sci-chemistry/prekin: Port to EAPI 6
authorDavid Seifert <soap@gentoo.org>
Tue, 17 Apr 2018 09:48:46 +0000 (11:48 +0200)
committerDavid Seifert <soap@gentoo.org>
Tue, 17 Apr 2018 20:25:19 +0000 (22:25 +0200)
Package-Manager: Portage-2.3.29, Repoman-2.3.9

sci-chemistry/prekin/prekin-6.51.081122-r1.ebuild

index 8bea9cc5230155da6c542a39233947396da741ab..db0c34eca49b320131508632aba13f08dc632aaa 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="2"
+EAPI=6
 
-inherit toolchain-funcs eutils multilib
+inherit toolchain-funcs
 
 MY_P=${PN}.${PV}
 
@@ -16,37 +16,33 @@ SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
 IUSE="X"
 
-RDEPEND="x11-libs/libXext
+RDEPEND="
+       x11-libs/libXext
        x11-libs/libXmu
        x11-libs/libX11
        x11-libs/libXt
-       X? ( >=x11-libs/motif-2.3:0 )"
+       X? ( >=x11-libs/motif-2.3:0= )"
 DEPEND="${RDEPEND}"
 
 S=${WORKDIR}/${MY_P}
+PATCHES=(
+       "${FILESDIR}"/${PV}-Makefile.patch
+       "${FILESDIR}"/${PV}-overflow.patch
+)
 
-src_prepare() {
-       epatch \
-               "${FILESDIR}"/${PV}-Makefile.patch \
-               "${FILESDIR}"/${PV}-overflow.patch
-       sed  \
+src_configure() {
+       tc-export CC
+
+       sed \
                -e 's:cc:$(CC):g' \
                -e "s:GENTOOLIBDIR:$(get_libdir):g" \
-               "${S}"/Makefile.linux > Makefile || die
+               Makefile.linux > Makefile || die
 }
 
 src_compile() {
-       local mytarget
-
-       if use X; then
-               mytarget="${PN}"
-       else
-               mytarget="nogui"
-       fi
-
-       emake CC="$(tc-getCC)" ${mytarget} || die
+       emake $(usex X ${PN} nogui)
 }
 
 src_install() {
-       dobin "${S}"/prekin || die
+       dobin prekin
 }