aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2016-07-23 14:33:10 +0800
committerume <ume@FreeBSD.org>2016-07-23 14:33:10 +0800
commitfbcd5d87d55403fb670c53de0101a5e9ba1091b0 (patch)
tree3d10fa7aec8f1924e6219392d3f2153e39de0b33 /japanese
parent741f7c1ea72c75bd402b9c681584a8ab21bb0aab (diff)
downloadfreebsd-ports-graphics-fbcd5d87d55403fb670c53de0101a5e9ba1091b0.tar.gz
freebsd-ports-graphics-fbcd5d87d55403fb670c53de0101a5e9ba1091b0.tar.zst
freebsd-ports-graphics-fbcd5d87d55403fb670c53de0101a5e9ba1091b0.zip
Add new port -- Mgen+ Japanese TrueType fonts
Diffstat (limited to 'japanese')
-rw-r--r--japanese/Makefile1
-rw-r--r--japanese/font-mgenplus/Makefile46
-rw-r--r--japanese/font-mgenplus/distinfo3
-rw-r--r--japanese/font-mgenplus/files/20-unhint-mgenplus.conf45
-rw-r--r--japanese/font-mgenplus/files/62-fonts-mgenplus.conf26
-rw-r--r--japanese/font-mgenplus/files/pkg-install.in119
-rw-r--r--japanese/font-mgenplus/pkg-descr3
-rw-r--r--japanese/font-mgenplus/pkg-plist73
8 files changed, 316 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile
index 6dc4596640f..88a16991553 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -79,6 +79,7 @@
SUBDIR += font-kochi
SUBDIR += font-koruri
SUBDIR += font-marumoji
+ SUBDIR += font-mgenplus
SUBDIR += font-migmix
SUBDIR += font-migu
SUBDIR += font-mikachan
diff --git a/japanese/font-mgenplus/Makefile b/japanese/font-mgenplus/Makefile
new file mode 100644
index 00000000000..ea9433663ae
--- /dev/null
+++ b/japanese/font-mgenplus/Makefile
@@ -0,0 +1,46 @@
+# $FreeBSD$
+
+PORTNAME= mgenplus
+PORTVERSION= 20150602
+#PORTREVISION= 0
+CATEGORIES= japanese x11-fonts
+MASTER_SITES= SOURCEFORGE_JP
+MASTER_SITE_SUBDIR=users/8/8597
+PKGNAMEPREFIX= ja-font-
+
+MAINTAINER= ume@FreeBSD.org
+COMMENT= Mgen+ Japanese TrueType fonts
+
+LICENSE= OFL11
+
+USES= 7z fonts:fc
+FONTNAME= ${PORTNAME}
+NO_ARCH= yes
+NO_BUILD= yes
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-install
+SUB_FILES= pkg-install
+NO_WRKSUBDIR= yes
+PORTDOCS= *
+
+OPTIONS_DEFINE= DOCS
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${FONTSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} *.ttf ${STAGEDIR}${FONTSDIR}
+ ${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
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
+ "! -name *\.ttf"
+
+.include <bsd.port.mk>
diff --git a/japanese/font-mgenplus/distinfo b/japanese/font-mgenplus/distinfo
new file mode 100644
index 00000000000..a8b65483d13
--- /dev/null
+++ b/japanese/font-mgenplus/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1469173389
+SHA256 (mgenplus-20150602.7z) = 86f0bcb59516d0b1a791f136d0c1d41ad6d7a10566ceb7fff85cdcedb65b8b8c
+SIZE (mgenplus-20150602.7z) = 36542833
diff --git a/japanese/font-mgenplus/files/20-unhint-mgenplus.conf b/japanese/font-mgenplus/files/20-unhint-mgenplus.conf
new file mode 100644
index 00000000000..b9890e24133
--- /dev/null
+++ b/japanese/font-mgenplus/files/20-unhint-mgenplus.conf
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <match target="font">
+ <or>
+ <test name="family">
+ <string>Mgen+ 1c</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 1cp</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 1p</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 1pp</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 2c</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 2cp</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 2p</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 2pp</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 1m</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 1mn</string>
+ </test>
+ <test name="family">
+ <string>Mgen+ 2m</string>
+ </test>
+ </or>
+ <edit name="autohint">
+ <bool>false</bool>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/japanese/font-mgenplus/files/62-fonts-mgenplus.conf b/japanese/font-mgenplus/files/62-fonts-mgenplus.conf
new file mode 100644
index 00000000000..1e85f5ac235
--- /dev/null
+++ b/japanese/font-mgenplus/files/62-fonts-mgenplus.conf
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+ <family>Mgen+ 1c</family>
+ <family>Mgen+ 1cp</family>
+ <family>Mgen+ 1p</family>
+ <family>Mgen+ 1pp</family>
+ <family>Mgen+ 2c</family>
+ <family>Mgen+ 2cp</family>
+ <family>Mgen+ 2p</family>
+ <family>Mgen+ 2pp</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+ <family>Mgen+ 1m</family>
+ <family>Mgen+ 1mn</family>
+ <family>Mgen+ 2m</family>
+ </prefer>
+ </alias>
+</fontconfig>
diff --git a/japanese/font-mgenplus/files/pkg-install.in b/japanese/font-mgenplus/files/pkg-install.in
new file mode 100644
index 00000000000..83ca86cf08d
--- /dev/null
+++ b/japanese/font-mgenplus/files/pkg-install.in
@@ -0,0 +1,119 @@
+#!/bin/sh
+# $FreeBSD$
+
+catfontsdir()
+{
+ while read _IN
+ do
+ case "${_IN}" in
+ *"-adobe-mgen+"*|[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
+
+ set -- "" ${_weight}-r \
+ ${ITAL} ${_weight}-i \
+ ${OBLI} ${_weight}-o \
+ ${RITA} ${_weight}-ri \
+ ${ROBL} ${_weight}-ro
+ while [ $# != 0 ]; do
+ _prefix="${PFIX}:$1"; shift
+ _variant=$1; shift
+ [ ${index_type} = "scale" -a ${_prefix} != ":" ] && continue
+ 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
+ for FAM in 1c 1cp 1p 1pp 2c 2cp 2p 2pp
+ do
+ make_xlfd ${ENC} mgenplus-${FAM}-black.ttf adobe "mgen+ ${FAM}" p black
+ make_xlfd ${ENC} mgenplus-${FAM}-bold.ttf adobe "mgen+ ${FAM}" p bold
+ make_xlfd ${ENC} mgenplus-${FAM}-heavy.ttf adobe "mgen+ ${FAM}" p extrabold
+ make_xlfd ${ENC} mgenplus-${FAM}-light.ttf adobe "mgen+ ${FAM}" p extralight
+ make_xlfd ${ENC} mgenplus-${FAM}-medium.ttf adobe "mgen+ ${FAM}" p medium
+ make_xlfd ${ENC} mgenplus-${FAM}-regular.ttf adobe "mgen+ ${FAM}" p book
+ make_xlfd ${ENC} mgenplus-${FAM}-thin.ttf adobe "mgen+ ${FAM}" p thin
+ done
+ for FAM in 1m 1mn 2m
+ do
+ make_xlfd ${ENC} mgenplus-${FAM}-bold.ttf adobe "mgen+ ${FAM}" c bold
+ make_xlfd ${ENC} mgenplus-${FAM}-light.ttf adobe "mgen+ ${FAM}" c extralight
+ make_xlfd ${ENC} mgenplus-${FAM}-medium.ttf adobe "mgen+ ${FAM}" c medium
+ make_xlfd ${ENC} mgenplus-${FAM}-regular.ttf adobe "mgen+ ${FAM}" c book
+ make_xlfd ${ENC} mgenplus-${FAM}-thin.ttf adobe "mgen+ ${FAM}" c thin
+ done
+ done
+}
+
+nfonts()
+{
+ _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L}
+}
+
+install_fontsdir()
+{
+ index_type=${1:-"dir"}
+ index="fonts.${index_type}"
+ tmpfile="${index}.tmp"
+ touch ${index}
+ (catfontsdir < ${index}; addentries ${index_type}) > ${tmpfile}
+ nfonts < ${tmpfile} > ${index}
+ cat ${tmpfile} >> ${index}
+ rm -f ${tmpfile}
+}
+
+deinstall_fontsdir()
+{
+ index_type=${1:-"dir"}
+ index="fonts.${index_type}"
+ tmpfile="${index}.tmp"
+ catfontsdir < ${index} > ${tmpfile}
+ nfonts < ${tmpfile} > ${index}
+ cat ${tmpfile} >> ${index}
+ rm -f ${tmpfile}
+ if [ -r ${index} -a $(wc -l < ${index}) = 1 ]; then
+ rm -f ${index}
+ fi
+}
+
+case "$2" in
+POST-INSTALL)
+ cd %%FONTSDIR%%
+ install_fontsdir dir
+ install_fontsdir scale
+ ;;
+POST-DEINSTALL)
+ cd %%FONTSDIR%%
+ deinstall_fontsdir dir
+ deinstall_fontsdir scale
+ ;;
+esac
diff --git a/japanese/font-mgenplus/pkg-descr b/japanese/font-mgenplus/pkg-descr
new file mode 100644
index 00000000000..137ae99e219
--- /dev/null
+++ b/japanese/font-mgenplus/pkg-descr
@@ -0,0 +1,3 @@
+Mgen+ Japanese TrueType fonts
+
+WWW: http://jikasei.me/font/mgenplus/
diff --git a/japanese/font-mgenplus/pkg-plist b/japanese/font-mgenplus/pkg-plist
new file mode 100644
index 00000000000..6bb420ccb9b
--- /dev/null
+++ b/japanese/font-mgenplus/pkg-plist
@@ -0,0 +1,73 @@
+etc/fonts/conf.avail/20-unhint-mgenplus.conf
+etc/fonts/conf.avail/62-fonts-mgenplus.conf
+%%FONTSDIR%%/mgenplus-1c-black.ttf
+%%FONTSDIR%%/mgenplus-1c-bold.ttf
+%%FONTSDIR%%/mgenplus-1c-heavy.ttf
+%%FONTSDIR%%/mgenplus-1c-light.ttf
+%%FONTSDIR%%/mgenplus-1c-medium.ttf
+%%FONTSDIR%%/mgenplus-1c-regular.ttf
+%%FONTSDIR%%/mgenplus-1c-thin.ttf
+%%FONTSDIR%%/mgenplus-1cp-black.ttf
+%%FONTSDIR%%/mgenplus-1cp-bold.ttf
+%%FONTSDIR%%/mgenplus-1cp-heavy.ttf
+%%FONTSDIR%%/mgenplus-1cp-light.ttf
+%%FONTSDIR%%/mgenplus-1cp-medium.ttf
+%%FONTSDIR%%/mgenplus-1cp-regular.ttf
+%%FONTSDIR%%/mgenplus-1cp-thin.ttf
+%%FONTSDIR%%/mgenplus-1m-bold.ttf
+%%FONTSDIR%%/mgenplus-1m-light.ttf
+%%FONTSDIR%%/mgenplus-1m-medium.ttf
+%%FONTSDIR%%/mgenplus-1m-regular.ttf
+%%FONTSDIR%%/mgenplus-1m-thin.ttf
+%%FONTSDIR%%/mgenplus-1mn-bold.ttf
+%%FONTSDIR%%/mgenplus-1mn-light.ttf
+%%FONTSDIR%%/mgenplus-1mn-medium.ttf
+%%FONTSDIR%%/mgenplus-1mn-regular.ttf
+%%FONTSDIR%%/mgenplus-1mn-thin.ttf
+%%FONTSDIR%%/mgenplus-1p-black.ttf
+%%FONTSDIR%%/mgenplus-1p-bold.ttf
+%%FONTSDIR%%/mgenplus-1p-heavy.ttf
+%%FONTSDIR%%/mgenplus-1p-light.ttf
+%%FONTSDIR%%/mgenplus-1p-medium.ttf
+%%FONTSDIR%%/mgenplus-1p-regular.ttf
+%%FONTSDIR%%/mgenplus-1p-thin.ttf
+%%FONTSDIR%%/mgenplus-1pp-black.ttf
+%%FONTSDIR%%/mgenplus-1pp-bold.ttf
+%%FONTSDIR%%/mgenplus-1pp-heavy.ttf
+%%FONTSDIR%%/mgenplus-1pp-light.ttf
+%%FONTSDIR%%/mgenplus-1pp-medium.ttf
+%%FONTSDIR%%/mgenplus-1pp-regular.ttf
+%%FONTSDIR%%/mgenplus-1pp-thin.ttf
+%%FONTSDIR%%/mgenplus-2c-black.ttf
+%%FONTSDIR%%/mgenplus-2c-bold.ttf
+%%FONTSDIR%%/mgenplus-2c-heavy.ttf
+%%FONTSDIR%%/mgenplus-2c-light.ttf
+%%FONTSDIR%%/mgenplus-2c-medium.ttf
+%%FONTSDIR%%/mgenplus-2c-regular.ttf
+%%FONTSDIR%%/mgenplus-2c-thin.ttf
+%%FONTSDIR%%/mgenplus-2cp-black.ttf
+%%FONTSDIR%%/mgenplus-2cp-bold.ttf
+%%FONTSDIR%%/mgenplus-2cp-heavy.ttf
+%%FONTSDIR%%/mgenplus-2cp-light.ttf
+%%FONTSDIR%%/mgenplus-2cp-medium.ttf
+%%FONTSDIR%%/mgenplus-2cp-regular.ttf
+%%FONTSDIR%%/mgenplus-2cp-thin.ttf
+%%FONTSDIR%%/mgenplus-2m-bold.ttf
+%%FONTSDIR%%/mgenplus-2m-light.ttf
+%%FONTSDIR%%/mgenplus-2m-medium.ttf
+%%FONTSDIR%%/mgenplus-2m-regular.ttf
+%%FONTSDIR%%/mgenplus-2m-thin.ttf
+%%FONTSDIR%%/mgenplus-2p-black.ttf
+%%FONTSDIR%%/mgenplus-2p-bold.ttf
+%%FONTSDIR%%/mgenplus-2p-heavy.ttf
+%%FONTSDIR%%/mgenplus-2p-light.ttf
+%%FONTSDIR%%/mgenplus-2p-medium.ttf
+%%FONTSDIR%%/mgenplus-2p-regular.ttf
+%%FONTSDIR%%/mgenplus-2p-thin.ttf
+%%FONTSDIR%%/mgenplus-2pp-black.ttf
+%%FONTSDIR%%/mgenplus-2pp-bold.ttf
+%%FONTSDIR%%/mgenplus-2pp-heavy.ttf
+%%FONTSDIR%%/mgenplus-2pp-light.ttf
+%%FONTSDIR%%/mgenplus-2pp-medium.ttf
+%%FONTSDIR%%/mgenplus-2pp-regular.ttf
+%%FONTSDIR%%/mgenplus-2pp-thin.ttf