external/libgpg-error/ExternalPackage_libgpg-error.mk    |   10 ++++++
 external/libgpg-error/UnpackedTarball_libgpg-error.mk    |    1 
 external/libgpg-error/libgpgerror-bundled-soname.patch.1 |   22 +++++++++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

New commits:
commit 7155fba93bbf4304d4920787d43227455e7801f8
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Mon Jan 28 14:31:12 2019 +0100
Commit:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
CommitDate: Wed Mar 22 17:00:47 2023 +0100

    libgpg-error: use custom soname and symbol version
    
    The hope is that this should allow both system's libgpg-error.so.0 and
    LO's bundled libgpg-error-lo.so.0 to be loaded by soffice.bin without
    unintended hilarity.
    
    Change-Id: I94498097a847b9756de86051798cb4ce022f6c83
    Reviewed-on: https://gerrit.libreoffice.org/67012
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/external/libgpg-error/ExternalPackage_libgpg-error.mk 
b/external/libgpg-error/ExternalPackage_libgpg-error.mk
index ba6e8c67f754..3afd218eef9e 100644
--- a/external/libgpg-error/ExternalPackage_libgpg-error.mk
+++ b/external/libgpg-error/ExternalPackage_libgpg-error.mk
@@ -13,7 +13,15 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,libgpg-error,libgpg-error)
 
 ifneq ($(DISABLE_DYNLOADING),TRUE)
 
-$(eval $(call 
gb_ExternalPackage_add_file,libgpg-error,$(LIBO_LIB_FOLDER)/libgpg-error.so.0,src/.libs/libgpg-error.so.0.21.0))
+ifeq ($(OS),LINUX)
+
+$(eval $(call 
gb_ExternalPackage_add_file,libgpg-error,$(LIBO_LIB_FOLDER)/libgpg-error-lo.so.0,src/.libs/libgpg-error-lo.so.0.22.0))
+
+else ifeq ($(OS),MACOSX)
+
+$(eval $(call 
gb_ExternalPackage_add_file,libgpg-error,$(LIBO_LIB_FOLDER)/libgpg-error.0.dylib,src/.libs/libgpg-error.0.dylib))
+
+endif
 
 endif # $(DISABLE_DYNLOADING)
 
diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk 
b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index 8343ad63bb6d..9594e9c635ef 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
     external/libgpg-error/fix-autoconf-macros.patch \
     external/libgpg-error/disable-rpath-option.patch \
        external/libgpg-error/libgpg-error_gawk5.patch \
+       $(if $(filter 
LINUX,$(OS)),external/libgpg-error/libgpgerror-bundled-soname.patch.1) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgpg-error/libgpgerror-bundled-soname.patch.1 
b/external/libgpg-error/libgpgerror-bundled-soname.patch.1
new file mode 100644
index 000000000000..4f927def368a
--- /dev/null
+++ b/external/libgpg-error/libgpgerror-bundled-soname.patch.1
@@ -0,0 +1,22 @@
+--- libgpg-error/src/Makefile.in.orig  2019-01-28 14:11:10.518425440 +0100
++++ libgpg-error/src/Makefile.in       2019-01-28 14:11:16.901414229 +0100
+@@ -540,7 +540,7 @@
+ @HAVE_LD_VERSION_SCRIPT_TRUE@libgpg_error_vers_opt = 
-Wl,--version-script=$(srcdir)/gpg-error.vers
+ libgpg_error_la_LDFLAGS = \
+   $(no_undefined) $(export_symbols) $(libgpg_error_vers_opt) \
+-  $(extra_ltoptions) -version-info \
++  $(extra_ltoptions) -release lo -version-info \
+   @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@
+ 
+ libgpg_error_la_SOURCES = gettext.h $(arch_sources) \
+--- libgpg-error/src/gpg-error.vers.orig       2019-01-28 14:08:11.413740011 
+0100
++++ libgpg-error/src/gpg-error.vers    2019-01-28 14:08:34.172700037 +0100
+@@ -20,7 +20,7 @@
+ #       visibility.h and gpg-error.def.in as well.
+ 
+ 
+-GPG_ERROR_1.0 {
++GPG_ERROR_LIBREOFFICE {
+   global:
+     gpg_strerror;
+     gpg_strerror_r;

Reply via email to