Skip to content

Commit

Permalink
x11-fonts/fontconfig: Update to 2.13.93
Browse files Browse the repository at this point in the history
Changelog:
        https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/master/README

- Switch to meson build system

PR:             253212
Exp-run by:     antoine
Submitted by:   daniel.engberg.lists@pyret.net
  • Loading branch information
tcberner committed Feb 15, 2021
1 parent b995074 commit b8f7476
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 1,941 deletions.
97 changes: 43 additions & 54 deletions x11-fonts/fontconfig/Makefile
Expand Up @@ -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/

Expand All @@ -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 <bsd.port.mk>
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 <bsd.port.mk>
6 changes: 3 additions & 3 deletions 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

1 comment on commit b8f7476

@grahamperrin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference

https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/master/README

404 not found.

https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/d06103e3e764bd43758e213414a1716858ab384c was:

Bump version to 2.13.93 (d06103e3) · Commits · fontconfig / fontconfig · GitLab

Please sign in to comment.