fontconfig: Branch 'main'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Makefile.am          |    2 +-
 configure.ac         |   13 +++++++++++++
 fc-cache/meson.build |    2 +-
 meson_options.txt    |    2 ++
 4 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 877d8699047f91975f71fce4498a7ed6cc1dc439
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Thu Oct 14 17:52:03 2021 +0900

    Add the option to not build fontconfig cache during installation
    
    Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/296

diff --git a/Makefile.am b/Makefile.am
index 2f75fc9..6d4cd32 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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)"
diff --git a/configure.ac b/configure.ac
index af2fd44..d7505d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/fc-cache/meson.build b/fc-cache/meson.build
index ed68d1e..5e40fac 100644
--- a/fc-cache/meson.build
+++ b/fc-cache/meson.build
@@ -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
diff --git a/meson_options.txt b/meson_options.txt
index d603049..b70edf1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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')



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux