diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2024-01-18 13:18:03 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2024-03-23 13:40:46 +0000 |
commit | 3b128ff9f74b28ada2f475f0b816480b1550e5b8 (patch) | |
tree | 90e27f934dbb220c80067447e3117d3c893d0774 /Mk | |
parent | 04bd4bf4931ba794718f67ff5e693a679740bdad (diff) | |
download | ports-3b128ff9f74b28ada2f475f0b816480b1550e5b8.tar.gz ports-3b128ff9f74b28ada2f475f0b816480b1550e5b8.zip |
x11-fonts/noto*: Restructure and update
Split x11-fonts/noto-basic into separate ports so they can be updated
separately. Keep noto-basic as a metaport but replace dependencies on
it with dependencies on individual fonts as needed.
Adjust x11-fonts/noto-extra to resolve conflicts for now. Individual
fonts can be split from this port later.
Let x11-fonts/noto-emoji install the monochrome Noto Emoji font and
create a new port x11-fonts/noto-color-emoji for Noto Color Emoji.
Add the new ports to x11-fonts/noto metaport and make Noto Sans and
Noto Serif non-optional because script-specific fonts depend on them.
Upstream does not provide useful tarballs so we create our own and host
them on LOCAL. The new ports have a "make noto-fetch" target that
creates a tarball in DISTDIR.
List of updates:
Noto Color Emoji 2.042
Noto Emoji 2.001
Noto Sans 2.013
Noto Sans Mono 2.014
Noto Sans Symbols 2.003
Noto Sans Symbols 2 2.008
Noto Serif 2.013
PR: 275758
Differential Revision: https://reviews.freebsd.org/D43509
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/noto.mk | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Mk/Uses/noto.mk b/Mk/Uses/noto.mk new file mode 100644 index 000000000000..909ae48cf6af --- /dev/null +++ b/Mk/Uses/noto.mk @@ -0,0 +1,71 @@ +# Infrastructure used by x11-fonts/noto-* ports. +# +# Feature: noto +# Usage: USES=noto +# +# The following variables can be defined in a port Makefile: +# +# NOTONAME Name of the font, e.g. NotoSans. +# NOTOTAG Git tag used in default NOTOLICSITES and NOTOSITES. +# Default: ${NOTONAME}-v${PORTVERSION}. +# NOTOLICSITES Location(s) of the license file. Optional. +# NOTOSITES Location(s) of the fonts. Optional. +# NOTOLICFILE Name of the license file. Default: LICENSE. +# NOTOSTYLES List of styles. You can define this if the upstream font +# files are named NOTONAME-STYLE.ttf. Define NOTOFILES +# directly if that's not the case. +# NOTOFILES List of upstream font files and their style. They will be +# installed as NOTONAME-STYLE.ttf. See x11-fonts/noto-emoji. +# Default: derived from NOTOSTYLES. +# +# MAINTAINER: tijl@FreeBSD.org + +.if !defined(_INCLUDE_USES_NOTO_MK) +_INCLUDE_USES_NOTO_MK= yes + +EXTRACT_SUFX= .tar.xz + +LICENSE= OFL11 +LICENSE_FILE= ${WRKSRC}/${NOTOLICFILE} + +FONTSDIR= ${PREFIX}/share/fonts/noto + +NOTOTAG?= ${NOTONAME}-v${PORTVERSION} +NOTOLICSITES?= https://github.com/notofonts/notofonts.github.io/raw/${NOTOTAG}/fonts/ +NOTOSITES?= https://github.com/notofonts/notofonts.github.io/raw/${NOTOTAG}/fonts/${NOTONAME}/hinted/ttf/ +NOTOLICFILE?= LICENSE +NOTOFILES?= ${NOTOSTYLES:C,.*,${NOTONAME}-&.ttf &,} +PLIST_FILES= ${NOTOFILES:N*.ttf:C,.*,${FONTSDIR:S,^${PREFIX}/,,}/${NOTONAME}-&.ttf,} + +NO_ARCH= yes +NO_BUILD= yes + +. ifdef NO_CHECKSUM && DISABLE_SIZE && !DIST_SUBDIR +# Assume make fetch called from make makesum. +_USES_fetch+= 250:noto-fetch +. endif + +noto-fetch: + @${MAKE} fetch NO_CHECKSUM=yes DISABLE_SIZE=yes \ + DISTFILES='${NOTOLICFILE}:lic ${NOTOFILES:M*.ttf}' \ + DIST_SUBDIR='${DISTNAME}' \ + MASTER_SITES='${NOTOLICSITES:S/$/:lic/} ${NOTOSITES}' + @${ECHO_MSG} '===> Creating distfile ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}' + @cd ${DISTDIR} && ${RM} ${DISTNAME}${EXTRACT_SUFX} && set -- \ + ${NOTOLICFILE:S,^,${DISTNAME}/,} \ + ${NOTOFILES:M*.ttf:S,^,${DISTNAME}/,} \ + && ${CHMOD} 0644 "$$@" && ${CHMOD} 0755 ${DISTNAME} \ + && ${TOUCH} -c -d 1970-01-01T00:00:00Z "$$@" ${DISTNAME} \ + && ${TAR} cJf ${DISTNAME}${EXTRACT_SUFX} \ + --uid 0 --gid 0 --numeric-owner "$$@" \ + && ${RM} "$$@" && { ${RMDIR} ${DISTNAME} 2>/dev/null || :; } + +do-install: + ${MKDIR} ${STAGEDIR}${FONTSDIR} +. for font style in ${NOTOFILES} + ${INSTALL_DATA} ${WRKSRC}/${font} \ + ${STAGEDIR}${FONTSDIR}/${NOTONAME}-${style}.ttf +. endfor + +.include "${USESDIR}/fonts.mk" +.endif |