[openwrt/openwrt] build: add support for patching libtool to include ABI version in soname

LEDE Commits lede-commits at lists.infradead.org
Mon Feb 15 12:57:33 EST 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f696cd3df3669a1a0a247623b549afeed718e207

commit f696cd3df3669a1a0a247623b549afeed718e207
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Feb 15 18:46:11 2021 +0100

    build: add support for patching libtool to include ABI version in soname
    
    Use the version from PKG_ABI_VERSION
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 include/autotools.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/autotools.mk b/include/autotools.mk
index ec67c844f7..4b48b38992 100644
--- a/include/autotools.mk
+++ b/include/autotools.mk
@@ -62,6 +62,12 @@ define patch_libtool
 	);
 endef
 
+define set_libtool_abiver
+	sed -i \
+		-e 's,^soname_spec=.*,soname_spec="\\$$$${libname}\\$$$${shared_ext}.$(PKG_ABI_VERSION)",' \
+		-e 's,^library_names_spec=.*,library_names_spec="\\$$$${libname}\\$$$${shared_ext}.$(PKG_ABI_VERSION) \\$$$${libname}\\$$$${shared_ext}",' \
+		$(PKG_BUILD_DIR)/libtool
+endef
 
 PKG_LIBTOOL_PATHS?=$(CONFIGURE_PATH)
 PKG_AUTOMAKE_PATHS?=$(CONFIGURE_PATH)
@@ -110,6 +116,10 @@ ifneq ($(filter libtool,$(PKG_FIXUP)),)
  endif
 endif
 
+ifneq ($(filter libtool-abiver,$(PKG_FIXUP)),)
+  Hooks/Configure/Post += set_libtool_abiver
+endif
+
 ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
   PKG_BUILD_DEPENDS += libtool gettext libiconv
  ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)



More information about the lede-commits mailing list