Index: head/japanese/font-ricty/Makefile =================================================================== --- head/japanese/font-ricty/Makefile (revision 383416) +++ head/japanese/font-ricty/Makefile (revision 383417) @@ -1,93 +1,93 @@ # Created by: masaki # $FreeBSD$ PORTNAME= ricty PORTVERSION= 3.2.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= japanese x11-fonts PKGNAMEPREFIX= ja-font- MAINTAINER?= meta+ports@vmeta.jp COMMENT?= Ricty - fonts for programming RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig BUILD_DEPENDS= ${LOCALBASE}/share/fonts/inconsolata/Inconsolata.otf:${PORTSDIR}/x11-fonts/inconsolata-ttf \ ${LOCALBASE}/share/fonts/TTF/migu-1m-regular.ttf:${PORTSDIR}/japanese/font-migu \ ${LOCALBASE}/share/fonts/TTF/migu-1m-bold.ttf:${PORTSDIR}/japanese/font-migu \ fontforge:${PORTSDIR}/print/fontforge USES= fonts USE_GITHUB= yes GH_ACCOUNT= yascentur GH_PROJECT= Ricty GH_COMMIT= c22daa9 NO_PACKAGE= redistribution is not allowed PKGINSTALL= ${WRKDIR}/pkg-install PKGDEINSTALL= ${WRKDIR}/pkg-install SUB_FILES= pkg-install FONTNAME= TTF .if !defined(PKGNAMESUFFIX) OPTIONS_DEFINE= DISCORD DOCS DISCORD_DESC= Install Ricty-Discord OPTIONS_DEFAULT= DISCORD PORTDOCS= README.md .endif .include .if !defined(PKGNAMESUFFIX) PLIST_SUB+= DISCORD="@comment " RICTY="" SUB_LIST+= DISCORD=\# RICTY="" .else PLIST_SUB+= DISCORD="" RICTY="@comment " SUB_LIST+= DISCORD="" RICTY=\# .endif .if ${PORT_OPTIONS:MDISCORD} RUN_DEPENDS+= ${DATADIR}/RictyDiscord-Regular.ttf:${PORTSDIR}/japanese/font-ricty-discord .endif do-build: cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \ ${SH} ${WRKSRC}/ricty_generator.sh \ ${PREFIX}/share/fonts/inconsolata/Inconsolata.otf \ ${PREFIX}/share/fonts/TTF/migu-1m-regular.ttf \ ${PREFIX}/share/fonts/TTF/migu-1m-bold.ttf 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 .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 .endif .if ${PORT_OPTIONS:MDOCS} && defined(PORTDOCS) ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .endif .include Index: head/japanese/font-ricty/files/pkg-install.in =================================================================== --- head/japanese/font-ricty/files/pkg-install.in (revision 383416) +++ head/japanese/font-ricty/files/pkg-install.in (revision 383417) @@ -1,107 +1,104 @@ #!/bin/sh -X_FONTSDIR=%%X_FONTSDIR%%/TTF - catfontsdir () { while read _IN do case "${_IN}" in %%RICTY%% *-Ricty-*) ;; %%DISCORD%% *-Ricty\ Discord-*) ;; *) echo ${_IN} ;; esac done } ROMA="" BOLD="ds=y" ITAL="ai=0.15" OBLI="ai=0.15" RITA="ai=0.08" ROBL="ai=0.08" make_xlfd() { _enc=$1 _file=$2 _vendor=$3 _fname=$4 _poc=$5 _weight=$6 case "${_poc}:${_enc}" in p:jisx0201.1976-*) PFIX="bw=0.5" ;; c:jisx0201.1976-*) PFIX="bw=0.5" ;; p:*) PFIX="" ;; c:*) PFIX="" ;; esac case $_weight in 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) set -- "" medium-r \ ${ITAL} medium-i \ ${OBLI} medium-o \ ${RITA} medium-ri \ ${ROBL} medium-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,^:,,' ;; esac } 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-Bold.ttf ipa "Ricty" p bold %%DISCORD%%make_xlfd $ENC RictyDiscord-Regular.ttf ipa "Ricty Discord" p medium %%DISCORD%%make_xlfd $ENC RictyDiscord-Bold.ttf ipa "Ricty Discord" p bold done } nfonts () { _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L} } case "$2" in POST-INSTALL) - cd ${X_FONTSDIR} + 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 ${X_FONTSDIR} + 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 - rmdir ${X_FONTSDIR} > /dev/null 2>&1 || true ;; esac