summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-01-29 20:28:25 +0100
committerDavid Seifert <soap@gentoo.org>2022-01-29 20:28:25 +0100
commit71d747ab92f4fa0e75a2ec5505de918da6639269 (patch)
tree594ef0c5390bb84e1c5c061d587ee8a776461161 /dev-util/libabigail
parentapp-accessibility/brltty: 6.4 build fixes (diff)
downloadgentoo-71d747ab92f4fa0e75a2ec5505de918da6639269.tar.gz
gentoo-71d747ab92f4fa0e75a2ec5505de918da6639269.tar.bz2
gentoo-71d747ab92f4fa0e75a2ec5505de918da6639269.zip
dev-util/libabigail: fix build on musl
Closes: https://bugs.gentoo.org/831571 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-util/libabigail')
-rw-r--r--dev-util/libabigail/files/libabigail-2.0-musl.patch72
-rw-r--r--dev-util/libabigail/libabigail-2.0.ebuild2
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-util/libabigail/files/libabigail-2.0-musl.patch b/dev-util/libabigail/files/libabigail-2.0-musl.patch
new file mode 100644
index 000000000000..6057c65622a6
--- /dev/null
+++ b/dev-util/libabigail/files/libabigail-2.0-musl.patch
@@ -0,0 +1,72 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -143,6 +143,7 @@
+ dnl *************************************************
+
+ AC_PROG_CXX
++AC_CANONICAL_HOST
+ AC_USE_SYSTEM_EXTENSIONS
+ AC_PROG_INSTALL
+
+@@ -201,6 +202,12 @@
+ [CFLAGS="$CFLAGS -DBAD_FTS=1",
+ CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
+
++dnl On musl, we need to find fts-standalone
++AS_CASE(
++ [${host_os}], [*-musl*], [
++ PKG_CHECK_MODULES([FTS], [fts-standalone])
++])
++
+ dnl Check for dependency: libelf, libdw, libebl (elfutils)
+ dnl Note that we need to use at least elfutils 0.159 but
+ dnl at that time elfutils didnt have pkgconfig capabilities
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -41,12 +41,12 @@
+ abg-symtab-reader.cc \
+ $(VIZ_SOURCES)
+
+-libabigail_la_LIBADD = $(DEPS_LIBS)
++libabigail_la_LIBADD = $(DEPS_LIBS) $(FTS_LIBS)
+ libabigail_la_LDFLAGS = -lpthread -Wl,--as-needed -no-undefined
+
+ CUSTOM_MACROS = -DABIGAIL_ROOT_SYSTEM_LIBDIR=\"${libdir}\"
+
+ AM_CPPFLAGS=\
+-$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) \
++$(CUSTOM_MACROS) $(DEPS_CPPFLAGS) $(FTS_CFLAGS) \
+ -Wall -I$(abs_top_srcdir) -I$(abs_top_srcdir)/include \
+ -I$(abs_top_builddir)/include -I$(abs_top_builddir)
+--- a/tools/abisym.cc
++++ b/tools/abisym.cc
+@@ -11,6 +11,7 @@
+ /// in its symbol tables and report what it sees.
+
+ #include <elf.h>
++#include <libgen.h>
+ #include <cstring>
+ #include <iostream>
+ #include <sstream>
+--- a/tools/kmidiff.cc
++++ b/tools/kmidiff.cc
+@@ -11,7 +11,6 @@
+
+ #include <sys/types.h>
+ #include <dirent.h>
+-#include <fts.h>
+ #include <cstring>
+ #include <string>
+ #include <vector>
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -37,7 +37,8 @@
+
+ abipkgdiff_SOURCES = abipkgdiff.cc
+ abipkgdiffdir = $(bindir)
+-abipkgdiff_LDADD = $(abs_top_builddir)/src/libabigail.la
++abipkgdiff_CPPFLAGS = $(FTS_CFLAGS)
++abipkgdiff_LDADD = $(abs_top_builddir)/src/libabigail.la $(FTS_LIBS)
+ abipkgdiff_LDFLAGS = -pthread
+
+ kmidiff_SOURCES = kmidiff.cc
diff --git a/dev-util/libabigail/libabigail-2.0.ebuild b/dev-util/libabigail/libabigail-2.0.ebuild
index 4f225f24eb9c..aee5a02c1455 100644
--- a/dev-util/libabigail/libabigail-2.0.ebuild
+++ b/dev-util/libabigail/libabigail-2.0.ebuild
@@ -30,6 +30,8 @@ BDEPEND="
)
test? ( ${PYTHON_DEPS} )"
+PATCHES=( "${FILESDIR}"/${P}-musl.patch )
+
src_prepare() {
default
# need to run our autotools, due to ltmain.sh including Redhat calls: