diff --git a/x11-fonts/fontconfig/Makefile b/x11-fonts/fontconfig/Makefile index 178524431376..7433dee7a78d 100644 --- a/x11-fonts/fontconfig/Makefile +++ b/x11-fonts/fontconfig/Makefile @@ -16,6 +16,7 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 \ libexpat.so:textproc/expat2 USES= cpe gperf meson pkgconfig python:3.6+,build shebangfix tar:xz +CONFIGURE_ARGS= -Dfc-cache=disabled CPE_VENDOR= fontconfig_project USE_LDCONFIG= yes diff --git a/x11-fonts/fontconfig/files/patch-fc-cache_meson.build b/x11-fonts/fontconfig/files/patch-fc-cache_meson.build new file mode 100644 index 000000000000..c486b256720d --- /dev/null +++ b/x11-fonts/fontconfig/files/patch-fc-cache_meson.build @@ -0,0 +1,21 @@ +Add option to avoid running fc-cache on install (make stage). +This can be committed upstream. + +--- meson_options.txt.orig 2020-12-03 11:45:00 UTC ++++ meson_options.txt +@@ -11,3 +11,5 @@ option('tests', type : 'feature', value + description: 'Enable unit tests') + option('tools', type : 'feature', value : 'auto', yield : true, + description: 'Build command-line tools (fc-list, fc-query, etc.)') ++option('fc-cache', type: 'feature', value : 'enabled', ++ description : 'Run fc-cache on install') +--- fc-cache/meson.build.orig 2021-01-28 11:53:32 UTC ++++ fc-cache/meson.build +@@ -8,6 +8,6 @@ fccache = executable('fc-cache', ['fc-ca + 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('fc-cache').enabled() and not meson.is_cross_build() + meson.add_install_script(fccache, '-s', '-f', '-v') + endif diff --git a/x11-fonts/fontconfig/files/pkg-install.in b/x11-fonts/fontconfig/files/pkg-install.in deleted file mode 100644 index 4dc92cbbbe33..000000000000 --- a/x11-fonts/fontconfig/files/pkg-install.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -PATH=/bin:/usr/bin:/sbin:/usr/sbin:%%PREFIX%%/bin -export PATH - -if [ "$2" = "POST-INSTALL" ]; then - echo "Running fc-cache to build fontconfig cache..." - fc-cache -f -s -v - exit 0 -fi diff --git a/x11-fonts/fontconfig/pkg-plist b/x11-fonts/fontconfig/pkg-plist index 27e6889f2c20..fe941c9038bd 100644 --- a/x11-fonts/fontconfig/pkg-plist +++ b/x11-fonts/fontconfig/pkg-plist @@ -79,3 +79,4 @@ share/gettext/its/fontconfig.loc %%NLS%%share/locale/zh_CN/LC_MESSAGES/fontconfig-conf.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/fontconfig.mo @dir /var/db/fontconfig +@postexec %D/bin/fc-cache -f -s -v