Add the option to not build fontconfig cache during installation

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/296
This commit is contained in:
Akira TAGOH 2021-10-14 17:52:03 +09:00
parent 1d76699927
commit 877d869904
4 changed files with 17 additions and 2 deletions

View File

@ -83,7 +83,7 @@ configdir = $(CONFIGDIR)
xmldir = $(XMLDIR)
xml_DATA = fonts.dtd
if CROSS_COMPILING
if !ENABLE_CACHE_BUILD
RUN_FC_CACHE_TEST=false
else
RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"

View File

@ -774,6 +774,19 @@ else
fi
AC_SUBST(DOCMAN3)
dnl ===========================================================================
default_cache_build="yes"
if test $cross_compiling = "yes"; then
default_cache_build="no"
fi
AC_ARG_ENABLE(cache-build,
[AC_HELP_STRING([--disable-cache-build],
[Don't run fc-cache during the build])],
,
enable_cache_build=$default_cache_build)
AM_CONDITIONAL(ENABLE_CACHE_BUILD, test "x$enable_cache_build" = xyes)
dnl Figure out what cache format suffix to use for this architecture
AC_C_BIGENDIAN

View File

@ -8,6 +8,6 @@ fccache = executable('fc-cache', ['fc-cache.c', fcstdint_h, alias_headers, ft_al
tools_man_pages += ['fc-cache']
# Do not try to execute target's fc-cache on host when cross compiling
if not meson.is_cross_build()
if get_option('cache-build').enabled() and not meson.is_cross_build()
meson.add_install_script(fccache, '-s', '-f', '-v')
endif

View File

@ -11,3 +11,5 @@ option('tests', type : 'feature', value : 'auto', yield : true,
description: 'Enable unit tests')
option('tools', type : 'feature', value : 'auto', yield : true,
description: 'Build command-line tools (fc-list, fc-query, etc.)')
option('cache-build', type : 'feature', value : 'enabled',
description: 'Run fc-cache on install')