1 |
commit: 2e341a3053d932f4d013f93107043498d31779f6 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 2 13:30:33 2022 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 2 13:58:39 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e341a30 |
7 |
|
8 |
dev-util/trace-cmd: add 3.1.2 |
9 |
|
10 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
11 |
|
12 |
dev-util/trace-cmd/Manifest | 1 + |
13 |
dev-util/trace-cmd/trace-cmd-3.1.2.ebuild | 134 ++++++++++++++++++++++++++++++ |
14 |
2 files changed, 135 insertions(+) |
15 |
|
16 |
diff --git a/dev-util/trace-cmd/Manifest b/dev-util/trace-cmd/Manifest |
17 |
index 289146809ca9..a683d07d99d6 100644 |
18 |
--- a/dev-util/trace-cmd/Manifest |
19 |
+++ b/dev-util/trace-cmd/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST trace-cmd-v2.9.1.tar.gz 4298008 BLAKE2B f7aa2f12b2c90f35390857ed6f5818b74c42be36ce70835d86410f9f4931d27410123baaad007fa2795c1ba1f5bafc739db620f467ccc48021d774ee7be8a68d SHA512 186bfdd8ff1e88e9e6d3ae87b123f049892deaaa8d6a42944b6f8abee6b828946b88774029aa96daf4423a3dfc01b42835508f44f636dd02579ef9a8ef425131 |
22 |
DIST trace-cmd-v3.0.2.tar.gz 308097 BLAKE2B 109cf260a2bc219c9bef92fb85bdd5abd0698d261ecec35ea31b152986af720aae26720cfa6148f798fca1d33f631ea3e50906a5fc7ef00dbd705c63d3b83f2a SHA512 3f364409f4a8931a09b762b19ee19ae52215b46e7ed90610a0fa4092e71d88d0dae91353ff98ba11f18012c27ef67289097c6c132f0f07193fac459ac52861d0 |
23 |
+DIST trace-cmd-v3.1.2.tar.gz 317611 BLAKE2B 485d62bfd6c7e3dedc5c3a9eb18af4b425bccc03e932854ef87fc0d032ef011e68cb978b34e319d97b85b24bba6d16ce619faaca8d96c77be1b64b1c4ca06e69 SHA512 d894842c11d895e2753fe254a83ecdc6bedcdfe1eceba5d75f1302b5476c9a3114c1fc5acddcba19ab05eaafb30db97e2e9b51b90afb1fd0550f1fbe0f59e0ac |
24 |
|
25 |
diff --git a/dev-util/trace-cmd/trace-cmd-3.1.2.ebuild b/dev-util/trace-cmd/trace-cmd-3.1.2.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..0d772370332c |
28 |
--- /dev/null |
29 |
+++ b/dev-util/trace-cmd/trace-cmd-3.1.2.ebuild |
30 |
@@ -0,0 +1,134 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+PYTHON_COMPAT=( python3_{8..11} ) |
36 |
+DISTUTILS_OPTIONAL=1 |
37 |
+ |
38 |
+inherit linux-info bash-completion-r1 python-r1 toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="User-space front-end for Ftrace" |
41 |
+HOMEPAGE="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git" |
42 |
+ |
43 |
+if [[ ${PV} == *9999 ]] ; then |
44 |
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/trace-cmd/${PN}.git" |
45 |
+ inherit git-r3 |
46 |
+else |
47 |
+ SRC_URI="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/${PN}-v${PV}.tar.gz" |
48 |
+ KEYWORDS="~amd64 ~arm64 ~x86" |
49 |
+ S="${WORKDIR}/${PN}-v${PV}" |
50 |
+fi |
51 |
+ |
52 |
+LICENSE="GPL-2+ LGPL-2.1+" |
53 |
+SLOT="0/${PV}" |
54 |
+IUSE="+audit doc python test udis86 +zstd" |
55 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
56 |
+RESTRICT="!test? ( test )" |
57 |
+ |
58 |
+# XXX trace-cmd autodetects this without configurability. This might cause |
59 |
+# issues if the libraries are picked up with the useflag disabled and later |
60 |
+# uninstalled |
61 |
+RDEPEND=" |
62 |
+ audit? ( sys-process/audit ) |
63 |
+ python? ( ${PYTHON_DEPS} ) |
64 |
+ udis86? ( dev-libs/udis86 ) |
65 |
+ zstd? ( >=app-arch/zstd-1.4 ) |
66 |
+ >=dev-libs/libtracefs-1.4 |
67 |
+ >=dev-libs/libtraceevent-1.5 |
68 |
+" |
69 |
+DEPEND="${RDEPEND} |
70 |
+ sys-kernel/linux-headers |
71 |
+ test? ( dev-util/cunit ) |
72 |
+" |
73 |
+BDEPEND=" |
74 |
+ virtual/pkgconfig |
75 |
+ python? ( dev-lang/swig ) |
76 |
+ doc? ( app-text/asciidoc ) |
77 |
+" |
78 |
+ |
79 |
+# having trouble getting tests to compile |
80 |
+RESTRICT+=" test" |
81 |
+ |
82 |
+pkg_setup() { |
83 |
+ local CONFIG_CHECK=" |
84 |
+ ~TRACING |
85 |
+ ~FTRACE |
86 |
+ ~BLK_DEV_IO_TRACE" |
87 |
+ |
88 |
+ linux-info_pkg_setup |
89 |
+} |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ default |
93 |
+ sed -r -e 's:([[:space:]]+)install_bash_completion($|[[:space:]]+):\1:' \ |
94 |
+ -i Makefile || die "sed failed" |
95 |
+} |
96 |
+ |
97 |
+src_configure() { |
98 |
+ EMAKE_FLAGS=( |
99 |
+ BUILD_OUTPUT="${WORKDIR}/${P}_build" |
100 |
+ "prefix=${EPREFIX}/usr" |
101 |
+ "libdir=${EPREFIX}/usr/$(get_libdir)" |
102 |
+ "CC=$(tc-getCC)" |
103 |
+ "AR=$(tc-getAR)" |
104 |
+ "BASH_COMPLETE_DIR=$(get_bashcompdir)" |
105 |
+ "etcdir=/etc" |
106 |
+ $(usex audit '' 'NO_AUDIT=' '' '1') |
107 |
+ $(usex test 'CUNIT_INSTALLED=' '' '1' '') |
108 |
+ $(usex udis86 '' 'NO_UDIS86=' '' '1') |
109 |
+ VERBOSE=1 |
110 |
+ ) |
111 |
+} |
112 |
+ |
113 |
+src_compile() { |
114 |
+ emake "${EMAKE_FLAGS[@]}" NO_PYTHON=1 \ |
115 |
+ trace-cmd |
116 |
+ |
117 |
+ if use python; then |
118 |
+ python_copy_sources |
119 |
+ python_foreach_impl python_compile |
120 |
+ fi |
121 |
+ |
122 |
+ use doc && emake doc |
123 |
+} |
124 |
+ |
125 |
+python_compile() { |
126 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
127 |
+ |
128 |
+ emake "${EMAKE_FLAGS[@]}" \ |
129 |
+ PYTHON_VERS="${EPYTHON}" \ |
130 |
+ PYTHON_PKGCONFIG_VERS="${EPYTHON//python/python-}" \ |
131 |
+ python_dir=$(python_get_sitedir)/${PN} \ |
132 |
+ python ctracecmd.so |
133 |
+ |
134 |
+ popd > /dev/null || die |
135 |
+} |
136 |
+ |
137 |
+src_test() { |
138 |
+ emake "${EMAKE_FLAGS[@]}" test |
139 |
+} |
140 |
+ |
141 |
+src_install() { |
142 |
+ emake "${EMAKE_FLAGS[@]}" NO_PYTHON=1 \ |
143 |
+ DESTDIR="${D}" \ |
144 |
+ install install_libs |
145 |
+ |
146 |
+ newbashcomp tracecmd/trace-cmd.bash "${PN}" |
147 |
+ |
148 |
+ use doc && emake DESTDIR="${D}" install_doc |
149 |
+ use python && python_foreach_impl python_install |
150 |
+} |
151 |
+ |
152 |
+python_install() { |
153 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
154 |
+ |
155 |
+ emake "${EMAKE_FLAGS[@]}" DESTDIR="${D}" \ |
156 |
+ PYTHON_VERS="${EPYTHON}" \ |
157 |
+ PYTHON_PKGCONFIG_VERS="${EPYTHON//python/python-}" \ |
158 |
+ python_dir=$(python_get_sitedir)/${PN} \ |
159 |
+ install_python |
160 |
+ |
161 |
+ popd > /dev/null || die |
162 |
+ |
163 |
+ python_optimize |
164 |
+} |