Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/amap/
Date: Wed, 13 Jul 2016 15:46:47
Message-Id: 1468425006.95a3f26f7b3f176527803b398f21fc2d097c6ab7.blueness@gentoo
1 commit: 95a3f26f7b3f176527803b398f21fc2d097c6ab7
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 13 15:37:11 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 13 15:50:06 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95a3f26f
7
8 net-analyzer/amap: add libressl support
9
10 Package-Manager: portage-2.2.28
11
12 net-analyzer/amap/amap-5.4-r1.ebuild | 76 ++++++++++++++++++++++++++++++++++++
13 1 file changed, 76 insertions(+)
14
15 diff --git a/net-analyzer/amap/amap-5.4-r1.ebuild b/net-analyzer/amap/amap-5.4-r1.ebuild
16 new file mode 100644
17 index 0000000..5042c17
18 --- /dev/null
19 +++ b/net-analyzer/amap/amap-5.4-r1.ebuild
20 @@ -0,0 +1,76 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +inherit eutils toolchain-funcs
28 +
29 +DESCRIPTION="A network scanning tool for pentesters"
30 +HOMEPAGE="https://www.thc.org/thc-amap/"
31 +SRC_URI="https://www.thc.org/releases/${P}.tar.gz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
36 +IUSE="libressl ssl"
37 +
38 +DEPEND="
39 + dev-libs/libpcre
40 + ssl? (
41 + !libressl? ( dev-libs/openssl:0= )
42 + libressl? ( dev-libs/libressl:0= )
43 + )
44 +"
45 +RDEPEND="
46 + ${DEPEND}
47 + !sci-biology/amap
48 +"
49 +
50 +src_prepare() {
51 + rm -r pcre-3.9 || die
52 + sed -i -e "s:etc/:share/amap/:g" amap-lib.c || die
53 + # Above change requires below change. See sources...
54 + sed -i '/strlen(AMAP_PREFIX/s: 5 : 12 :' amap-lib.c || die
55 + sed -i 's:/usr/local:/usr:' amap.h || die
56 + # Files to be updated are at different location, bug 207839.
57 + sed -i '/AMAP_RESOURCE/s:www:freeworld:' amap.h || die
58 +
59 + sed -i '/DATADIR/s:/etc:/share/amap:' Makefile.am || die
60 +
61 + epatch "${FILESDIR}"/4.8-system-pcre.patch
62 +}
63 +
64 +src_configure() {
65 + # non-autotools configure script
66 + ./configure || die
67 + sed -i \
68 + -e '/^XDEFINES=/s:=.*:=:' \
69 + -e '/^XLIBS=/s:=.*:=:' \
70 + -e '/^XLIBPATHS/s:=.*:=:' \
71 + -e '/^XIPATHS=/s:=.*:=:' \
72 + -e "/^CC=/d" \
73 + Makefile || die
74 + if use ssl ; then
75 + sed -i \
76 + -e '/^XDEFINES=/s:=:=-DOPENSSL:' \
77 + -e '/^XLIBS=/s:=:=-lcrypto -lssl:' \
78 + Makefile || die
79 + fi
80 + sed -i Makefile \
81 + -e '/-o amap/{s|(OPT) |(OPT) $(LDFLAGS) |g}' \
82 + || die
83 +}
84 +
85 +src_compile() {
86 + emake CC=$(tc-getCC) OPT="${CFLAGS}"
87 +}
88 +
89 +src_install() {
90 + dobin amap amapcrap
91 + insinto /usr/share/amap
92 + doins appdefs.*
93 +
94 + doman ${PN}.1
95 + dodoc README TODO CHANGES
96 +}