1 |
commit: 006674e4b3910de7f0a448627c146821e8cb0ed8 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 17 15:06:10 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 17 15:06:51 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=006674e4 |
7 |
|
8 |
net-wireless/horst: Version 5.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.60, Repoman-2.3.12 |
11 |
|
12 |
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=661914 |
13 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
14 |
|
15 |
net-wireless/horst/Manifest | 1 + |
16 |
net-wireless/horst/files/horst-5.1-CC.patch | 14 +++++++ |
17 |
.../horst/files/horst-5.1-pcap_bufsize.patch | 32 ++++++++++++++++ |
18 |
net-wireless/horst/files/horst-5.1-tinfo.patch | 11 ++++++ |
19 |
net-wireless/horst/files/horst-9999-tinfo.patch | 11 ++++++ |
20 |
net-wireless/horst/horst-5.1.ebuild | 44 ++++++++++++++++++++++ |
21 |
net-wireless/horst/horst-9999.ebuild | 38 +++++++++++-------- |
22 |
7 files changed, 136 insertions(+), 15 deletions(-) |
23 |
|
24 |
diff --git a/net-wireless/horst/Manifest b/net-wireless/horst/Manifest |
25 |
index c19dc8b815c..d4ac613a275 100644 |
26 |
--- a/net-wireless/horst/Manifest |
27 |
+++ b/net-wireless/horst/Manifest |
28 |
@@ -1,2 +1,3 @@ |
29 |
DIST horst-4.2.tar.gz 97976 BLAKE2B 9f59e2dd6f67b50d0d6c67ff269f327e073edbfa87db5d3d63621116123cdcda3d85759e47bcd26344f750f87b0516589aff140542f2ef36cd12dddd048be60f SHA512 a6fa50d6eb0d2c2ae83dfccf59359f8cd74334dbc2362f01f1a3787ebb3d34bcdb76c34899cb048e4a4abc7353d72e8dd846b567ba228f9930e3f418b3656c0a |
30 |
DIST horst-5.0.tar.gz 115572 BLAKE2B a7702fe05a706f3f9cfd0545850451e1035840503c1fdf9377594d883095e41acaf89dca4ef9433f3a0109491932612e657dce8054a9f28c2bd725d230588bb1 SHA512 d2df54fade3d62b91482fb16e34f9b03567285880eceb5baea3f76b46caf1763909f3999b2924e210eb0ab0d9fd9f6444f31d2b06ea1a3b73a9f54e257cfd989 |
31 |
+DIST horst-5.1.tar.gz 117392 BLAKE2B 4e21a1cb4d508c8ed6e63fe975a30299452c706aec1a83125acabc547ab8718bbae66d546d973bc10af1f0b6c885a20193c584312c30f5ecaef9d86156c0b12b SHA512 d2889a8c42c31bea72d4e0efd7141ca56c96953b37d2476793ef52d019720059eb57e48b72fa5d720e0c5518a9b0b8dee1a105828d581655c0fbf4dfb29698c4 |
32 |
|
33 |
diff --git a/net-wireless/horst/files/horst-5.1-CC.patch b/net-wireless/horst/files/horst-5.1-CC.patch |
34 |
new file mode 100644 |
35 |
index 00000000000..f9c2e5120ac |
36 |
--- /dev/null |
37 |
+++ b/net-wireless/horst/files/horst-5.1-CC.patch |
38 |
@@ -0,0 +1,14 @@ |
39 |
+--- a/Makefile |
40 |
++++ b/Makefile |
41 |
+@@ -99,9 +99,9 @@ |
42 |
+ all: $(NAME) |
43 |
+ |
44 |
+ .objdeps.mk: $(OBJS:%.o=%.c) |
45 |
+- gcc -MM -I. $^ >$@ |
46 |
++ $(CC) -MM -I. $^ >$@ |
47 |
+ ifeq ($(OSX),1) |
48 |
+- gcc -MM -I. ifctrl-osx.m >>$@ |
49 |
++ $(CC) -MM -I. ifctrl-osx.m >>$@ |
50 |
+ endif |
51 |
+ |
52 |
+ -include .objdeps.mk |
53 |
|
54 |
diff --git a/net-wireless/horst/files/horst-5.1-pcap_bufsize.patch b/net-wireless/horst/files/horst-5.1-pcap_bufsize.patch |
55 |
new file mode 100644 |
56 |
index 00000000000..35f3f59dd98 |
57 |
--- /dev/null |
58 |
+++ b/net-wireless/horst/files/horst-5.1-pcap_bufsize.patch |
59 |
@@ -0,0 +1,32 @@ |
60 |
+--- a/capture-pcap.c |
61 |
++++ b/capture-pcap.c |
62 |
+@@ -32,16 +32,16 @@ |
63 |
+ #define PCAP_TIMEOUT 200 |
64 |
+ |
65 |
+ static unsigned char* pcap_buffer; |
66 |
+-static size_t pcap_bufsize; |
67 |
++static size_t horst_pcap_bufsize; |
68 |
+ static pcap_t *pcap_fp = NULL; |
69 |
+ |
70 |
+ static void handler(u_char *user, const struct pcap_pkthdr *h, const u_char *bytes) |
71 |
+ { |
72 |
+ *((int *)user) = h->len; |
73 |
+- if (pcap_bufsize < h->len) { |
74 |
++ if (horst_pcap_bufsize < h->len) { |
75 |
+ printlog("ERROR: Buffer(%d) too small for %d bytes", |
76 |
+- (int)pcap_bufsize, h->len); |
77 |
+- *((int *)user) = pcap_bufsize; |
78 |
++ (int)horst_pcap_bufsize, h->len); |
79 |
++ *((int *)user) = horst_pcap_bufsize; |
80 |
+ } |
81 |
+ memmove(pcap_buffer, bytes, *((int *)user)); |
82 |
+ } |
83 |
+@@ -98,7 +98,7 @@ |
84 |
+ { |
85 |
+ int ret = 0; |
86 |
+ pcap_buffer = buffer; |
87 |
+- pcap_bufsize = bufsize; |
88 |
++ horst_pcap_bufsize = bufsize; |
89 |
+ if (0 == pcap_dispatch(pcap_fp, 1, handler, (u_char *)&ret)) |
90 |
+ return -1; |
91 |
+ return ret; |
92 |
|
93 |
diff --git a/net-wireless/horst/files/horst-5.1-tinfo.patch b/net-wireless/horst/files/horst-5.1-tinfo.patch |
94 |
new file mode 100644 |
95 |
index 00000000000..059158e58cf |
96 |
--- /dev/null |
97 |
+++ b/net-wireless/horst/files/horst-5.1-tinfo.patch |
98 |
@@ -0,0 +1,11 @@ |
99 |
+--- a/Makefile |
100 |
++++ b/Makefile |
101 |
+@@ -54,7 +54,7 @@ |
102 |
+ radiotap/radiotap.o \ |
103 |
+ util.o \ |
104 |
+ wlan_util.o |
105 |
+-LIBS=-lncurses -lm |
106 |
++LIBS=$(shell $(PKG_CONFIG) --libs ncurses ) -lm |
107 |
+ CFLAGS+=-std=gnu99 -Wall -Wextra -g -I. -DVERSION=\"$(VERSION)\" |
108 |
+ |
109 |
+ ifeq ($(OSX),1) |
110 |
|
111 |
diff --git a/net-wireless/horst/files/horst-9999-tinfo.patch b/net-wireless/horst/files/horst-9999-tinfo.patch |
112 |
new file mode 100644 |
113 |
index 00000000000..eb623d67b13 |
114 |
--- /dev/null |
115 |
+++ b/net-wireless/horst/files/horst-9999-tinfo.patch |
116 |
@@ -0,0 +1,11 @@ |
117 |
+--- a/Makefile |
118 |
++++ b/Makefile |
119 |
+@@ -41,7 +41,7 @@ |
120 |
+ SRC += network.c |
121 |
+ SRC += protocol_parser.c |
122 |
+ |
123 |
+-LIBS = -lncurses -lm -luwifi |
124 |
++LIBS = $(shell $(PKG_CONFIG) --libs ncurses ) -lm -luwifi |
125 |
+ LDFLAGS += -Wl,-rpath,/usr/local/lib |
126 |
+ |
127 |
+ INCLUDES = -I. |
128 |
|
129 |
diff --git a/net-wireless/horst/horst-5.1.ebuild b/net-wireless/horst/horst-5.1.ebuild |
130 |
new file mode 100644 |
131 |
index 00000000000..1e0f7e8997d |
132 |
--- /dev/null |
133 |
+++ b/net-wireless/horst/horst-5.1.ebuild |
134 |
@@ -0,0 +1,44 @@ |
135 |
+# Copyright 1999-2019 Gentoo Authors |
136 |
+# Distributed under the terms of the GNU General Public License v2 |
137 |
+ |
138 |
+EAPI=6 |
139 |
+inherit toolchain-funcs vcs-snapshot |
140 |
+ |
141 |
+DESCRIPTION="Small 802.11 wireless LAN analyzer" |
142 |
+HOMEPAGE="http://br1.einfach.org/tech/horst/" |
143 |
+SRC_URI="https://github.com/br101/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
144 |
+ |
145 |
+LICENSE="GPL-2" |
146 |
+SLOT="0" |
147 |
+KEYWORDS="~amd64 ~x86" |
148 |
+IUSE="debug +pcap test" |
149 |
+ |
150 |
+RDEPEND=" |
151 |
+ sys-libs/ncurses:0 |
152 |
+ pcap? ( net-libs/libpcap ) |
153 |
+" |
154 |
+TDEPEND=" |
155 |
+ test? ( sys-devel/sparse ) |
156 |
+" |
157 |
+DEPEND=" |
158 |
+ ${RDEPEND} |
159 |
+ ${TDEPEND} |
160 |
+ virtual/pkgconfig |
161 |
+" |
162 |
+RESTRICT=test #just semantic tests, no functional tests |
163 |
+PATCHES=( |
164 |
+ "${FILESDIR}"/${PN}-5.1-CC.patch |
165 |
+ "${FILESDIR}"/${PN}-5.1-pcap_bufsize.patch |
166 |
+ "${FILESDIR}"/${PN}-5.1-tinfo.patch |
167 |
+) |
168 |
+ |
169 |
+src_compile() { |
170 |
+ tc-export CC PKG_CONFIG |
171 |
+ emake PCAP=$(usex pcap 1 0) DEBUG=$(usex debug 1 0) |
172 |
+} |
173 |
+ |
174 |
+src_install() { |
175 |
+ dosbin ${PN}{,.sh} |
176 |
+ dodoc README.md |
177 |
+ doman ${PN}.8 |
178 |
+} |
179 |
|
180 |
diff --git a/net-wireless/horst/horst-9999.ebuild b/net-wireless/horst/horst-9999.ebuild |
181 |
index 7f4bb0baf2b..3e8968e69d1 100644 |
182 |
--- a/net-wireless/horst/horst-9999.ebuild |
183 |
+++ b/net-wireless/horst/horst-9999.ebuild |
184 |
@@ -1,36 +1,44 @@ |
185 |
-# Copyright 1999-2017 Gentoo Foundation |
186 |
+# Copyright 1999-2019 Gentoo Authors |
187 |
# Distributed under the terms of the GNU General Public License v2 |
188 |
|
189 |
-EAPI=5 |
190 |
- |
191 |
-inherit toolchain-funcs git-r3 |
192 |
+EAPI=6 |
193 |
+inherit git-r3 toolchain-funcs |
194 |
|
195 |
DESCRIPTION="Small 802.11 wireless LAN analyzer" |
196 |
-HOMEPAGE="https://github.com/br101/horst" |
197 |
-EGIT_REPO_URI="https://github.com/br101/${PN}" |
198 |
+HOMEPAGE="http://br1.einfach.org/tech/horst/" |
199 |
+EGIT_REPO_URI="https://github.com/br101/${PN}/" |
200 |
|
201 |
LICENSE="GPL-2" |
202 |
SLOT="0" |
203 |
KEYWORDS="" |
204 |
IUSE="debug +pcap test" |
205 |
|
206 |
-RDEPEND="sys-libs/ncurses:0 |
207 |
- pcap? ( net-libs/libpcap )" |
208 |
-DEPEND="${RDEPEND} |
209 |
- test? ( sys-devel/sparse )" |
210 |
- |
211 |
-#just semantic tests, no functional tests |
212 |
-RESTRICT=test |
213 |
+RDEPEND=" |
214 |
+ sys-libs/ncurses:0 |
215 |
+ pcap? ( net-libs/libpcap ) |
216 |
+" |
217 |
+TDEPEND=" |
218 |
+ test? ( sys-devel/sparse ) |
219 |
+" |
220 |
+DEPEND=" |
221 |
+ ${RDEPEND} |
222 |
+ ${TDEPEND} |
223 |
+ virtual/pkgconfig |
224 |
+" |
225 |
+RESTRICT=test #just semantic tests, no functional tests |
226 |
+PATCHES=( |
227 |
+ "${FILESDIR}"/${PN}-9999-tinfo.patch |
228 |
+) |
229 |
|
230 |
src_compile() { |
231 |
- tc-export CC |
232 |
+ tc-export CC PKG_CONFIG |
233 |
emake PCAP=$(usex pcap 1 0) DEBUG=$(usex debug 1 0) |
234 |
} |
235 |
|
236 |
src_install() { |
237 |
dosbin ${PN}{,.sh} |
238 |
dodoc README.md |
239 |
- doman ${PN}.8 ${PN}.conf.5 |
240 |
+ doman ${PN}.8 |
241 |
insinto /etc |
242 |
doins ${PN}.conf |
243 |
} |