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/nast/files/, net-analyzer/nast/
Date: Wed, 31 Jan 2018 10:13:53
Message-Id: 1517393624.a296a6e0fb0afca044415ecea3ad172b4726629e.jer@gentoo
1 commit: a296a6e0fb0afca044415ecea3ad172b4726629e
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 31 10:11:40 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 31 10:13:44 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a296a6e0
7
8 net-analyzer/nast: Remove file checks from configure (bug #646196 by Jan Psota).
9
10 Package-Manager: Portage-2.3.20, Repoman-2.3.6
11
12 net-analyzer/nast/files/nast-0.2.0-gentoo.patch | 133 ++++++++++++++----------
13 net-analyzer/nast/nast-0.2.0-r2.ebuild | 41 ++++++++
14 2 files changed, 120 insertions(+), 54 deletions(-)
15
16 diff --git a/net-analyzer/nast/files/nast-0.2.0-gentoo.patch b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch
17 index f8f05ab3a16..015354e5186 100644
18 --- a/net-analyzer/nast/files/nast-0.2.0-gentoo.patch
19 +++ b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch
20 @@ -1,79 +1,104 @@
21 --- a/configure.ac
22 +++ b/configure.ac
23 -@@ -84,14 +84,14 @@
24 +@@ -83,22 +83,6 @@
25 + # -- libnet --
26 #
27
28 - filechk="yes"
29 +-filechk="yes"
30 -AC_CHECK_FILE(/usr/lib/libnet.a,, filechk="no")
31 -+AC_CHECK_FILE(/usr/lib/libnet.so,, filechk="no")
32 - if test "$filechk" = "no"; then
33 +-if test "$filechk" = "no"; then
34 - AC_CHECK_FILE(/usr/local/lib/libnet.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
35 -+ AC_CHECK_FILE(/usr/local/lib/libnet.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
36 - fi
37 -
38 - if test "$filechk" = "no"; then AC_MSG_ERROR([
39 -
40 +-fi
41 +-
42 +-if test "$filechk" = "no"; then AC_MSG_ERROR([
43 +-
44 -Libnet archive file (libnet.a) not found in /usr or /usr/local!
45 -+Libnet archive file (libnet.so) not found in /usr or /usr/local!
46 -
47 - Libnet-1.1.x Packet Shaping Library is required.
48 - You can download it from official web site: http://www.packetfactory.net/libnet
49 -@@ -111,14 +111,14 @@
50 +-
51 +-Libnet-1.1.x Packet Shaping Library is required.
52 +-You can download it from official web site: http://www.packetfactory.net/libnet
53 +-
54 +-])
55 +-fi
56 +-
57 + AC_CHECK_LIB(net, libnet_name2addr4,, AC_MSG_ERROR([
58 +
59 + Libnet-1.1.x Packet Shaping Library not found! It's required.
60 +@@ -110,22 +94,6 @@
61 + # -- libpcap --
62 #
63
64 - filechk="yes"
65 +-filechk="yes"
66 -AC_CHECK_FILE(/usr/lib/libpcap.a,, filechk="no")
67 -+AC_CHECK_FILE(/usr/lib/libpcap.so,, filechk="no")
68 - if test "$filechk" = "no"; then
69 +-if test "$filechk" = "no"; then
70 - AC_CHECK_FILE(/usr/local/lib/libpcap.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
71 -+ AC_CHECK_FILE(/usr/local/lib/libpcap.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
72 - fi
73 -
74 - if test "$filechk" = "no"; then AC_MSG_ERROR([
75 -
76 +-fi
77 +-
78 +-if test "$filechk" = "no"; then AC_MSG_ERROR([
79 +-
80 -Libpcap archive file (libpcap.a) not found in /usr or /usr/local!
81 -+Libpcap archive file (libpcap.so) not found in /usr or /usr/local!
82 -
83 - Libpcap-0.7.1 Packet Capture Library is required.
84 - You can download it from official web site: http://www.tcpdump.org/#current
85 -@@ -137,16 +137,18 @@
86 +-
87 +-Libpcap-0.7.1 Packet Capture Library is required.
88 +-You can download it from official web site: http://www.tcpdump.org/#current
89 +-
90 +-])
91 +-fi
92 +-
93 + AC_CHECK_LIB(pcap, pcap_dispatch,, AC_MSG_ERROR([
94 +
95 + Libpcap-0.7.1 Packet Capture Library not found! It's required.
96 +@@ -137,25 +105,7 @@
97 # -- libncurses support --
98 #
99
100 -+PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],)
101 -+
102 - filechk="yes"
103 +-filechk="yes"
104 -AC_CHECK_FILE(/usr/lib/libncurses.a,, filechk="no")
105 -+AC_CHECK_FILE(/usr/lib/libncurses.so,, filechk="no")
106 - if test "$filechk" = "no"; then
107 +-if test "$filechk" = "no"; then
108 - AC_CHECK_FILE(/usr/local/lib/libncurses.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
109 -+ AC_CHECK_FILE(/usr/local/lib/libncurses.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
110 - fi
111 -
112 - if test "$filechk" = "no";
113 - then AC_MSG_WARN([
114 -
115 +-fi
116 +-
117 +-if test "$filechk" = "no";
118 +-then AC_MSG_WARN([
119 +-
120 -Libncurses archive file (libncurses.a) not found in /usr or /usr/local!
121 -+Libncurses archive file (libncurses.so) not found in /usr or /usr/local!
122 +-
123 +-Ncurses library (*) not found in your system.
124 +-You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
125 +-(*): CRT screen handling and optimization package
126 +-
127 +-Building without ncurses menu support (-G flag will doesn't work)
128 +-
129 +-])
130 +-fi
131 ++PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],)
132
133 - Ncurses library (*) not found in your system.
134 - You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
135 -@@ -174,15 +176,15 @@
136 + ENABLE_NCRS="no"
137 + AC_CHECK_LIB(ncurses, initscr, ENABLE_NCRS="yes"; NCURSES=ncurses/n_nast.o; LIBS="-lncurses $LIBS"; AC_DEFINE(HAVE_LIBNCURSES), AC_MSG_RESULT([
138 +@@ -173,28 +123,6 @@
139 + # --lmenu support--
140 #
141
142 - filechk="yes"
143 +-filechk="yes"
144 -AC_CHECK_FILE(/usr/lib/libmenu.a,, filechk="no")
145 -+AC_CHECK_FILE(/usr/lib/libmenu.so,, filechk="no")
146 - if test "$filechk" = "no"; then
147 +-if test "$filechk" = "no"; then
148 - AC_CHECK_FILE(/usr/local/lib/libmenu.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
149 -+ AC_CHECK_FILE(/usr/local/lib/libmenu.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
150 - fi
151 -
152 - if test "$filechk" = "no";
153 - then AC_MSG_WARN([
154 -
155 +-fi
156 +-
157 +-if test "$filechk" = "no";
158 +-then AC_MSG_WARN([
159 +-
160 -Menu archive file (libncurses.a) not found in /usr or /usr/local!
161 -+Menu archive file (libncurses.so) not found in /usr or /usr/local!
162 -
163 +-
164 +-
165 +-Menu library (*) not found in your system.
166 +-You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
167 +-(*): CRT screen handling and optimization package
168 +-
169 +-
170 +-Building without ncurses menu support (-G flag will doesn't work)
171 +-])
172 +-
173 +-fi
174 +-
175 + ENABLE_NCRS="no"
176 + AC_CHECK_LIB(menu, menu_opts_off, ENABLE_NCRS="yes"; MENU=ncurses/n_menu.o; LIBS="-lmenu $LIBS"; AC_DEFINE(HAVE_LIBMENU), AC_MSG_RESULT([
177
178 - Menu library (*) not found in your system.
179
180 diff --git a/net-analyzer/nast/nast-0.2.0-r2.ebuild b/net-analyzer/nast/nast-0.2.0-r2.ebuild
181 new file mode 100644
182 index 00000000000..a922979f560
183 --- /dev/null
184 +++ b/net-analyzer/nast/nast-0.2.0-r2.ebuild
185 @@ -0,0 +1,41 @@
186 +# Copyright 1999-2018 Gentoo Foundation
187 +# Distributed under the terms of the GNU General Public License v2
188 +
189 +EAPI=6
190 +inherit autotools
191 +
192 +DESCRIPTION="NAST - Network Analyzer Sniffer Tool"
193 +HOMEPAGE="https://sourceforge.net/projects/nast.berlios/"
194 +SRC_URI="mirror://sourceforge/${PN}.berlios/${P}.tar.gz"
195 +LICENSE="GPL-2"
196 +SLOT="0"
197 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
198 +IUSE="ncurses"
199 +
200 +RDEPEND="
201 + >=net-libs/libnet-1.1.1
202 + net-libs/libpcap
203 + ncurses? ( >=sys-libs/ncurses-5.4 )
204 +"
205 +DEPEND="
206 + ${RDEPEND}
207 + virtual/pkgconfig
208 +"
209 +PATCHES=(
210 + "${FILESDIR}"/${P}-gentoo.patch
211 +)
212 +
213 +src_prepare() {
214 + default
215 + eautoreconf
216 +}
217 +
218 +src_compile() {
219 + emake CFLAGS="${CFLAGS}"
220 +}
221 +
222 +src_install() {
223 + dosbin nast
224 + doman nast.8
225 + dodoc AUTHORS BUGS CREDITS ChangeLog NCURSES_README README TODO
226 +}