summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-02-08 05:30:07 +0000
committerSam James <sam@gentoo.org>2022-02-08 05:42:19 +0000
commit2ded35bffa1a01d8bc96328701814aa8566d9507 (patch)
tree7d6100a51f427099c7e8baf8b8b09163311d2842 /net-libs/libtrace
parentgnome-base/gnome: Stabilize 40.0 arm64, #831946 (diff)
downloadgentoo-2ded35bffa1a01d8bc96328701814aa8566d9507.tar.gz
gentoo-2ded35bffa1a01d8bc96328701814aa8566d9507.tar.bz2
gentoo-2ded35bffa1a01d8bc96328701814aa8566d9507.zip
net-libs/libtrace: add 4.0.18_p1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/libtrace')
-rw-r--r--net-libs/libtrace/Manifest1
-rw-r--r--net-libs/libtrace/files/libtrace-4.0.18_p1-build-system.patch133
-rw-r--r--net-libs/libtrace/libtrace-4.0.18_p1.ebuild70
3 files changed, 204 insertions, 0 deletions
diff --git a/net-libs/libtrace/Manifest b/net-libs/libtrace/Manifest
index 53a961ba3b97..b1de7ff5ca58 100644
--- a/net-libs/libtrace/Manifest
+++ b/net-libs/libtrace/Manifest
@@ -1,2 +1,3 @@
DIST libtrace-4.0.15_p1.tar.gz 1891845 BLAKE2B 08faf395f5fdda21829b89a9276649b297d2266ef10d2162b588b39d4d8d2da1306c74bb180d63b92f4422bb157fb451d34cd8167f0bff42322776e3b1ee0e7c SHA512 82f18b03e824f3ac89330854c3659244106ab5323f5e7a43ec7d2280f6ad3d427a906708688469b3f5aa479d11fef99a4bbecea585b81c916029132375582a4e
DIST libtrace-4.0.17_p1.tar.gz 1961123 BLAKE2B be961bc58496414415b9affb0a6b77e5f234b92196fb719f3a2e8058ae80ade90977c44d57c75d37cbf26ff2e0c8816a4b376b77b6e44d13833960c6095b7e2c SHA512 85280edd515acf52361c34ebe5324fd95f4fafc72aa22c2c8bd43a6bca9a6b5fc9a046480fc760bb39d8b577532ed416caf10a630cea9465d305f2ed4dcb318e
+DIST libtrace-4.0.18_p1.tar.gz 1963425 BLAKE2B fdacd4a44f899dc49fe9571d8e695cd726ea07d1c0595bd7c1f59d53721bd5610126924323c9c7098caf65276219e61265e5e05f23b4a92ae6377268c618202f SHA512 fc2979fa56b0eee25149a3571d0a06e2a46ab6d6fa419b2fc37635ebcf4a8814250005c4dfc5dddb5fb6aa9c74161ab4f475a037e021388054bb62f414b9c5d2
diff --git a/net-libs/libtrace/files/libtrace-4.0.18_p1-build-system.patch b/net-libs/libtrace/files/libtrace-4.0.18_p1-build-system.patch
new file mode 100644
index 000000000000..b536302c30b9
--- /dev/null
+++ b/net-libs/libtrace/files/libtrace-4.0.18_p1-build-system.patch
@@ -0,0 +1,133 @@
+https://github.com/LibtraceTeam/libtrace/pull/201
+
+From dde6c39e5808f06f1450b03e7c682edb0f1290cf Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 8 Feb 2022 05:30:32 +0000
+Subject: [PATCH 1/3] build: fix bashism in configure
+
+configures have a shebang of #!/bin/sh so need to work with a POSIX-compliant
+shell; let's use = instead of == which will have the same effect on both Bash
+and said shells (like dash).
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 95d63fdc..dbbaabb7 100644
+--- a/configure.in
++++ b/configure.in
+@@ -305,7 +305,7 @@ AC_ARG_WITH(xdp, AS_HELP_STRING(--with-xdp, include XDP capture support),
+
+ if test "$want_xdp" != no; then
+ AC_CHECK_LIB(elf, elf_begin, elffound=1, elffound=0)
+- if test "$elffound" == 1; then
++ if test "$elffound" = 1; then
+ # check for libbpf
+ AC_CHECK_LIB(bpf, xsk_socket__create, bpffound=1, bpffound=0, -lelf)
+
+
+From 1525a42b386da02bda3982cf6e8b472f57f8ac34 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 8 Feb 2022 05:32:59 +0000
+Subject: [PATCH 2/3] build: make NUMA support optional
+
+This avoids an 'automagic dependency' [0] on NUMA. This is helpful for
+downstreams to ensure we don't miss dependencies or when we may not
+want to enable support for a feature even though a dependency is enabled.
+
+Gentoo has shipped this patch for quite some time.
+
+[0] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.in | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index dbbaabb7..6fbff150 100644
+--- a/configure.in
++++ b/configure.in
+@@ -518,7 +518,23 @@ AC_CHECK_DECL([PACKET_FANOUT],
+ [[#include <linux/if_packet.h>]])
+
+ # If we use DPDK we might be able to use libnuma
+-AC_CHECK_LIB(numa, numa_node_to_cpus, have_numa=1, have_numa=0)
++AC_ARG_WITH(numa,
++ AS_HELP_STRING(--with-numa,include NUMA support),
++[
++ if test "$withval" = no
++ then
++ want_numa=no
++ else
++ want_numa=yes
++ fi
++],[
++ # Default to building without NUMA
++ want_numa=yes
++])
++
++if test "$want_numa" != no; then
++ AC_CHECK_LIB(numa, numa_node_to_cpus, have_numa=1, have_numa=0)
++fi
+
+ # Need libwandder for ETSI live decoding
+ AC_CHECK_LIB(wandder, init_wandder_decoder, have_wandder=1, have_wandder=0)
+
+From 153254413ae3cd6a62ee7d8b5eae189e84ebc066 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 8 Feb 2022 05:34:05 +0000
+Subject: [PATCH 3/3] build: use pkg-config to find ncurses
+
+ncurses can be built in a variety of configurations, but the motivating case
+for Gentoo was "split tinfo" where libtinfo is no longer included within
+libncurses.
+
+Use pkg-config to find where ncurses is installed and the required libraries
+needed to link against it (which will include -ltinfo if required).
+
+We've been shipping this patch in Gentoo for quite some time.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.in | 4 ++++
+ tools/tracetop/Makefile.am | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 6fbff150..cbb94d55 100644
+--- a/configure.in
++++ b/configure.in
+@@ -79,6 +79,8 @@ AC_PROG_INSTALL
+ AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc)
+ AM_PROG_LEX
+
++PKG_PROG_PKG_CONFIG
++
+ # All our source files for function replacements are in lib/
+ AC_CONFIG_LIBOBJ_DIR(lib)
+
+@@ -916,6 +918,8 @@ if (test "$use_llvm" != "no"); then
+ fi
+ fi
+
++PKG_CHECK_MODULES(ncurses,ncurses,have_ncurses=yes,have_ncurses=no)
++
+ AC_ARG_WITH([ncurses],
+ AC_HELP_STRING([--with-ncurses], [build tracetop (requires ncurses)]))
+
+diff --git a/tools/tracetop/Makefile.am b/tools/tracetop/Makefile.am
+index 2ebbc3a7..a2eb2797 100644
+--- a/tools/tracetop/Makefile.am
++++ b/tools/tracetop/Makefile.am
+@@ -6,6 +6,6 @@ bin_PROGRAMS = tracetop
+ include ../Makefile.tools
+
+ tracetop_SOURCES = tracetop.cc
+-tracetop_LDADD = -lncurses
++tracetop_LDADD = @ncurses_LIBS@
+ tracetop_CPPFLAGS = -fno-strict-aliasing $(AM_CFLAGS)
+ endif
+
diff --git a/net-libs/libtrace/libtrace-4.0.18_p1.ebuild b/net-libs/libtrace/libtrace-4.0.18_p1.ebuild
new file mode 100644
index 000000000000..b43bb405d524
--- /dev/null
+++ b/net-libs/libtrace/libtrace-4.0.18_p1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A library and tools for trace processing"
+HOMEPAGE="https://research.wand.net.nz/software/libtrace.php"
+SRC_URI="https://github.com/${PN^}Team/${PN}/archive//${PV/_p/-}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${P/_p/-}"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# doxygen is always needed for man pages, but USE=doc controls installing docs themselves
+# (not man pages)
+IUSE="doc ncurses numa"
+
+RDEPEND=">=net-libs/libpcap-0.8
+ dev-libs/libyaml
+ dev-libs/openssl:=
+ net-libs/wandio
+ ncurses? ( sys-libs/ncurses:= )
+ numa? ( sys-process/numactl )"
+DEPEND="${RDEPEND}"
+BDEPEND="app-doc/doxygen[dot]
+ sys-devel/flex
+ virtual/os-headers
+ virtual/pkgconfig
+ virtual/yacc"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.18_p1-build-system.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.{in,ac} || die
+
+ eautoreconf
+
+ # Comment out FILE_PATTERNS definition (bug #706230)
+ if has_version ~app-doc/doxygen-1.8.16; then
+ sed -i -e '/^FILE_PATTERNS/s|^|#|g' docs/${PN}.doxygen.in || die
+ fi
+
+ # Update doxygen configuration
+ doxygen -u docs/libtrace.doxygen.in || die
+}
+
+src_configure() {
+ econf \
+ $(use_with ncurses) \
+ $(use_with numa) \
+ --with-man \
+ --without-dpdk
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ docinto html
+ dodoc -r docs/doxygen/html
+ fi
+
+ find "${ED}" -name "*.la" -delete || die
+}