summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-05-25 12:13:24 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-08-26 10:27:57 +0200
commita0edcc68f94915a78fcc08e70d2cdd752abd9ebb (patch)
treecdbe1279877c3071ca84ef03ed317830a85a724f /configure.ac
parentb67f42c4c2906b7059b93d748c8efccd588b1e1c (diff)
update Skia to chrome/m94
Updating to m91 or newer required handling the problem with Vulkan crashing, but that's been finally fixed by the previous commit. This Skia version also requires at least freetype-2.8.1, so disable Skia if that's not available (LO's minimum is lower). Additionally patch out Skia's use of TT_SUPPORT_COLRV1, which seems to be an unstable freetype API from the git version and it doesn't even compile with the latest stable 2.9.11 release Change-Id: I4a17effb912468c43fc7cdb69fe453062e4d2447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120967 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac65
1 files changed, 40 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index bd929450971c..e44f1ab9e312 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9397,6 +9397,7 @@ if test "$using_freetype_fontconfig" = yes -a "$test_system_freetype" != no; the
# FreeType's docs/VERSION.DLL provides a table mapping between the three
#
# 9.9.3 is 2.2.0
+ # When the minimal version is at least 2.8.1, remove Skia's check down below.
PKG_CHECK_MODULES(FREETYPE, freetype2 >= 9.9.3)
FREETYPE_CFLAGS=$(printf '%s' "$FREETYPE_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
FilterLibs "${FREETYPE_LIBS}"
@@ -11974,38 +11975,52 @@ AC_SUBST(POPPLER_CFLAGS)
AC_SUBST(POPPLER_LIBS)
# Skia?
-AC_MSG_CHECKING([whether to build Skia])
ENABLE_SKIA=
if test "$enable_skia" != "no" -a "$build_skia" = "yes" -a -z "$DISABLE_GUI"; then
- if test "$enable_skia" = "debug"; then
- AC_MSG_RESULT([yes (debug)])
- ENABLE_SKIA_DEBUG=TRUE
- else
- AC_MSG_RESULT([yes])
- ENABLE_SKIA_DEBUG=
- fi
- ENABLE_SKIA=TRUE
- AC_DEFINE(HAVE_FEATURE_SKIA)
- BUILD_TYPE="$BUILD_TYPE SKIA"
+ # Skia now requires at least freetype2 >= 2.8.1, which is less that what LO requires as system freetype.
+ if test "$SYSTEM_FREETYPE" = TRUE; then
+ PKG_CHECK_EXISTS(freetype2 >= 21.0.15, # 21.0.15 = 2.8.1
+ [skia_freetype_ok=yes],
+ [skia_freetype_ok=no])
+ else # internal is ok
+ skia_freetype_ok=yes
+ fi
+ AC_MSG_CHECKING([whether to build Skia])
+ if test "$skia_freetype_ok" = "yes"; then
+ if test "$enable_skia" = "debug"; then
+ AC_MSG_RESULT([yes (debug)])
+ ENABLE_SKIA_DEBUG=TRUE
+ else
+ AC_MSG_RESULT([yes])
+ ENABLE_SKIA_DEBUG=
+ fi
+ ENABLE_SKIA=TRUE
+ AC_DEFINE(HAVE_FEATURE_SKIA)
+ BUILD_TYPE="$BUILD_TYPE SKIA"
- if test "$OS" = "MACOSX"; then
- AC_DEFINE(SK_SUPPORT_GPU,1)
- AC_DEFINE(SK_METAL,1)
- SKIA_GPU=METAL
- AC_SUBST(SKIA_GPU)
- else
- AC_DEFINE(SK_SUPPORT_GPU,1)
- AC_DEFINE(SK_VULKAN,1)
- SKIA_GPU=VULKAN
- AC_SUBST(SKIA_GPU)
- fi
+ if test "$OS" = "MACOSX"; then
+ AC_DEFINE(SK_SUPPORT_GPU,1)
+ AC_DEFINE(SK_METAL,1)
+ SKIA_GPU=METAL
+ AC_SUBST(SKIA_GPU)
+ else
+ AC_DEFINE(SK_SUPPORT_GPU,1)
+ AC_DEFINE(SK_VULKAN,1)
+ SKIA_GPU=VULKAN
+ AC_SUBST(SKIA_GPU)
+ fi
- if test -n "$MAC_OS_X_VERSION_MIN_REQUIRED" -a "$MAC_OS_X_VERSION_MIN_REQUIRED" -lt "101200"; then
- SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX=1
- AC_SUBST(SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX)
+ if test -n "$MAC_OS_X_VERSION_MIN_REQUIRED" -a "$MAC_OS_X_VERSION_MIN_REQUIRED" -lt "101200"; then
+ SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX=1
+ AC_SUBST(SKIA_DISABLE_VMA_USE_STL_SHARED_MUTEX)
+ fi
+ else
+ AC_MSG_RESULT([no (freetype too old)])
+ add_warning "freetype version is too old for Skia library, at least 2.8.1 required, Skia support disabled"
fi
else
+ AC_MSG_CHECKING([whether to build Skia])
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_SKIA)