Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/yersinia/files/, net-analyzer/yersinia/
Date: Tue, 28 Jan 2020 15:38:39
Message-Id: 1580225905.d4645a4940923b40d8785e4ea7e6d774f81b0785.jer@gentoo
1 commit: d4645a4940923b40d8785e4ea7e6d774f81b0785
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 28 15:37:51 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 28 15:38:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4645a49
7
8 net-analyzer/yersinia: Add live ebuild
9
10 Package-Manager: Portage-2.3.85, Repoman-2.3.20
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 .../yersinia/files/yersinia-9999-tinfo.patch | 27 ++++++++++
14 net-analyzer/yersinia/yersinia-9999.ebuild | 59 ++++++++++++++++++++++
15 2 files changed, 86 insertions(+)
16
17 diff --git a/net-analyzer/yersinia/files/yersinia-9999-tinfo.patch b/net-analyzer/yersinia/files/yersinia-9999-tinfo.patch
18 new file mode 100644
19 index 00000000000..b5bf566c107
20 --- /dev/null
21 +++ b/net-analyzer/yersinia/files/yersinia-9999-tinfo.patch
22 @@ -0,0 +1,27 @@
23 +--- a/configure.ac
24 ++++ b/configure.ac
25 +@@ -467,6 +467,7 @@
26 + AC_DEFINE(HAVE_REMOTE_ADMIN)
27 + fi
28 +
29 ++PKG_CHECK_MODULES(ncurses,ncurses)
30 +
31 + dnl Curses detection: Munged from Midnight Commander's configure.in
32 + dnl
33 +@@ -616,6 +617,16 @@
34 + AC_DEFINE(USE_NCURSES)
35 + AC_DEFINE(HAS_CURSES)
36 + has_curses=true
37 ++ else
38 ++ if test "$ncurses_LIBS" ; then
39 ++ CURSES_LIBS="$ncurses_LIBS"
40 ++ CURSES_INCLUDEDIR="$ncurses_CFLAGS"
41 ++ search_ncurses=false
42 ++ screen_manager="ncurses"
43 ++ AC_DEFINE(USE_NCURSES)
44 ++ AC_DEFINE(HAS_CURSES)
45 ++ has_curses=true
46 ++ fi
47 + fi
48 + )
49 +
50
51 diff --git a/net-analyzer/yersinia/yersinia-9999.ebuild b/net-analyzer/yersinia/yersinia-9999.ebuild
52 new file mode 100644
53 index 00000000000..f2825d6f6f1
54 --- /dev/null
55 +++ b/net-analyzer/yersinia/yersinia-9999.ebuild
56 @@ -0,0 +1,59 @@
57 +# Copyright 1999-2020 Gentoo Authors
58 +# Distributed under the terms of the GNU General Public License v2
59 +
60 +EAPI=7
61 +inherit autotools flag-o-matic git-r3
62 +
63 +DESCRIPTION="A framework for layer 2 attacks"
64 +HOMEPAGE="https://github.com/tomac/yersinia"
65 +EGIT_REPO_URI="https://github.com/tomac/yersinia"
66 +
67 +LICENSE="GPL-2"
68 +SLOT="0"
69 +KEYWORDS=""
70 +IUSE="gtk ncurses"
71 +
72 +RDEPEND="
73 + ncurses? ( >=sys-libs/ncurses-5.5:= )
74 + gtk? (
75 + dev-libs/glib:2
76 + x11-libs/gdk-pixbuf
77 + =x11-libs/gtk+-2*
78 + )
79 + >=net-libs/libnet-1.1.2
80 + >=net-libs/libpcap-0.9.4
81 +"
82 +DEPEND="
83 + virtual/pkgconfig
84 + ${RDEPEND}
85 +"
86 +DOCS=( AUTHORS ChangeLog FAQ README THANKS TODO )
87 +PATCHES=(
88 + "${FILESDIR}"/${PN}-0.7.1-no-ncurses.patch
89 + "${FILESDIR}"/${PN}-9999-tinfo.patch
90 +)
91 +
92 +src_prepare() {
93 + default
94 +
95 + if ! use gtk; then
96 + #bug #514802
97 + sed -i -e '/AM_GLIB_GNU_GETTEXT/d' configure.in || die
98 + fi
99 +
100 + eautoreconf
101 +}
102 +
103 +src_configure() {
104 + append-cflags -fcommon
105 +
106 + econf \
107 + --enable-admin \
108 + --with-pcap-includes=/usr/include \
109 + $(use_with ncurses) \
110 + $(use_enable gtk)
111 +}
112 +
113 +src_compile() {
114 + emake CFLAGS="${CFLAGS}"
115 +}