diff options
author | David Seifert <soap@gentoo.org> | 2021-08-01 21:28:54 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-08-01 21:28:54 +0200 |
commit | 96b03e9e2115af0468c8487cd488e2eb54f33397 (patch) | |
tree | f5c9e05fe3d9d0ccbe31c980e2ae9edd8163cc3c /net-analyzer/tracebox | |
parent | x11-base/xorg-server: 1.20.13-r1 and 9999 wayland USE drop. (diff) | |
download | gentoo-96b03e9e2115af0468c8487cd488e2eb54f33397.tar.gz gentoo-96b03e9e2115af0468c8487cd488e2eb54f33397.tar.bz2 gentoo-96b03e9e2115af0468c8487cd488e2eb54f33397.zip |
net-analyzer/tracebox: Fix build with GCC 11
Closes: https://bugs.gentoo.org/786687
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'net-analyzer/tracebox')
-rw-r--r-- | net-analyzer/tracebox/files/tracebox-0.4.4-autotools.patch (renamed from net-analyzer/tracebox/files/tracebox-0.4.4-deps.patch) | 57 | ||||
-rw-r--r-- | net-analyzer/tracebox/files/tracebox-0.4.4-include-crafter.patch | 44 | ||||
-rw-r--r-- | net-analyzer/tracebox/tracebox-0.4.4-r100.ebuild | 50 |
3 files changed, 119 insertions, 32 deletions
diff --git a/net-analyzer/tracebox/files/tracebox-0.4.4-deps.patch b/net-analyzer/tracebox/files/tracebox-0.4.4-autotools.patch index 43c0132a49a7..612132d157f4 100644 --- a/net-analyzer/tracebox/files/tracebox-0.4.4-deps.patch +++ b/net-analyzer/tracebox/files/tracebox-0.4.4-autotools.patch @@ -1,3 +1,8 @@ +- do not link to bundled + * dev-libs/json-c + * net-libs/libcrafter +- allow different lua versions + --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,8 @@ @@ -155,3 +160,55 @@ ac_configure_args="$ac_configure_args_pre" ]) +@@ -271,7 +190,6 @@ + + AC_CONFIG_FILES([ + Makefile +- noinst/Makefile + src/Makefile + src/tracebox/Makefile + tests/Makefile +--- a/Makefile.am ++++ b/Makefile.am +@@ -8,8 +8,8 @@ + MAYBE_DOC = doc + endif + +-SUBDIRS = noinst src $(MAYBE_OPT) $(MAYBE_DOC) +-DIST_SUBDIRS = noinst src tests doc ++SUBDIRS = src $(MAYBE_OPT) $(MAYBE_DOC) ++DIST_SUBDIRS = src tests doc + + debian-package: + dpkg-buildpackage -rfakeroot -tc -us -uc +--- a/noinst/Makefile.am ++++ b/noinst/Makefile.am +@@ -1,4 +1,3 @@ +-DIST_SUBDIRS = libcrafter/libcrafter + + all-local: + cd libcrafter/libcrafter && $(MAKE) $(AM_MAKEFLAGS) all +--- a/src/tracebox/Makefile.am ++++ b/src/tracebox/Makefile.am +@@ -4,7 +4,6 @@ + + dist_man_MANS = tracebox.1 + +-dist_bin_SCRIPTS = luatracebox + + SUBDIRS = examples + +@@ -78,13 +77,11 @@ + + tracebox_LDADD = \ + $(EXTRALIBS) \ +- $(abs_top_builddir)/noinst/libcrafter/libcrafter/libcrafter.la \ + $(LUA_LIB) \ + $(PCAPLIB) \ + $(JSON_LIB) + + tracebox_CPPFLAGS = \ +- -I$(top_srcdir)/noinst/libcrafter/libcrafter \ + $(LUA_INCLUDE) \ + $(PCAPINC) \ + $(JSON_INCLUDE) \ diff --git a/net-analyzer/tracebox/files/tracebox-0.4.4-include-crafter.patch b/net-analyzer/tracebox/files/tracebox-0.4.4-include-crafter.patch new file mode 100644 index 000000000000..bedd0208303a --- /dev/null +++ b/net-analyzer/tracebox/files/tracebox-0.4.4-include-crafter.patch @@ -0,0 +1,44 @@ +--- a/src/tracebox/PacketModification.h ++++ b/src/tracebox/PacketModification.h +@@ -8,7 +8,7 @@ + #ifndef __PACKETMODIFICATION_H__ + #define __PACKETMODIFICATION_H__ + +-#include "crafter.h" ++#include <crafter.h> + #ifdef HAVE_LIBJSON + #include <json/json.h> + #endif +--- a/src/tracebox/PartialHeader.h ++++ b/src/tracebox/PartialHeader.h +@@ -8,7 +8,7 @@ + #ifndef __PARTIALHEADER_H__ + #define __PARTIALHEADER_H__ + +-#include "crafter.h" ++#include <crafter.h> + + /* ICMP message can contains partial header information */ + +--- a/src/tracebox/script.h ++++ b/src/tracebox/script.h +@@ -9,7 +9,7 @@ + #ifndef __TRACEBOX_SCRIPT_H__ + #define __TRACEBOX_SCRIPT_H__ + +-#include "crafter.h" ++#include <crafter.h> + + Crafter::Packet *script_packet(std::string& cmd); + int script_exec(const char*, int, char**); +--- a/src/tracebox/tracebox.h ++++ b/src/tracebox/tracebox.h +@@ -11,7 +11,7 @@ + + #include <memory> + +-#include "crafter.h" ++#include <crafter.h> + #include "config.h" + #include "PacketModification.h" + diff --git a/net-analyzer/tracebox/tracebox-0.4.4-r100.ebuild b/net-analyzer/tracebox/tracebox-0.4.4-r100.ebuild index 63a8ba122cbd..7278ad0ab731 100644 --- a/net-analyzer/tracebox/tracebox-0.4.4-r100.ebuild +++ b/net-analyzer/tracebox/tracebox-0.4.4-r100.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 LUA_COMPAT=( lua5-{1..4} luajit ) -inherit autotools lua-single +inherit autotools flag-o-matic lua-single DESCRIPTION="A Middlebox Detection Tool" HOMEPAGE="http://www.tracebox.org/" @@ -15,51 +15,37 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="curl sniffer" - REQUIRED_USE="${LUA_REQUIRED_USE}" +RESTRICT="test" RDEPEND="${LUA_DEPS} >=net-libs/libcrafter-0.3_p20171019 dev-libs/json-c net-libs/libpcap curl? ( net-misc/curl ) - sniffer? ( net-libs/libnetfilter_queue ) -" -DEPEND=" - ${RDEPEND} -" -BDEPEND=" - virtual/pkgconfig -" -RESTRICT="test" + sniffer? ( net-libs/libnetfilter_queue )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + PATCHES=( - "${FILESDIR}"/${PN}-0.4.4-deps.patch + "${FILESDIR}"/${P}-autotools.patch + "${FILESDIR}"/${P}-include-crafter.patch ) src_prepare() { default - - sed -i -e '/SUBDIRS/s|noinst||g' Makefile.am || die - sed -i -e '/DIST_SUBDIRS.*libcrafter/d' noinst/Makefile.am || die - - sed -i \ - -e '/[[:graph:]]*libcrafter[[:graph:]]*/d' \ - -e '/dist_bin_SCRIPTS/d' \ - src/${PN}/Makefile.am \ - || die - - sed -i \ - -e 's|"crafter.h"|<crafter.h>|g' \ - src/${PN}/PacketModification.h \ - src/${PN}/PartialHeader.h \ - src/${PN}/script.h \ - src/${PN}/${PN}.h \ - || die - + # remove bundled + # - dev-libs/json-c + # - net-libs/libcrafter + rm -r noinst || die eautoreconf } src_configure() { + # https://bugs.gentoo.org/786687 + # std::byte clashes with crafter/Types.h typedef + append-cxxflags -std=c++14 + econf \ $(use_enable curl) \ $(use_enable sniffer) |