diff options
author | hrs <hrs@FreeBSD.org> | 2009-06-03 14:58:40 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2009-06-03 14:58:40 +0800 |
commit | cb4c6b26df121101d674807c7f4b1d0816065418 (patch) | |
tree | c935accdff8cf066b8973fdf520fee58232c4eb7 /japanese/font-ipa-uigothic | |
parent | 3556d64d7ad16bfc43ee843e2f8c297560d424b6 (diff) | |
download | freebsd-ports-gnome-cb4c6b26df121101d674807c7f4b1d0816065418.tar.gz freebsd-ports-gnome-cb4c6b26df121101d674807c7f4b1d0816065418.tar.zst freebsd-ports-gnome-cb4c6b26df121101d674807c7f4b1d0816065418.zip |
Add japanese/font-ipa-uigothic, a Japanese font "IPAUIGothic"
which supports JIS X 0213:2004. This is included in IPA font
version 002.03.
Diffstat (limited to 'japanese/font-ipa-uigothic')
-rw-r--r-- | japanese/font-ipa-uigothic/Makefile | 62 | ||||
-rw-r--r-- | japanese/font-ipa-uigothic/distinfo | 3 | ||||
-rw-r--r-- | japanese/font-ipa-uigothic/files/20-unhint-ipa-uigothic.conf | 13 | ||||
-rw-r--r-- | japanese/font-ipa-uigothic/files/62-fonts-ipa-uigothic.conf | 11 | ||||
-rw-r--r-- | japanese/font-ipa-uigothic/files/pkg-install.in | 90 | ||||
-rw-r--r-- | japanese/font-ipa-uigothic/pkg-descr | 4 | ||||
-rw-r--r-- | japanese/font-ipa-uigothic/pkg-plist | 18 |
7 files changed, 201 insertions, 0 deletions
diff --git a/japanese/font-ipa-uigothic/Makefile b/japanese/font-ipa-uigothic/Makefile new file mode 100644 index 000000000000..b63c35982a90 --- /dev/null +++ b/japanese/font-ipa-uigothic/Makefile @@ -0,0 +1,62 @@ +# New ports collection makefile for: font-ipa-uigothic +# Date created: 2 June 2009 +# Whom: hrs +# $FreeBSD$ +# + +PORTNAME= font-ipa-uigothic +PORTVERSION= 00203 +CATEGORIES= japanese x11-fonts +MASTER_SITES= http://info.openlab.ipa.go.jp/ipafont/fontdata/old/ +DISTNAME= IPAfont${PORTVERSION} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= IPA Japanese fonts, UIGothic + +RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig + +# ja-font-mplus-ipa-1.0.20060520.p1 has an old ipagui.ttf +CONFLICTS= ja-font-mplus-ipa-1.0.20060520.p1 + +USE_ZIP= yes +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= enduser_license.txt \ + Readme${PORTVERSION}.txt + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +do-install: + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/ipagui.ttf ${DATADIR} + ${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TTF + ${LN} -s -f \ + ${DATADIR}/ipagui.ttf \ + ${LOCALBASE}/${LOCAL_FONTSDIR}/TTF/ + ${MKDIR} ${LOCALBASE}/${X_FONTSDIR}/TTF + ${LN} -s -f \ + ${DATADIR}/ipagui.ttf \ + ${LOCALBASE}/${X_FONTSDIR}/TTF/ + ${INSTALL_DATA} ${FILESDIR}/20-unhint-ipa-uigothic.conf \ + ${FILESDIR}/62-fonts-ipa-uigothic.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-ipa-uigothic.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-ipa-uigothic.conf + ${LN} -s -f ../conf.avail/62-fonts-ipa-uigothic.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-ipa-uigothic.conf +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif + +post-install: + ${LOCALBASE}/bin/fc-cache -f -v ${LOCALBASE}/${X_FONTSDIR}/TTF + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/japanese/font-ipa-uigothic/distinfo b/japanese/font-ipa-uigothic/distinfo new file mode 100644 index 000000000000..2388a7b8a3cd --- /dev/null +++ b/japanese/font-ipa-uigothic/distinfo @@ -0,0 +1,3 @@ +MD5 (IPAfont00203.zip) = 2f9bb8c4c74416c32c17633f5041c006 +SHA256 (IPAfont00203.zip) = ab6799af23903c1ee180e9c784d0b32b4f0b140f28df6980bdb0294f396c6a9e +SIZE (IPAfont00203.zip) = 16045502 diff --git a/japanese/font-ipa-uigothic/files/20-unhint-ipa-uigothic.conf b/japanese/font-ipa-uigothic/files/20-unhint-ipa-uigothic.conf new file mode 100644 index 000000000000..21af54bb1ecf --- /dev/null +++ b/japanese/font-ipa-uigothic/files/20-unhint-ipa-uigothic.conf @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <test name="family"> + <string>IPAUIGothic</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-ipa-uigothic/files/62-fonts-ipa-uigothic.conf b/japanese/font-ipa-uigothic/files/62-fonts-ipa-uigothic.conf new file mode 100644 index 000000000000..e77865e294b8 --- /dev/null +++ b/japanese/font-ipa-uigothic/files/62-fonts-ipa-uigothic.conf @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>sans-serif</family> + <prefer> + <family>IPAUIGothic</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-ipa-uigothic/files/pkg-install.in b/japanese/font-ipa-uigothic/files/pkg-install.in new file mode 100644 index 000000000000..e8beb7ff9472 --- /dev/null +++ b/japanese/font-ipa-uigothic/files/pkg-install.in @@ -0,0 +1,90 @@ +#!/bin/sh +# $FreeBSD$ + +X_FONTSDIR=%%X_FONTSDIR%%/TTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-ipa-IPAUI*|*-ipa-UI*|[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 ipagui.ttf ipa IPAUIGothic c + make_xlfd $ENC ipagui.ttf ipa UIGothic c + 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 + ;; +esac diff --git a/japanese/font-ipa-uigothic/pkg-descr b/japanese/font-ipa-uigothic/pkg-descr new file mode 100644 index 000000000000..da48e72b8067 --- /dev/null +++ b/japanese/font-ipa-uigothic/pkg-descr @@ -0,0 +1,4 @@ +Japanese TrueType fonts distributed by Infomation-technology Promotion +Agency (IPA) Japan. + +WWW: http://ossipedia.ipa.go.jp/ipafont/index.html diff --git a/japanese/font-ipa-uigothic/pkg-plist b/japanese/font-ipa-uigothic/pkg-plist new file mode 100644 index 000000000000..a037b97a398d --- /dev/null +++ b/japanese/font-ipa-uigothic/pkg-plist @@ -0,0 +1,18 @@ +@comment $FreeBSD$ +%%DATADIR%%/ipagui.ttf +@dirrm %%DATADIR%% +%%LOCAL_FONTSDIR%%/TTF/ipagui.ttf +@dirrmtry %%LOCAL_FONTSDIR%%/TTF +@dirrmtry %%LOCAL_FONTSDIR%% +etc/fonts/conf.avail/20-unhint-ipa-uigothic.conf +etc/fonts/conf.avail/62-fonts-ipa-uigothic.conf +@exec ln -s -f ../conf.avail/20-unhint-ipa-uigothic.conf %D/etc/fonts/conf.d/20-unhint-ipa-uigothic.conf +@exec ln -s -f ../conf.avail/62-fonts-ipa-uigothic.conf %D/etc/fonts/conf.d/62-fonts-ipa-uigothic.conf +@unexec rm -f %D/etc/fonts/conf.d/20-unhint-ipa-uigothic.conf +@unexec rm -f %D/etc/fonts/conf.d/62-fonts-ipa-uigothic.conf +%%X_FONTSDIR%%/TTF/ipagui.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%%/TTF/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 |