1 |
commit: 2eaa80cf1221b95ca3734e47b470db53424e2721 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 31 14:43:46 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 31 14:44:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2eaa80cf |
7 |
|
8 |
net-wireless/airtraf: Fix CFLAGS=-fno-common |
9 |
|
10 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
11 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=706908 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
net-wireless/airtraf/airtraf-1.1-r4.ebuild | 54 ++++++++++++++++++++++ |
15 |
.../airtraf/files/airtraf-1.1-fno-common.patch | 21 +++++++++ |
16 |
2 files changed, 75 insertions(+) |
17 |
|
18 |
diff --git a/net-wireless/airtraf/airtraf-1.1-r4.ebuild b/net-wireless/airtraf/airtraf-1.1-r4.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..c0d5978fdf8 |
21 |
--- /dev/null |
22 |
+++ b/net-wireless/airtraf/airtraf-1.1-r4.ebuild |
23 |
@@ -0,0 +1,54 @@ |
24 |
+# Copyright 1999-2020 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+inherit toolchain-funcs |
29 |
+ |
30 |
+DESCRIPTION="AirTraf 802.11b Wireless traffic sniffer" |
31 |
+LICENSE="GPL-2" |
32 |
+HOMEPAGE="http://www.elixar.com/" |
33 |
+SRC_URI="http://www.elixar.com/${P}.tar.gz" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~ppc ~x86" |
36 |
+ |
37 |
+RDEPEND=" |
38 |
+ net-libs/libpcap |
39 |
+ sys-libs/ncurses:= |
40 |
+" |
41 |
+DEPEND=" |
42 |
+ ${RDEPEND} |
43 |
+ virtual/pkgconfig |
44 |
+" |
45 |
+PATCHES=( |
46 |
+ "${FILESDIR}"/${P}-sniffd.patch |
47 |
+ "${FILESDIR}"/${P}-off-by-one.patch |
48 |
+ "${FILESDIR}"/${P}-fprintf-format.patch |
49 |
+ "${FILESDIR}"/${P}-fno-common.patch |
50 |
+) |
51 |
+ |
52 |
+src_prepare() { |
53 |
+ default |
54 |
+ |
55 |
+ sed -i \ |
56 |
+ -e '/^LIBS/s|=.*|= $(shell $(PKG_CONFIG) --libs panel)|' \ |
57 |
+ src/libncurses/Makefile || die |
58 |
+ sed -i \ |
59 |
+ -e 's|-lpanel -lncurses|$(shell $(PKG_CONFIG) --libs ncurses panel)|' \ |
60 |
+ src/sniffd/Makefile || die |
61 |
+ tc-export PKG_CONFIG |
62 |
+} |
63 |
+ |
64 |
+src_compile() { |
65 |
+ # parallel make (bug #297331) |
66 |
+ emake -C src -j1 \ |
67 |
+ CC=$(tc-getCC) \ |
68 |
+ CXX=$(tc-getCXX) \ |
69 |
+ CFLAGS="${CFLAGS}" \ |
70 |
+ CXXFLAGS="${CXXFLAGS}" \ |
71 |
+ LDFLAGS="${LDFLAGS}" |
72 |
+} |
73 |
+ |
74 |
+src_install () { |
75 |
+ dobin src/airtraf |
76 |
+ dodoc Authors COMPATIBILITY docs/airtraf_doc.html |
77 |
+} |
78 |
|
79 |
diff --git a/net-wireless/airtraf/files/airtraf-1.1-fno-common.patch b/net-wireless/airtraf/files/airtraf-1.1-fno-common.patch |
80 |
new file mode 100644 |
81 |
index 00000000000..9945f170d53 |
82 |
--- /dev/null |
83 |
+++ b/net-wireless/airtraf/files/airtraf-1.1-fno-common.patch |
84 |
@@ -0,0 +1,21 @@ |
85 |
+--- a/src/sniffd/capture_engine.c |
86 |
++++ b/src/sniffd/capture_engine.c |
87 |
+@@ -52,7 +52,6 @@ |
88 |
+ FILE * capture_stream; |
89 |
+ FILE * error_stream; |
90 |
+ |
91 |
+-char atime[TIME_TARGET_MAX]; |
92 |
+ |
93 |
+ |
94 |
+ //////////////////////////////////////////////////////////////////////// |
95 |
+--- a/src/libcommon/logger.h |
96 |
++++ b/src/libcommon/logger.h |
97 |
+@@ -33,6 +33,8 @@ |
98 |
+ #ifndef __logger_h__ |
99 |
+ #define __logger_h__ |
100 |
+ |
101 |
++extern char atime[TIME_TARGET_MAX]; |
102 |
++ |
103 |
+ int init_log(int, char*); |
104 |
+ int write_log(int, char*); |
105 |
+ void flush_log(int); |