From 442c65759e68e9af7bcb92dc02663ca321883b96 Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Thu, 4 Feb 2021 09:00:40 +0100 Subject: [PATCH] fontconfigv2 fontconfigv2 Signed-off-by: Daniel Engberg --- x11-fonts/fontconfig/Makefile | 97 +- x11-fonts/fontconfig/distinfo | 6 +- x11-fonts/fontconfig/files/patch-2.13.92.diff | 1795 ----------------- x11-fonts/fontconfig/files/patch-Makefile.in | 31 - .../files/patch-conf.d_60-latin.conf | 62 + .../fontconfig/files/patch-conf.d_meson.build | 33 + x11-fonts/fontconfig/files/patch-configure | 10 - x11-fonts/fontconfig/files/patch-meson.build | 36 + .../fontconfig/files/patch-src__fccompat.c | 17 - .../fontconfig/files/patch-src_fcatomic.h | 20 - x11-fonts/fontconfig/files/patch-src_fclang.c | 2 +- .../fontconfig/files/patch-src_meson.build | 12 + x11-fonts/fontconfig/pkg-plist | 11 +- 13 files changed, 191 insertions(+), 1941 deletions(-) delete mode 100644 x11-fonts/fontconfig/files/patch-2.13.92.diff delete mode 100644 x11-fonts/fontconfig/files/patch-Makefile.in create mode 100644 x11-fonts/fontconfig/files/patch-conf.d_60-latin.conf create mode 100644 x11-fonts/fontconfig/files/patch-conf.d_meson.build delete mode 100644 x11-fonts/fontconfig/files/patch-configure create mode 100644 x11-fonts/fontconfig/files/patch-meson.build delete mode 100644 x11-fonts/fontconfig/files/patch-src__fccompat.c delete mode 100644 x11-fonts/fontconfig/files/patch-src_fcatomic.h create mode 100644 x11-fonts/fontconfig/files/patch-src_meson.build diff --git a/x11-fonts/fontconfig/Makefile b/x11-fonts/fontconfig/Makefile index d9e98163a3e0..84e93ecdbb0b 100644 --- a/x11-fonts/fontconfig/Makefile +++ b/x11-fonts/fontconfig/Makefile @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME= fontconfig -PORTVERSION= 2.13.92 -PORTREVISION?= 2 -PORTEPOCH?= 1 +DISTVERSION= 2.13.93 +PORTEPOCH= 1 CATEGORIES= x11-fonts MASTER_SITES= https://www.freedesktop.org/software/fontconfig/release/ @@ -14,76 +13,66 @@ COMMENT= XML-based font configuration API for X Windows LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING -USES= gperf tar:xz - -.if !defined(REFERENCE_PORT) - LIB_DEPENDS= libfreetype.so:print/freetype2 \ libexpat.so:textproc/expat2 -USES+= cpe gmake libtool pathfix pkgconfig +USES= cpe gperf meson pkgconfig python:3.6+,build shebangfix tar:xz CPE_VENDOR= fontconfig_project USE_LDCONFIG= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --with-configdir=${PREFIX}/etc/fonts/conf.d \ - --with-templatedir=${PREFIX}/etc/fonts/conf.avail \ - --with-xmldir=${PREFIX}/etc/fonts \ - --with-expat-includes=${LOCALBASE}/include \ - --with-expat-lib=${LOCALBASE}/lib \ - --with-default-hinting=${PREFERRED_HINTING} \ - --with-default-fonts=${PREFIX}/share/fonts \ - --with-add-fonts=${LOCALBASE}/lib/X11/fonts \ - --with-cache-dir=/var/db/fontconfig \ - --with-pkgconfigdir=${PREFIX}/libdata/pkgconfig \ - --disable-docs - -# D6155: static linked library linking added to support statically linked -# applications, e.g. x11/xforward static option -CONFIGURE_ARGS+= --enable-static - -PKGINSTALL= ${WRKDIR}/pkg-install -INSTALL_TARGET=install-strip + +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 + +# Custom configuration variables +FCDEFAULTFONTS= ${PREFIX}/share/fonts +FCADDFONTS= ${LOCALBASE}/lib/X11/fonts + +# To avoid circular depdency docs (including manpages) needs to be disabled as +# they depend on textproc/docbook-utils which requires fontconfig +MESON_ARGS= -Ddefault_library=both -Ddoc=disabled PLIST_SUB= PREFERRED_HINTING=${PREFERRED_HINTING} -PORTDOCS= fontconfig-user.html fontconfig-user.pdf fontconfig-user.txt -OPTIONS_DEFINE= DOCS NLS NO_BITMAPS -OPTIONS_DEFAULT=HINTING_SLIGHT +OPTIONS_DEFINE= NLS BITMAPS TEST +OPTIONS_DEFAULT=BITMAPS HINTING_SLIGHT OPTIONS_SUB= yes -NO_BITMAPS_DESC= Reject bitmap fonts by default - OPTIONS_SINGLE= HINTING -HINTING_DESC= Preferred pixel hinting configuration .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 -NLS_USES= gettext -NLS_CONFIGURE_ENABLE= nls +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-NO_BITMAPS-on: - @${REINPLACE_CMD} -i '.bitmaps.bak' -e \ - '/^CONF_LINKS =/s|$$|\${.newline} 70-no-bitmaps.conf \\|' \ - ${WRKSRC}/conf.d/Makefile.in +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/*.5 \ - ${STAGEDIR}${PREFIX}/man/man5 - ${INSTALL_DATA} ${WRKSRC}/fonts.conf \ - ${STAGEDIR}${PREFIX}/etc/fonts/fonts.conf.sample - @${SED} -e 's|%%PREFIX%%|${PREFIX}| ; \ - s|%%LOCALBASE%%|${LOCALBASE}|' < ${FILESDIR}/pkg-install.in \ - > ${PKGINSTALL} - -post-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR} + ${MV} ${STAGEDIR}${PREFIX}/etc/fonts/fonts.conf ${STAGEDIR}${PREFIX}/etc/fonts/fonts.conf.sample + @${MKDIR} ${STAGEDIR}/var/db/fontconfig -.include +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 -.endif +.include diff --git a/x11-fonts/fontconfig/distinfo b/x11-fonts/fontconfig/distinfo index 071c4d91fe37..4b15b7171dd2 100644 --- a/x11-fonts/fontconfig/distinfo +++ b/x11-fonts/fontconfig/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1565349179 -SHA256 (fontconfig-2.13.92.tar.xz) = 506e61283878c1726550bc94f2af26168f1e9f2106eac77eaaf0b2cdfad66e4e -SIZE (fontconfig-2.13.92.tar.xz) = 1413128 +TIMESTAMP = 1612204906 +SHA256 (fontconfig-2.13.93.tar.xz) = ea968631eadc5739bc7c8856cef5c77da812d1f67b763f5e51b57b8026c1a0a0 +SIZE (fontconfig-2.13.93.tar.xz) = 1418288 diff --git a/x11-fonts/fontconfig/files/patch-2.13.92.diff b/x11-fonts/fontconfig/files/patch-2.13.92.diff deleted file mode 100644 index 3bd6b55c06fa..000000000000 --- a/x11-fonts/fontconfig/files/patch-2.13.92.diff +++ /dev/null @@ -1,1795 +0,0 @@ -# Affect FC_FONT_HAS_HINT property to score on matcher -# https://cgit.freedesktop.org/fontconfig/commit/?id=cb1036a7c7f1cb79fa799b1db368c86b018ec368 -# Add missing return type for FcFontSet* functions -# https://cgit.freedesktop.org/fontconfig/commit/?id=7172f08d4231c59cf14dab9ebab714df37e352ac -# Do not return FcFalse from FcConfigParseAndLoad*() if complain is set to false -# https://cgit.freedesktop.org/fontconfig/commit/?id=fcada522913e5e07efa6367eff87ace9f06d24c8 -# conf: Add JoyPixels emoji font -# https://cgit.freedesktop.org/fontconfig/commit/?id=65087ac7ce4cc5f2109967c1380b474955dcb590 -# Warn as well if no directory name for cachedir provided -# https://cgit.freedesktop.org/fontconfig/commit/?id=75eadca26648abf69497691ff0f4c7803b9ff23c -# Take effect sysroot functionality to the default config file -# https://cgit.freedesktop.org/fontconfig/commit/?id=cd51cb241aad7b362b793200ca7d42595c14f52b -# Read latest cache in paths -# https://cgit.freedesktop.org/fontconfig/commit/?id=c9862b6ea7c3234b29f6500c7d07359847e55ed7 -# Fix a memory leak caused by the previous commit -# https://cgit.freedesktop.org/fontconfig/commit/?id=a45fc8a33256d9d3ea0ea7947f33c8e5e3cc7238 -# Use FcConfigReference/Destroy appropriately instead of FcConfigGetCurrent -# https://cgit.freedesktop.org/fontconfig/commit/?id=b5bcf61fe789e66df2de609ec246cb7e4d326180 -# Fix potential race condition in FcConfigSetCurrent and FcConfigReference -# https://cgit.freedesktop.org/fontconfig/commit/?id=aa8c8cfa9fb2563482336249e3f56459099fcf6e -# Correct reset-dirs in DTD -# https://cgit.freedesktop.org/fontconfig/commit/?id=a4aa66a858f1ecd375c5efe5916398281f73f794 -# Don't add a value for FC_FULLNAME in meta face -# https://cgit.freedesktop.org/fontconfig/commit/?id=8249f871b373db5c6559f8c48242beed612b23a0 -# Add proper fullname for named-instances -# https://cgit.freedesktop.org/fontconfig/commit/?id=452be8125f0e2a18a7dfef469e05d19374d36307 -# Fix the process substitution doesn't work with FONTCONFIG_FILE -# https://cgit.freedesktop.org/fontconfig/commit/?id=71d6866d381a0ab3585eb9ee760aeec98e722359 -# Fix memory leaks -# https://cgit.freedesktop.org/fontconfig/commit/?id=61573ad5f7c4dd0860d613d99d0086433240eb75 -# Set name_mapping to NULL after freeing to avoid risk of double-free. -# https://cgit.freedesktop.org/fontconfig/commit/?id=6edaaa4d1823518a97fb4cc3004d110b1046f742 -# Fix assertion in FcFini() -# https://cgit.freedesktop.org/fontconfig/commit/?id=fbc05949ef52c8a8d69233eed77f6636dffec280 -# Set exact boolean value to color property -# https://cgit.freedesktop.org/fontconfig/commit/?id=d3bfbea7dc53aa7fa52aa9616235a23d4507da1b -# Fix assertion in FcCacheFini() again -# https://cgit.freedesktop.org/fontconfig/commit/?id=6f6b39780215714386606ca1c5457a7106639ff4 - -Excluding changes for the following files: test/Makefile.am, test/run-test.sh, -test/test-bz1744377.c, test/test-crbug1004254.c, test/test-issue180.c. - ---- conf.d/45-generic.conf.orig 2018-06-05 10:36:38 UTC -+++ conf.d/45-generic.conf -@@ -38,6 +38,10 @@ - emoji - - -+ JoyPixels -+ emoji -+ -+ - Emoji One - emoji - ---- conf.d/60-generic.conf.orig 2018-06-05 10:36:38 UTC -+++ conf.d/60-generic.conf -@@ -42,6 +42,7 @@ - EmojiOne Mozilla - - Emoji Two -+ JoyPixels - Emoji One - - Noto Emoji ---- doc/fcconfig.fncs.orig 2019-05-08 08:22:25 UTC -+++ doc/fcconfig.fncs -@@ -174,6 +174,10 @@ Returns one of the two sets of fonts fro - by set. This font set is owned by the library and must - not be modified or freed. - If config is NULL, the current configuration is used. -+ -+This function isn't MT-safe. FcConfigReference must be called -+before using this and then FcConfigDestroy when -+the return value is no longer referenced. - @@ - - @RET@ FcBlanks * -@@ -344,6 +348,15 @@ to be up to date, and used. - @TYPE1@ const FcChar8 * @ARG1@ name - @PURPOSE@ Find a config file - @DESC@ -+This function is deprecated and is replaced by FcConfigGetFilename. -+@@ -+ -+@RET@ FcChar8 * -+@FUNC@ FcConfigGetFilename -+@TYPE1@ FcConfig * @ARG1@ config -+@TYPE2@ const FcChar8 * @ARG2@ name -+@PURPOSE@ Find a config file -+@DESC@ - Given the specified external entity name, return the associated filename. - This provides applications a way to convert various configuration file - references into filename form. -@@ -355,6 +368,8 @@ refers to a file in the current users ho - doesn't start with '/', it refers to a file in the default configuration - directory; the built-in default directory can be overridden with the - FONTCONFIG_PATH environment variable. -+ -+The result of this function is affected by the FONTCONFIG_SYSROOT environment variable or equivalent functionality. - @@ - - @RET@ FcBool -@@ -396,6 +411,10 @@ parse error, semantic error or allocatio - Obtains the system root directory in 'config' if available. All files - (including file properties in patterns) obtained from this 'config' are - relative to this system root directory. -+ -+This function isn't MT-safe. FcConfigReference must be called -+before using this and then FcConfigDestroy when -+the return value is no longer referenced. - @SINCE@ 2.10.92 - @@ - -@@ -422,6 +441,10 @@ When setting this on the current config - @PURPOSE@ Initialize the iterator - @DESC@ - Initialize 'iter' with the first iterator in the config file information list. -+ -+This function isn't MT-safe. FcConfigReference must be called -+before using this and then FcConfigDestroy when the relevant -+values are no longer referenced. - @SINCE@ 2.12.91 - @@ - -@@ -433,6 +456,10 @@ Initialize 'iter' with the first iterato - @DESC@ - Set 'iter' to point to the next node in the config file information list. - If there is no next node, FcFalse is returned. -+ -+This function isn't MT-safe. FcConfigReference must be called -+before using FcConfigFileInfoIterInit and then -+FcConfigDestroy when the relevant values are no longer referenced. - @SINCE@ 2.12.91 - @@ - -@@ -448,5 +475,9 @@ If there is no next node, FcFalse is ret - Obtain the filename, the description and the flag whether it is enabled or not - for 'iter' where points to current configuration file information. - If the iterator is invalid, FcFalse is returned. -+ -+This function isn't MT-safe. FcConfigReference must be called -+before using FcConfigFileInfoIterInit and then -+FcConfigDestroy when the relevant values are no longer referenced. - @SINCE@ 2.12.91 - @@ ---- doc/fcfontset.fncs.orig 2016-07-11 02:41:05 UTC -+++ doc/fcfontset.fncs -@@ -97,7 +97,7 @@ of the output is designed to be of help - change at any time. - @@ - --@RET@ -+@RET@ FcFontSet * - @FUNC@ FcFontSetSort - @TYPE1@ FcConfig * @ARG1@ config - @TYPE2@ FcFontSet ** @ARG2@ sets -@@ -128,7 +128,7 @@ modify these patterns. Instead, they sh - The FcFontSet returned by FcFontSetSort is destroyed by calling FcFontSetDestroy. - @@ - --@RET@ -+@RET@ void - @FUNC@ FcFontSetSortDestroy - @TYPE1@ FcFontSet * @ARG1@ set - @PURPOSE@ DEPRECATED destroy a font set ---- fontconfig/fontconfig.h.orig 2019-08-09 11:09:32 UTC -+++ fontconfig/fontconfig.h -@@ -375,7 +375,7 @@ FcPublic FcBool - FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose); - - FcPublic void --FcCacheCreateTagFile (const FcConfig *config); -+FcCacheCreateTagFile (FcConfig *config); - - FcPublic FcBool - FcDirCacheCreateUUID (FcChar8 *dir, -@@ -394,6 +394,10 @@ FcPublic FcBool - FcConfigEnableHome (FcBool enable); - - FcPublic FcChar8 * -+FcConfigGetFilename (FcConfig *config, -+ const FcChar8 *url); -+ -+FcPublic FcChar8 * - FcConfigFilename (const FcChar8 *url); - - FcPublic FcConfig * -@@ -433,7 +437,7 @@ FcPublic FcBlanks * - FcConfigGetBlanks (FcConfig *config); - - FcPublic FcStrList * --FcConfigGetCacheDirs (const FcConfig *config); -+FcConfigGetCacheDirs (FcConfig *config); - - FcPublic int - FcConfigGetRescanInterval (FcConfig *config); ---- fonts.dtd.orig 2019-05-08 08:22:25 UTC -+++ fonts.dtd -@@ -124,7 +124,7 @@ - -- -+ - - ++ Verdana + Tahoma ++ Albany AMT + + + + monospace + ++ Liberation Mono + DejaVu Sans Mono + Inconsolata + Andale Mono + Courier New +- Cumberland AMT + Luxi Mono + Nimbus Mono L + Nimbus Mono + Nimbus Mono PS + Courier ++ Cumberland AMT + + +