diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2020-01-09 22:42:51 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2020-01-09 22:42:51 +0000 |
commit | 88ac618258a6c07a8f643b03fe1ae13ec59820fc (patch) | |
tree | c7ccbb489b7921aeaeb0fe5553c1ec2d1ac5b98b /japanese/font-ricty | |
parent | Update to 1.10.1. (diff) |
- 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)
Notes
Notes:
svn path=/head/; revision=522544
Diffstat (limited to 'japanese/font-ricty')
-rw-r--r-- | japanese/font-ricty/Makefile | 98 | ||||
-rw-r--r-- | japanese/font-ricty/files/20-unhint-ricty-discord.conf (renamed from japanese/font-ricty/files/20-unhint-rictydiscord.conf) | 0 | ||||
-rw-r--r-- | japanese/font-ricty/files/62-fonts-ricty-discord.conf (renamed from japanese/font-ricty/files/62-fonts-rictydiscord.conf) | 0 | ||||
-rw-r--r-- | japanese/font-ricty/files/genfontsdir.sh.in (renamed from japanese/font-ricty/files/pkg-install.in) | 60 | ||||
-rw-r--r-- | japanese/font-ricty/pkg-descr | 2 | ||||
-rw-r--r-- | japanese/font-ricty/pkg-plist | 33 |
6 files changed, 73 insertions, 120 deletions
diff --git a/japanese/font-ricty/Makefile b/japanese/font-ricty/Makefile index 2d398d19a370..c45c0c560380 100644 --- a/japanese/font-ricty/Makefile +++ b/japanese/font-ricty/Makefile @@ -2,8 +2,9 @@ PORTNAME= ricty PORTVERSION= 4.1.1 +PORTREVISION= 1 CATEGORIES= japanese x11-fonts -MASTER_SITES= http://www.rs.tus.ac.jp/yyusa/ricty/ +MASTER_SITES= https://rictyfonts.github.io/files/ PKGNAMEPREFIX= ja-font- DISTNAME= ricty_generator-${PORTVERSION}.sh EXTRACT_SUFX= # empty @@ -12,82 +13,73 @@ DIST_SUBDIR= ${PORTNAME} MAINTAINER?= meta@FreeBSD.org COMMENT?= Ricty - fonts for programming -LICENSE= OFL11 +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/TTF/migu-1m-regular.ttf:japanese/font-migu \ - ${LOCALBASE}/share/fonts/TTF/migu-1m-bold.ttf:japanese/font-migu \ + ${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 -NO_ARCH= yes USES= fonts:fc +FONTNAME= ${PORTNAME}${PKGNAMESUFFIX} +FONTPATHSPEC= ${FONTNAME}:pri=60 -NO_PACKAGE= redistribution is not allowed -PKGINSTALL= ${WRKDIR}/pkg-install -PKGDEINSTALL= ${WRKDIR}/pkg-install -SUB_FILES= pkg-install - -FONTNAME= TTF +NO_ARCH= yes +SUB_FILES= genfontsdir.sh -.if !defined(PKGNAMESUFFIX) +.if !defined(MASTERDIR) OPTIONS_DEFINE= DISCORD +OPTIONS_DEFAULT=DISCORD DISCORD_DESC= Install Ricty-Discord -OPTIONS_DEFAULT= DISCORD +DISCORD_RUN_DEPENDS= ${LOCALBASE}/share/fonts/ricty-discord/RictyDiscord-Regular.ttf:japanese/font-ricty-discord .endif .include <bsd.port.options.mk> -.if !defined(PKGNAMESUFFIX) -PLIST_SUB+= DISCORD="@comment " RICTY="" -SUB_LIST+= DISCORD=\# RICTY="" -.else -PLIST_SUB+= DISCORD="" RICTY="@comment " +.if ${SLAVE_PORT} == no SUB_LIST+= DISCORD="" RICTY=\# -.endif - -.if ${PORT_OPTIONS:MDISCORD} -RUN_DEPENDS+= ${LOCALBASE}/${DATADIR_REL}/RictyDiscord-Regular.ttf:japanese/font-ricty-discord +.else +SUB_LIST+= DISCORD=\# RICTY="" .endif do-extract: @${MKDIR} ${WRKSRC} - @${CP} ${DISTDIR}/${DIST_SUBDIR}/ricty_generator-${PORTVERSION}.sh ${WRKSRC}/ricty_generator.sh do-build: cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \ - ${SH} ${WRKSRC}/ricty_generator.sh \ - ${PREFIX}/share/fonts/inconsolata/Inconsolata-Regular.ttf \ - ${PREFIX}/share/fonts/inconsolata/Inconsolata-Bold.ttf \ - ${PREFIX}/share/fonts/TTF/migu-1m-regular.ttf \ - ${PREFIX}/share/fonts/TTF/migu-1m-bold.ttf + ${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}${DATADIR} - ${MKDIR} ${STAGEDIR}${FONTSDIR} - ${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \ - ${STAGEDIR}${PREFIX}/etc/fonts/conf.d -.if !defined(PKGNAMESUFFIX) - ${INSTALL_DATA} ${WRKSRC}/Ricty-*.ttf ${STAGEDIR}${DATADIR} - cd ${STAGEDIR}${FONTSDIR} && ${LN} -s -f \ - ../../../${DATADIR_REL}/Ricty-*.ttf . - ${INSTALL_DATA} ${FILESDIR}/20-unhint-${PORTNAME}.conf \ - ${FILESDIR}/62-fonts-${PORTNAME}.conf \ - ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail - ${LN} -s -f ../conf.avail/20-unhint-${PORTNAME}.conf \ - ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${PORTNAME}.conf - ${LN} -s -f ../conf.avail/62-fonts-${PORTNAME}.conf \ - ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${PORTNAME}.conf + @${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} ${WRKSRC}/RictyDiscord-*.ttf ${STAGEDIR}${DATADIR} - cd ${STAGEDIR}${FONTSDIR} && ${LN} -s -f \ - ../../../${DATADIR_REL}/RictyDiscord-*.ttf . - ${INSTALL_DATA} ${FILESDIR}/20-unhint-${PORTNAME}discord.conf \ - ${FILESDIR}/62-fonts-${PORTNAME}discord.conf \ - ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail - ${LN} -s -f ../conf.avail/20-unhint-${PORTNAME}discord.conf \ - ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${PORTNAME}discord.conf - ${LN} -s -f ../conf.avail/62-fonts-${PORTNAME}discord.conf \ - ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${PORTNAME}discord.conf + ${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> diff --git a/japanese/font-ricty/files/20-unhint-rictydiscord.conf b/japanese/font-ricty/files/20-unhint-ricty-discord.conf index a13b5e42d197..a13b5e42d197 100644 --- a/japanese/font-ricty/files/20-unhint-rictydiscord.conf +++ b/japanese/font-ricty/files/20-unhint-ricty-discord.conf diff --git a/japanese/font-ricty/files/62-fonts-rictydiscord.conf b/japanese/font-ricty/files/62-fonts-ricty-discord.conf index d4e1e8a025d8..d4e1e8a025d8 100644 --- a/japanese/font-ricty/files/62-fonts-rictydiscord.conf +++ b/japanese/font-ricty/files/62-fonts-ricty-discord.conf diff --git a/japanese/font-ricty/files/pkg-install.in b/japanese/font-ricty/files/genfontsdir.sh.in index 36285e2cdac1..c9677aa938ee 100644 --- a/japanese/font-ricty/files/pkg-install.in +++ b/japanese/font-ricty/files/genfontsdir.sh.in @@ -1,16 +1,5 @@ #!/bin/sh - -catfontsdir () -{ - while read _IN - do - case "${_IN}" in -%%RICTY%% *-Ricty-*) ;; -%%DISCORD%% *-Ricty\ Discord-*) ;; - *) echo ${_IN} ;; - esac - done -} +# $FreeBSD$ ROMA="" BOLD="ds=y" @@ -27,6 +16,7 @@ make_xlfd() _fname=$4 _poc=$5 _weight=$6 + _obli=$7 case "${_poc}:${_enc}" in p:jisx0201.1976-*) PFIX="bw=0.5" ;; @@ -36,33 +26,31 @@ make_xlfd() esac case $_weight in + bold-o) + set -- "" bold-o + ;; bold) set -- "" bold-r \ ${ITAL} bold-i \ - ${OBLI} bold-o \ ${RITA} bold-ri \ ${ROBL} bold-ro - while [ $# != 0 ]; do - _prefix="${PFIX}:$1"; shift - _variant=$1; shift - printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \ - $_prefix $_file $_vendor "$_fname" $_variant $_poc $_enc - done | sed -e 's,::,:,g' -e 's,^:,,' + ;; + medium-o) + set -- "" medium-o ;; medium) set -- "" medium-r \ ${ITAL} medium-i \ - ${OBLI} medium-o \ ${RITA} medium-ri \ ${ROBL} medium-ro + ;; + esac while [ $# != 0 ]; do _prefix="${PFIX}:$1"; shift _variant=$1; shift printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \ $_prefix $_file $_vendor "$_fname" $_variant $_poc $_enc done | sed -e 's,::,:,g' -e 's,^:,,' - ;; - esac } addentries () @@ -70,10 +58,14 @@ addentries () for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0 do %%RICTY%%make_xlfd $ENC Ricty-Regular.ttf ipa "Ricty" p medium + %%RICTY%%make_xlfd $ENC Ricty-Oblique.ttf ipa "Ricty" p medium-o %%RICTY%%make_xlfd $ENC Ricty-Bold.ttf ipa "Ricty" p bold + %%RICTY%%make_xlfd $ENC Ricty-BoldOblique.ttf ipa "Ricty" p bold-o %%DISCORD%%make_xlfd $ENC RictyDiscord-Regular.ttf ipa "Ricty Discord" p medium + %%DISCORD%%make_xlfd $ENC RictyDiscord-Oblique.ttf ipa "Ricty Discord" p medium-o %%DISCORD%%make_xlfd $ENC RictyDiscord-Bold.ttf ipa "Ricty Discord" p bold + %%DISCORD%%make_xlfd $ENC RictyDiscord-BoldOblique.ttf ipa "Ricty Discord" p bold-o done } @@ -82,23 +74,7 @@ nfonts () _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L} } -case "$2" in -POST-INSTALL) - cd ${FONTSDIR} - touch fonts.dir - (sed 1d fonts.dir | catfontsdir; addentries) > fonts.dir.tmp - nfonts < fonts.dir.tmp > fonts.dir - cat fonts.dir.tmp >> fonts.dir - rm -f fonts.dir.tmp - ;; -POST-DEINSTALL) - cd ${FONTSDIR} - sed 1d fonts.dir | catfontsdir > fonts.dir.tmp - nfonts < fonts.dir.tmp > fonts.dir - cat fonts.dir.tmp >> fonts.dir - rm -f fonts.dir.tmp - if [ -r fonts.dir -a `wc -l < fonts.dir` = 1 ]; then - rm -f fonts.dir - fi - ;; -esac +addentries > fonts.dir.tmp +nfonts < fonts.dir.tmp > fonts.dir +cat fonts.dir.tmp >> fonts.dir +rm -f fonts.dir.tmp diff --git a/japanese/font-ricty/pkg-descr b/japanese/font-ricty/pkg-descr index 05c84b7b9472..2d2d8b6dd009 100644 --- a/japanese/font-ricty/pkg-descr +++ b/japanese/font-ricty/pkg-descr @@ -1,4 +1,4 @@ Ricty is a Japanese TrueType font, consisting of Inconsolata and Migu 1M. -WWW: http://www.rs.tus.ac.jp/yyusa/ricty.html +WWW: https://rictyfonts.github.io diff --git a/japanese/font-ricty/pkg-plist b/japanese/font-ricty/pkg-plist index 563a4c6a35a2..de3ddbeac3e9 100644 --- a/japanese/font-ricty/pkg-plist +++ b/japanese/font-ricty/pkg-plist @@ -1,24 +1,9 @@ -%%RICTY%%%%DATADIR%%/Ricty-Bold.ttf -%%RICTY%%%%DATADIR%%/Ricty-BoldOblique.ttf -%%RICTY%%%%DATADIR%%/Ricty-Oblique.ttf -%%RICTY%%%%DATADIR%%/Ricty-Regular.ttf -%%DISCORD%%%%DATADIR%%/RictyDiscord-Bold.ttf -%%DISCORD%%%%DATADIR%%/RictyDiscord-BoldOblique.ttf -%%DISCORD%%%%DATADIR%%/RictyDiscord-Oblique.ttf -%%DISCORD%%%%DATADIR%%/RictyDiscord-Regular.ttf -%%RICTY%%etc/fonts/conf.avail/20-unhint-ricty.conf -%%RICTY%%etc/fonts/conf.avail/62-fonts-ricty.conf -%%RICTY%%etc/fonts/conf.d/20-unhint-ricty.conf -%%RICTY%%etc/fonts/conf.d/62-fonts-ricty.conf -%%DISCORD%%etc/fonts/conf.avail/20-unhint-rictydiscord.conf -%%DISCORD%%etc/fonts/conf.avail/62-fonts-rictydiscord.conf -%%DISCORD%%etc/fonts/conf.d/20-unhint-rictydiscord.conf -%%DISCORD%%etc/fonts/conf.d/62-fonts-rictydiscord.conf -%%RICTY%%%%FONTSDIR%%/Ricty-Bold.ttf -%%RICTY%%%%FONTSDIR%%/Ricty-BoldOblique.ttf -%%RICTY%%%%FONTSDIR%%/Ricty-Oblique.ttf -%%RICTY%%%%FONTSDIR%%/Ricty-Regular.ttf -%%DISCORD%%%%FONTSDIR%%/RictyDiscord-Bold.ttf -%%DISCORD%%%%FONTSDIR%%/RictyDiscord-BoldOblique.ttf -%%DISCORD%%%%FONTSDIR%%/RictyDiscord-Oblique.ttf -%%DISCORD%%%%FONTSDIR%%/RictyDiscord-Regular.ttf +%%FONTSDIR%%/fonts.dir +%%FONTSDIR%%/Ricty-Bold.ttf +%%FONTSDIR%%/Ricty-BoldOblique.ttf +%%FONTSDIR%%/Ricty-Oblique.ttf +%%FONTSDIR%%/Ricty-Regular.ttf +etc/fonts/conf.avail/20-unhint-ricty.conf +etc/fonts/conf.avail/62-fonts-ricty.conf +etc/fonts/conf.d/20-unhint-ricty.conf +etc/fonts/conf.d/62-fonts-ricty.conf |