configure.ac                                  |   13 ++++++-------
 external/harfbuzz/UnpackedTarball_harfbuzz.mk |    1 +
 external/harfbuzz/harfbuzz_visibility.patch.1 |   11 +++++++++++
 3 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit 8ff06494e4edd023b920f8d9f0f679aa5c21f483
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Wed Apr 30 12:13:49 2025 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Mon May 5 13:51:52 2025 +0200

    harfbuzz: use -fvisibility=hidden
    
    Change-Id: I3fa8cd03f91ffdb0463bcb2d67410bac9085a7d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184819
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/configure.ac b/configure.ac
index 0bb64aabb9dd..85d0ac43aef9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11499,21 +11499,20 @@ 
HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src"
 case "$_os" in
     Linux)
         GRAPHITE_LIBS_internal='$(gb_StaticLibrary_WORKDIR)/libgraphite.a'
-        
HARFBUZZ_LIBS_internal="${WORKDIR}/UnpackedTarball/harfbuzz/builddir/src/libharfbuzz.a"
+        
HARFBUZZ_LIBS_internal='$(gb_UnpackedTarball_workdir)/harfbuzz/builddir/src/libharfbuzz.a
 $(GRAPHITE_LIBS)'
+        ;;
+    WINNT)
+        GRAPHITE_LIBS_internal='$(gb_StaticLibrary_WORKDIR)/graphite.lib'
+        
HARFBUZZ_LIBS_internal='$(gb_UnpackedTarball_workdir)/harfbuzz/builddir/src/libharfbuzz.a
 $(GRAPHITE_LIBS)'
         ;;
     *)
         GRAPHITE_LIBS_internal='-L$(gb_StaticLibrary_WORKDIR) -lgraphite'
-        
HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/builddir/src/ 
-lharfbuzz"
+        
HARFBUZZ_LIBS_internal='-L$(gb_UnpackedTarball_workdir)/harfbuzz/builddir/src/ 
-lharfbuzz $(GRAPHITE_LIBS)'
         ;;
 esac
 libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
 libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 
$harfbuzz_required_version])
 
-if test "$COM" = "MSC"; then # override the above
-    GRAPHITE_LIBS='$(gb_StaticLibrary_WORKDIR)/graphite.lib'
-    
HARFBUZZ_LIBS='$(gb_UnpackedTarball_workdir)/harfbuzz/builddir/src/libharfbuzz.a
 $(GRAPHITE_LIBS)'
-fi
-
 MESON_NO_PYTHON=
 if test "$with_system_harfbuzz" = "yes"; then
     if test "$with_system_graphite" = "no"; then
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk 
b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index 7df503752f08..49b5ee65f05c 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
     external/harfbuzz/tdf159529.patch.0 \
+    external/harfbuzz/harfbuzz_visibility.patch.1 \
 ))
 
 # meson will replace python3 from shebang in build commands with the
diff --git a/external/harfbuzz/harfbuzz_visibility.patch.1 
b/external/harfbuzz/harfbuzz_visibility.patch.1
new file mode 100644
index 000000000000..2b72a35da460
--- /dev/null
+++ b/external/harfbuzz/harfbuzz_visibility.patch.1
@@ -0,0 +1,11 @@
+diff -ur harfbuzz.org/src/meson.build harfbuzz/src/meson.build
+--- harfbuzz.org/src/meson.build       2025-04-30 11:53:08
++++ harfbuzz/src/meson.build   2025-04-30 12:02:08
+@@ -624,6 +624,7 @@
+   include_directories: incconfig,
+   dependencies: harfbuzz_deps,
+   cpp_args: cpp_args + extra_hb_cpp_args,
++  gnu_symbol_visibility: 'hidden',
+   soversion: hb_so_version,
+   version: version,
+   install: true,

Reply via email to