commit:     5a2d0ee5d2468a1894098de973c8159d0f8bd59c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 15 20:13:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 15 20:13:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a2d0ee5

net-analyzer/amap: port to EAPI 7

Package-Manager: Portage-3.0.14-prefix, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/amap/amap-5.4-r1.ebuild | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/net-analyzer/amap/amap-5.4-r1.ebuild 
b/net-analyzer/amap/amap-5.4-r1.ebuild
index 9848a4c18f2..71868935cdb 100644
--- a/net-analyzer/amap/amap-5.4-r1.ebuild
+++ b/net-analyzer/amap/amap-5.4-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="A network scanning tool for pentesters"
 HOMEPAGE="https://www.thc.org/thc-amap/";
@@ -26,23 +26,31 @@ RDEPEND="
        !sci-biology/amap
 "
 
+PATCHES=(
+       "${FILESDIR}"/4.8-system-pcre.patch
+)
+
 src_prepare() {
        rm -r pcre-3.9 || die
+
        sed -i -e "s:etc/:share/amap/:g" amap-lib.c || die
+
        # Above change requires below change. See sources...
        sed -i '/strlen(AMAP_PREFIX/s: 5 : 12 :' amap-lib.c || die
        sed -i 's:/usr/local:/usr:' amap.h || die
+
        # Files to be updated are at different location, bug 207839.
        sed -i '/AMAP_RESOURCE/s:www:freeworld:' amap.h || die
 
        sed -i '/DATADIR/s:/etc:/share/amap:' Makefile.am || die
 
-       epatch "${FILESDIR}"/4.8-system-pcre.patch
+       default
 }
 
 src_configure() {
        # non-autotools configure script
        ./configure || die
+
        sed -i \
                -e '/^XDEFINES=/s:=.*:=:' \
                -e '/^XLIBS=/s:=.*:=:' \
@@ -50,12 +58,14 @@ src_configure() {
                -e '/^XIPATHS=/s:=.*:=:' \
                -e "/^CC=/d" \
                Makefile || die
+
        if use ssl ; then
                sed -i \
                        -e '/^XDEFINES=/s:=:=-DOPENSSL:' \
                        -e '/^XLIBS=/s:=:=-lcrypto -lssl:' \
                        Makefile || die
        fi
+
        sed -i Makefile \
                -e '/-o amap/{s|(OPT) |(OPT) $(LDFLAGS) |g}' \
                || die

Reply via email to