commit:     5412facd85c545249541ee613122dd4012b06a7b
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  1 00:51:40 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Feb  3 13:30:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5412facd

dev-util/trace-cmd: separate libtracecmd library

the libtracecmd library is unbundled to a dedicated package -
dev-libs/libtracecmd, while dev-util/trace-cmd itself is still built
with static libtracecmd library from source duo to private API usage

Bug: https://bugs.gentoo.org/909439
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 ...trace-cmd-3.2.ebuild => trace-cmd-3.2-r1.ebuild} | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/dev-util/trace-cmd/trace-cmd-3.2.ebuild 
b/dev-util/trace-cmd/trace-cmd-3.2-r1.ebuild
similarity index 74%
rename from dev-util/trace-cmd/trace-cmd-3.2.ebuild
rename to dev-util/trace-cmd/trace-cmd-3.2-r1.ebuild
index 0faa6c63b891..ac238bb320a9 100644
--- a/dev-util/trace-cmd/trace-cmd-3.2.ebuild
+++ b/dev-util/trace-cmd/trace-cmd-3.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -61,6 +61,17 @@ pkg_setup() {
        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
@@ -74,3 +85,11 @@ src_configure() {
        # upstream some build options for these.
        meson_src_configure
 }
+
+src_install() {
+       meson_src_install
+
+       # TODO: fix bash completion name
+       mv "${D}"/usr/share/bash-completion/completions/${PN}.bash \
+               "${D}"/usr/share/bash-completion/completions/${PN} || die
+}

Reply via email to