RepositoryExternal.mk | 6 bin/lo-all-static-libs | 4 configure.ac | 128 +++++++++-------- download.lst | 10 - external/cairo/ExternalPackage_cairo.mk | 2 external/cairo/ExternalPackage_pixman.mk | 2 external/cairo/ExternalProject_cairo.mk | 101 ++++++++----- external/cairo/ExternalProject_pixman.mk | 59 +++++-- external/cairo/UnpackedTarball_cairo.mk | 45 ++--- external/cairo/cairo/0025-libtool-pass-use-ld.patch | 16 -- external/cairo/cairo/avoid-negative-left-shift.patch.1 | 14 + external/cairo/cairo/cairo-1.10.2.ios.patch | 27 --- external/cairo/cairo/cairo-1.10.2.no-atsui.patch | 22 -- external/cairo/cairo/cairo-libtool-rpath.patch.1 | 12 - external/cairo/cairo/cairo.GL_RGBA.patch | 37 ++-- external/cairo/cairo/cairo.RGB24_888.patch | 29 +-- external/cairo/cairo/cairo.buildfix.patch | 122 ---------------- external/cairo/cairo/cairo.ofz46165.patch.1 | 16 -- external/cairo/cairo/cairo.ofz50805.patch.1 | 16 -- external/cairo/cairo/disable-cairo-utilities.patch.1 | 11 + external/cairo/cairo/libcairo-bundled-soname.patch.0 | 12 - external/cairo/cairo/libcairo-bundled-soname.patch.1 | 12 + external/cairo/cairo/san.patch.0 | 58 ------- external/cairo/cairo/ubsan-memcpy-nullptr.patch.1 | 15 + external/cairo/cairo/ubsan-memcpy-nullptr2.patch.1 | 15 + external/cairo/pixman/pixman-0.24.4.patch | 11 - external/cairo/pixman/pixman-ubsan.patch | 9 - external/cairo/pixman/pixman-wasm.patch | 102 +++++-------- external/harfbuzz/ExternalProject_harfbuzz.mk | 2 29 files changed, 355 insertions(+), 560 deletions(-)
New commits: commit 2b515d095d7251db98241e6b69f9b110e64e9aea Author: Caolán McNamara <[email protected]> AuthorDate: Fri Sep 19 12:47:25 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Sep 27 21:38:46 2025 +0200 upgrade pixman and cairo Co-authored-by: Noel Grandin <[email protected]> Change-Id: I21b8c772138b544d3192b786a6bae4c64ebcac94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191199 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 83c4a5cc1406..c2165fc8e7ed 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1214,14 +1214,16 @@ $(call gb_LinkTarget_use_external,$(1),freetype_headers) $(call gb_LinkTarget_set_include,$(1),\ -I$(gb_UnpackedTarball_workdir)/cairo \ -I$(gb_UnpackedTarball_workdir)/cairo/src \ + -I$(gb_UnpackedTarball_workdir)/cairo/builddir/src \ -I$(gb_UnpackedTarball_workdir)/pixman/pixman \ + -I$(gb_UnpackedTarball_workdir)/pixman/builddir/pixman \ $$(INCLUDE) \ ) $(call gb_LinkTarget_add_libs,$(1),\ $(if $(filter EMSCRIPTEN,$(OS)), \ - $(gb_UnpackedTarball_workdir)/cairo/src/.libs/libcairo.a \ + $(gb_UnpackedTarball_workdir)/cairo/builddir/src/libcairo-lo.a \ $(gb_UnpackedTarball_workdir)/pixman/pixman/.libs/libpixman-1.a, \ - -L$(gb_UnpackedTarball_workdir)/cairo/src/.libs -lcairo \ + -L$(gb_UnpackedTarball_workdir)/cairo/builddir/src -lcairo-lo \ -L$(gb_UnpackedTarball_workdir)/pixman/pixman/.libs -lpixman-1) \ ) diff --git a/bin/lo-all-static-libs b/bin/lo-all-static-libs index dd85567f188d..41bba54fe913 100755 --- a/bin/lo-all-static-libs +++ b/bin/lo-all-static-libs @@ -39,8 +39,8 @@ ANDROID) oslibs="$WORKDIR/UnpackedTarball/curl/lib/.libs/*.a" oslibs="$oslibs $WORKDIR/UnpackedTarball/fontconfig/src/.libs/libfontconfig.a" oslibs="$oslibs $WORKDIR/UnpackedTarball/freetype/objs/.libs/libfreetype.a" - oslibs="$oslibs $WORKDIR/UnpackedTarball/pixman/pixman/.libs/libpixman-1.a" - oslibs="$oslibs $WORKDIR/UnpackedTarball/cairo/src/.libs/libcairo.a" + oslibs="$oslibs $WORKDIR/UnpackedTarball/pixman/builddir/pixman/libpixman-1.a" + oslibs="$oslibs $WORKDIR/UnpackedTarball/cairo/builddir/src/libcairo-lo.a" oslibs="$oslibs $WORKDIR/UnpackedTarball/xmlsec/src/.libs/libxmlsec1.a" oslibs="$oslibs $WORKDIR/UnpackedTarball/xmlsec/src/nss/.libs/libxmlsec1-nss.a" # Only liblo-bootstrap.a ends up here: diff --git a/configure.ac b/configure.ac index 3af7dbd1ba1f..6b0df1d62706 100644 --- a/configure.ac +++ b/configure.ac @@ -11679,63 +11679,8 @@ else AC_MSG_ERROR([--without-system-graphite must be used when --without-system-harfbuzz is used]) fi # harfbuzz is now built using meson - AC_ARG_VAR(MESON, [point to a specific meson to use instead of autodetecting]) - if test -z "$MESON"; then - if test -z "$PYTHON_FOR_BUILD"; then - # we also want to call meson with internal python and use internal meson - BUILD_TYPE="$BUILD_TYPE MESON" - MESON='$(gb_UnpackedTarball_workdir)/meson/meson.py' - else - # autodetect, prefer meson.py / standalone version that can more likely be run - # by different python runtimes - AC_PATH_PROGS(MESON,[meson.py meson],,[$LODE_HOME/opt/bin:$PATH]) - if test -z "$MESON"; then - AC_MSG_WARN([meson not found, using internal copy]) - BUILD_TYPE="$BUILD_TYPE MESON" - MESON='$(gb_UnpackedTarball_workdir)/meson/meson.py' - else - PathFormat "$MESON" - MESON="$formatted_path" - AC_MSG_CHECKING([whether meson can be run with "$PYTHON_FOR_BUILD $MESON"]) - if ($PYTHON_FOR_BUILD $MESON --version >/dev/null) ; then - # Xcode 26 and higher need a newer version of meson so use - # the internal meson if the external meson's version is - # too old - if test $_os = Darwin -a $MACOSX_SDK_VERSION -ge 260000; then - _meson_minver=1.8.3 - _meson_minmajmin=`echo $_meson_minver | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` - _meson_version=`$PYTHON_FOR_BUILD $MESON --version 2>/dev/null` - _meson_majmin=`echo $_meson_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` - if test "$_meson_majmin" -lt "$_meson_minmajmin"; then - AC_MSG_WARN([meson "$_meson_version" is too old, using internal copy]) - BUILD_TYPE="$BUILD_TYPE MESON" - MESON='$(gb_UnpackedTarball_workdir)/meson/meson.py' - else - AC_MSG_RESULT([yes]) - fi - else - AC_MSG_RESULT([yes]) - fi - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([meson incompatible with the specified python. Try using a different python runtime or a plain release of meson by adding PYTHON=/other/python.version and/or MESON=/path/to/meson.py to autogen.input]) - fi - fi - fi - MESON='$(call gb_ExternalExecutable_get_command,python) '"$MESON" - fi - AC_CHECK_PROG(NINJA,ninja,ninja) - if test -z "$MESON" -o -z "$NINJA"; then - AC_MSG_ERROR([you need to have meson and ninja in order to build harfbuzz]) - fi -fi -if test -z "$NINJA" || test "$NINJA" = 'assumed to be available from Visual Studio'; then - x_NINJA=[\#] -else - x_NINJA= + need_meson="yes" fi -AC_SUBST(x_NINJA) -AC_SUBST(NINJA) if test "$USING_X11" = TRUE; then AC_PATH_X @@ -14701,6 +14646,8 @@ if test "$test_cairo" = "yes"; then else AC_MSG_RESULT([no]) BUILD_TYPE="$BUILD_TYPE CAIRO" + # harfbuzz is now built using meson + need_meson="yes" fi if test "$enable_cairo_canvas" != no; then @@ -14714,6 +14661,75 @@ AC_SUBST(CAIRO_LIBS) AC_SUBST(ENABLE_CAIRO_CANVAS) AC_SUBST(SYSTEM_CAIRO) +dnl =================================================================== +dnl Check for meson +dnl =================================================================== +if test "$need_meson" = "yes"; then + AC_ARG_VAR(MESON, [point to a specific meson to use instead of autodetecting]) + if test -z "$MESON"; then + if test -z "$PYTHON_FOR_BUILD"; then + # we also want to call meson with internal python and use internal meson + BUILD_TYPE="$BUILD_TYPE MESON" + MESON='$(gb_UnpackedTarball_workdir)/meson/meson.py' + else + # autodetect, prefer meson.py / standalone version that can more likely be run + # by different python runtimes + AC_PATH_PROGS(MESON,[meson.py meson],,[$LODE_HOME/opt/bin:$PATH]) + if test -z "$MESON"; then + AC_MSG_WARN([meson not found, using internal copy]) + BUILD_TYPE="$BUILD_TYPE MESON" + MESON='$(gb_UnpackedTarball_workdir)/meson/meson.py' + else + PathFormat "$MESON" + MESON="$formatted_path" + AC_MSG_CHECKING([whether meson can be run with "$PYTHON_FOR_BUILD $MESON"]) + if ($PYTHON_FOR_BUILD $MESON --version >/dev/null) ; then + _meson_minver=0.61.5 + if test "$test_cairo" = "yes" -a "$SYSTEM_CAIRO" != "TRUE"; then + _meson_minver=1.3.0 + fi + # Xcode 26 and higher need a newer version of meson so use + # the internal meson if the external meson's version is + # too old + if test $_os = Darwin; then + if $MACOSX_SDK_VERSION -ge 260000; then + _meson_minver=1.8.3 + fi + fi + _meson_minmajmin=`echo $_meson_minver | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + _meson_version=`$PYTHON_FOR_BUILD $MESON --version 2>/dev/null` + _meson_majmin=`echo $_meson_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + if test "$_meson_majmin" -lt "$_meson_minmajmin"; then + AC_MSG_WARN([meson "$_meson_version" is too old, using internal copy]) + BUILD_TYPE="$BUILD_TYPE MESON" + MESON='$(gb_UnpackedTarball_workdir)/meson/meson.py' + else + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([min version of meson required]) + AC_MSG_RESULT([$meson_minver]) + fi + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([meson incompatible with the specified python. Try using a different python runtime or a plain release of meson by adding PYTHON=/other/python.version and/or MESON=/path/to/meson.py to autogen.input]) + fi + fi + fi + MESON='$(call gb_ExternalExecutable_get_command,python) '"$MESON" + fi + AC_CHECK_PROG(NINJA,ninja,ninja) + if test -z "$MESON" -o -z "$NINJA"; then + AC_MSG_ERROR([you need to have meson and ninja in order to build harfbuzz]) + fi +fi + +if test -z "$NINJA" || test "$NINJA" = 'assumed to be available from Visual Studio'; then + x_NINJA=[\#] +else + x_NINJA= +fi +AC_SUBST(x_NINJA) +AC_SUBST(NINJA) + dnl =================================================================== dnl Test whether to use avahi dnl =================================================================== diff --git a/download.lst b/download.lst index 6e7c9ec8b029..9e68e90c4eed 100644 --- a/download.lst +++ b/download.lst @@ -39,9 +39,9 @@ BZIP2_TARBALL := bzip2-1.0.8.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -CAIRO_SHA256SUM := 4eebc4c2bad0402bc3f501db184417094657d111fb6c06f076a82ea191fe1faf -CAIRO_VERSION_MICRO := 6 -CAIRO_TARBALL := cairo-1.17.$(CAIRO_VERSION_MICRO).tar.xz +CAIRO_SHA256SUM := 445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb +CAIRO_VERSION_MICRO := 4 +CAIRO_TARBALL := cairo-1.18.$(CAIRO_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick # will not run into conflicts @@ -569,8 +569,8 @@ PDFIUM_TARBALL := pdfium-7012.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PIXMAN_SHA256SUM := ea1480efada2fd948bc75366f7c349e1c96d3297d09a3fe62626e38e234a625e -PIXMAN_TARBALL := pixman-0.42.2.tar.gz +PIXMAN_SHA256SUM := a098c33924754ad43f981b740f6d576c70f9ed1006e12221b1845431ebce1239 +PIXMAN_TARBALL := pixman-0.46.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/cairo/ExternalPackage_cairo.mk b/external/cairo/ExternalPackage_cairo.mk index 6bd0800d9f21..3867e21aa6fd 100644 --- a/external/cairo/ExternalPackage_cairo.mk +++ b/external/cairo/ExternalPackage_cairo.mk @@ -12,7 +12,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,cairo,cairo)) $(eval $(call gb_ExternalPackage_use_external_project,cairo,cairo)) ifneq ($(DISABLE_DYNLOADING),TRUE) -$(eval $(call gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo-lo.so.2,src/.libs/libcairo-lo.so.2.1170$(CAIRO_VERSION_MICRO).0)) +$(eval $(call gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo-lo.so.2,builddir/src/libcairo-lo.so.2.1180$(CAIRO_VERSION_MICRO).$(CAIRO_VERSION_MICRO))) endif # vim: set noet sw=4 ts=4: diff --git a/external/cairo/ExternalPackage_pixman.mk b/external/cairo/ExternalPackage_pixman.mk index 85ff062f22e2..7f2261b6e405 100644 --- a/external/cairo/ExternalPackage_pixman.mk +++ b/external/cairo/ExternalPackage_pixman.mk @@ -12,7 +12,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,pixman,pixman)) $(eval $(call gb_ExternalPackage_use_external_project,pixman,pixman)) ifneq ($(DISABLE_DYNLOADING),TRUE) -$(eval $(call gb_ExternalPackage_add_file,pixman,$(LIBO_LIB_FOLDER)/libpixman-1.so.0,pixman/.libs/libpixman-1.so.0.42.2)) +$(eval $(call gb_ExternalPackage_add_file,pixman,$(LIBO_LIB_FOLDER)/libpixman-1.so.0,builddir/pixman/libpixman-1.so.0.46.4)) endif # vim: set noet sw=4 ts=4: diff --git a/external/cairo/ExternalProject_cairo.mk b/external/cairo/ExternalProject_cairo.mk index 53536cea2f00..1877295f68c4 100644 --- a/external/cairo/ExternalProject_cairo.mk +++ b/external/cairo/ExternalProject_cairo.mk @@ -9,18 +9,43 @@ $(eval $(call gb_ExternalProject_ExternalProject,cairo)) +$(eval $(call gb_ExternalProject_register_targets,cairo,\ + build \ +)) + $(eval $(call gb_ExternalProject_use_external_project,cairo,pixman)) $(eval $(call gb_ExternalProject_use_externals,cairo,\ - fontconfig \ + fontconfig \ freetype \ libpng \ + meson \ zlib \ )) -$(eval $(call gb_ExternalProject_register_targets,cairo,\ - build \ -)) +# We cannot use environment vars inside the meson cross-build file, +# so we're going to have to generate one on-the-fly. +# mungle variables into python list format +python_listify = '$(subst $(WHITESPACE),'$(COMMA)',$(strip $(1)))' +cross_c = $(call python_listify,$(gb_CC)) +cross_cxx = $(call python_listify,$(gb_CXX)) +cross_ld := $(call python_listify,$(subst -fuse-ld=,,$(USE_LD))) + +define gb_cairo_cross_compile +[binaries] +c = [$(cross_c)] +cpp = [$(cross_cxx)] +c_ld = [$(cross_ld)] +cpp_ld = [$(cross_ld)] +ar = '$(AR)' +strip = '$(STRIP)' +# TODO: this is pretty ugly... +[host_machine] +system = '$(if $(filter WNT,$(OS)),windows,$(if $(filter MACOSX,$(OS)),darwin,$(if $(filter ANDROID,$(OS)),android,linux)))' +cpu_family = '$(subst X86_64,x86_64,$(RTL_ARCH))' +cpu = '$(if $(filter x86,$(RTL_ARCH)),i686,$(if $(filter X86_64,$(RTL_ARCH)),x86_64,$(if $(filter AARCH64,$(RTL_ARCH)),aarch64,armv7)))' +endian = '$(ENDIANNESS)' +endef # Including -rtlib=compiler-rt in pixman_LIBS is a BAD HACK: At least when compiling with Clang # -fsanitize=undefined on Linux x86-64, the generated code references __muloti4, which is an @@ -42,43 +67,45 @@ $(eval $(call gb_ExternalProject_register_targets,cairo,\ # cairo's configure. And pixman_LIBS happens to offer that. (The -Wc is necessary so that libtool # does not throw away the -rtlib=compiler-rt which it does not understand.) +# We control how cairo handles its subprojects/dependencies by adding entries to PKG_CONFIG_PATH . +# Meson will look in those locations for *.pc files, which contains FLAGS and LIBS entries. + +# We set PKG_CONFIG_TOP_BUILD_DIR= in order to work around some pkg-config weirdness, which otherwise +# will make meson crash. + $(call gb_ExternalProject_get_state_target,cairo,build) : $(call gb_Trace_StartRange,cairo,EXTERNAL) + $(file >$(gb_UnpackedTarball_workdir)/cairo/cross-file.txt,$(gb_cairo_cross_compile)) $(call gb_ExternalProject_run,build,\ - $(gb_RUN_CONFIGURE) ./configure \ - $(if $(debug),STRIP=" ") \ - $(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -DCAIRO_NO_MUTEX $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \ + PYTHONWARNINGS= \ + PKG_CONFIG_TOP_BUILD_DIR= \ + $(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(gb_VISIBILITY_FLAGS)") \ + $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -DCAIRO_NO_MUTEX -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \ + PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(gb_UnpackedTarball_workdir)/pixman/builddir/meson-uninstalled" \ + $(if $(SYSTEM_FREETYPE),,PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:$(gb_UnpackedTarball_workdir)/freetype/instdir/lib/pkgconfig") \ + $(if $(SYSTEM_FONTCONFIG),,PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:$(gb_UnpackedTarball_workdir)/fontconfig") \ + $(comment # on android we use system provided libz, but there is no .pc file, so create one for cairo) \ + $(if $(filter ANDROID,$(OS)), \ + $(shell mkdir $(gb_UnpackedTarball_workdir)/cairo/missing-system-pc) \ + $(file >$(gb_UnpackedTarball_workdir)/cairo/missing-system-pc/zlib.pc,$(call gb_pkgconfig_file,zlib,1.2.8,$(ZLIB_CFLAGS),$(ZLIB_LIBS))) \ + PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:$(gb_UnpackedTarball_workdir)/cairo/missing-system-pc" \ + ) \ + $(if $(SYSTEM_ZLIB),,PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:$(gb_UnpackedTarball_workdir)/zlib") \ + $(if $(SYSTEM_LIBPNG),,PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:$(gb_UnpackedTarball_workdir)/libpng") \ $(if $(filter -fsanitize=undefined,$(CC)),CC='$(CC) -fno-sanitize=function') \ - $(if $(filter-out EMSCRIPTEN ANDROID iOS,$(OS)), \ - CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,cairo) $(ZLIB_CFLAGS)" \ - LDFLAGS="$(call gb_ExternalProject_get_link_flags,cairo)" \ - ) \ - $(if $(filter MACOSX ANDROID iOS,$(OS)),PKG_CONFIG=./dummy_pkg_config) \ - LIBS="$(ZLIB_LIBS)" \ - $(if $(filter -fsanitize=%,$(LDFLAGS)),LDFLAGS="$(LDFLAGS) -fuse-ld=bfd") \ - pixman_CFLAGS="-I$(gb_UnpackedTarball_workdir)/pixman/pixman -pthread" \ - pixman_LIBS="-L$(gb_UnpackedTarball_workdir)/pixman/pixman/.libs -lpixman-1 \ - $(if $(filter LINUX,$(OS)),-Wl$(COMMA)-z$(COMMA)origin \ - -Wl$(COMMA)-rpath$(COMMA)\\$$\$$ORIGIN) \ - $(if $(filter -fsanitize=%,$(CC)), \ - $(if $(filter LINUX-X86_64-TRUE,$(OS)-$(CPUNAME)-$(COM_IS_CLANG)), \ - -Wc$(COMMA)-rtlib=compiler-rt))" \ - png_REQUIRES="trick_configure_into_using_png_CFLAGS_and_LIBS" \ - png_CFLAGS="$(LIBPNG_CFLAGS)" png_LIBS="$(LIBPNG_LIBS)" \ - $(if $(SYSTEM_FREETYPE),,FREETYPE_CFLAGS="-I$(gb_UnpackedTarball_workdir)/freetype/include") \ - $(if $(SYSTEM_FONTCONFIG),,FONTCONFIG_CFLAGS="-I$(gb_UnpackedTarball_workdir)/fontconfig") \ - $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ - $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ - $(if $(filter EMSCRIPTEN ANDROID iOS,$(OS)),--disable-xlib --disable-xcb,$(if $(filter TRUE,$(DISABLE_GUI)),--disable-xlib --disable-xcb,--enable-xlib --enable-xcb)) \ - $(if $(filter iOS,$(OS)),--enable-quartz --enable-quartz-font) \ - --disable-valgrind \ - $(if $(filter iOS,$(OS)),--disable-ft,--enable-ft --enable-fc) \ - --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no \ - $(gb_CONFIGURE_PLATFORMS) \ - $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no ax_cv_c_float_words_bigendian=no)) \ - $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ - && cd src && $(MAKE) \ + $(MESON) setup --wrap-mode nofallback builddir \ + $(if $(debug),-Dstrip=false,-Dstrip=true) \ + $(if $(filter -fsanitize=%,$(CC)),-Db_lundef=false) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-Ddefault_library=static,-Ddefault_library=shared) \ + $(if $(filter EMSCRIPTEN ANDROID iOS,$(OS)),-Dxlib=disabled -Dxcb=disabled,$(if $(filter TRUE,$(DISABLE_GUI)),-Dxlib=disabled -Dxcb=disabled,-Dxlib=enabled -Dxcb=enabled)) \ + $(if $(filter iOS,$(OS)),-Dquartz=enabled) \ + $(if $(filter iOS,$(OS)),-Dfreetype=disabled,-Dfreetype=enabled -Dfontconfig=enabled) \ + -Dgtk_doc=false -Dtests=disabled \ + $(if $(CROSS_COMPILING),--cross-file cross-file.txt) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + $(if $(filter-out $(BUILD_PLATFORM),$(HOST_PLATFORM))$(WSL),--cross-file cross-file.txt) && \ + $(MESON) compile -C builddir \ + $(if $(verbose),--verbose) \ ) $(call gb_Trace_EndRange,cairo,EXTERNAL) diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk index f95fcb626ccc..67105d2befa1 100644 --- a/external/cairo/ExternalProject_pixman.mk +++ b/external/cairo/ExternalProject_pixman.mk @@ -13,24 +13,53 @@ $(eval $(call gb_ExternalProject_register_targets,pixman,\ build \ )) -# ANDROID: -# The pixman-cpu.c code wants to read /proc/<pid>/auxv, but -# the Android headers don't define Elf32_auxv_t. -# -# Maybe we should instead just patch the arm_has_* booleans in -# pixman-cpu.c to be hardcoded as TRUE and patch out the run-time -# check? +$(eval $(call gb_ExternalProject_use_externals,pixman,\ + meson \ +)) + +# We cannot use environment vars inside the meson cross-build file, +# so we're going to have to generate one on-the-fly. +# mungle variables into python list format +python_listify = '$(subst $(WHITESPACE),'$(COMMA)',$(strip $(1)))' +cross_c = $(call python_listify,$(gb_CC)) +cross_cxx = $(call python_listify,$(gb_CXX)) +cross_ld := $(call python_listify,$(subst -fuse-ld=,,$(USE_LD))) + +define gb_pixman_cross_compile +[binaries] +c = [$(cross_c)] +cpp = [$(cross_cxx)] +c_ld = [$(cross_ld)] +cpp_ld = [$(cross_ld)] +ar = '$(AR)' +strip = '$(STRIP)' +# TODO: this is pretty ugly... +[host_machine] +system = '$(if $(filter WNT,$(OS)),windows,$(if $(filter MACOSX,$(OS)),darwin,$(if $(filter ANDROID,$(OS)),android,linux)))' +cpu_family = '$(subst X86_64,x86_64,$(RTL_ARCH))' +cpu = '$(if $(filter x86,$(RTL_ARCH)),i686,$(if $(filter X86_64,$(RTL_ARCH)),x86_64,$(if $(filter AARCH64,$(RTL_ARCH)),aarch64,armv7)))' +endian = '$(ENDIANNESS)' +endef + $(call gb_ExternalProject_get_state_target,pixman,build) : $(call gb_Trace_StartRange,pixman,EXTERNAL) + $(file >$(gb_UnpackedTarball_workdir)/pixman/cross-file.txt,$(gb_pixman_cross_compile)) $(call gb_ExternalProject_run,build,\ - $(gb_RUN_CONFIGURE) ./configure \ - $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ - $(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-a64-neon --disable-arm-iwmmxt) \ - $(gb_CONFIGURE_PLATFORMS) \ - $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread -msimd128") \ - $(if $(filter -fsanitize=undefined,$(CC)),CC='$(CC) -fno-sanitize=function') \ - && $(MAKE) \ + export PIXMAP_CFLAGS="\ + $(if $(call gb_Module__symbols_enabled,pixman),$(gb_DEBUGINFO_FLAGS) ) \ + $(if $(filter EMSCRIPTEN,$(OS)),-O3 -pthread -msimd128 ) \ + $(if $(filter -fsanitize=undefined,$(CC)),-fno-sanitize=function ) \ + " && \ + $(MESON) setup --wrap-mode nofallback builddir \ + -Ddefault_library=$(if $(filter TRUE,$(DISABLE_DYNLOADING)),static,shared) \ + $(if $(call gb_Module__symbols_enabled,pixman),-Dc_args="$$PIXMAP_CFLAGS") \ + $(if $(filter ANDROID,$(OS)),-Darm-simd=disabled -Dneon=disabled -Da64-neon=disabled) \ + -Dbuildtype=$(if $(ENABLE_DBGUTIL),debug,$(if $(ENABLE_DEBUG),debugoptimized,release)) \ + -Dauto_features=disabled \ + -Dtests=disabled \ + $(if $(filter-out $(BUILD_PLATFORM),$(HOST_PLATFORM))$(WSL),--cross-file cross-file.txt) && \ + $(MESON) compile -C builddir \ + $(if $(verbose),--verbose) \ ) $(call gb_Trace_EndRange,pixman,EXTERNAL) diff --git a/external/cairo/UnpackedTarball_cairo.mk b/external/cairo/UnpackedTarball_cairo.mk index e0a60bc7f7d6..8269ec6bc85f 100644 --- a/external/cairo/UnpackedTarball_cairo.mk +++ b/external/cairo/UnpackedTarball_cairo.mk @@ -13,40 +13,27 @@ $(eval $(call gb_UnpackedTarball_set_tarball,cairo,$(CAIRO_TARBALL),,cairo)) $(eval $(call gb_UnpackedTarball_set_patchlevel,cairo,2)) -# cairo >= 1.17.6 was probably created in Fedora where -# https://salsa.debian.org/mckinstry/libtool/-/commit/26c23f951d049241128e5e04a7bbc263e5b145f1 -# isn't applied, so add that in to avoid: /usr/bin/ld: unrecognized option '--gdb-index' - -# ofz50805.patch https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/350 -# ofz46165.patch upstreamed as https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/351 -# san.patch upstreamed as https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/352 - -$(eval $(call gb_UnpackedTarball_add_patches,cairo,\ - external/cairo/cairo/cairo.buildfix.patch \ - external/cairo/cairo/cairo.RGB24_888.patch \ - external/cairo/cairo/cairo-libtool-rpath.patch.1 \ - external/cairo/cairo/cairo.oldfreetype.patch \ - external/cairo/cairo/san.patch.0 \ - external/cairo/cairo/cairo.ofz46165.patch.1 \ - external/cairo/cairo/cairo.ofz50805.patch.1 \ - external/cairo/cairo/0025-libtool-pass-use-ld.patch \ - external/cairo/cairo/libcairo-bundled-soname.patch.0 \ - external/cairo/cairo/cairo-fd-hack.patch.0 \ - external/cairo/cairo/cairo.ofz57493-Timeout.patch.1 \ - external/cairo/cairo/shm-null-deref.patch.1 \ - external/cairo/cairo/Wincompatible-pointer-types.patch.0 \ -)) - -ifeq ($(OS),iOS) +# The avoid-negative-left-shift patch, I'm not sure if it's the right thing. It triggers in JunitTest_chart2_unoapi. +# +# The ubsan-memcpy-nullptr is reported at https://gitlab.freedesktop.org/cairo/cairo/-/issues/884 +# $(eval $(call gb_UnpackedTarball_add_patches,cairo,\ - external/cairo/cairo/cairo-1.10.2.no-atsui.patch \ - external/cairo/cairo/cairo-1.10.2.ios.patch \ + external/cairo/cairo/cairo.RGB24_888.patch \ + external/cairo/cairo/san.patch.0 \ + external/cairo/cairo/libcairo-bundled-soname.patch.1 \ + external/cairo/cairo/cairo-fd-hack.patch.0 \ + external/cairo/cairo/cairo.ofz57493-Timeout.patch.1 \ + external/cairo/cairo/shm-null-deref.patch.1 \ + external/cairo/cairo/avoid-negative-left-shift.patch.1 \ + external/cairo/cairo/ubsan-memcpy-nullptr.patch.1 \ + external/cairo/cairo/ubsan-memcpy-nullptr2.patch.1 \ + external/cairo/cairo/Wincompatible-pointer-types.patch.0 \ + external/cairo/cairo/disable-cairo-utilities.patch.1 \ )) -endif ifeq ($(ENABLE_CAIRO_RGBA),TRUE) $(eval $(call gb_UnpackedTarball_add_patches,cairo,\ - external/cairo/cairo/cairo.GL_RGBA.patch \ + external/cairo/cairo/cairo.GL_RGBA.patch \ )) endif diff --git a/external/cairo/cairo/0025-libtool-pass-use-ld.patch b/external/cairo/cairo/0025-libtool-pass-use-ld.patch deleted file mode 100644 index c5558ff736a1..000000000000 --- a/external/cairo/cairo/0025-libtool-pass-use-ld.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/cairo/build/ltmain.sh 2022-05-04 16:12:17.409012360 +0100 -+++ b/cairo/build/ltmain.sh 2022-05-04 16:12:42.510870063 +0100 -@@ -7273,11 +7273,12 @@ - # --sysroot=* for sysroot support - # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files -+ # -fuse-ld=* Linker select flags for GCC - # -stdlib=* select c++ std lib with clang - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -- -specs=*) -+ -specs=*|-fuse-ld=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" diff --git a/external/cairo/cairo/avoid-negative-left-shift.patch.1 b/external/cairo/cairo/avoid-negative-left-shift.patch.1 new file mode 100644 index 000000000000..299feeb7f335 --- /dev/null +++ b/external/cairo/cairo/avoid-negative-left-shift.patch.1 @@ -0,0 +1,14 @@ +Only in cairo: builddir +Only in cairo: build.log +diff -ur cairo.org/src/cairo-fixed-private.h cairo/src/cairo-fixed-private.h +--- cairo.org/src/cairo-fixed-private.h 2025-01-30 11:47:24.708589118 +0200 ++++ cairo/src/cairo-fixed-private.h 2025-01-30 11:48:36.632864262 +0200 +@@ -265,7 +265,7 @@ + } else if ((f >> CAIRO_FIXED_FRAC_BITS) > INT16_MAX) { + x = INT32_MAX; + } else { +- x = f << (16 - CAIRO_FIXED_FRAC_BITS); ++ x = (cairo_fixed_t)((unsigned)f << (16 - CAIRO_FIXED_FRAC_BITS)); + } + + return x; diff --git a/external/cairo/cairo/cairo-1.10.2.ios.patch b/external/cairo/cairo/cairo-1.10.2.ios.patch deleted file mode 100644 index c61faf333f0c..000000000000 --- a/external/cairo/cairo/cairo-1.10.2.ios.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- misc/cairo-1.10.2/configure 2011-12-16 10:02:39.626077757 +0100 -+++ misc/build/cairo-1.10.2/configure 2011-12-16 10:02:23.518237109 +0100 -@@ -22766,11 +22766,13 @@ - - - ac_fn_c_check_header_mongrel "$LINENO" "ApplicationServices/ApplicationServices.h" "ac_cv_header_ApplicationServices_ApplicationServices_h" "$ac_includes_default" -+if false; then - if test "x$ac_cv_header_ApplicationServices_ApplicationServices_h" = x""yes; then : - - else - use_quartz="no (requires ApplicationServices framework)" - fi -+fi - - - if test "x$use_quartz" != "xyes" ; then ---- misc/cairo-1.10.2/src/cairo-quartz.h 2011-12-16 10:02:39.639079241 +0100 -+++ misc/build/cairo-1.10.2/src/cairo-quartz.h 2011-12-16 10:01:18.404789245 +0100 -@@ -40,7 +40,7 @@ - - #if CAIRO_HAS_QUARTZ_SURFACE - --#include <ApplicationServices/ApplicationServices.h> -+#include <CoreGraphics/CoreGraphics.h> - - CAIRO_BEGIN_DECLS - diff --git a/external/cairo/cairo/cairo-1.10.2.no-atsui.patch b/external/cairo/cairo/cairo-1.10.2.no-atsui.patch deleted file mode 100644 index 51b98afa59b9..000000000000 --- a/external/cairo/cairo/cairo-1.10.2.no-atsui.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- misc/cairo-1.10.2/src/cairo-quartz-font.c 2010-12-25 15:21:34.000000000 +0100 -+++ misc/build/cairo-1.10.2/src/cairo-quartz-font.c 2011-12-16 09:54:18.672445207 +0100 -@@ -777,7 +777,7 @@ - return ffont->cgFont; - } - --#ifndef __LP64__ -+#if 0 - /* - * compat with old ATSUI backend - */ ---- misc/cairo-1.10.2/src/cairo-quartz.h 2010-06-18 13:47:13.000000000 +0200 -+++ misc/build/cairo-1.10.2/src/cairo-quartz.h 2011-12-16 09:52:53.081501547 +0100 -@@ -66,7 +66,7 @@ - cairo_public cairo_font_face_t * - cairo_quartz_font_face_create_for_cgfont (CGFontRef font); - --#ifndef __LP64__ -+#if 0 - cairo_public cairo_font_face_t * - cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id); - #endif diff --git a/external/cairo/cairo/cairo-libtool-rpath.patch.1 b/external/cairo/cairo/cairo-libtool-rpath.patch.1 deleted file mode 100644 index 18a3507a9506..000000000000 --- a/external/cairo/cairo/cairo-libtool-rpath.patch.1 +++ /dev/null @@ -1,12 +0,0 @@ -Prevent libtool from adding annoying stuff to RPATH - ---- cairo/configure.orig 2018-10-19 22:20:08.000000000 +0200 -+++ cairo/configure 2019-09-04 17:53:00.927539686 +0200 -@@ -10432,6 +10432,7 @@ - else - ld_shlibs=no - fi -+hardcode_libdir_flag_spec= - ;; - - netbsd*) diff --git a/external/cairo/cairo/cairo.GL_RGBA.patch b/external/cairo/cairo/cairo.GL_RGBA.patch index bad6a81ed541..34c6da9ba989 100644 --- a/external/cairo/cairo/cairo.GL_RGBA.patch +++ b/external/cairo/cairo/cairo.GL_RGBA.patch @@ -14,27 +14,26 @@ return CAIRO_FORMAT_RGB24; case PIXMAN_a8: return CAIRO_FORMAT_A8; -@@ -109,7 +109,7 @@ +@@ -109,15 +109,15 @@ return CAIRO_FORMAT_A1; case PIXMAN_r5g6b5: return CAIRO_FORMAT_RGB16_565; -- case PIXMAN_r8g8b8: -+ case PIXMAN_b8g8r8: //tweaked +- case PIXMAN_r8g8b8: ++ case PIXMAN_b8g8r8: //tweaked return CAIRO_FORMAT_RGB24_888; - #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,22,0) case PIXMAN_r8g8b8a8: case PIXMAN_r8g8b8x8: -@@ -117,8 +117,8 @@ - #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,27,2) case PIXMAN_a8r8g8b8_sRGB: + #if HAS_PIXMAN_r8g8b8_sRGB + case PIXMAN_r8g8b8_sRGB: #endif -- case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: +- case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: - case PIXMAN_b8g8r8: case PIXMAN_b5g6r5: + case PIXMAN_a8r8g8b8: case PIXMAN_x8r8g8b8: //tweaked + case PIXMAN_r8g8b8: case PIXMAN_b5g6r5: case PIXMAN_a1r5g5b5: case PIXMAN_x1r5g5b5: case PIXMAN_a1b5g5r5: case PIXMAN_x1b5g5r5: case PIXMAN_a4r4g4b4: case PIXMAN_x4r4g4b4: case PIXMAN_a4b4g4r4: case PIXMAN_x4b4g4r4: case PIXMAN_r3g3b2: -@@ -320,7 +320,7 @@ +@@ -335,7 +335,7 @@ ret = PIXMAN_a8; break; case CAIRO_FORMAT_RGB24: @@ -43,7 +42,7 @@ break; case CAIRO_FORMAT_RGB30: ret = PIXMAN_x2r10g10b10; -@@ -335,12 +335,12 @@ +@@ -350,12 +350,12 @@ ret = PIXMAN_rgba_float; break; case CAIRO_FORMAT_RGB24_888: @@ -60,7 +59,7 @@ return ret; --- misc/cairo-1.10.2/src/cairo-ft-font.c +++ misc/cairo-1.10.2/src/cairo-ft-font.c -@@ -1318,6 +1321,19 @@ +@@ -1331,6 +1331,19 @@ memcpy (data, bitmap->buffer, (size_t)stride * height); } @@ -80,15 +79,15 @@ if (!_cairo_is_little_endian ()) { /* Byteswap. */ -@@ -2573,7 +2589,7 @@ - if (unlikely (status)) - return status; - -- if (pixman_image_get_format (surface->pixman_image) == PIXMAN_a8r8g8b8 && -+ if (pixman_image_get_format (surface->pixman_image) == PIXMAN_a8b8g8r8 && - !pixman_image_get_component_alpha (surface->pixman_image)) { - _cairo_scaled_glyph_set_color_surface (scaled_glyph, - &scaled_font->base, +@@ -2679,7 +2692,7 @@ + /* We tried loading a color glyph and can now check if we got + * a color glyph and set scaled_glyph->color_glyph + * accordingly */ +- if (pixman_image_get_format (surface->pixman_image) == PIXMAN_a8r8g8b8 && ++ if (pixman_image_get_format (surface->pixman_image) == PIXMAN_a8b8g8r8 && + !pixman_image_get_component_alpha (surface->pixman_image)) + { + _cairo_scaled_glyph_set_color_surface (scaled_glyph, --- misc/cairo-1.10.2/src/cairo-image-compositor.c +++ misc/cairo-1.10.2/src/cairo-image-compositor.c @@ -1074,7 +1074,7 @@ diff --git a/external/cairo/cairo/cairo.RGB24_888.patch b/external/cairo/cairo/cairo.RGB24_888.patch index b33bee411b9b..c2d70f4c1ddf 100644 --- a/external/cairo/cairo/cairo.RGB24_888.patch +++ b/external/cairo/cairo/cairo.RGB24_888.patch @@ -1,7 +1,7 @@ diff -ru cairo-1.17.4.orig/src/cairo.h cairo-1.17.4/src/cairo.h --- misc/cairo-1.17.4.orig/src/cairo.h 2021-08-29 19:43:26.976435721 +0100 +++ misc/build/cairo-1.17.4/src/cairo.h 2021-08-29 19:47:41.373919330 +0100 -@@ -407,6 +407,8 @@ +@@ -420,6 +420,8 @@ * @CAIRO_FORMAT_RGB30: like RGB24 but with 10bpc. (Since 1.12) * @CAIRO_FORMAT_RGB96F: 3 floats, R, G, B. (Since 1.17.2) * @CAIRO_FORMAT_RGBA128F: 4 floats, R, G, B, A. (Since 1.17.2) @@ -10,7 +10,7 @@ diff -ru cairo-1.17.4.orig/src/cairo.h cairo-1.17.4/src/cairo.h * * #cairo_format_t is used to identify the memory format of * image data. -@@ -424,9 +426,16 @@ +@@ -437,10 +439,18 @@ CAIRO_FORMAT_RGB16_565 = 4, CAIRO_FORMAT_RGB30 = 5, CAIRO_FORMAT_RGB96F = 6, @@ -19,15 +19,17 @@ diff -ru cairo-1.17.4.orig/src/cairo.h cairo-1.17.4/src/cairo.h + CAIRO_FORMAT_RGB24_888 = 8 } cairo_format_t; -+/** + /** + * Need this until CAIRO_FORMAT_RGB24_888 is in some official release. + * Otherwise we can't reliably check if this is available or we should + * convert from 24-bit RGB to 32-bit RGB before passing to Cairo. + **/ +#define HAVE_CAIRO_FORMAT_RGB24_888 - - /** - * cairo_write_func_t: ++ ++/** + * cairo_dither_t: + * @CAIRO_DITHER_NONE: No dithering. + * @CAIRO_DITHER_DEFAULT: Default choice at cairo compile time. Currently NONE. diff -ru cairo-1.17.4.orig/src/cairo-image-source.c cairo-1.17.4/src/cairo-image-source.c --- misc/cairo-1.17.4.orig/src/cairo-image-source.c 2021-08-29 19:43:26.979435585 +0100 +++ misc/build/cairo-1.17.4/src/cairo-image-source.c 2021-08-29 19:43:47.501506559 +0100 @@ -54,24 +56,23 @@ diff -ru cairo-1.17.4.orig/src/cairo-image-source.c cairo-1.17.4/src/cairo-image diff -ru cairo-1.17.4.orig/src/cairo-image-surface.c cairo-1.17.4/src/cairo-image-surface.c --- misc/cairo-1.17.4.orig/src/cairo-image-surface.c 2021-08-29 19:43:26.982435449 +0100 +++ misc/build/cairo-1.17.4/src/cairo-image-surface.c 2021-08-29 19:43:47.501506559 +0100 -@@ -109,13 +109,15 @@ +@@ -109,12 +109,14 @@ return CAIRO_FORMAT_A1; case PIXMAN_r5g6b5: return CAIRO_FORMAT_RGB16_565; -+ case PIXMAN_r8g8b8: ++ case PIXMAN_r8g8b8: + return CAIRO_FORMAT_RGB24_888; - #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,22,0) case PIXMAN_r8g8b8a8: case PIXMAN_r8g8b8x8: - #endif - #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,27,2) case PIXMAN_a8r8g8b8_sRGB: + #if HAS_PIXMAN_r8g8b8_sRGB + case PIXMAN_r8g8b8_sRGB: #endif - case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: case PIXMAN_r8g8b8: -+ case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: ++ case PIXMAN_a8b8g8r8: case PIXMAN_x8b8g8r8: case PIXMAN_b8g8r8: case PIXMAN_b5g6r5: case PIXMAN_a1r5g5b5: case PIXMAN_x1r5g5b5: case PIXMAN_a1b5g5r5: case PIXMAN_x1b5g5r5: case PIXMAN_a4r4g4b4: case PIXMAN_x4r4g4b4: -@@ -332,6 +334,9 @@ +@@ -347,6 +349,9 @@ case CAIRO_FORMAT_RGBA128F: ret = PIXMAN_rgba_float; break; @@ -81,7 +82,7 @@ diff -ru cairo-1.17.4.orig/src/cairo-image-surface.c cairo-1.17.4/src/cairo-imag case CAIRO_FORMAT_ARGB32: case CAIRO_FORMAT_INVALID: default: -@@ -736,6 +741,8 @@ +@@ -743,6 +748,8 @@ case CAIRO_FORMAT_RGB30: case CAIRO_FORMAT_RGB24: return 32; diff --git a/external/cairo/cairo/cairo.buildfix.patch b/external/cairo/cairo/cairo.buildfix.patch deleted file mode 100644 index 5b64dfb593f2..000000000000 --- a/external/cairo/cairo/cairo.buildfix.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff -ru cairo-1.17.4.orig/build/Makefile.win32.features cairo-1.17.4/build/Makefile.win32.features ---- misc/cairo-1.17.4.orig/build/Makefile.win32.features 2021-08-29 19:43:27.093430425 +0100 -+++ misc/build/cairo-1.17.4/build/Makefile.win32.features 2021-08-29 19:43:47.496506785 +0100 -@@ -30,7 +30,7 @@ - CAIRO_HAS_FC_FONT=0 - CAIRO_HAS_PS_SURFACE=1 - CAIRO_HAS_PDF_SURFACE=1 --CAIRO_HAS_SVG_SURFACE=1 -+CAIRO_HAS_SVG_SURFACE=0 - CAIRO_HAS_TEST_SURFACES=0 - CAIRO_HAS_TEE_SURFACE=0 - CAIRO_HAS_XML_SURFACE=0 -diff -ru cairo-1.17.4.orig/configure cairo-1.17.4/configure ---- misc/cairo-1.17.4.orig/configure 2021-08-29 19:43:26.966436173 +0100 -+++ misc/build/cairo-1.17.4/configure 2021-08-29 19:43:47.500506604 +0100 -@@ -17149,61 +17149,12 @@ - rm -f confcache - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 --$as_echo_n "checking for compress in -lz... " >&6; } --if ${ac_cv_lib_z_compress+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lz $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char compress (); --int --main () --{ --return compress (); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_z_compress=yes --else -- ac_cv_lib_z_compress=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 --$as_echo "$ac_cv_lib_z_compress" >&6; } --if test "x$ac_cv_lib_z_compress" = xyes; then : -- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" --if test "x$ac_cv_header_zlib_h" = xyes; then : - - have_libz=yes - - $as_echo "#define HAVE_ZLIB 1" >>confdefs.h - - --else -- have_libz="no (requires zlib http://www.gzip.org/zlib/)" --fi -- -- --else -- have_libz="no (requires zlib http://www.gzip.org/zlib/)" --fi -- -- - save_LIBS="$LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzo2a_decompress in -llzo2" >&5 - $as_echo_n "checking for lzo2a_decompress in -llzo2... " >&6; } -@@ -24319,7 +24270,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_VERSION - OK" >&5 - $as_echo "$FREETYPE_VERSION - OK" >&6; } - ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags` -- ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs` -+ ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs | $SED -e 's/-lz//g'` - else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_VERSION - Too old" >&5 - $as_echo "$FREETYPE_VERSION - Too old" >&6; } - use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)" -@@ -24329,7 +24280,7 @@ - fi - - ft_CFLAGS="$FREETYPE_CFLAGS" -- ft_LIBS="$FREETYPE_LIBS" -+ ft_LIBS=`echo "$FREETYPE_LIBS" | $SED -e 's/-lz//g'` - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo's FreeType font backend feature could be enabled" >&5 -@@ -24962,7 +24913,7 @@ - - # The ps backend requires zlib. - use_ps=$have_libz -- ps_NONPKGCONFIG_LIBS=-lz -+ ps_NONPKGCONFIG_LIBS=$ZLIB3RDLIB - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo's PostScript surface backend feature could be enabled" >&5 -@@ -25355,7 +25306,7 @@ - - # The pdf backend requires zlib. - use_pdf=$have_libz -- pdf_NONPKGCONFIG_LIBS=-lz -+ pdf_NONPKGCONFIG_LIBS=$ZLIB3RDLIB - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo's PDF surface backend feature could be enabled" >&5 -@@ -27218,7 +27169,7 @@ - use_xml="no (requires --enable-png)" - else - use_xml=$have_libz -- xml_NONPKGCONFIG_LIBS=-lz -+ xml_NONPKGCONFIG_LIBS=$ZLIB3RDLIB - fi - - diff --git a/external/cairo/cairo/cairo.ofz46165.patch.1 b/external/cairo/cairo/cairo.ofz46165.patch.1 deleted file mode 100644 index 948313c2a186..000000000000 --- a/external/cairo/cairo/cairo.ofz46165.patch.1 +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/cairo-pen.c 2022-03-30 09:48:14.702456922 +0100 -+++ b/src/cairo-pen.c 2022-03-30 09:50:40.011793460 +0100 -@@ -289,7 +289,12 @@ - } else if (tolerance >= major_axis) { - num_vertices = 4; - } else { -- num_vertices = ceil (2*M_PI / acos (1 - tolerance / major_axis)); -+ double divisor = acos (1 - tolerance / major_axis); -+ -+ if (divisor == 0.0) -+ return 4; -+ -+ num_vertices = ceil (2*M_PI / divisor); - - /* number of vertices must be even */ - if (num_vertices % 2) diff --git a/external/cairo/cairo/cairo.ofz50805.patch.1 b/external/cairo/cairo/cairo.ofz50805.patch.1 deleted file mode 100644 index 25bd6bb930df..000000000000 --- a/external/cairo/cairo/cairo.ofz50805.patch.1 +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/cairo-ft-font.c 2022-08-31 09:46:52.595160200 +0100 -+++ b/src/cairo-ft-font.c 2022-08-31 09:47:41.623945654 +0100 -@@ -2568,9 +2568,11 @@ - if (unlikely (status)) - cairo_surface_destroy (&surface->base); - } -- if (unlikely (status)) -- return status; - } -+ -+ if (unlikely (status)) -+ return status; -+ - if (pixman_image_get_format (surface->pixman_image) == PIXMAN_a8r8g8b8 && - !pixman_image_get_component_alpha (surface->pixman_image)) { - _cairo_scaled_glyph_set_color_surface (scaled_glyph, diff --git a/external/cairo/cairo/disable-cairo-utilities.patch.1 b/external/cairo/cairo/disable-cairo-utilities.patch.1 new file mode 100644 index 000000000000..484d4248dc21 --- /dev/null +++ b/external/cairo/cairo/disable-cairo-utilities.patch.1 @@ -0,0 +1,11 @@ +--- cairo/meson.build ++++ cairo/meson.build +@@ -790,8 +790,6 @@ + cairoboilerplate_dep = dependency('', required: false) + endif + +-subdir('util') +- + if not get_option('tests').disabled() and feature_conf.get('CAIRO_HAS_PNG_FUNCTIONS', 0) == 1 + subdir('test') + subdir('perf') diff --git a/external/cairo/cairo/libcairo-bundled-soname.patch.0 b/external/cairo/cairo/libcairo-bundled-soname.patch.0 deleted file mode 100644 index 92aac5f753df..000000000000 --- a/external/cairo/cairo/libcairo-bundled-soname.patch.0 +++ /dev/null @@ -1,12 +0,0 @@ -# -*- Mode: Diff -*- ---- src/Makefile.in -+++ src/Makefile.in -@@ -2075,7 +2075,7 @@ - $(enabled_cairo_sources) \ - $(NULL) - --libcairo_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols) -+libcairo_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols) -release lo -Wl,-soname -Wl,libcairo-lo.so.2 - libcairo_la_LIBADD = $(CAIRO_LIBS) - libcairo_la_DEPENDENCIES = $(cairo_def_dependency) - diff --git a/external/cairo/cairo/libcairo-bundled-soname.patch.1 b/external/cairo/cairo/libcairo-bundled-soname.patch.1 new file mode 100644 index 000000000000..3620961ad073 --- /dev/null +++ b/external/cairo/cairo/libcairo-bundled-soname.patch.1 @@ -0,0 +1,12 @@ +diff -ur cairo.org/src/meson.build cairo/src/meson.build +--- cairo.org/src/meson.build 2025-01-29 14:45:14.418331058 +0200 ++++ cairo/src/meson.build 2025-01-29 14:45:46.897440936 +0200 +@@ -240,7 +240,7 @@ + add_project_arguments('-DCAIRO_WIN32_STATIC_BUILD', language: 'c') + endif + +-libcairo = library('cairo', cairo_sources, ++libcairo = library('cairo-lo', cairo_sources, + dependencies: deps, + c_args: cairo_no_warn_c_args + pthread_c_args + ['-DCAIRO_COMPILATION'], + cpp_args: cairo_no_warn_c_args + pthread_c_args + ['-DCAIRO_COMPILATION'], diff --git a/external/cairo/cairo/san.patch.0 b/external/cairo/cairo/san.patch.0 index ea28154bc77a..eeb585b0a221 100644 --- a/external/cairo/cairo/san.patch.0 +++ b/external/cairo/cairo/san.patch.0 @@ -1,60 +1,8 @@ ---- configure 2022-08-27 10:09:35.721992976 +0100 -+++ configure 2022-08-27 10:10:00.363873391 +0100 -@@ -14940,7 +14940,8 @@ - - MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common" - --MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2" -+# breaks msan -+# MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2" - - # invalidate cached value if MAYBE_WARN has changed - if test "x$cairo_cv_warn_maybe" != "x$MAYBE_WARN"; then ---- src/cairo-fixed-private.h -+++ src/cairo-fixed-private.h -@@ -61,7 +61,7 @@ - static inline cairo_fixed_t - _cairo_fixed_from_int (int i) - { -- return i << CAIRO_FIXED_FRAC_BITS; -+ return (unsigned)i << CAIRO_FIXED_FRAC_BITS; - } - - /* This is the "magic number" approach to converting a double into fixed -@@ -249,7 +249,7 @@ - } else if ((f >> CAIRO_FIXED_FRAC_BITS) > INT16_MAX) { - x = INT32_MAX; - } else { -- x = f << (16 - CAIRO_FIXED_FRAC_BITS); -+ x = (uint32_t)f << (16 - CAIRO_FIXED_FRAC_BITS); - } - - return x; ---- src/cairo-gstate.c -+++ src/cairo-gstate.c -@@ -2297,7 +2297,7 @@ - if (!drop || KEEP_GLYPH (transformed_glyphs[j])) - j++; - } -- memcpy (transformed_clusters, clusters, -+ if (num_clusters != 0) memcpy (transformed_clusters, clusters, - num_clusters * sizeof (cairo_text_cluster_t)); - } else { - const cairo_glyph_t *cur_glyph; -@@ -2352,7 +2352,7 @@ - if (! drop || KEEP_GLYPH (transformed_glyphs[j])) - j++; - } -- memcpy (transformed_clusters, clusters, -+ if (num_clusters != 0) memcpy (transformed_clusters, clusters, - num_clusters * sizeof (cairo_text_cluster_t)); - } else { - const cairo_glyph_t *cur_glyph; --- src/cairo-surface.c +++ src/cairo-surface.c -@@ -2849,7 +2849,7 @@ - - if (_cairo_scaled_font_has_color_glyphs (scaled_font)) { +@@ -2952,7 +2952,7 @@ + scaled_font->options.color_mode != CAIRO_COLOR_MODE_NO_COLOR) + { utf8_copy = malloc (sizeof (char) * utf8_len); - memcpy (utf8_copy, utf8, sizeof (char) * utf8_len); + if (utf8_len != 0) memcpy (utf8_copy, utf8, sizeof (char) * utf8_len); diff --git a/external/cairo/cairo/ubsan-memcpy-nullptr.patch.1 b/external/cairo/cairo/ubsan-memcpy-nullptr.patch.1 new file mode 100644 index 000000000000..2836572b065e --- /dev/null +++ b/external/cairo/cairo/ubsan-memcpy-nullptr.patch.1 @@ -0,0 +1,15 @@ +diff -ur cairo.org/src/cairo-gstate.c cairo/src/cairo-gstate.c +--- cairo.org/src/cairo-gstate.c 2025-01-30 12:44:31.337402299 +0200 ++++ cairo/src/cairo-gstate.c 2025-01-30 12:45:23.443833793 +0200 +@@ -2357,8 +2357,9 @@ + if (! drop || KEEP_GLYPH (transformed_glyphs[j])) + j++; + } +- memcpy (transformed_clusters, clusters, +- num_clusters * sizeof (cairo_text_cluster_t)); ++ if (num_clusters) ++ memcpy (transformed_clusters, clusters, ++ num_clusters * sizeof (cairo_text_cluster_t)); + } else { + const cairo_glyph_t *cur_glyph; + diff --git a/external/cairo/cairo/ubsan-memcpy-nullptr2.patch.1 b/external/cairo/cairo/ubsan-memcpy-nullptr2.patch.1 new file mode 100644 index 000000000000..67bb9eb99578 --- /dev/null +++ b/external/cairo/cairo/ubsan-memcpy-nullptr2.patch.1 @@ -0,0 +1,15 @@ +diff -ur cairo.org/src/cairo-gstate.c cairo/src/cairo-gstate.c +--- cairo.org/src/cairo-gstate.c 2025-01-30 12:53:23.553726623 +0200 ++++ cairo/src/cairo-gstate.c 2025-01-30 12:54:05.543062183 +0200 +@@ -2302,8 +2302,9 @@ + if (!drop || KEEP_GLYPH (transformed_glyphs[j])) + j++; + } +- memcpy (transformed_clusters, clusters, +- num_clusters * sizeof (cairo_text_cluster_t)); ++ if (num_clusters != 0) ++ memcpy (transformed_clusters, clusters, ++ num_clusters * sizeof (cairo_text_cluster_t)); + } else { + const cairo_glyph_t *cur_glyph; + diff --git a/external/cairo/pixman/pixman-0.24.4.patch b/external/cairo/pixman/pixman-0.24.4.patch index a5d32f88f82f..68fd282e6478 100644 --- a/external/cairo/pixman/pixman-0.24.4.patch +++ b/external/cairo/pixman/pixman-0.24.4.patch @@ -1,14 +1,3 @@ ---- misc/pixman-0.24.4/Makefile.in 2011-11-06 22:11:25.000000000 +0100 -+++ misc/build/pixman-0.24.4/Makefile.in 2011-12-16 09:06:45.317211035 +0100 -@@ -385,7 +385,7 @@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = pixman demos test -+SUBDIRS = pixman - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = pixman-1.pc - GPGKEY = 3892336E --- misc/pixman-0.24.4/pixman/pixman-utils.c +++ misc/build/pixman-0.24.4/pixman/pixman-utils.c @@ -27,6 +27,7 @@ diff --git a/external/cairo/pixman/pixman-ubsan.patch b/external/cairo/pixman/pixman-ubsan.patch index b4b1d43adb18..4e29c7428919 100644 --- a/external/cairo/pixman/pixman-ubsan.patch +++ b/external/cairo/pixman/pixman-ubsan.patch @@ -38,18 +38,15 @@ diff -ru pixman-0.42.2.orig/pixman/pixman-fast-path.c pixman-0.42.2/pixman/pixma px = (x & 0xffff) >> x_phase_shift; py = (y & 0xffff) >> y_phase_shift; -@@ -2837,9 +2837,9 @@ +@@ -2836,7 +2836,7 @@ + sgtot = CLIP (sgtot, 0, 0xff); sbtot = CLIP (sbtot, 0, 0xff); - #ifdef WORDS_BIGENDIAN -- buffer[k] = (satot << 0) | (srtot << 8) | (sgtot << 16) | (sbtot << 24); -+ buffer[k] = (satot << 0) | (srtot << 8) | (sgtot << 16) | ((uint32_t)sbtot << 24); - #else - buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0); + buffer[k] = ((uint32_t)satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0); - #endif next: + vx += ux; diff -ru pixman-0.42.2.orig/pixman/pixman-sse2.c pixman-0.42.2/pixman/pixman-sse2.c --- misc/pixman-0.42.2/pixman/pixman-sse2.c 2022-02-02 05:51:25.000000000 +0900 +++ misc/build/pixman-0.42.2/pixman/pixman-sse2.c 2022-11-28 22:11:19.276969466 +0900 diff --git a/external/cairo/pixman/pixman-wasm.patch b/external/cairo/pixman/pixman-wasm.patch index a04aa7ccca1b..790bd2c26759 100644 --- a/external/cairo/pixman/pixman-wasm.patch +++ b/external/cairo/pixman/pixman-wasm.patch @@ -1,39 +1,15 @@ --- a/pixman/pixman/pixman-x86.c +++ b/pixman/pixman/pixman-x86.c -@@ -77,13 +77,20 @@ +@@ -74,6 +74,8 @@ #else --#define _PIXMAN_X86_64 \ -- (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)) -+#if (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)) -+#define _PIXMAN_X86_64 1 -+#else -+#define _PIXMAN_X86_64 0 -+#endif - - static pixman_bool_t - have_cpuid (void) - { --#if _PIXMAN_X86_64 || defined (_MSC_VER) -+#if defined(__EMSCRIPTEN__) -+ -+ return FALSE; -+ -+#elif _PIXMAN_X86_64 || defined (_MSC_VER) - - return TRUE; - -@@ -109,6 +109,8 @@ - #endif - } - +#if !defined(__EMSCRIPTEN__) + - static void - pixman_cpuid (uint32_t feature, - uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) -@@ -156,10 +156,17 @@ + #if defined (__GNUC__) + #include <cpuid.h> + #elif defined(_MSC_VER) +@@ -100,10 +102,17 @@ #error Unknown compiler #endif } @@ -51,7 +27,7 @@ uint32_t a, b, c, d; cpu_features_t features = 0; -@@ -202,6 +202,8 @@ +@@ -149,6 +158,8 @@ } return features; @@ -72,37 +48,37 @@ #include <xmmintrin.h> #include <emmintrin.h> #include <tmmintrin.h> ---- a/pixman/configure -+++ b/pixman/configure -@@ -14207,7 +14207,11 @@ - #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) - #error "Need GCC >= 3.4 for MMX intrinsics" - #endif -+#if !defined(__EMSCRIPTEN__) - #include <mmintrin.h> -+#else -+#include <xmmintrin.h> -+#endif - #include <stdint.h> +--- a/pixman/meson.build ++++ b/pixman/meson.build +@@ -104,7 +104,11 @@ + if host_machine.cpu_family() == 'x86_64' or cc.get_id() == 'msvc' + have_mmx = true + elif host_machine.cpu_family() == 'x86' and cc.compiles(''' ++ #if !defined(__EMSCRIPTEN__) + #include <mmintrin.h> ++ #else ++ #include <xmmintrin.h> ++ #endif + #include <stdint.h> - /* Check support for block expressions */ -@@ -14308,7 +14308,9 @@ - # error "Need GCC >= 4.2 for SSE2 intrinsics on x86" - # endif - #endif -+#if !defined(__EMSCRIPTEN__) - #include <mmintrin.h> -+#endif - #include <xmmintrin.h> - #include <emmintrin.h> - int param; -@@ -14380,7 +14380,9 @@ - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+#if !defined(__EMSCRIPTEN__) - #include <mmintrin.h> -+#endif - #include <xmmintrin.h> - #include <emmintrin.h> - #include <tmmintrin.h> + /* Check support for block expressions */ +@@ -167,7 +171,9 @@ + # error "Need GCC >= 4.2 for SSE2 intrinsics on x86" + # endif + #endif ++ #if !defined(__EMSCRIPTEN__) + #include <mmintrin.h> ++ #endif + #include <xmmintrin.h> + #include <emmintrin.h> + int param; +@@ -202,7 +208,9 @@ + if not use_ssse3.disabled() and not (cc.get_id() == 'msvc' and cc.version().version_compare('<16') and host_machine.cpu_family() == 'x86_64') + if host_machine.cpu_family().startswith('x86') + if cc.compiles(''' ++ #if !defined(__EMSCRIPTEN__) + #include <mmintrin.h> ++ #endif + #include <xmmintrin.h> + #include <emmintrin.h> + int param; diff --git a/external/harfbuzz/ExternalProject_harfbuzz.mk b/external/harfbuzz/ExternalProject_harfbuzz.mk index 462a807ee5d6..98ae5b93eb94 100644 --- a/external/harfbuzz/ExternalProject_harfbuzz.mk +++ b/external/harfbuzz/ExternalProject_harfbuzz.mk @@ -51,7 +51,7 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) : | $(call gb_Externa $(call gb_ExternalProject_run,build,\ PKG_CONFIG_PATH="${PKG_CONFIG_PATH}$(LIBO_PATH_SEPARATOR)$(gb_UnpackedTarball_workdir)/graphite$(if $(SYSTEM_ICU),,$(LIBO_PATH_SEPARATOR)$(gb_UnpackedTarball_workdir)/icu)" \ PYTHONWARNINGS= \ - $(MESON) setup builddir \ + $(MESON) setup --wrap-mode nofallback builddir \ -Ddefault_library=static -Dbuildtype=$(if $(ENABLE_DBGUTIL),debug,$(if $(ENABLE_DEBUG),debugoptimized,release \ $(if $(call gb_Module__symbols_enabled,harfbuzz),$(addsuffix "$(strip $(gb_DEBUGINFO_FLAGS))",-Dc_args= -Dcpp_args=)))) \ -Dauto_features=disabled \
