external/freetype/ExternalProject_freetype.mk |    3 +--
 external/freetype/UnpackedTarball_freetype.mk |    1 -
 external/freetype/zlib-duplicates.patch       |   22 ----------------------
 3 files changed, 1 insertion(+), 25 deletions(-)

New commits:
commit a7a974fda5d8635b5d67c8e7fe71f4c7d83c5797
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Fri Nov 25 11:27:57 2022 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Nov 25 16:20:30 2022 +0100

    freetype: don't build yet another copy of zlib
    
    Since commit e515267602d9049bc15739a215f43f1379141d81 the zlib that's
    statically linked into freetype conflicts with the zlib that's
    statically linked into Qt5 because both appear to rename the symbols via
    Z_PREFIX to the same names and thus the linker complains about duplicate
    symbols.
    
    Apparently --without-zlib doesn't disable the feature but instead causes
    freetype to use its own copy; just use --with-zlib instead and rely on
    the ZLIB_CFLAGS/ZLIB_LIBS to find LO's bundled zlib.
    
    Change-Id: I0b5684ca6556c3da7874c17ff2da97b2753b0262
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143289
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/external/freetype/ExternalProject_freetype.mk 
b/external/freetype/ExternalProject_freetype.mk
index 2a61ac7d7be4..04c11cf794b8 100644
--- a/external/freetype/ExternalProject_freetype.mk
+++ b/external/freetype/ExternalProject_freetype.mk
@@ -19,7 +19,7 @@ $(call gb_ExternalProject_get_state_target,freetype,build) :
                $(gb_RUN_CONFIGURE) ./configure \
                        --disable-shared \
                        --with-pic \
-                       --without-zlib \
+                       --with-zlib \
                        --without-brotli \
                        --without-bzip2 \
                        --without-harfbuzz \
commit 654bd3a0ec480b3aab6571fbf1a607fc0bf6b11c
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Fri Nov 25 13:00:21 2022 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Nov 25 16:20:17 2022 +0100

    Revert "external/freetype: Avoid duplicate zlib symbols"
    
    This reverts commit e515267602d9049bc15739a215f43f1379141d81.
    
    Reason for revert: freetype should not build its own copy
    of zlib in the first place. See follow-up patch.
    
    Change-Id: Iab9205144bcd261701350fe088a3da187ab0aadd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143258
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/external/freetype/ExternalProject_freetype.mk 
b/external/freetype/ExternalProject_freetype.mk
index f8adeb46f6fd..2a61ac7d7be4 100644
--- a/external/freetype/ExternalProject_freetype.mk
+++ b/external/freetype/ExternalProject_freetype.mk
@@ -30,7 +30,6 @@ $(call gb_ExternalProject_get_state_target,freetype,build) :
                                $(call 
gb_ExternalProject_get_build_flags,freetype) \
                                $(gb_VISIBILITY_FLAGS) \
                                $(gb_EMSCRIPTEN_CPPFLAGS)" \
-                       CPPFLAGS='$(CPPFLAGS) -DZ_PREFIX' \
                        LDFLAGS="$(call 
gb_ExternalProject_get_link_flags,freetype)" \
                && $(MAKE) install \
                && touch $@     )
diff --git a/external/freetype/UnpackedTarball_freetype.mk 
b/external/freetype/UnpackedTarball_freetype.mk
index 0bc090ec2d34..076edb9e3d97 100644
--- a/external/freetype/UnpackedTarball_freetype.mk
+++ b/external/freetype/UnpackedTarball_freetype.mk
@@ -14,7 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,freetype,$(FREETYPE_TARBALL),,freet
 $(eval $(call gb_UnpackedTarball_add_patches,freetype,\
        external/freetype/freetype-2.6.5.patch.1 \
        external/freetype/ubsan.patch \
-       external/freetype/zlib-duplicates.patch \
 ))
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,freetype,0))
diff --git a/external/freetype/zlib-duplicates.patch 
b/external/freetype/zlib-duplicates.patch
deleted file mode 100644
index 9ae562c61b4f..000000000000
--- a/external/freetype/zlib-duplicates.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/gzip/ftzconf.h
-+++ src/gzip/ftzconf.h
-@@ -130,10 +130,8 @@
- #    define uncompress2           z_uncompress2
- #  endif
- #  define zError                z_zError
--#  ifndef Z_SOLO
- #    define zcalloc               z_zcalloc
- #    define zcfree                z_zcfree
--#  endif
- #  define zlibCompileFlags      z_zlibCompileFlags
- #  define zlibVersion           z_zlibVersion
- 
-@@ -163,6 +161,8 @@
- #  define gz_header_s           z_gz_header_s
- #  define internal_state        z_internal_state
- 
-+#define z_errmsg z_z_errmsg
-+
- #endif
- 
- #if defined(__MSDOS__) && !defined(MSDOS)

Reply via email to