dev-util/biew: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Tue, 18 Feb 2020 19:11:31 +0000 (20:11 +0100)
committerDavid Seifert <soap@gentoo.org>
Tue, 18 Feb 2020 19:11:31 +0000 (20:11 +0100)
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
dev-util/biew/biew-6.1.0-r3.ebuild

index d35ab26a9595b75974f0de4e03742e46b399daf5..9c225d4a5e5420501a0b601b09c9ec27369ae683 100644 (file)
@@ -1,15 +1,15 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
-inherit eutils flag-o-matic toolchain-funcs versionator
+EAPI=7
 
-MY_P=${PN}-$(replace_all_version_separators "")
+inherit flag-o-matic toolchain-funcs
+
+MY_P=${PN}-$(ver_rs 1- "")
 
 DESCRIPTION="A portable viewer of binary files, hexadecimal and disassembler modes"
 HOMEPAGE="http://beye.sourceforge.net/"
 SRC_URI="mirror://sourceforge/beye/${PV}/${MY_P}-src.tar.bz2"
-S=${WORKDIR}/${MY_P}
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -20,30 +20,31 @@ REQUIRED_USE="cpu_flags_x86_mmx cpu_flags_x86_sse"
 RDEPEND="gpm? ( sys-libs/gpm )"
 DEPEND="${RDEPEND}"
 
-pkg_setup() {
-       append-flags -mmmx -msse #362043
-}
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-610-fix_localedep-1.patch
+       "${FILESDIR}"/${PN}-610-portable_configure-1.patch
+       "${FILESDIR}"/${PN}-610-crash.patch
+)
 
 src_prepare() {
-       epatch "${FILESDIR}/${PN}-610-fix_localedep-1.patch"
-       epatch "${FILESDIR}/${PN}-610-portable_configure-1.patch"
-       epatch "${FILESDIR}/${PN}-610-crash.patch"
-       sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile || die "Failed to edit makefile."
+       default
+       sed -i -e 's^man/man1/biew.1^share/man/man1/biew.1^' makefile || die
 }
 
 src_configure() {
-       if use gpm; then
-               append-cppflags -DHAVE_MOUSE
-       else
-               append-cppflags -UHAVE_MOUSE
-       fi
-       ./configure --datadir=/usr/share/${PN} \
-               --prefix=/usr \
+       append-flags -mmmx -msse #362043
+       append-cppflags $(usex gpm -DHAVE_MOUSE -UHAVE_MOUSE)
+
+       ./configure \
+               --datadir="${EPREFIX}"/usr/share/${PN} \
+               --prefix="${EPREFIX}"/usr \
                --cc="$(tc-getCC)" \
                --ld="$(tc-getCC)" \
                --ar="$(tc-getAR) -rcu" \
                --as="$(tc-getAS)" \
-               --ranlib="$(tc-getRANLIB)" || die "configure failed."
+               --ranlib="$(tc-getRANLIB)" || die "configure failed"
 }
 
 src_compile() {
@@ -51,7 +52,7 @@ src_compile() {
 }
 
 src_install() {
-       emake DESTDIR="${D}" install
+       default
        dodoc doc/{biew_en,release,unix}.txt
 }