public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libtrace/files/, net-libs/libtrace/
Date: Tue,  8 Feb 2022 05:43:28 +0000 (UTC)	[thread overview]
Message-ID: <1644298939.2ded35bffa1a01d8bc96328701814aa8566d9507.sam@gentoo> (raw)

commit:     2ded35bffa1a01d8bc96328701814aa8566d9507
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  8 05:30:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb  8 05:42:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ded35bf

net-libs/libtrace: add 4.0.18_p1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/libtrace/Manifest                         |   1 +
 .../files/libtrace-4.0.18_p1-build-system.patch    | 133 +++++++++++++++++++++
 net-libs/libtrace/libtrace-4.0.18_p1.ebuild        |  70 +++++++++++
 3 files changed, 204 insertions(+)

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
+}


             reply	other threads:[~2022-02-08  5:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08  5:43 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-23  0:27 [gentoo-commits] repo/gentoo:master commit in: net-libs/libtrace/files/, net-libs/libtrace/ Sam James
2020-02-15 11:05 Jeroen Roovers
2019-11-07  8:28 Jeroen Roovers
2019-08-20  9:02 Jeroen Roovers
2019-07-16  5:10 Jeroen Roovers
2017-02-28  8:13 Jeroen Roovers
2016-05-05  7:55 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1644298939.2ded35bffa1a01d8bc96328701814aa8566d9507.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox