diff options
author | hrs <hrs@FreeBSD.org> | 2011-07-18 16:57:02 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2011-07-18 16:57:02 +0800 |
commit | 1dc2607a1d2471219cbcb3dda726d6729f4901b9 (patch) | |
tree | 50ebb5f6fe4426b6b334b3c33f86bb87b1432b7b /japanese | |
parent | 0143685ad038689a748063a74b76ed338875aee8 (diff) | |
download | freebsd-ports-gnome-1dc2607a1d2471219cbcb3dda726d6729f4901b9.tar.gz freebsd-ports-gnome-1dc2607a1d2471219cbcb3dda726d6729f4901b9.tar.zst freebsd-ports-gnome-1dc2607a1d2471219cbcb3dda726d6729f4901b9.zip |
Add japanese/font-migu, another Japanese font set based on MigMix.
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/font-migu/Makefile | 76 | ||||
-rw-r--r-- | japanese/font-migu/distinfo | 12 | ||||
-rw-r--r-- | japanese/font-migu/files/20-unhint-migu.conf | 18 | ||||
-rw-r--r-- | japanese/font-migu/files/62-fonts-migu.conf | 23 | ||||
-rw-r--r-- | japanese/font-migu/files/pkg-install.in | 117 | ||||
-rw-r--r-- | japanese/font-migu/pkg-descr | 3 | ||||
-rw-r--r-- | japanese/font-migu/pkg-plist | 49 |
8 files changed, 299 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index 43613d3bf2be..669e279b7afc 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -81,6 +81,7 @@ SUBDIR += font-ipaex SUBDIR += font-kochi SUBDIR += font-migmix + SUBDIR += font-migu SUBDIR += font-mona-ipa SUBDIR += font-motoya-al SUBDIR += font-mplus diff --git a/japanese/font-migu/Makefile b/japanese/font-migu/Makefile new file mode 100644 index 000000000000..4aceba73e7ba --- /dev/null +++ b/japanese/font-migu/Makefile @@ -0,0 +1,76 @@ +# New ports collection makefile for: font-migu +# Date created: 22 June 2011 +# Whom: hrs +# +# $FreeBSD$ +# + +PORTNAME= font-migu +PORTVERSION= 1.0.20110610 +CATEGORIES= japanese x11-fonts +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP} +MASTER_SITE_SUBDIR= mix-mplus-ipa/52283 +DISTFILES= Migu-1P-20110610${EXTRACT_SUFX} \ + Migu-1C-20110610${EXTRACT_SUFX} \ + Migu-1M-20110610${EXTRACT_SUFX} \ + Migu-2M-20110610${EXTRACT_SUFX} \ + Migu-1VS-20110610${EXTRACT_SUFX} \ + Migu-2DS-20110610${EXTRACT_SUFX} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= Another Japanese font set based on MigMix + +RUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig + +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= IPA_Font_License_Agreement_v1.0.txt Readme_ipag00303.txt \ + README_E README_J LICENSE_E LICENSE_J Migu-README.txt + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +do-install: + cd ${WRKDIR}/Migu-1P-20110610/ && \ + ${INSTALL_DATA} ipag00303/*.txt \ + mplus-TESTFLIGHT-040/* \ + Migu-README.txt \ + ${WRKDIR} + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} \ + ${WRKDIR}/Migu-1P-20110610/*.ttf \ + ${WRKDIR}/Migu-1C-20110610/*.ttf \ + ${WRKDIR}/Migu-1M-20110610/*.ttf \ + ${WRKDIR}/Migu-2M-20110610/*.ttf \ + ${WRKDIR}/Migu-1VS-20110610/*.ttf \ + ${WRKDIR}/Migu-2DS-20110610/*.ttf \ + ${DATADIR} + ${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TTF + ${LN} -s -f ${DATADIR}/Migu*.ttf \ + ${PREFIX}/${LOCAL_FONTSDIR}/TTF/ + ${MKDIR} ${PREFIX}/${X_FONTSDIR}/TTF + ${LN} -s -f ${DATADIR}/Migu*.ttf \ + ${PREFIX}/${X_FONTSDIR}/TTF/ + ${INSTALL_DATA} ${FILESDIR}/20-unhint-migu.conf \ + ${FILESDIR}/62-fonts-migu.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-migu.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-migu.conf + ${LN} -s -f ../conf.avail/62-fonts-migu.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-migu.conf +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKDIR} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif + +post-install: + ${LOCALBASE}/bin/fc-cache -s -f -v ${PREFIX}/${X_FONTSDIR}/TTF + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/japanese/font-migu/distinfo b/japanese/font-migu/distinfo new file mode 100644 index 000000000000..7b6c7c0b7823 --- /dev/null +++ b/japanese/font-migu/distinfo @@ -0,0 +1,12 @@ +SHA256 (Migu-1P-20110610.zip) = d4a1739cb2ade593d31d4f0280955256620bd47dcc0e93d1c314138a00659c52 +SIZE (Migu-1P-20110610.zip) = 4332242 +SHA256 (Migu-1C-20110610.zip) = b44725948c3568f94c5bbffaaaa698f40f03948bd07a35a0d4e3a5033bdde0ed +SIZE (Migu-1C-20110610.zip) = 4340415 +SHA256 (Migu-1M-20110610.zip) = a8b689d96190e1b9ca7954968cd193fcd4ae7d206c1462d8db3ca67087c1efe7 +SIZE (Migu-1M-20110610.zip) = 4249183 +SHA256 (Migu-2M-20110610.zip) = 7b1cbfa42015df05456246d99dc0a1a61e80dd0792310a8e46f5bd80027a4694 +SIZE (Migu-2M-20110610.zip) = 4248674 +SHA256 (Migu-1VS-20110610.zip) = 7649caebccafa8fc56d98609f955e21b004e1b94609482e5fab52716df61216a +SIZE (Migu-1VS-20110610.zip) = 4752481 +SHA256 (Migu-2DS-20110610.zip) = 44452dad1f08998eeca6aaf45810687f214f670cd95069fa802fe7f4de25ba5a +SIZE (Migu-2DS-20110610.zip) = 4559057 diff --git a/japanese/font-migu/files/20-unhint-migu.conf b/japanese/font-migu/files/20-unhint-migu.conf new file mode 100644 index 000000000000..99c71d29d65b --- /dev/null +++ b/japanese/font-migu/files/20-unhint-migu.conf @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <test name="family"> + <string>Migu 1C</string> + <string>Migu 1P</string> + <string>Migu 1M</string> + <string>Migu 2M</string> + <string>Migu 1VS</string> + <string>Migu 2DS</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-migu/files/62-fonts-migu.conf b/japanese/font-migu/files/62-fonts-migu.conf new file mode 100644 index 000000000000..a5e279ce890b --- /dev/null +++ b/japanese/font-migu/files/62-fonts-migu.conf @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>sans-serif</family> + <prefer> + <family>Migu 1C</family> + <family>Migu 1P</family> + <family>Migu 1M</family> + <family>Migu 2M</family> + <family>Migu 1VS</family> + <family>Migu 2DS</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>Migu 1M</family> + <family>Migu 2M</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-migu/files/pkg-install.in b/japanese/font-migu/files/pkg-install.in new file mode 100644 index 000000000000..9b8c7c4ffac0 --- /dev/null +++ b/japanese/font-migu/files/pkg-install.in @@ -0,0 +1,117 @@ +#!/bin/sh +# $FreeBSD$ + +X_FONTSDIR=%%X_FONTSDIR%%/TTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-ipa-migu\ *|[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 + _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 Migu-1C-bold.ttf ipa "migu 1c" p bold + make_xlfd $ENC Migu-1C-regular.ttf ipa "migu 1c" p medium + + make_xlfd $ENC Migu-1P-bold.ttf ipa "migu 1p" p bold + make_xlfd $ENC Migu-1P-regular.ttf ipa "migu 1p" p medium + + make_xlfd $ENC Migu-1VS-bold.ttf ipa "migu 1vs" p bold + make_xlfd $ENC Migu-1VS-regular.ttf ipa "migu 1vs" p medium + make_xlfd $ENC Migu-2DS-bold.ttf ipa "migu 2ds" p bold + make_xlfd $ENC Migu-2DS-regular.ttf ipa "migu 2ds" p medium + + make_xlfd $ENC Migu-1M-bold.ttf ipa "migu 1m" c bold + make_xlfd $ENC Migu-1M-regular.ttf ipa "migu 1m" c medium + make_xlfd $ENC Migu-2M-bold.ttf ipa "migu 2m" c bold + make_xlfd $ENC Migu-2M-regular.ttf ipa "migu 2m" c medium + 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-migu/pkg-descr b/japanese/font-migu/pkg-descr new file mode 100644 index 000000000000..e740e5bd7a0d --- /dev/null +++ b/japanese/font-migu/pkg-descr @@ -0,0 +1,3 @@ +This is a Japanese TrueType font based on MigMix Japanese font. + +WWW: http://mix-mplus-ipa.sourceforge.jp/migu/ diff --git a/japanese/font-migu/pkg-plist b/japanese/font-migu/pkg-plist new file mode 100644 index 000000000000..429d748f14da --- /dev/null +++ b/japanese/font-migu/pkg-plist @@ -0,0 +1,49 @@ +@comment $FreeBSD$ +%%DATADIR%%/Migu-1C-bold.ttf +%%DATADIR%%/Migu-1C-regular.ttf +%%DATADIR%%/Migu-1P-bold.ttf +%%DATADIR%%/Migu-1P-regular.ttf +%%DATADIR%%/Migu-1M-bold.ttf +%%DATADIR%%/Migu-1M-regular.ttf +%%DATADIR%%/Migu-2M-bold.ttf +%%DATADIR%%/Migu-2M-regular.ttf +%%DATADIR%%/Migu-1VS-bold.ttf +%%DATADIR%%/Migu-1VS-regular.ttf +%%DATADIR%%/Migu-2DS-bold.ttf +%%DATADIR%%/Migu-2DS-regular.ttf +@dirrm %%DATADIR%% +%%LOCAL_FONTSDIR%%/TTF/Migu-1C-bold.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-1C-regular.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-1P-bold.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-1P-regular.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-1M-bold.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-1M-regular.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-2M-bold.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-2M-regular.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-1VS-bold.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-1VS-regular.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-2DS-bold.ttf +%%LOCAL_FONTSDIR%%/TTF/Migu-2DS-regular.ttf +@dirrmtry %%LOCAL_FONTSDIR%%/TTF +@dirrmtry %%LOCAL_FONTSDIR%% +etc/fonts/conf.avail/20-unhint-migu.conf +etc/fonts/conf.avail/62-fonts-migu.conf +etc/fonts/conf.d/20-unhint-migu.conf +etc/fonts/conf.d/62-fonts-migu.conf +%%X_FONTSDIR%%/TTF/Migu-1C-bold.ttf +%%X_FONTSDIR%%/TTF/Migu-1C-regular.ttf +%%X_FONTSDIR%%/TTF/Migu-1P-bold.ttf +%%X_FONTSDIR%%/TTF/Migu-1P-regular.ttf +%%X_FONTSDIR%%/TTF/Migu-1M-bold.ttf +%%X_FONTSDIR%%/TTF/Migu-1M-regular.ttf +%%X_FONTSDIR%%/TTF/Migu-2M-bold.ttf +%%X_FONTSDIR%%/TTF/Migu-2M-regular.ttf +%%X_FONTSDIR%%/TTF/Migu-1VS-bold.ttf +%%X_FONTSDIR%%/TTF/Migu-1VS-regular.ttf +%%X_FONTSDIR%%/TTF/Migu-2DS-bold.ttf +%%X_FONTSDIR%%/TTF/Migu-2DS-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%%/TTF/fonts.cache-1 +@dirrmtry %%X_FONTSDIR%%/TTF +@unexec if [ -d %D/%%X_FONTSDIR%%/TTF ]; then %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/TTF || true; fi |