diff --git a/Keywords/fcfontsdir.ucl b/Keywords/fcfontsdir.ucl deleted file mode 100644 index 81f9d4e716ab..000000000000 --- a/Keywords/fcfontsdir.ucl +++ /dev/null @@ -1,27 +0,0 @@ -# MAINTAINER: x11@FreeBSD.org - -actions: [dir] -post-install: </dev/null || true - mkfontscale ${fontsdir} 2>/dev/null || true - mkfontdir ${fontsdir} 2>/dev/null || true -EOD -post-deinstall: </dev/null || true - mkfontscale ${fontsdir} 2>/dev/null || true - if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then - rm ${fontsdir}/fonts.scale - fi - mkfontdir ${fontsdir} 2>/dev/null || true - if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then - rm ${fontsdir}/fonts.dir - fi -EOD diff --git a/Keywords/fontsdir.ucl b/Keywords/fontsdir.ucl index 09c31572bf50..8c0701223e53 100644 --- a/Keywords/fontsdir.ucl +++ b/Keywords/fontsdir.ucl @@ -1,25 +1,19 @@ # MAINTAINER: x11@FreeBSD.org actions: [dir] -post-install: </dev/null || true - mkfontdir ${fontsdir} 2>/dev/null || true +post-install-lua: </dev/null || true - if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then - rm ${fontsdir}/fonts.scale - fi - mkfontdir ${fontsdir} 2>/dev/null || true - if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then - rm ${fontsdir}/fonts.dir - fi +post-deinstall-lua: < PORTNAME= fontconfig DISTVERSION= 2.13.94 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= x11-fonts MASTER_SITES= https://www.freedesktop.org/software/fontconfig/release/ MAINTAINER= desktop@FreeBSD.org COMMENT= XML-based font configuration API for X Windows LICENSE= MIT 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 SHEBANG_FILES= conf.d/link_confs.py \ conf.d/write-35-lang-normalize-conf.py \ fc-case/fc-case.py \ fc-lang/fc-lang.py TEST_TARGET= test -SUB_FILES= pkg-install -SUB_LIST= PREFIX=${PREFIX} # Custom configuration variables FCDEFAULTFONTS= ${PREFIX}/share/fonts FCADDFONTS= ${LOCALBASE}/lib/X11/fonts # To avoid circular dependency rebuild of docs (including manpages) needs to be # disabled as they depend on textproc/docbook-utils which requires fontconfig MESON_ARGS= -Ddefault_library=both -Ddoc=disabled -Dfc-cache=disabled PLIST_SUB= PREFERRED_HINTING=${PREFERRED_HINTING} PORTDOCS= fontconfig-user.html fontconfig-user.pdf fontconfig-user.txt OPTIONS_DEFINE= DOCS NLS BITMAPS TEST OPTIONS_DEFAULT=BITMAPS HINTING_SLIGHT OPTIONS_SUB= yes OPTIONS_SINGLE= HINTING .for opt in NONE SLIGHT MEDIUM FULL OPTIONS_SINGLE_HINTING+= HINTING_${opt} HINTING_${opt}_DESC= ${opt:tl} HINTING_${opt}_VARS= PREFERRED_HINTING=${opt:tl} .endfor BITMAPS_DESC= Enable bitmap fonts by default HINTING_DESC= Preferred pixel hinting configuration NLS_USES= gettext-tools NLS_MESON_ENABLED= nls TEST_MESON_ENABLED= tests post-patch: @${REINPLACE_CMD} -e 's|%%FCDEFAULTFONTS%%|${FCDEFAULTFONTS}|g' \ ${PATCH_WRKSRC}/meson.build @${REINPLACE_CMD} -e 's|%%FCADDFONTS%%|${FCADDFONTS}|g' \ ${PATCH_WRKSRC}/meson.build @${REINPLACE_CMD} -e 's|%%FCPREFERREDHINTING%%|${PREFERRED_HINTING}|g' \ ${PATCH_WRKSRC}/conf.d/meson.build post-install: ${INSTALL_MAN} ${WRKSRC}/fc-*/*.1 ${STAGEDIR}${PREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/doc/*.3 ${STAGEDIR}${PREFIX}/man/man3 ${INSTALL_MAN} ${WRKSRC}/doc/*.5 ${STAGEDIR}${PREFIX}/man/man5 ${MV} ${STAGEDIR}${PREFIX}/etc/fonts/fonts.conf ${STAGEDIR}${PREFIX}/etc/fonts/fonts.conf.sample @${MKDIR} ${STAGEDIR}/var/db/fontconfig post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR} post-install-BITMAPS-off: ${RLN} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail/70-no-bitmaps.conf ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/70-no-bitmaps.conf post-install-BITMAPS-on: ${RM} ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/70-no-bitmaps.conf ${RLN} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail/70-yes-bitmaps.conf ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/70-yes-bitmaps.conf .include 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: <