summaryrefslogtreecommitdiff
path: root/net-analyzer/tracebox
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/tracebox')
-rw-r--r--net-analyzer/tracebox/Manifest5
-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.patch44
-rw-r--r--net-analyzer/tracebox/tracebox-0.4.4-r100.ebuild50
4 files changed, 122 insertions, 34 deletions
diff --git a/net-analyzer/tracebox/Manifest b/net-analyzer/tracebox/Manifest
index 647acd59bdde..cf07fe1e1d3d 100644
--- a/net-analyzer/tracebox/Manifest
+++ b/net-analyzer/tracebox/Manifest
@@ -1,4 +1,5 @@
-AUX tracebox-0.4.4-deps.patch 5159 BLAKE2B cea5cfb75b407c7e9a88062abc931ae27b7f5022e586ee7f811129ac2b5c5a54a61b6a0ce71961ebf6102d1b53087e91260cfe4d8f6622d78e98e87408c2d64b SHA512 a87ff6ef0079f99241dd975d1fcb1bb3d1c2a0a623af1932d9a00b45b6d70b403e34f8dbc07551cda55707d5eea5e48a7bb7ac931474efe6186937942a769761
+AUX tracebox-0.4.4-autotools.patch 6324 BLAKE2B 26a9e8df24323a05b16d6a97e24d06c2d7aefb48533b2ac5ef5f4f15c5900c8870e0a28bbfe669223ea5b794dc91ae59f17304d31fd0fd4c1d119d7aeea4ad9e SHA512 cc4fd3acfed4f8914e7aea87a5a8be177bf13ebdd920c9ff468a2f33e154eaaa5e238e4dfc4d1cb222128a6c5c974de117633250daf6c071b6468e7f07ccd29a
+AUX tracebox-0.4.4-include-crafter.patch 995 BLAKE2B cbc16ee7f29d76b5dec03c4bb332b4155fa93a04a32a783ba4976c81262f481aa2a09b3df1e22e2b94e457016e3f16a927f41f7ec50749bc5ffc822370182c00 SHA512 6164cca291ff982556785051f0d4ed418221aea6701b3a66d32fc36d69c39c9e8c7e74ed06bed938628651e67ea9d24554e848582cdec19ebe9b03ba4104703e
DIST tracebox-0.4.4.tar.gz 76828 BLAKE2B 0c3fbe9ea3fd5a967c85cf7b175900d899885f6c43ca8ffa32ba98256490b5bc23e8f80618208df6ec05f0484e5ce27599528aa5d84e331ac71eca960b6b1fd0 SHA512 2113d6ed4543b0c3a9b44bc92c4eb8ab2a860b4409a5eba374b9960ddb4ba299a33c0dea49595c94bc725eda36633d8bb698236d662ea9cc1027070b597c52f6
-EBUILD tracebox-0.4.4-r100.ebuild 1250 BLAKE2B bebc05ecba31e0b71f2e3548e490227a0552d9235c491ef5d2568aa83b2ef5eee88a0c969104d8202098c047f1e9db5f0386fe768c75edf8dd67b51f51cb6a84 SHA512 ec6c1125325177e9e1f15afaadfbf557072d54ddff5b9f01f0f8a0a658a24d46d76f120aa28b86fead73c54e66f1311f3d6139685a734a4e07f86e40faff677c
+EBUILD tracebox-0.4.4-r100.ebuild 1083 BLAKE2B fc5145dd9d37a579497f6fdee4720096f13210cb203a661b65be0cc09fdb9f34026ec5e37505d4dbea69b445f959706519b95f59be63159c7ee36aea3a053cb9 SHA512 d2fd07e88ceec0ddda22bb4de8c9847a00a0aaafd4f59e52194400e9fb98731d69fd0019960e1549e4db108a89ba73a1c8ad78c31be52890cf1647181e10cd5f
MISC metadata.xml 575 BLAKE2B 513c1e0904b220151dc961251b8b93223017d423d67c194d4af8ac03c73d4d4d023b377b2b95b7a5a730c8bb6a722669ed4defb2cc822c5ffa69a39d7c380775 SHA512 3b56de905ff16d563e9d69b1306950dcfb5097ed04a1aab5bc69db6242804ad9e5172c4d19f610daaa109bae97871342ef29b037b8e8f8b96bc42b3f5f543856
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)