diff options
author | hrs <hrs@FreeBSD.org> | 2010-02-20 02:19:58 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2010-02-20 02:19:58 +0800 |
commit | 5c80137b2d4103ab72483653609ccea21e8d1843 (patch) | |
tree | d275ab68399f2a95f5c03354f04d597d7b3d1112 /japanese | |
parent | a31cd92b0bb7fe7e2161b3440d873dfa04502fc2 (diff) | |
download | freebsd-ports-gnome-5c80137b2d4103ab72483653609ccea21e8d1843.tar.gz freebsd-ports-gnome-5c80137b2d4103ab72483653609ccea21e8d1843.tar.zst freebsd-ports-gnome-5c80137b2d4103ab72483653609ccea21e8d1843.zip |
Add japanese/font-takao:
Takao Fonts are a community developed derivative of IPA
Fonts. The main purpose of this project is to secure the
possibility to maintain the fonts by the community.
Feature safe: yes
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/font-takao/Makefile | 60 | ||||
-rw-r--r-- | japanese/font-takao/distinfo | 3 | ||||
-rw-r--r-- | japanese/font-takao/files/20-unhint-takao.conf | 16 | ||||
-rw-r--r-- | japanese/font-takao/files/62-fonts-takao.conf | 24 | ||||
-rw-r--r-- | japanese/font-takao/files/pkg-install.in | 95 | ||||
-rw-r--r-- | japanese/font-takao/pkg-descr | 5 | ||||
-rw-r--r-- | japanese/font-takao/pkg-plist | 27 |
8 files changed, 231 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index 48975ea6b1df..eb258640fe29 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -83,6 +83,7 @@ SUBDIR += font-sazanami SUBDIR += font-shinonome SUBDIR += font-std + SUBDIR += font-takao SUBDIR += font-ume SUBDIR += font-vlgothic SUBDIR += freepwing diff --git a/japanese/font-takao/Makefile b/japanese/font-takao/Makefile new file mode 100644 index 000000000000..cdf50ef025e7 --- /dev/null +++ b/japanese/font-takao/Makefile @@ -0,0 +1,60 @@ +# New ports collection makefile for: font-takao +# Date created: 19 February 2010 +# Whom: hrs +# $FreeBSD$ +# + +PORTNAME= font-takao +PORTVERSION= 003.01.20100214.1 +CATEGORIES= japanese x11-fonts +MASTER_SITES= http://launchpadlibrarian.net/39193744/ +DISTNAME= takao-fonts-otf-${PORTVERSION} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= An improved IPA Japanese fonts + +RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig + +NO_BUILD= yes +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= IPA_Font_License_Agreement_v1.0.txt \ + README \ + README.ja \ + ChangeLog + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +do-install: + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/*.otf ${DATADIR} + ${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/OTF + ${LN} -s -f \ + ${DATADIR}/Takao*.otf \ + ${LOCALBASE}/${LOCAL_FONTSDIR}/OTF/ + ${MKDIR} ${LOCALBASE}/${X_FONTSDIR}/OTF + ${LN} -s -f \ + ${DATADIR}/Takao*.otf \ + ${LOCALBASE}/${X_FONTSDIR}/OTF/ + ${INSTALL_DATA} ${FILESDIR}/20-unhint-takao.conf \ + ${FILESDIR}/62-fonts-takao.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-takao.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-takao.conf + ${LN} -s -f ../conf.avail/62-fonts-takao.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-takao.conf +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif + +post-install: + ${LOCALBASE}/bin/fc-cache -f -v ${LOCALBASE}/${X_FONTSDIR}/OTF + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/japanese/font-takao/distinfo b/japanese/font-takao/distinfo new file mode 100644 index 000000000000..1b5d76176073 --- /dev/null +++ b/japanese/font-takao/distinfo @@ -0,0 +1,3 @@ +MD5 (takao-fonts-otf-003.01.20100214.1.tar.gz) = 0ddeac06eb9576b2d99a1fc7240cf71c +SHA256 (takao-fonts-otf-003.01.20100214.1.tar.gz) = 8450b84fb784e96c5d28ac7bd44514dad1fc968c8156b57b06ec91530f65a71a +SIZE (takao-fonts-otf-003.01.20100214.1.tar.gz) = 10178591 diff --git a/japanese/font-takao/files/20-unhint-takao.conf b/japanese/font-takao/files/20-unhint-takao.conf new file mode 100644 index 000000000000..13dcc73edcdb --- /dev/null +++ b/japanese/font-takao/files/20-unhint-takao.conf @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <test name="family"> + <string>TakaoMincho</string> + <string>TakaoGothic</string> + <string>TakaoPMincho</string> + <string>TakaoPGothic</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-takao/files/62-fonts-takao.conf b/japanese/font-takao/files/62-fonts-takao.conf new file mode 100644 index 000000000000..d92a02c78270 --- /dev/null +++ b/japanese/font-takao/files/62-fonts-takao.conf @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>serif</family> + <prefer> + <family>TakaoPMincho</family> + </prefer> + </alias> + <alias> + <family>sans-serif</family> + <prefer> + <family>TakaoPGothic</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>TakaoGothic</family> + <family>TakaoMincho</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-takao/files/pkg-install.in b/japanese/font-takao/files/pkg-install.in new file mode 100644 index 000000000000..a9cca0a92123 --- /dev/null +++ b/japanese/font-takao/files/pkg-install.in @@ -0,0 +1,95 @@ +#!/bin/sh +# $FreeBSD$ + +X_FONTSDIR=%%X_FONTSDIR%%/OTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-ipa-Takao*|[0-9]*|"") ;; + *) 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 + + case "${_poc}:${_enc}" in + p:jisx0201.1976-*) PFIX="bw=0.5" ;; + c:jisx0201.1976-*) PFIX="bw=0.5" ;; + p:*) PFIX="" ;; + c:*) PFIX="" ;; + esac + + set -- "${ROMA}" medium-r \ + ${BOLD} bold-r \ + ${ITAL} medium-i \ + ${ITAL}:${BOLD} bold-i \ + ${OBLI} medium-o \ + ${OBLI}:${BOLD} bold-o \ + ${RITA} medium-ri \ + ${RITA}:${BOLD} bold-ri \ + ${ROBL} medium-ro \ + ${ROBL}:${BOLD} 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,^:,,' +} + +addentries () +{ + for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0 jisx0208.1997-0 jisx0213.2004-1 + do + make_xlfd $ENC TakaoGothic.otf ipa TakaoGothic c + make_xlfd $ENC TakaoPGothic.otf ipa TakaoPGothic p + make_xlfd $ENC TakaoPGothic.otf ipa TakaoGothic p + make_xlfd $ENC TakaoMincho.otf ipa TakaoMincho c + make_xlfd $ENC TakaoPMincho.otf ipa TakaoPMincho p + make_xlfd $ENC TakaoPMincho.otf ipa TakaoMincho p + 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-takao/pkg-descr b/japanese/font-takao/pkg-descr new file mode 100644 index 000000000000..81d78b176f41 --- /dev/null +++ b/japanese/font-takao/pkg-descr @@ -0,0 +1,5 @@ +Takao Fonts are a community developed derivatives of IPA Fonts. The +main purpose of this project is to secure the possibility to maintain +the fonts by the community. + +WWW: https://launchpad.net/takao-fonts diff --git a/japanese/font-takao/pkg-plist b/japanese/font-takao/pkg-plist new file mode 100644 index 000000000000..f7f9d2cfb05f --- /dev/null +++ b/japanese/font-takao/pkg-plist @@ -0,0 +1,27 @@ +@comment $FreeBSD$ +%%DATADIR%%/TakaoPMincho.otf +%%DATADIR%%/TakaoMincho.otf +%%DATADIR%%/TakaoPGothic.otf +%%DATADIR%%/TakaoGothic.otf +@dirrm %%DATADIR%% +%%LOCAL_FONTSDIR%%/OTF/TakaoGothic.otf +%%LOCAL_FONTSDIR%%/OTF/TakaoPGothic.otf +%%LOCAL_FONTSDIR%%/OTF/TakaoMincho.otf +%%LOCAL_FONTSDIR%%/OTF/TakaoPMincho.otf +@dirrmtry %%LOCAL_FONTSDIR%%/OTF +@dirrmtry %%LOCAL_FONTSDIR%% +etc/fonts/conf.avail/20-unhint-takao.conf +etc/fonts/conf.avail/62-fonts-takao.conf +@exec ln -s -f ../conf.avail/20-unhint-ipa.conf %D/etc/fonts/conf.d/20-unhint-takao.conf +@exec ln -s -f ../conf.avail/62-fonts-ipa.conf %D/etc/fonts/conf.d/62-fonts-takao.conf +@unexec rm -f %D/etc/fonts/conf.d/20-unhint-takao.conf +@unexec rm -f %D/etc/fonts/conf.d/62-fonts-takao.conf +%%X_FONTSDIR%%/OTF/TakaoGothic.otf +%%X_FONTSDIR%%/OTF/TakaoPGothic.otf +%%X_FONTSDIR%%/OTF/TakaoMincho.otf +%%X_FONTSDIR%%/OTF/TakaoPMincho.otf +@exec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/OTF || true +@unexec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/OTF || true +@unexec rm -f %D/%%X_FONTSDIR%%/OTF/fonts.cache-1 +@dirrmtry %%X_FONTSDIR%%/OTF +@unexec if [ -d %D/%%X_FONTSDIR%%/OTF ]; then %%LOCALBASE%%/bin/fc-cache -f -v %D/%%X_FONTSDIR%%/OTF || true; fi |