Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/libabigail/files/, dev-util/libabigail/
Date: Sat, 29 Jan 2022 19:29:02
Message-Id: 1643484505.71d747ab92f4fa0e75a2ec5505de918da6639269.soap@gentoo
1 commit: 71d747ab92f4fa0e75a2ec5505de918da6639269
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 29 19:28:25 2022 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 29 19:28:25 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71d747ab
7
8 dev-util/libabigail: fix build on musl
9
10 Closes: https://bugs.gentoo.org/831571
11 Signed-off-by: David Seifert <soap <AT> gentoo.org>
12
13 .../libabigail/files/libabigail-2.0-musl.patch | 72 ++++++++++++++++++++++
14 dev-util/libabigail/libabigail-2.0.ebuild | 2 +
15 2 files changed, 74 insertions(+)
16
17 diff --git a/dev-util/libabigail/files/libabigail-2.0-musl.patch b/dev-util/libabigail/files/libabigail-2.0-musl.patch
18 new file mode 100644
19 index 000000000000..6057c65622a6
20 --- /dev/null
21 +++ b/dev-util/libabigail/files/libabigail-2.0-musl.patch
22 @@ -0,0 +1,72 @@
23 +--- a/configure.ac
24 ++++ b/configure.ac
25 +@@ -143,6 +143,7 @@
26 + dnl *************************************************
27 +
28 + AC_PROG_CXX
29 ++AC_CANONICAL_HOST
30 + AC_USE_SYSTEM_EXTENSIONS
31 + AC_PROG_INSTALL
32 +
33 +@@ -201,6 +202,12 @@
34 + [CFLAGS="$CFLAGS -DBAD_FTS=1",
35 + CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
36 +
37 ++dnl On musl, we need to find fts-standalone
38 ++AS_CASE(
39 ++ [${host_os}], [*-musl*], [
40 ++ PKG_CHECK_MODULES([FTS], [fts-standalone])
41 ++])
42 ++
43 + dnl Check for dependency: libelf, libdw, libebl (elfutils)
44 + dnl Note that we need to use at least elfutils 0.159 but
45 + dnl at that time elfutils didnt have pkgconfig capabilities
46 +--- a/src/Makefile.am
47 ++++ b/src/Makefile.am
48 +@@ -41,12 +41,12 @@
49 + abg-symtab-reader.cc \
50 + $(VIZ_SOURCES)
51 +
52 +-libabigail_la_LIBADD = $(DEPS_LIBS)
53 ++libabigail_la_LIBADD = $(DEPS_LIBS) $(FTS_LIBS)
54 + libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined
55 +
56 + CUSTOM_MACROS = -DABIGAIL_ROOT_SYSTEM_LIBDIR=\"${libdir}\"
57 +
58 + AM_CPPFLAGS=\
59 +-$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) \
60 ++$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) $(FTS_CFLAGS) \
61 + -Wall -I$(abs_top_srcdir) -I$(abs_top_srcdir)/include \
62 + -I$(abs_top_builddir)/include -I$(abs_top_builddir)
63 +--- a/tools/abisym.cc
64 ++++ b/tools/abisym.cc
65 +@@ -11,6 +11,7 @@
66 + /// in its symbol tables and report what it sees.
67 +
68 + #include <elf.h>
69 ++#include <libgen.h>
70 + #include <cstring>
71 + #include <iostream>
72 + #include <sstream>
73 +--- a/tools/kmidiff.cc
74 ++++ b/tools/kmidiff.cc
75 +@@ -11,7 +11,6 @@
76 +
77 + #include <sys/types.h>
78 + #include <dirent.h>
79 +-#include <fts.h>
80 + #include <cstring>
81 + #include <string>
82 + #include <vector>
83 +--- a/tools/Makefile.am
84 ++++ b/tools/Makefile.am
85 +@@ -37,7 +37,8 @@
86 +
87 + abipkgdiff_SOURCES = abipkgdiff.cc
88 + abipkgdiffdir = $(bindir)
89 +-abipkgdiff_LDADD = $(abs_top_builddir)/src/libabigail.la
90 ++abipkgdiff_CPPFLAGS = $(FTS_CFLAGS)
91 ++abipkgdiff_LDADD = $(abs_top_builddir)/src/libabigail.la $(FTS_LIBS)
92 + abipkgdiff_LDFLAGS = -pthread
93 +
94 + kmidiff_SOURCES = kmidiff.cc
95
96 diff --git a/dev-util/libabigail/libabigail-2.0.ebuild b/dev-util/libabigail/libabigail-2.0.ebuild
97 index 4f225f24eb9c..aee5a02c1455 100644
98 --- a/dev-util/libabigail/libabigail-2.0.ebuild
99 +++ b/dev-util/libabigail/libabigail-2.0.ebuild
100 @@ -30,6 +30,8 @@ BDEPEND="
101 )
102 test? ( ${PYTHON_DEPS} )"
103
104 +PATCHES=( "${FILESDIR}"/${P}-musl.patch )
105 +
106 src_prepare() {
107 default
108 # need to run our autotools, due to ltmain.sh including Redhat calls: