1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00
freebsd-ports/japanese/font-ricty/Makefile
Hiroki Sato 88ac618258 - Use FONTPATHSPEC.
- Use a static fonts.dir instead of generating it by pkg-install.
- Fix XLFD entries for oblique fonts.
- Update MASTER_SITES and WWW in pkg-descr.
- Fix LICENSE.  This is no-pkg-sell and no-pkg-mirror.
- Fix pathnames for files installed by japanese/font-migu.
- Simplify the master/slave structure of font-ricty and font-ricty-discord.

Approved by:	meta (maintainer)
2020-01-09 22:42:51 +00:00

86 lines
2.6 KiB
Makefile

# $FreeBSD$
PORTNAME= ricty
PORTVERSION= 4.1.1
PORTREVISION= 1
CATEGORIES= japanese x11-fonts
MASTER_SITES= https://rictyfonts.github.io/files/
PKGNAMEPREFIX= ja-font-
DISTNAME= ricty_generator-${PORTVERSION}.sh
EXTRACT_SUFX= # empty
DIST_SUBDIR= ${PORTNAME}
MAINTAINER?= meta@FreeBSD.org
COMMENT?= Ricty - fonts for programming
LICENSE= OFL11 IPAFONTLICv1.0
LICENSE_COMB= multi
LICENSE_NAME_IPAFONTLICv1.0= IPA Font License Agreement v1.0
LICENSE_TEXT_IPAFONTLICv1.0= https://opensource.org/licenses/IPA
# No package redistribution due to OFL11
LICENSE_PERMS_IPAFONTLICv1.0= dist-mirror dist-sell no-pkg-mirror \
no-pkg-sell auto-accept
BUILD_DEPENDS= inconsolata-ttf>=2.000:x11-fonts/inconsolata-ttf \
${LOCALBASE}/share/fonts/migu/migu-1m-regular.ttf:japanese/font-migu \
${LOCALBASE}/share/fonts/migu/migu-1m-bold.ttf:japanese/font-migu \
fontforge:print/fontforge
USES= fonts:fc
FONTNAME= ${PORTNAME}${PKGNAMESUFFIX}
FONTPATHSPEC= ${FONTNAME}:pri=60
NO_ARCH= yes
SUB_FILES= genfontsdir.sh
.if !defined(MASTERDIR)
OPTIONS_DEFINE= DISCORD
OPTIONS_DEFAULT=DISCORD
DISCORD_DESC= Install Ricty-Discord
DISCORD_RUN_DEPENDS= ${LOCALBASE}/share/fonts/ricty-discord/RictyDiscord-Regular.ttf:japanese/font-ricty-discord
.endif
.include <bsd.port.options.mk>
.if ${SLAVE_PORT} == no
SUB_LIST+= DISCORD="" RICTY=\#
.else
SUB_LIST+= DISCORD=\# RICTY=""
.endif
do-extract:
@${MKDIR} ${WRKSRC}
do-build:
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
${SH} ${DISTDIR}/${DIST_SUBDIR}/ricty_generator-${PORTVERSION}.sh \
${LOCALBASE}/share/fonts/inconsolata/Inconsolata-Regular.ttf \
${LOCALBASE}/share/fonts/inconsolata/Inconsolata-Bold.ttf \
${LOCALBASE}/share/fonts/migu/migu-1m-regular.ttf \
${LOCALBASE}/share/fonts/migu/migu-1m-bold.ttf
pre-install:
cd ${WRKDIR} && ${SH} ./genfontsdir.sh
do-install:
@${MKDIR} \
${STAGEDIR}${FONTSDIR} \
${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \
${STAGEDIR}${PREFIX}/etc/fonts/conf.d
.if ${SLAVE_PORT} == no
${INSTALL_DATA} ${WRKDIR}/fonts.dir ${WRKSRC}/Ricty-*.ttf \
${STAGEDIR}${FONTSDIR}
.else
${INSTALL_DATA} ${WRKDIR}/fonts.dir ${WRKSRC}/RictyDiscord-*.ttf \
${STAGEDIR}${FONTSDIR}
.endif
${INSTALL_DATA} ${FILESDIR}/20-unhint-${FONTNAME}.conf \
${FILESDIR}/62-fonts-${FONTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/fonts/conf.avail
${RLN} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail/20-unhint-${FONTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${FONTNAME}.conf
${RLN} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail/62-fonts-${FONTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${FONTNAME}.conf
.include <bsd.port.mk>