diff options
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/font-ipamjm/Makefile | 64 | ||||
-rw-r--r-- | japanese/font-ipamjm/distinfo | 2 | ||||
-rw-r--r-- | japanese/font-ipamjm/files/20-unhint-ipamjm.conf | 15 | ||||
-rw-r--r-- | japanese/font-ipamjm/files/62-fonts-ipamjm.conf | 11 | ||||
-rw-r--r-- | japanese/font-ipamjm/files/pkg-install.in | 94 | ||||
-rw-r--r-- | japanese/font-ipamjm/pkg-descr | 7 | ||||
-rw-r--r-- | japanese/font-ipamjm/pkg-plist | 8 |
8 files changed, 202 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index 4cab331c014d..e629f197d65a 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -64,6 +64,7 @@ SUBDIR += font-ipa SUBDIR += font-ipa-uigothic SUBDIR += font-ipaex + SUBDIR += font-ipamjm SUBDIR += font-jisx0213 SUBDIR += font-kochi SUBDIR += font-koruri diff --git a/japanese/font-ipamjm/Makefile b/japanese/font-ipamjm/Makefile new file mode 100644 index 000000000000..b0f00c9b7231 --- /dev/null +++ b/japanese/font-ipamjm/Makefile @@ -0,0 +1,64 @@ +# $FreeBSD$ + +PORTNAME= ipamjm +PORTVERSION= 00301 +CATEGORIES= japanese x11-fonts +MASTER_SITES= http://dl.mojikiban.ipa.go.jp/IPAmjMincho/ +PKGNAMEPREFIX= ja-font- +DISTNAME= ${PORTNAME}${PORTVERSION} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= IPAmj Mincho Japanese fonts + +LICENSE= IPAFLAv1 +LICENSE_NAME= IPA Font License Agreement v1.0 +LICENSE_FILE= ${WRKSRC}/IPA_Font_License_Agreement_v1.0.txt +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig + +USES= zip +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} +DATADIR= ${PREFIX}/share/font-${PORTNAME} +PORTDOCS= Readme_${PORTNAME}003.01.txt + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +OPTIONS_DEFINE= DOCS + +.include <bsd.port.options.mk> + +do-install: + ${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/ipamjm.ttf ${STAGEDIR}${DATADIR} + ${MKDIR} ${STAGEDIR}${PREFIX}/${LOCAL_FONTSDIR}/OTF + cd ${STAGEDIR}${PREFIX}/${LOCAL_FONTSDIR}/OTF/ && ${LN} -s -f \ + ../${LOCAL_FONTSDIR:C,[^/]+,..,g}/${DATADIR_REL}/ipamjm.ttf . + ${MKDIR} ${STAGEDIR}${PREFIX}/${X_FONTSDIR}/OTF + cd ${STAGEDIR}${PREFIX}/${X_FONTSDIR}/OTF/ && ${LN} -s -f \ + ../${X_FONTSDIR:C,[^/]+,..,g}/${DATADIR_REL}/ipamjm.ttf . + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \ + ${STAGEDIR}${PREFIX}/etc/fonts/conf.d + ${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 +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} +.endif + +post-su-install: + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/japanese/font-ipamjm/distinfo b/japanese/font-ipamjm/distinfo new file mode 100644 index 000000000000..8802353138a5 --- /dev/null +++ b/japanese/font-ipamjm/distinfo @@ -0,0 +1,2 @@ +SHA256 (ipamjm00301.zip) = 036929d12ea36dce50915b36a1a9c3f8983a87c585305eaac1888aaceba18d64 +SIZE (ipamjm00301.zip) = 31097786 diff --git a/japanese/font-ipamjm/files/20-unhint-ipamjm.conf b/japanese/font-ipamjm/files/20-unhint-ipamjm.conf new file mode 100644 index 000000000000..947e845fa40b --- /dev/null +++ b/japanese/font-ipamjm/files/20-unhint-ipamjm.conf @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <or> + <test name="family"> + <string>IPAmjMincho</string> + </test> + </or> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-ipamjm/files/62-fonts-ipamjm.conf b/japanese/font-ipamjm/files/62-fonts-ipamjm.conf new file mode 100644 index 000000000000..c4b7c82c8501 --- /dev/null +++ b/japanese/font-ipamjm/files/62-fonts-ipamjm.conf @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>serif</family> + <prefer> + <family>IPAmjMincho</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-ipamjm/files/pkg-install.in b/japanese/font-ipamjm/files/pkg-install.in new file mode 100644 index 000000000000..57ce1a13d971 --- /dev/null +++ b/japanese/font-ipamjm/files/pkg-install.in @@ -0,0 +1,94 @@ +#!/bin/sh +# $FreeBSD$ + +X_FONTSDIR=%%X_FONTSDIR%%/OTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-ipa-IPAmj*|[0-9]*|"") ;; + *-ipa-mjm*|[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 ipamjm.ttf ipa IPAmjMincho c + make_xlfd $ENC ipamjm.ttf ipa IPAmjMincho p + make_xlfd $ENC ipamjm.ttf ipa mjmincho c + make_xlfd $ENC ipamjm.ttf ipa mjmincho 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-ipamjm/pkg-descr b/japanese/font-ipamjm/pkg-descr new file mode 100644 index 000000000000..cd621a4b1872 --- /dev/null +++ b/japanese/font-ipamjm/pkg-descr @@ -0,0 +1,7 @@ +Japanese TrueType fonts distributed by Infomation-technology Promotion +Agency (IPA) Japan. + +IPAmj Mincho is a font set which covers the entire range of Kanji characters +used in names of Japanese people. + +WWW: http://mojikiban.ipa.go.jp/1300.html diff --git a/japanese/font-ipamjm/pkg-plist b/japanese/font-ipamjm/pkg-plist new file mode 100644 index 000000000000..65c39809e0eb --- /dev/null +++ b/japanese/font-ipamjm/pkg-plist @@ -0,0 +1,8 @@ +%%DATADIR%%/ipamjm.ttf +%%LOCAL_FONTSDIR%%/OTF/ipamjm.ttf +etc/fonts/conf.avail/20-unhint-ipamjm.conf +etc/fonts/conf.avail/62-fonts-ipamjm.conf +etc/fonts/conf.d/20-unhint-ipamjm.conf +etc/fonts/conf.d/62-fonts-ipamjm.conf +%%X_FONTSDIR%%/OTF/ipamjm.ttf +@fc %%X_FONTSDIR%%/OTF |