diff options
author | hrs <hrs@FreeBSD.org> | 2010-08-01 02:34:32 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2010-08-01 02:34:32 +0800 |
commit | 27525f8ac68b85e75c2c0c2d38732d72a219d78c (patch) | |
tree | b7be59a4df26911ccc3e1e9345cae36734fd716a | |
parent | f4bfa063ccbbd0193c31f4323ba3d704e37c9275 (diff) | |
download | freebsd-ports-gnome-27525f8ac68b85e75c2c0c2d38732d72a219d78c.tar.gz freebsd-ports-gnome-27525f8ac68b85e75c2c0c2d38732d72a219d78c.tar.zst freebsd-ports-gnome-27525f8ac68b85e75c2c0c2d38732d72a219d78c.zip |
Add japanese/font-migmix, a Japanese TrueType fontset which consists of
IPA Gothic (version 3.02) + M+ outline (TESTFLIGHT-030).
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/font-migmix/Makefile | 67 | ||||
-rw-r--r-- | japanese/font-migmix/distinfo | 6 | ||||
-rw-r--r-- | japanese/font-migmix/files/20-unhint-migmix.conf | 16 | ||||
-rw-r--r-- | japanese/font-migmix/files/62-fonts-migmix.conf | 21 | ||||
-rw-r--r-- | japanese/font-migmix/files/pkg-install.in | 110 | ||||
-rw-r--r-- | japanese/font-migmix/pkg-descr | 5 | ||||
-rw-r--r-- | japanese/font-migmix/pkg-plist | 39 |
8 files changed, 265 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index b2c1aaa99c5b..0c19c19c0c46 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -79,6 +79,7 @@ SUBDIR += font-ipa-uigothic SUBDIR += font-ipaex SUBDIR += font-kochi + SUBDIR += font-migmix SUBDIR += font-mona-ipa SUBDIR += font-mplus SUBDIR += font-mplus-ipa diff --git a/japanese/font-migmix/Makefile b/japanese/font-migmix/Makefile new file mode 100644 index 000000000000..5a14832d41ce --- /dev/null +++ b/japanese/font-migmix/Makefile @@ -0,0 +1,67 @@ +# New ports collection makefile for: font-migmix +# Date created: 21 July 2010 +# Whom: hrs +# +# $FreeBSD$ +# + +PORTNAME= font-migmix +PORTVERSION= 1.0.20100626 +CATEGORIES= japanese x11-fonts +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP} +MASTER_SITE_SUBDIR= mix-mplus-ipa/48024 +DISTFILES= MigMix-1P-1M-20100626${EXTRACT_SUFX} \ + MigMix-2P-2M-20100626${EXTRACT_SUFX} + +MAINTAINER= hrs@FreeBSD.org +COMMENT= Mixed Japanese font with IPA Gothic and M-plus outline + +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_IPAfont00302.txt \ + README_E README_J LICENSE_E LICENSE_J README.txt + +LOCAL_FONTSDIR= share/fonts +X_FONTSDIR= lib/X11/fonts + +do-install: + cd ${WRKDIR}/MigMix-1P-1M-20100626/ && \ + ${INSTALL_DATA} IPAfont00302/*.txt \ + mplus-TESTFLIGHT-030/* \ + README.txt \ + ${WRKDIR} + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKDIR}/MigMix-1P-1M-20100626/*.ttf \ + ${WRKDIR}/MigMix-2P-2M-20100626/*.ttf \ + ${DATADIR} + ${MKDIR} ${PREFIX}/${LOCAL_FONTSDIR}/TTF + ${LN} -s -f ${DATADIR}/MigMix*.ttf \ + ${LOCALBASE}/${LOCAL_FONTSDIR}/TTF/ + ${MKDIR} ${LOCALBASE}/${X_FONTSDIR}/TTF + ${LN} -s -f ${DATADIR}/MigMix*.ttf \ + ${LOCALBASE}/${X_FONTSDIR}/TTF/ + ${INSTALL_DATA} ${FILESDIR}/20-unhint-migmix.conf \ + ${FILESDIR}/62-fonts-migmix.conf \ + ${PREFIX}/etc/fonts/conf.avail + ${LN} -s -f ../conf.avail/20-unhint-migmix.conf \ + ${PREFIX}/etc/fonts/conf.d/20-unhint-migmix.conf + ${LN} -s -f ../conf.avail/62-fonts-migmix.conf \ + ${PREFIX}/etc/fonts/conf.d/62-fonts-migmix.conf +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKDIR} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} +.endif + +post-install: + ${LOCALBASE}/bin/fc-cache -s -f -v ${LOCALBASE}/${X_FONTSDIR}/TTF + ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/japanese/font-migmix/distinfo b/japanese/font-migmix/distinfo new file mode 100644 index 000000000000..81e988ffba68 --- /dev/null +++ b/japanese/font-migmix/distinfo @@ -0,0 +1,6 @@ +MD5 (MigMix-1P-1M-20100626.zip) = 08442d1062bbe63e741667f2a6ee8c3e +SHA256 (MigMix-1P-1M-20100626.zip) = 444f49d6ddfee3a10d1fca48e988d7df661f49713642e299d4bfb38f1004f443 +SIZE (MigMix-1P-1M-20100626.zip) = 12448485 +MD5 (MigMix-2P-2M-20100626.zip) = 7c9c57121eecbdad793b1d5e8809dd8c +SHA256 (MigMix-2P-2M-20100626.zip) = 4c24b4ee18a36fd41de3986c7b7af69fde6fb5eee43b0ddcd24c187901a95f35 +SIZE (MigMix-2P-2M-20100626.zip) = 12448872 diff --git a/japanese/font-migmix/files/20-unhint-migmix.conf b/japanese/font-migmix/files/20-unhint-migmix.conf new file mode 100644 index 000000000000..8564e91cdbe6 --- /dev/null +++ b/japanese/font-migmix/files/20-unhint-migmix.conf @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <match target="font"> + <test name="family"> + <string>MigMix 1M</string> + <string>MigMix 1P</string> + <string>MigMix 2M</string> + <string>MigMix 2P</string> + </test> + <edit name="autohint"> + <bool>false</bool> + </edit> + </match> +</fontconfig> diff --git a/japanese/font-migmix/files/62-fonts-migmix.conf b/japanese/font-migmix/files/62-fonts-migmix.conf new file mode 100644 index 000000000000..3038eac0bd34 --- /dev/null +++ b/japanese/font-migmix/files/62-fonts-migmix.conf @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- $FreeBSD$ --> +<fontconfig> + <alias> + <family>sans-serif</family> + <prefer> + <family>MigMix 1M</family> + <family>MigMix 1P</family> + <family>MigMix 2M</family> + <family>MigMix 2P</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>MigMix 1M</family> + <family>MigMix 2M</family> + </prefer> + </alias> +</fontconfig> diff --git a/japanese/font-migmix/files/pkg-install.in b/japanese/font-migmix/files/pkg-install.in new file mode 100644 index 000000000000..b3308487f1b5 --- /dev/null +++ b/japanese/font-migmix/files/pkg-install.in @@ -0,0 +1,110 @@ +#!/bin/sh +# $FreeBSD$ + +X_FONTSDIR=%%X_FONTSDIR%%/TTF + +catfontsdir () +{ + while read _IN + do + case "${_IN}" in + *-ipa-migmix*|[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 MigMix-1M-Bold.ttf ipa "migmix 1m" c bold + make_xlfd $ENC MigMix-1M-Regular.ttf ipa "migmix 1m" c medium + make_xlfd $ENC MigMix-1P-Bold.ttf ipa "migmix 1p" p bold + make_xlfd $ENC MigMix-1P-Regular.ttf ipa "migmix 1p" p medium + make_xlfd $ENC MigMix-2M-Bold.ttf ipa "migmix 2m" c bold + make_xlfd $ENC MigMix-2M-Regular.ttf ipa "migmix 2m" c medium + make_xlfd $ENC MigMix-2P-Bold.ttf ipa "migmix 2p" p bold + make_xlfd $ENC MigMix-2P-Regular.ttf ipa "migmix 2p" p 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-migmix/pkg-descr b/japanese/font-migmix/pkg-descr new file mode 100644 index 000000000000..80295faac111 --- /dev/null +++ b/japanese/font-migmix/pkg-descr @@ -0,0 +1,5 @@ +This package includes a mixed font consisting of Japanese TrueType +fonts distributed by Infomation-technology Promotion Agency (IPA) +Japan and M+ outline font. + +WWW: http://mix-mplus-ipa.sourceforge.jp/migmix/ diff --git a/japanese/font-migmix/pkg-plist b/japanese/font-migmix/pkg-plist new file mode 100644 index 000000000000..e1935b307982 --- /dev/null +++ b/japanese/font-migmix/pkg-plist @@ -0,0 +1,39 @@ +@comment $FreeBSD$ +%%DATADIR%%/MigMix-1M-Bold.ttf +%%DATADIR%%/MigMix-1M-Regular.ttf +%%DATADIR%%/MigMix-1P-Bold.ttf +%%DATADIR%%/MigMix-1P-Regular.ttf +%%DATADIR%%/MigMix-2M-Bold.ttf +%%DATADIR%%/MigMix-2M-Regular.ttf +%%DATADIR%%/MigMix-2P-Bold.ttf +%%DATADIR%%/MigMix-2P-Regular.ttf +@dirrm %%DATADIR%% +%%LOCAL_FONTSDIR%%/TTF/MigMix-1M-Bold.ttf +%%LOCAL_FONTSDIR%%/TTF/MigMix-1M-Regular.ttf +%%LOCAL_FONTSDIR%%/TTF/MigMix-1P-Bold.ttf +%%LOCAL_FONTSDIR%%/TTF/MigMix-1P-Regular.ttf +%%LOCAL_FONTSDIR%%/TTF/MigMix-2M-Bold.ttf +%%LOCAL_FONTSDIR%%/TTF/MigMix-2M-Regular.ttf +%%LOCAL_FONTSDIR%%/TTF/MigMix-2P-Bold.ttf +%%LOCAL_FONTSDIR%%/TTF/MigMix-2P-Regular.ttf +@dirrmtry %%LOCAL_FONTSDIR%%/TTF +@dirrmtry %%LOCAL_FONTSDIR%% +etc/fonts/conf.avail/20-unhint-migmix.conf +etc/fonts/conf.avail/62-fonts-migmix.conf +@exec ln -s -f ../conf.avail/20-unhint-migmix.conf %D/etc/fonts/conf.d/20-unhint-migmix.conf +@exec ln -s -f ../conf.avail/62-fonts-migmix.conf %D/etc/fonts/conf.d/62-fonts-migmix.conf +@unexec rm -f %D/etc/fonts/conf.d/20-unhint-migmix.conf +@unexec rm -f %D/etc/fonts/conf.d/62-fonts-migmix.conf +%%X_FONTSDIR%%/TTF/MigMix-1M-Bold.ttf +%%X_FONTSDIR%%/TTF/MigMix-1M-Regular.ttf +%%X_FONTSDIR%%/TTF/MigMix-1P-Bold.ttf +%%X_FONTSDIR%%/TTF/MigMix-1P-Regular.ttf +%%X_FONTSDIR%%/TTF/MigMix-2M-Bold.ttf +%%X_FONTSDIR%%/TTF/MigMix-2M-Regular.ttf +%%X_FONTSDIR%%/TTF/MigMix-2P-Bold.ttf +%%X_FONTSDIR%%/TTF/MigMix-2P-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 |