Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/babeltrace/files/, dev-util/babeltrace/
Date: Mon, 09 May 2022 23:14:59
Message-Id: 1652138007.deaeeee3d4cd6625fcae1301af88e7454581c0e3.dlan@gentoo
1 commit: deaeeee3d4cd6625fcae1301af88e7454581c0e3
2 Author: orbea <orbea <AT> riseup <DOT> net>
3 AuthorDate: Mon May 9 22:21:15 2022 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Mon May 9 23:13:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=deaeeee3
7
8 dev-util/babeltrace: Fix overlinking
9
10 When building with slibtool the build fails with many multiple
11 definition errors. This is because of overlinking internal .la
12 files where GNU libtool somehow obscures the issue.
13
14 Note the newer Babeltrace 2 which is not yet in Gentoo does
15 not seem to have any slibtool related build issues.
16
17 Bug: https://bugs.gentoo.org/777444
18 Upstream-PR: https://github.com/efficios/babeltrace/pull/119
19 Closes: https://github.com/gentoo/gentoo/pull/25408
20 Signed-off-by: orbea <orbea <AT> riseup.net>
21 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
22
23 dev-util/babeltrace/babeltrace-1.5.8.ebuild | 19 +++-
24 .../files/babeltrace-1.5.8-slibtool.patch | 119 +++++++++++++++++++++
25 2 files changed, 135 insertions(+), 3 deletions(-)
26
27 diff --git a/dev-util/babeltrace/babeltrace-1.5.8.ebuild b/dev-util/babeltrace/babeltrace-1.5.8.ebuild
28 index 73c74b6ae152..35e3b9f18b6a 100644
29 --- a/dev-util/babeltrace/babeltrace-1.5.8.ebuild
30 +++ b/dev-util/babeltrace/babeltrace-1.5.8.ebuild
31 @@ -1,7 +1,9 @@
32 # Copyright 1999-2022 Gentoo Authors
33 # Distributed under the terms of the GNU General Public License v2
34
35 -EAPI=7
36 +EAPI=8
37 +
38 +inherit autotools
39
40 DESCRIPTION="A command-line tool and library to read and convert trace files"
41 HOMEPAGE="https://babeltrace.org/"
42 @@ -17,12 +19,23 @@ RDEPEND="dev-libs/glib:2
43 dev-libs/popt
44 dev-libs/elfutils
45 sys-apps/util-linux
46 - "
47 +"
48
49 DEPEND="${RDEPEND}
50 sys-devel/bison
51 sys-devel/flex
52 - "
53 +"
54 +
55 +PATCHES=(
56 + "${FILESDIR}/${P}-slibtool.patch"
57 +)
58 +
59 +src_prepare() {
60 + default
61 +
62 + eautoreconf
63 +}
64 +
65 src_configure() {
66 econf $(use_enable test glibtest) \
67 --enable-debug-info
68
69 diff --git a/dev-util/babeltrace/files/babeltrace-1.5.8-slibtool.patch b/dev-util/babeltrace/files/babeltrace-1.5.8-slibtool.patch
70 new file mode 100644
71 index 000000000000..39572985b94e
72 --- /dev/null
73 +++ b/dev-util/babeltrace/files/babeltrace-1.5.8-slibtool.patch
74 @@ -0,0 +1,119 @@
75 +From 2780bd0b908b4021bcd2a12a56094deb7861c3fc Mon Sep 17 00:00:00 2001
76 +From: orbea <orbea@××××××.net>
77 +Date: Sat, 7 May 2022 20:31:24 -0700
78 +Subject: [PATCH] Fix the build with slibtool
79 +
80 +gentoo bug: https://bugs.gentoo.org/777444
81 +---
82 + formats/ctf-text/Makefile.am | 4 +---
83 + formats/ctf-text/types/Makefile.am | 3 +--
84 + formats/ctf/Makefile.am | 1 -
85 + formats/ctf/ir/Makefile.am | 3 +--
86 + formats/ctf/metadata/Makefile.am | 2 +-
87 + formats/ctf/types/Makefile.am | 3 +--
88 + formats/ctf/writer/Makefile.am | 3 +--
89 + lib/Makefile.am | 4 +---
90 + 8 files changed, 7 insertions(+), 16 deletions(-)
91 +
92 +diff --git a/formats/ctf-text/Makefile.am b/formats/ctf-text/Makefile.am
93 +index d773c8157..f2f6b22e3 100644
94 +--- a/formats/ctf-text/Makefile.am
95 ++++ b/formats/ctf-text/Makefile.am
96 +@@ -12,9 +12,7 @@ libbabeltrace_ctf_text_la_LDFLAGS = \
97 + $(LD_NO_AS_NEEDED) -version-info $(BABELTRACE_LIBRARY_VERSION) \
98 + types/libctf-text-types.la
99 +
100 +-libbabeltrace_ctf_text_la_LIBADD = \
101 +- $(top_builddir)/lib/libbabeltrace.la \
102 +- $(top_builddir)/formats/ctf/libbabeltrace-ctf.la
103 ++libbabeltrace_ctf_text_la_LIBADD =
104 +
105 + if ENABLE_DEBUG_INFO
106 + libbabeltrace_ctf_text_la_LIBADD += $(top_builddir)/lib/libdebug-info.la
107 +diff --git a/formats/ctf-text/types/Makefile.am b/formats/ctf-text/types/Makefile.am
108 +index 576d29d7d..596a6a859 100644
109 +--- a/formats/ctf-text/types/Makefile.am
110 ++++ b/formats/ctf-text/types/Makefile.am
111 +@@ -14,5 +14,4 @@ libctf_text_types_la_SOURCES = \
112 +
113 + libctf_text_types_la_LDFLAGS = $(LT_NO_UNDEFINED)
114 +
115 +-libctf_text_types_la_LIBADD = \
116 +- $(top_builddir)/lib/libbabeltrace.la
117 ++libctf_text_types_la_LIBADD =
118 +diff --git a/formats/ctf/Makefile.am b/formats/ctf/Makefile.am
119 +index 23ae0b93c..65de7cf87 100644
120 +--- a/formats/ctf/Makefile.am
121 ++++ b/formats/ctf/Makefile.am
122 +@@ -17,7 +17,6 @@ libbabeltrace_ctf_la_LDFLAGS = \
123 + $(LD_NO_AS_NEEDED) -version-info $(BABELTRACE_LIBRARY_VERSION)
124 +
125 + libbabeltrace_ctf_la_LIBADD = \
126 +- $(top_builddir)/lib/libbabeltrace.la \
127 + types/libctf-types.la \
128 + metadata/libctf-parser.la \
129 + metadata/libctf-ast.la \
130 +diff --git a/formats/ctf/ir/Makefile.am b/formats/ctf/ir/Makefile.am
131 +index 6f5b06e4d..3af40cfc1 100644
132 +--- a/formats/ctf/ir/Makefile.am
133 ++++ b/formats/ctf/ir/Makefile.am
134 +@@ -22,8 +22,7 @@ libctf_ir_la_SOURCES = \
135 +
136 + libctf_ir_la_LDFLAGS = $(LT_NO_UNDEFINED)
137 +
138 +-libctf_ir_la_LIBADD = \
139 +- $(top_builddir)/lib/libbabeltrace.la
140 ++libctf_ir_la_LIBADD =
141 +
142 + if BABELTRACE_BUILD_WITH_LIBUUID
143 + libctf_ir_la_LIBADD += -luuid
144 +diff --git a/formats/ctf/metadata/Makefile.am b/formats/ctf/metadata/Makefile.am
145 +index 573f94d31..a181e784c 100644
146 +--- a/formats/ctf/metadata/Makefile.am
147 ++++ b/formats/ctf/metadata/Makefile.am
148 +@@ -24,7 +24,7 @@ libctf_ast_la_SOURCES = ctf-visitor-xml.c \
149 + ctf-visitor-semantic-validator.c \
150 + ctf-visitor-generate-io-struct.c
151 + libctf_ast_la_LIBADD = \
152 +- $(top_builddir)/lib/libbabeltrace.la
153 ++ $(top_builddir)/types/libbabeltrace_types.la
154 + libctf_ast_la_LDFLAGS = $(LT_NO_UNDEFINED)
155 +
156 + if BABELTRACE_BUILD_WITH_LIBUUID
157 +diff --git a/formats/ctf/types/Makefile.am b/formats/ctf/types/Makefile.am
158 +index a1bcfb2fe..9ae105868 100644
159 +--- a/formats/ctf/types/Makefile.am
160 ++++ b/formats/ctf/types/Makefile.am
161 +@@ -14,5 +14,4 @@ libctf_types_la_SOURCES = \
162 +
163 + libctf_types_la_LDFLAGS = $(LT_NO_UNDEFINED)
164 +
165 +-libctf_types_la_LIBADD = \
166 +- $(top_builddir)/lib/libbabeltrace.la
167 ++libctf_types_la_LIBADD =
168 +diff --git a/formats/ctf/writer/Makefile.am b/formats/ctf/writer/Makefile.am
169 +index e328084be..ab27b0742 100644
170 +--- a/formats/ctf/writer/Makefile.am
171 ++++ b/formats/ctf/writer/Makefile.am
172 +@@ -6,8 +6,7 @@ libctf_writer_la_SOURCES = \
173 + writer.c \
174 + functor.c
175 +
176 +-libctf_writer_la_LIBADD = \
177 +- $(top_builddir)/lib/libbabeltrace.la
178 ++libctf_writer_la_LIBADD =
179 +
180 + libctf_writer_la_LDFLAGS = $(LT_NO_UNDEFINED)
181 +
182 +diff --git a/lib/Makefile.am b/lib/Makefile.am
183 +index 48620e8fd..e4748cadc 100644
184 +--- a/lib/Makefile.am
185 ++++ b/lib/Makefile.am
186 +@@ -28,6 +28,4 @@ libdebug_info_la_LIBADD = libbabeltrace.la
187 + endif
188 +
189 + libbabeltrace_la_LIBADD = \
190 +- prio_heap/libprio_heap.la \
191 +- $(top_builddir)/types/libbabeltrace_types.la \
192 +- $(top_builddir)/compat/libcompat.la
193 ++ prio_heap/libprio_heap.la