diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2022-03-18 13:36:57 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2022-03-22 12:29:52 +0000 |
commit | 306567bc74fbdfb30c62479083b933835f314c8f (patch) | |
tree | 6f5b8c9a61a54524ad5661e2cd17bfd0481a8daf /x11-fonts | |
parent | 52598b84ea0eb90860dcf06d781883cd8fe187fe (diff) | |
download | ports-306567bc74fbdfb30c62479083b933835f314c8f.tar.gz ports-306567bc74fbdfb30c62479083b933835f314c8f.zip |
x11-fonts/fontconfig: Use triggers to rebuild fc-cache
Stop forcing the overwrite of the cache at each run it is not necessary
most of the time.
Reviewed by: tcberner
Differencial Revision: https://reviews.freebsd.org/D34602
While here rework USES=fonts to drop @fcfontsdir which is not nessary anymore
and convert the @fontsdir into lua which make it way simpler to read
Diffstat (limited to 'x11-fonts')
-rw-r--r-- | x11-fonts/font-misc-ethiopic/pkg-plist | 2 | ||||
-rw-r--r-- | x11-fonts/fontconfig/Makefile | 7 | ||||
-rw-r--r-- | x11-fonts/fontconfig/files/fontconfig.ucl.in | 9 | ||||
-rw-r--r-- | x11-fonts/fontconfig/files/pkg-install.in | 10 |
4 files changed, 13 insertions, 15 deletions
diff --git a/x11-fonts/font-misc-ethiopic/pkg-plist b/x11-fonts/font-misc-ethiopic/pkg-plist index 94cfc23c0419..d90a9cea8586 100644 --- a/x11-fonts/font-misc-ethiopic/pkg-plist +++ b/x11-fonts/font-misc-ethiopic/pkg-plist @@ -1,4 +1,4 @@ -@fcfontsdir share/fonts/OTF +@fontsdir share/fonts/OTF share/fonts/OTF/GohaTibebZemen.otf share/fonts/TTF/GohaTibebZemen.ttf @comment share/fonts/OTF/fonts.dir diff --git a/x11-fonts/fontconfig/Makefile b/x11-fonts/fontconfig/Makefile index 8977dc2dabd8..5672a999d63d 100644 --- a/x11-fonts/fontconfig/Makefile +++ b/x11-fonts/fontconfig/Makefile @@ -2,7 +2,7 @@ PORTNAME= fontconfig DISTVERSION= 2.13.94 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= x11-fonts MASTER_SITES= https://www.freedesktop.org/software/fontconfig/release/ @@ -16,7 +16,8 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libfreetype.so:print/freetype2 \ libexpat.so:textproc/expat2 -USES= cpe gperf meson pkgconfig python:3.6+,build shebangfix tar:xz +USES= cpe gperf meson pkgconfig python:3.6+,build shebangfix tar:xz \ + trigger CPE_VENDOR= fontconfig_project USE_LDCONFIG= yes @@ -26,8 +27,6 @@ SHEBANG_FILES= conf.d/link_confs.py \ fc-lang/fc-lang.py TEST_TARGET= test -SUB_FILES= pkg-install -SUB_LIST= PREFIX=${PREFIX} # Custom configuration variables FCDEFAULTFONTS= ${PREFIX}/share/fonts diff --git a/x11-fonts/fontconfig/files/fontconfig.ucl.in b/x11-fonts/fontconfig/files/fontconfig.ucl.in new file mode 100644 index 000000000000..4f7c1909e63e --- /dev/null +++ b/x11-fonts/fontconfig/files/fontconfig.ucl.in @@ -0,0 +1,9 @@ +path: [ "%%PREFIX%%/share/fonts", %%PREFIX%%/etc/fonts/conf.d ] +trigger: { + type: lua + sandbox: false + script: <<EOS +print("Running fc-cache to build fontconfig cache...") +pkg.exec({"%%PREFIX%%/bin/fc-cache", "-s" }) +EOS +} 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 |