diff options
author | tota <tota@FreeBSD.org> | 2012-05-02 10:57:45 +0800 |
---|---|---|
committer | tota <tota@FreeBSD.org> | 2012-05-02 10:57:45 +0800 |
commit | 24c44fe63e8bd4b5bac3099338c1e9b3a3d620e1 (patch) | |
tree | 79c75239b0dac656ad9a604c15ab345e45ad59c4 /japanese | |
parent | 50696f024bea18e83e8693c0a1fe38d1175a1bd7 (diff) | |
download | freebsd-ports-gnome-24c44fe63e8bd4b5bac3099338c1e9b3a3d620e1.tar.gz freebsd-ports-gnome-24c44fe63e8bd4b5bac3099338c1e9b3a3d620e1.tar.zst freebsd-ports-gnome-24c44fe63e8bd4b5bac3099338c1e9b3a3d620e1.zip |
- Add a new port: japanese/font-ricty
Ricty is a Japanese TrueType font, consisting of
Inconsolata and Migu 1M.
WWW: http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty.html
Approved by: Masaki TAGAWA <masaki@club.kyutech.ac.jp> (maintainer)
Obtained from: http://www.club.kyutech.ac.jp/~masaki/ports/font-ricty.shar
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/font-ricty/Makefile | 98 | ||||
-rw-r--r-- | japanese/font-ricty/distinfo | 2 | ||||
-rw-r--r-- | japanese/font-ricty/files/20-unhint-ricty.conf | 12 | ||||
-rw-r--r-- | japanese/font-ricty/files/20-unhint-rictydiscord.conf | 12 | ||||
-rw-r--r-- | japanese/font-ricty/files/62-fonts-ricty.conf | 16 | ||||
-rw-r--r-- | japanese/font-ricty/files/62-fonts-rictydiscord.conf | 16 | ||||
-rw-r--r-- | japanese/font-ricty/files/pkg-install.in | 106 | ||||
-rw-r--r-- | japanese/font-ricty/pkg-descr | 4 | ||||
-rw-r--r-- | japanese/font-ricty/pkg-plist | 28 |
10 files changed, 295 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index ea2bcf8a53a5..1b455319bda5 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -82,6 +82,7 @@ SUBDIR += font-motoya-al SUBDIR += font-mplus SUBDIR += font-mplus-ipa + SUBDIR += font-ricty SUBDIR += font-sazanami SUBDIR += font-shinonome SUBDIR += font-std diff --git a/japanese/font-ricty/Makefile b/japanese/font-ricty/Makefile new file mode 100644 index 000000000000..c0d0b0ea09c7 --- /dev/null +++ b/japanese/font-ricty/Makefile @@ -0,0 +1,98 @@ +# New ports collection makefile for: font-ricty +# Date created: 24 April 2012 +# Whom: masaki +# +# $FreeBSD$ +# + +PORTNAME= ricty +PORTVERSION= 3.2.0 +CATEGORIES= japanese x11-fonts +MASTER_SITES= https://nodeload.github.com/yascentur/Ricty/tarball/ + +MAINTAINER= masaki@club.kyutech.ac.jp +COMMENT= Ricty - fonts for programming + +RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig +BUILD_DEPENDS= ${LOCALBASE}/${X_FONTSDIR}/OTF/Inconsolata.otf:${PORTSDIR}/x11-fonts/inconsolata-ttf \ + ${LOCALBASE}/${X_FONTSDIR}/TTF/migu-1m-regular.ttf:${PORTSDIR}/japanese/font-migu \ + ${LOCALBASE}/${X_FONTSDIR}/TTF/migu-1m-bold.ttf:${PORTSDIR}/japanese/font-migu \ + fontforge:${PORTSDIR}/print/fontforge + +PKGINSTALL= ${WRKDIR}/pkg-install +PKGDEINSTALL= ${WRKDIR}/pkg-install +SUB_FILES= pkg-install +SUB_LIST= X_FONTSDIR=${PREFIX}/${X_FONTSDIR} +PLIST_SUB= X_FONTSDIR=${X_FONTSDIR} \ + LOCAL_FONTSDIR=${LOCAL_FONTSDIR} +PORTDOCS= README.md +TAG= b9d8b9c +WRKSRC= ${WRKDIR}/yascentur-Ricty-${TAG} + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +OPTIONS= DISCORD "Install Ricty-Discord" On + +.include <bsd.port.pre.mk> + +PKGNAMEPREFIX:= ${PKGNAMEPREFIX}font- + +.if defined(WITH_DISCORD) +PLIST_SUB+= DISCORD="" +SUB_LIST+= DISCORD="" +.else +PLIST_SUB+= DISCORD="@comment " +SUB_LIST+= DISCORD="#" +.endif + +do-fetch: + @${FETCH_BINARY} -o ${DISTDIR}/${DISTFILES} ${MASTER_SITES}${PORTVERSION} + +do-build: + cd ${WRKSRC} &&\ + ${SH} ${WRKSRC}/ricty_generator.sh \ + ${PREFIX}/${X_FONTSDIR}/OTF/Inconsolata.otf \ + ${PREFIX}/${X_FONTSDIR}/TTF/migu-1m-regular.ttf \ + ${PREFIX}/${X_FONTSDIR}/TTF/migu-1m-bold.ttf + +do-install: + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/Ricty-*.ttf ${DATADIR} +.if defined(WITH_DISCORD) + ${INSTALL_DATA} ${WRKSRC}/RictyDiscord-*.ttf ${DATADIR} +.endif + ${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TTF + ${LN} -s -f \ + ${DATADIR}/*.ttf \ + ${PREFIX}/${LOCAL_FONTSDIR}/TTF/ + ${MKDIR} ${PREFIX}/${X_FONTSDIR}/TTF + ${LN} -s -f \ + ${DATADIR}/*.ttf \ + ${PREFIX}/${X_FONTSDIR}/TTF/ + ${INSTALL_DATA} ${FILESDIR}/20-unhint-ricty.conf \ + ${FILESDIR}/62-fonts-ricty.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-ricty.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-ricty.conf + ${LN} -s -f ../conf.avail/62-fonts-ricty.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-ricty.conf +.if defined(WITH_DISCORD) + ${INSTALL_DATA} ${FILESDIR}/20-unhint-rictydiscord.conf \ + ${FILESDIR}/62-fonts-rictydiscord.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-rictydiscord.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-rictydiscord.conf + ${LN} -s -f ../conf.avail/62-fonts-rictydiscord.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-rictydiscord.conf +.endif +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif + +post-install: + ${LOCALBASE}/bin/fc-cache -f -v ${PREFIX}/${X_FONTSDIR}/TTF + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.post.mk> diff --git a/japanese/font-ricty/distinfo b/japanese/font-ricty/distinfo new file mode 100644 index 000000000000..13a95e1b1ea6 --- /dev/null +++ b/japanese/font-ricty/distinfo @@ -0,0 +1,2 @@ +SHA256 (ricty-3.2.0.tar.gz) = bb2bf6d7762b5e6e13d237bd82ba43d6faffc17b7e6d541db89d58a73a8a319e +SIZE (ricty-3.2.0.tar.gz) = 13286 diff --git a/japanese/font-ricty/files/20-unhint-ricty.conf b/japanese/font-ricty/files/20-unhint-ricty.conf new file mode 100644 index 000000000000..a2f2dddf3fa6 --- /dev/null +++ b/japanese/font-ricty/files/20-unhint-ricty.conf @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <match target="font"> + <test name="family"> + <string>Ricty</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-ricty/files/20-unhint-rictydiscord.conf b/japanese/font-ricty/files/20-unhint-rictydiscord.conf new file mode 100644 index 000000000000..a13b5e42d197 --- /dev/null +++ b/japanese/font-ricty/files/20-unhint-rictydiscord.conf @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <match target="font"> + <test name="family"> + <string>Ricty Discord</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-ricty/files/62-fonts-ricty.conf b/japanese/font-ricty/files/62-fonts-ricty.conf new file mode 100644 index 000000000000..5b83a10ede6c --- /dev/null +++ b/japanese/font-ricty/files/62-fonts-ricty.conf @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <alias> + <family>sans-serif</family> + <prefer> + <family>Ricty</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>Ricty</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-ricty/files/62-fonts-rictydiscord.conf b/japanese/font-ricty/files/62-fonts-rictydiscord.conf new file mode 100644 index 000000000000..d4e1e8a025d8 --- /dev/null +++ b/japanese/font-ricty/files/62-fonts-rictydiscord.conf @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <alias> + <family>sans-serif</family> + <prefer> + <family>Ricty Discord</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>Ricty Discord</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-ricty/files/pkg-install.in b/japanese/font-ricty/files/pkg-install.in new file mode 100644 index 000000000000..9d53097ce8b7 --- /dev/null +++ b/japanese/font-ricty/files/pkg-install.in @@ -0,0 +1,106 @@ +#!/bin/sh + +X_FONTSDIR=%%X_FONTSDIR%%/TTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-Ricty*) ;; + *) 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 + make_xlfd $ENC Ricty-Regular.ttf ipa "Ricty" p medium + 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} + touch fonts.dir + (catfontsdir < fonts.dir; 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} + catfontsdir < fonts.dir > 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 diff --git a/japanese/font-ricty/pkg-descr b/japanese/font-ricty/pkg-descr new file mode 100644 index 000000000000..7f24387f838d --- /dev/null +++ b/japanese/font-ricty/pkg-descr @@ -0,0 +1,4 @@ +Ricty is a Japanese TrueType font, consisting of +Inconsolata and Migu 1M. + +WWW: http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty.html diff --git a/japanese/font-ricty/pkg-plist b/japanese/font-ricty/pkg-plist new file mode 100644 index 000000000000..de9afa3c3286 --- /dev/null +++ b/japanese/font-ricty/pkg-plist @@ -0,0 +1,28 @@ +%%DATADIR%%/Ricty-Bold.ttf +%%DATADIR%%/Ricty-Regular.ttf +%%DISCORD%%%%DATADIR%%/RictyDiscord-Bold.ttf +%%DISCORD%%%%DATADIR%%/RictyDiscord-Regular.ttf +@dirrm %%DATADIR%% +%%LOCAL_FONTSDIR%%/TTF/Ricty-Bold.ttf +%%LOCAL_FONTSDIR%%/TTF/Ricty-Regular.ttf +%%DISCORD%%%%LOCAL_FONTSDIR%%/TTF/RictyDiscord-Bold.ttf +%%DISCORD%%%%LOCAL_FONTSDIR%%/TTF/RictyDiscord-Regular.ttf +@dirrmtry %%LOCAL_FONTSDIR%%/TTF +@dirrmtry %%LOCAL_FONTSDIR%% +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 +%%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 +%%X_FONTSDIR%%/TTF/Ricty-Bold.ttf +%%X_FONTSDIR%%/TTF/Ricty-Regular.ttf +%%DISCORD%%%%X_FONTSDIR%%/TTF/RictyDiscord-Bold.ttf +%%DISCORD%%%%X_FONTSDIR%%/TTF/RictyDiscord-Regular.ttf +@exec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/TTF || true +@unexec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/TTF || true +@unexec rm -f %D/%%X_FONTSDIR%%/OTF/fonts.cache-1 +@dirrmtry %%X_FONTSDIR%%/TTF +@unexec if [ -d %D/%%X_FONTSDIR%%/TTF ]; then %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/TTF || true; fi |