diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2011-01-15 13:12:38 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2011-01-15 13:12:38 +0000 |
commit | 4eb022e27e8aea6aa57e831d7f889ba7f8edef14 (patch) | |
tree | 188d0674b4b07c7a6b7583ef3fec5c74b0439354 /japanese/font-motoya-al | |
parent | a944e927167518695c56e9d5d0d0f08b6655cad1 (diff) |
Add font-motoya-al for two free Japanese TrueType fonts by MOTOYA Co.,Ltd.,
which are available under Apache license.
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=267825
Diffstat (limited to 'japanese/font-motoya-al')
-rw-r--r-- | japanese/font-motoya-al/Makefile | 59 | ||||
-rw-r--r-- | japanese/font-motoya-al/distinfo | 2 | ||||
-rw-r--r-- | japanese/font-motoya-al/files/20-unhint-motoya-al.conf | 14 | ||||
-rw-r--r-- | japanese/font-motoya-al/files/62-fonts-motoya-al.conf | 19 | ||||
-rw-r--r-- | japanese/font-motoya-al/files/pkg-install.in | 97 | ||||
-rw-r--r-- | japanese/font-motoya-al/pkg-descr | 7 | ||||
-rw-r--r-- | japanese/font-motoya-al/pkg-plist | 18 |
7 files changed, 216 insertions, 0 deletions
diff --git a/japanese/font-motoya-al/Makefile b/japanese/font-motoya-al/Makefile new file mode 100644 index 000000000000..ec0560df659e --- /dev/null +++ b/japanese/font-motoya-al/Makefile @@ -0,0 +1,59 @@ +# New ports collection makefile for: font-motoya-al +# Date created: 7 January 2011 +# Whom: hrs +# $FreeBSD$ +# + +PORTNAME= font-motoya-al +PORTVERSION= 0.0.20100921 +CATEGORIES= japanese x11-fonts +MASTER_SITES= LOCAL +MASTER_SITE_SUBDIR= hrs +DISTNAME= motoya-al-fonts-${PORTVERSION:S,^0.0.,,} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= Free Japanese fonts by MOTOYA + +RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig + +USE_BZIP2= 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= newsrelease20100921.pdf + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +do-install: + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/*.ttf ${DATADIR} + ${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TTF + ${LN} -s -f \ + ${DATADIR}/MTL*.ttf \ + ${PREFIX}/${LOCAL_FONTSDIR}/TTF/ + ${MKDIR} ${PREFIX}/${X_FONTSDIR}/TTF + ${LN} -s -f \ + ${DATADIR}/MTL*.ttf \ + ${PREFIX}/${X_FONTSDIR}/TTF/ + ${INSTALL_DATA} ${FILESDIR}/20-unhint-motoya-al.conf \ + ${FILESDIR}/62-fonts-motoya-al.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-motoya-al.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-motoya-al.conf + ${LN} -s -f ../conf.avail/62-fonts-motoya-al.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-motoya-al.conf +.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.mk> diff --git a/japanese/font-motoya-al/distinfo b/japanese/font-motoya-al/distinfo new file mode 100644 index 000000000000..da7efc39e08a --- /dev/null +++ b/japanese/font-motoya-al/distinfo @@ -0,0 +1,2 @@ +SHA256 (motoya-al-fonts-20100921.tar.bz2) = a1fa3c53f0ec3b339b9f655737e089e90efeab186682107f639b8908343d2b06 +SIZE (motoya-al-fonts-20100921.tar.bz2) = 2933997 diff --git a/japanese/font-motoya-al/files/20-unhint-motoya-al.conf b/japanese/font-motoya-al/files/20-unhint-motoya-al.conf new file mode 100644 index 000000000000..421f6c828d9e --- /dev/null +++ b/japanese/font-motoya-al/files/20-unhint-motoya-al.conf @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <test name="family"> + <string>MotoyaLCeder</string> + <string>MotoyaLMaru</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-motoya-al/files/62-fonts-motoya-al.conf b/japanese/font-motoya-al/files/62-fonts-motoya-al.conf new file mode 100644 index 000000000000..e337179e0340 --- /dev/null +++ b/japanese/font-motoya-al/files/62-fonts-motoya-al.conf @@ -0,0 +1,19 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>sans-serif</family> + <prefer> + <family>MotoyaLCeder</family> + <family>MotoyaLMaru</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>MotoyaLCeder</family> + <family>MotoyaLMaru</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-motoya-al/files/pkg-install.in b/japanese/font-motoya-al/files/pkg-install.in new file mode 100644 index 000000000000..a680897e2e58 --- /dev/null +++ b/japanese/font-motoya-al/files/pkg-install.in @@ -0,0 +1,97 @@ +#!/bin/sh +# $FreeBSD$ + +X_FONTSDIR=%%X_FONTSDIR%%/TTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-motoya-motoyalmaru-*) ;; + *-motoya-motoyalceder-*) ;; + *-motoya-lmaru-*) ;; + *-motoya-lceder-*) ;; + [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 MTLc3m.ttf motoya motoyalceder c + make_xlfd $ENC MTLc3m.ttf motoya lceder c + make_xlfd $ENC MTLmr3m.ttf motoya motoyalmaru c + make_xlfd $ENC MTLmr3m.ttf motoya lmaru 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 + rmdir ${X_FONTSDIR} > /dev/null 2>&1 || true + ;; +esac diff --git a/japanese/font-motoya-al/pkg-descr b/japanese/font-motoya-al/pkg-descr new file mode 100644 index 000000000000..9e56a49a5c94 --- /dev/null +++ b/japanese/font-motoya-al/pkg-descr @@ -0,0 +1,7 @@ +Two free Japanese TrueType fonts (Apache License) by MOTOYA Co.,Ltd: + +- Motoya L Ceder W3 +- Motoya L Maru W3 + +WWW: http://www.motoyafont.jp/news/newsrelease20100921.pdf +WWW: https://android.git.kernel.org/?p=platform/frameworks/base.git;a=commit;h=76d3b0f1bdf31b7315b636834f7da7211ca907e0 diff --git a/japanese/font-motoya-al/pkg-plist b/japanese/font-motoya-al/pkg-plist new file mode 100644 index 000000000000..392095ad9d01 --- /dev/null +++ b/japanese/font-motoya-al/pkg-plist @@ -0,0 +1,18 @@ +@comment $FreeBSD$ +%%DATADIR%%/MTLc3m.ttf +%%DATADIR%%/MTLmr3m.ttf +@dirrm %%DATADIR%% +%%LOCAL_FONTSDIR%%/TTF/MTLc3m.ttf +%%LOCAL_FONTSDIR%%/TTF/MTLmr3m.ttf +@dirrmtry %%LOCAL_FONTSDIR%%/TTF +@dirrmtry %%LOCAL_FONTSDIR%% +etc/fonts/conf.avail/20-unhint-motoya-al.conf +etc/fonts/conf.avail/62-fonts-motoya-al.conf +etc/fonts/conf.d/20-unhint-motoya-al.conf +etc/fonts/conf.d/62-fonts-motoya-al.conf +%%X_FONTSDIR%%/TTF/MTLc3m.ttf +%%X_FONTSDIR%%/TTF/MTLmr3m.ttf +@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 |