commit:     bc03be6f49bbf3d85f3876cecbde50a8bcf78a06
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 23 13:26:05 2026 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Feb 23 13:41:18 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc03be6f

dev-util/trace-cmd: add 3.4

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 dev-util/trace-cmd/Manifest             |   1 +
 dev-util/trace-cmd/trace-cmd-3.4.ebuild | 108 ++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)

diff --git a/dev-util/trace-cmd/Manifest b/dev-util/trace-cmd/Manifest
index 07c4da63dae5..686bbf31c447 100644
--- a/dev-util/trace-cmd/Manifest
+++ b/dev-util/trace-cmd/Manifest
@@ -1,2 +1,3 @@
 DIST trace-cmd-v3.3.2.tar.gz 366804 BLAKE2B 
506fcff2e7fccea76632f63545e12871819d88adc9e782b34c793b2c5eb185a5546b0bdc4fba8245dd8c57c945d1377c601720ef3f34cb261d27a6875df899df
 SHA512 
139b4a00248479c88e2267c5e8ab368a4fb94687c47fe5192ccceb2d0919689072458fcbae2c9ccd27f538a67b1a373bdb539345938e39f23eec80fe5285da35
 DIST trace-cmd-v3.3.3.tar.gz 366872 BLAKE2B 
b07848ca789092fda3aeadbf47d65a9f84c53af927c4c43d9f00c777460085795efebdf973a9708ef35dca0f20e773e5e39a5f4ef25f7297ad9bce449d2953b8
 SHA512 
df3604e3f897449b7685faddb7c61c6bcce2dbe26c504200710f73d4e24047b34b3df819855d6ac52934c8515725d1b25bd0089c66de700dac0990f44d0069a6
+DIST trace-cmd-v3.4.tar.gz 369809 BLAKE2B 
0a708dcf2cdfcfc1e18e51e424d44a1463cf78424eb0416800a2b8da5ec29db94e394ac973b2596d6b6037bffaa8ae5b6d6a77cd4e336263fe511de131c20494
 SHA512 
b237a5e60e71a882b7fd559d130cbf6e076c51f548292f3226d30a50591c5306de60ac5f664268b7d8f9f104353bc509b5bd4d7903a5db2e020570674b7712e7

diff --git a/dev-util/trace-cmd/trace-cmd-3.4.ebuild 
b/dev-util/trace-cmd/trace-cmd-3.4.ebuild
new file mode 100644
index 000000000000..7f05d2f59000
--- /dev/null
+++ b/dev-util/trace-cmd/trace-cmd-3.4.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit linux-info meson python-single-r1
+
+DESCRIPTION="User-space front-end for Ftrace"
+HOMEPAGE="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git";
+
+if [[ ${PV} == *9999 ]] ; then
+       EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/trace-cmd/${PN}.git";
+       inherit git-r3
+else
+       
SRC_URI="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/${PN}-v${PV}.tar.gz";
+       KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+       S="${WORKDIR}/${PN}-v${PV}"
+fi
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/${PV}"
+IUSE="python test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+# Tests segfault for now?
+RESTRICT="!test? ( test ) test"
+
+RDEPEND="
+       >=app-arch/zstd-1.4
+       >=dev-libs/libtracefs-1.8
+       >=dev-libs/libtraceevent-1.9
+       virtual/zlib:=
+       sys-process/audit
+       python? ( ${PYTHON_DEPS} )
+"
+DEPEND="
+       ${RDEPEND}
+       sys-kernel/linux-headers
+       test? ( dev-util/cunit )
+"
+BDEPEND="
+       app-text/asciidoc
+       app-text/xmlto
+       virtual/pkgconfig
+       python? ( dev-lang/swig )
+"
+
+pkg_setup() {
+       local CONFIG_CHECK="
+               ~TRACING
+               ~FTRACE
+               ~BLK_DEV_IO_TRACE"
+
+       linux-info_pkg_setup
+
+       # TODO: Once we have options for doc+tests, we can revisit Python being
+       # single-impl.
+       use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+       default
+
+       # Due to the in-progress meson build transaction, we decide to separate
+       # the libtracecmd as an independent package, see bug #909439
+       # Note: dev-util/trace-cmd still use in-source static libtracecmd duo to
+       # it still use internal private API.
+       sed -i -e "/^libtracecmd_standalone_build/s/true/false/" \
+               "${S}"/lib/meson.build || die
+}
+
+src_configure() {
+       local emesonargs=(
+               -Dasciidoctor=false
+               -Dhtmldir=/usr/share/doc/${PF}/html
+               -Dmandir=/usr/share/man
+               -Dversion-tag=${PVR}-gentoo
+               $(meson_use python)
+       )
+
+       # TODO: udis86 isn't wired up to meson at all
+       # TODO: get docs & tests optional upstream
+       # TODO: audit/zstd/zlib lack meson options for now. Previously, the 
situation
+       # was somewhat automagic, so this isn't a huge loss for now, but we 
should
+       # upstream some build options for these.
+       meson_src_configure
+}
+
+src_compile() {
+       # The 'docs' target is not part of the 'all' target, hence we need to
+       # explicitly specify 'docs'.
+       meson_src_compile all docs
+}
+
+src_install() {
+       meson_src_install
+       use python && python_install
+
+       # TODO: fix bash completion name
+       mv "${D}"/usr/share/bash-completion/completions/${PN}.bash \
+               "${D}"/usr/share/bash-completion/completions/${PN} || die
+}
+
+python_install() {
+       python_optimize "${D}$(python_get_sitedir)"
+}

Reply via email to