Date: Sat, 23 Jul 2016 06:33:10 +0000 (UTC) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r418946 - in head/japanese: . font-mgenplus font-mgenplus/files Message-ID: <201607230633.u6N6XA0p095568@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ume Date: Sat Jul 23 06:33:10 2016 New Revision: 418946 URL: https://svnweb.freebsd.org/changeset/ports/418946 Log: Add new port -- Mgen+ Japanese TrueType fonts Added: head/japanese/font-mgenplus/ head/japanese/font-mgenplus/Makefile (contents, props changed) head/japanese/font-mgenplus/distinfo (contents, props changed) head/japanese/font-mgenplus/files/ head/japanese/font-mgenplus/files/20-unhint-mgenplus.conf (contents, props changed) head/japanese/font-mgenplus/files/62-fonts-mgenplus.conf (contents, props changed) head/japanese/font-mgenplus/files/pkg-install.in (contents, props changed) head/japanese/font-mgenplus/pkg-descr (contents, props changed) head/japanese/font-mgenplus/pkg-plist (contents, props changed) Modified: head/japanese/Makefile Modified: head/japanese/Makefile ============================================================================== --- head/japanese/Makefile Sat Jul 23 06:13:47 2016 (r418945) +++ head/japanese/Makefile Sat Jul 23 06:33:10 2016 (r418946) @@ -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 Added: head/japanese/font-mgenplus/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/font-mgenplus/Makefile Sat Jul 23 06:33:10 2016 (r418946) @@ -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> Added: head/japanese/font-mgenplus/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/font-mgenplus/distinfo Sat Jul 23 06:33:10 2016 (r418946) @@ -0,0 +1,3 @@ +TIMESTAMP = 1469173389 +SHA256 (mgenplus-20150602.7z) = 86f0bcb59516d0b1a791f136d0c1d41ad6d7a10566ceb7fff85cdcedb65b8b8c +SIZE (mgenplus-20150602.7z) = 36542833 Added: head/japanese/font-mgenplus/files/20-unhint-mgenplus.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/font-mgenplus/files/20-unhint-mgenplus.conf Sat Jul 23 06:33:10 2016 (r418946) @@ -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> Added: head/japanese/font-mgenplus/files/62-fonts-mgenplus.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/font-mgenplus/files/62-fonts-mgenplus.conf Sat Jul 23 06:33:10 2016 (r418946) @@ -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> Added: head/japanese/font-mgenplus/files/pkg-install.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/font-mgenplus/files/pkg-install.in Sat Jul 23 06:33:10 2016 (r418946) @@ -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 Added: head/japanese/font-mgenplus/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/font-mgenplus/pkg-descr Sat Jul 23 06:33:10 2016 (r418946) @@ -0,0 +1,3 @@ +Mgen+ Japanese TrueType fonts + +WWW: http://jikasei.me/font/mgenplus/ Added: head/japanese/font-mgenplus/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/font-mgenplus/pkg-plist Sat Jul 23 06:33:10 2016 (r418946) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607230633.u6N6XA0p095568>