summaryrefslogtreecommitdiff
path: root/net-analyzer/amap
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-07-13 11:37:11 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-07-13 11:50:06 -0400
commit95a3f26f7b3f176527803b398f21fc2d097c6ab7 (patch)
tree82c97a7da35b156d03f76891345b1ed8541eaa79 /net-analyzer/amap
parent51ef84f85e8923669fcf90be67a9ee6f7af66dc6 (diff)
downloadgentoo-95a3f26f7b3f176527803b398f21fc2d097c6ab7.tar.gz
gentoo-95a3f26f7b3f176527803b398f21fc2d097c6ab7.tar.xz
net-analyzer/amap: add libressl support
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-analyzer/amap')
-rw-r--r--net-analyzer/amap/amap-5.4-r1.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/net-analyzer/amap/amap-5.4-r1.ebuild b/net-analyzer/amap/amap-5.4-r1.ebuild
new file mode 100644
index 00000000000..5042c179c45
--- /dev/null
+++ b/net-analyzer/amap/amap-5.4-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A network scanning tool for pentesters"
+HOMEPAGE="https://www.thc.org/thc-amap/"
+SRC_URI="https://www.thc.org/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="libressl ssl"
+
+DEPEND="
+ dev-libs/libpcre
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+RDEPEND="
+ ${DEPEND}
+ !sci-biology/amap
+"
+
+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
+}
+
+src_configure() {
+ # non-autotools configure script
+ ./configure || die
+ sed -i \
+ -e '/^XDEFINES=/s:=.*:=:' \
+ -e '/^XLIBS=/s:=.*:=:' \
+ -e '/^XLIBPATHS/s:=.*:=:' \
+ -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
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) OPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin amap amapcrap
+ insinto /usr/share/amap
+ doins appdefs.*
+
+ doman ${PN}.1
+ dodoc README TODO CHANGES
+}