freebsd-ports/x11-fonts/fontconfig/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

86 lines
2.7 KiB
Makefile

PORTNAME= fontconfig
DISTVERSION= 2.14.0
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
WWW= https://www.freedesktop.org/wiki/Software/fontconfig/
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 \
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
# 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 -Dcache-build=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 <bsd.port.mk>