summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-01-31 15:43:46 +0100
committerJeroen Roovers <jer@gentoo.org>2020-01-31 15:44:08 +0100
commit2eaa80cf1221b95ca3734e47b470db53424e2721 (patch)
treebb560c5017e374a0e207aad8de24dd22a32dbd3d /net-wireless/airtraf
parentnet-analyzer/netdiscover: Fix CFLAGS=-fno-common (diff)
downloadgentoo-2eaa80cf1221b95ca3734e47b470db53424e2721.tar.gz
gentoo-2eaa80cf1221b95ca3734e47b470db53424e2721.tar.bz2
gentoo-2eaa80cf1221b95ca3734e47b470db53424e2721.zip
net-wireless/airtraf: Fix CFLAGS=-fno-common
Package-Manager: Portage-2.3.86, Repoman-2.3.20 Closes: https://bugs.gentoo.org/show_bug.cgi?id=706908 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-wireless/airtraf')
-rw-r--r--net-wireless/airtraf/airtraf-1.1-r4.ebuild54
-rw-r--r--net-wireless/airtraf/files/airtraf-1.1-fno-common.patch21
2 files changed, 75 insertions, 0 deletions
diff --git a/net-wireless/airtraf/airtraf-1.1-r4.ebuild b/net-wireless/airtraf/airtraf-1.1-r4.ebuild
new file mode 100644
index 000000000000..c0d5978fdf85
--- /dev/null
+++ b/net-wireless/airtraf/airtraf-1.1-r4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+DESCRIPTION="AirTraf 802.11b Wireless traffic sniffer"
+LICENSE="GPL-2"
+HOMEPAGE="http://www.elixar.com/"
+SRC_URI="http://www.elixar.com/${P}.tar.gz"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses:=
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+PATCHES=(
+ "${FILESDIR}"/${P}-sniffd.patch
+ "${FILESDIR}"/${P}-off-by-one.patch
+ "${FILESDIR}"/${P}-fprintf-format.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^LIBS/s|=.*|= $(shell $(PKG_CONFIG) --libs panel)|' \
+ src/libncurses/Makefile || die
+ sed -i \
+ -e 's|-lpanel -lncurses|$(shell $(PKG_CONFIG) --libs ncurses panel)|' \
+ src/sniffd/Makefile || die
+ tc-export PKG_CONFIG
+}
+
+src_compile() {
+ # parallel make (bug #297331)
+ emake -C src -j1 \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install () {
+ dobin src/airtraf
+ dodoc Authors COMPATIBILITY docs/airtraf_doc.html
+}
diff --git a/net-wireless/airtraf/files/airtraf-1.1-fno-common.patch b/net-wireless/airtraf/files/airtraf-1.1-fno-common.patch
new file mode 100644
index 000000000000..9945f170d53d
--- /dev/null
+++ b/net-wireless/airtraf/files/airtraf-1.1-fno-common.patch
@@ -0,0 +1,21 @@
+--- a/src/sniffd/capture_engine.c
++++ b/src/sniffd/capture_engine.c
+@@ -52,7 +52,6 @@
+ FILE * capture_stream;
+ FILE * error_stream;
+
+-char atime[TIME_TARGET_MAX];
+
+
+ ////////////////////////////////////////////////////////////////////////
+--- a/src/libcommon/logger.h
++++ b/src/libcommon/logger.h
+@@ -33,6 +33,8 @@
+ #ifndef __logger_h__
+ #define __logger_h__
+
++extern char atime[TIME_TARGET_MAX];
++
+ int init_log(int, char*);
+ int write_log(int, char*);
+ void flush_log(int);