Date: Wed, 12 Feb 2014 03:56:20 GMT From: Koichiro IWAO <meta+ports@vmeta.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/186673: New port: japanese/font-kokuri Message-ID: <201402120356.s1C3uKg5092728@cgiserv.freebsd.org> Resent-Message-ID: <201402120400.s1C400FL024454@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 186673 >Category: ports >Synopsis: New port: japanese/font-kokuri >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 12 04:00:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Koichiro IWAO >Release: 10.0-RELEASE >Organization: >Environment: >Description: Kokuri Japanese TrueType fonts. WWW: http://koruri.lindwurm.biz/ >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # font-koruri # font-koruri/pkg-descr # font-koruri/files # font-koruri/files/pkg-install.in # font-koruri/files/20-unhint-koruri.conf # font-koruri/files/62-fonts-koruri.conf # font-koruri/distinfo # font-koruri/pkg-plist # font-koruri/Makefile # echo c - font-koruri mkdir -p font-koruri > /dev/null 2>&1 echo x - font-koruri/pkg-descr sed 's/^X//' >font-koruri/pkg-descr << '04844c80810272636e94280db503a702' XKoruri Japanese TrueType fonts. X XWWW: http://koruri.lindwurm.biz/ 04844c80810272636e94280db503a702 echo c - font-koruri/files mkdir -p font-koruri/files > /dev/null 2>&1 echo x - font-koruri/files/pkg-install.in sed 's/^X//' >font-koruri/files/pkg-install.in << 'ae3d5a68914999449d8fb307d9e33c76' X#!/bin/sh X# $FreeBSD$ X XX_FONTSDIR=%%X_FONTSDIR%%/TTF X Xcatfontsdir () X{ X while read _IN X do X case "${_IN}" in X *-koruri-*|[0-9]*|"") ;; X *) echo ${_IN} ;; X esac X done X} X XROMA="" XBOLD="ds=y" XITAL="ai=0.15" XOBLI="ai=0.15" XRITA="ai=0.08" XROBL="ai=0.08" X Xmake_xlfd() X{ X _enc=$1 X _file=$2 X _vendor=$3 X _fname=$4 X _poc=$5 X X case "${_poc}:${_enc}" in X p:jisx0201.1976-*) PFIX="bw=0.5" ;; X c:jisx0201.1976-*) PFIX="bw=0.5" ;; X p:*) PFIX="" ;; X c:*) PFIX="" ;; X esac X X set -- "${ROMA}" medium-r \ X ${BOLD} bold-r \ X ${ITAL} medium-i \ X ${ITAL}:${BOLD} bold-i \ X ${OBLI} medium-o \ X ${OBLI}:${BOLD} bold-o \ X ${RITA} medium-ri \ X ${RITA}:${BOLD} bold-ri \ X ${ROBL} medium-ro \ X ${ROBL}:${BOLD} bold-ro X while [ $# != 0 ]; do X _prefix="${PFIX}:$1"; shift X _variant=$1; shift X printf "%s:%s -%s-%s-%s-normal--0-0-0-0-%s-0-%s\n" \ X $_prefix $_file $_vendor $_fname $_variant $_poc $_enc X done | sed -e 's,::,:,g' -e 's,^:,,' X} X Xaddentries () X{ X for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0 X do X make_xlfd $ENC Koruri-Bold.ttf koruri gothic p X make_xlfd $ENC Koruri-Bold.ttf koruri gothic c X make_xlfd $ENC Koruri-Extrabold.ttf koruri gothic p X make_xlfd $ENC Koruri-Extrabold.ttf koruri gothic c X make_xlfd $ENC Koruri-Light.ttf koruri gothic p X make_xlfd $ENC Koruri-Light.ttf koruri gothic c X make_xlfd $ENC Koruri-Semibold.ttf koruri gothic p X make_xlfd $ENC Koruri-Semibold.ttf koruri gothic c X make_xlfd $ENC Koruri.ttf koruri gothic p X make_xlfd $ENC Koruri.ttf koruri gothic c X done X} X Xnfonts () X{ X _L=0; while read _IN; do _L=$((${_L}+1)); done; echo ${_L} X} X Xcase "$2" in XPOST-INSTALL) X cd ${X_FONTSDIR} X touch fonts.dir X (catfontsdir < fonts.dir; addentries) > fonts.dir.tmp X nfonts < fonts.dir.tmp > fonts.dir X cat fonts.dir.tmp >> fonts.dir X rm -f fonts.dir.tmp X ;; XDEINSTALL) X cd ${X_FONTSDIR} X catfontsdir < fonts.dir > fonts.dir.tmp X nfonts < fonts.dir.tmp > fonts.dir X cat fonts.dir.tmp >> fonts.dir X rm -f fonts.dir.tmp X if [ -r fonts.dir -a `wc -l < fonts.dir` = 1 ]; then X rm -f fonts.dir X fi X ;; Xesac ae3d5a68914999449d8fb307d9e33c76 echo x - font-koruri/files/20-unhint-koruri.conf sed 's/^X//' >font-koruri/files/20-unhint-koruri.conf << 'c4e6cfaa980cf3000166ba1a8f7655ef' X<?xml version="1.0"?> X<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> X<!-- $FreeBSD$ --> X<fontconfig> X <match target="font"> X <or> X <test name="family"> X <string>Koruri</string> X </test> X </or> X <edit name="autohint"> X <bool>false</bool> X </edit> X </match> X</fontconfig> c4e6cfaa980cf3000166ba1a8f7655ef echo x - font-koruri/files/62-fonts-koruri.conf sed 's/^X//' >font-koruri/files/62-fonts-koruri.conf << 'f6b450e8a2afd960e7b7ac9337cf28b5' X<?xml version="1.0"?> X<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> X<!-- $FreeBSD$ --> X<fontconfig> X <alias> X <family>sans-serif</family> X <prefer> X <family>Koruri</family> X </prefer> X </alias> X <alias> X <family>monospace</family> X <prefer> X <family>Koruri</family> X </prefer> X </alias> X</fontconfig> f6b450e8a2afd960e7b7ac9337cf28b5 echo x - font-koruri/distinfo sed 's/^X//' >font-koruri/distinfo << '0116c68dd71fe426e741a83765ddbe70' XSHA256 (Koruri-20131228.tar.xz) = 815c4f53ee63fda58c03b73fe6ed7101fe563477a8ff2e8a48ff8c11a20c8ecb XSIZE (Koruri-20131228.tar.xz) = 23724396 0116c68dd71fe426e741a83765ddbe70 echo x - font-koruri/pkg-plist sed 's/^X//' >font-koruri/pkg-plist << '7f6f2c653a3bc3d5da3578c72bea56e1' X%%DATADIR%%/Koruri-Bold.ttf X%%DATADIR%%/Koruri-Extrabold.ttf X%%DATADIR%%/Koruri-Light.ttf X%%DATADIR%%/Koruri-Semibold.ttf X%%DATADIR%%/Koruri.ttf X@dirrmtry %%DATADIR%% X%%LOCAL_FONTSDIR%%/TTF/Koruri-Bold.ttf X%%LOCAL_FONTSDIR%%/TTF/Koruri-Extrabold.ttf X%%LOCAL_FONTSDIR%%/TTF/Koruri-Light.ttf X%%LOCAL_FONTSDIR%%/TTF/Koruri-Semibold.ttf X%%LOCAL_FONTSDIR%%/TTF/Koruri.ttf X@dirrmtry %%LOCAL_FONTSDIR%%/TTF X@dirrmtry %%LOCAL_FONTSDIR%% Xetc/fonts/conf.avail/20-unhint-koruri.conf Xetc/fonts/conf.avail/62-fonts-koruri.conf Xetc/fonts/conf.d/20-unhint-koruri.conf Xetc/fonts/conf.d/62-fonts-koruri.conf X%%X_FONTSDIR%%/TTF/Koruri-Bold.ttf X%%X_FONTSDIR%%/TTF/Koruri-Extrabold.ttf X%%X_FONTSDIR%%/TTF/Koruri-Light.ttf X%%X_FONTSDIR%%/TTF/Koruri-Semibold.ttf X%%X_FONTSDIR%%/TTF/Koruri.ttf X@exec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/TTF || true X@unexec %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/TTF || true X@unexec rm -f %D/%%X_FONTSDIR%%/TTF/fonts.cache-1 X@dirrmtry %%X_FONTSDIR%%/TTF X@unexec if [ -d %D/%%X_FONTSDIR%%/TTF ]; then %%LOCALBASE%%/bin/fc-cache -s -f -v %D/%%X_FONTSDIR%%/TTF || true; fi 7f6f2c653a3bc3d5da3578c72bea56e1 echo x - font-koruri/Makefile sed 's/^X//' >font-koruri/Makefile << 'dcdde701cd2b29d881a61a3dbb8037fd' X# Created by: Koichiro IWAO <meta+ports@vmeta.jp> X# $FreeBSD$ X XPORTNAME= koruri XPORTVERSION= 20131228 XCATEGORIES= japanese x11-fonts XMASTER_SITES= SFJP/koruri/60169 XPKGNAMEPREFIX= ja-font- XDISTNAME= Koruri-${PORTVERSION} X XMAINTAINER= meta+ports@vmeta.jp XCOMMENT= Koruri Japanese TrueType fonts X XRUN_DEPENDS= fc-cache:${PORTSDIR}/x11-fonts/fontconfig X XUSE_XZ= yes XNO_BUILD= yes XPKGINSTALL= ${WRKDIR}/pkg-install XPKGDEINSTALL= ${WRKDIR}/pkg-install XSUB_FILES= pkg-install XSUB_LIST= X_FONTSDIR=${PREFIX}/${X_FONTSDIR} XPLIST_SUB= X_FONTSDIR=${X_FONTSDIR} \ X LOCAL_FONTSDIR=${LOCAL_FONTSDIR} XDATADIR= ${PREFIX}/share/font-${PORTNAME} XPORTDOCS= README XLICENSE= APACHE20 X XLOCAL_FONTSDIR= share/fonts XX_FONTSDIR= lib/X11/fonts X XOPTIONS_DEFINE= DOCS X X.include <bsd.port.options.mk> X Xdo-install: X ${MKDIR} ${STAGEDIR}${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/*.ttf ${STAGEDIR}${DATADIR} X ${MKDIR} ${STAGEDIR}${PREFIX}/${LOCAL_FONTSDIR}/TTF X cd ${STAGEDIR}${PREFIX}/${LOCAL_FONTSDIR}/TTF && ${LN} -s -f \ X ../${LOCAL_FONTSDIR:C,[^/]+,..,g}/${DATADIR_REL}/*.ttf . X ${MKDIR} ${STAGEDIR}${PREFIX}/${X_FONTSDIR}/TTF X cd ${STAGEDIR}${PREFIX}/${X_FONTSDIR}/TTF && ${LN} -s -f \ X ../${X_FONTSDIR:C,[^/]+,..,g}/${DATADIR_REL}/*.ttf . X ${MKDIR} ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail \ X ${STAGEDIR}${PREFIX}/etc/fonts/conf.d X ${INSTALL_DATA} ${FILESDIR}/20-unhint-${PORTNAME}.conf \ X ${FILESDIR}/62-fonts-${PORTNAME}.conf \ X ${STAGEDIR}${PREFIX}/etc/fonts/conf.avail X ${LN} -s -f ../conf.avail/20-unhint-${PORTNAME}.conf \ X ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/20-unhint-${PORTNAME}.conf X ${LN} -s -f ../conf.avail/62-fonts-${PORTNAME}.conf \ X ${STAGEDIR}${PREFIX}/etc/fonts/conf.d/62-fonts-${PORTNAME}.conf X Xpost-su-install: X ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL X X.if ${PORT_OPTIONS:MDOCS} Xpost-install: X ${MKDIR} ${STAGEDIR}${DOCSDIR} X cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} X.endif X X.include <bsd.port.mk> dcdde701cd2b29d881a61a3dbb8037fd exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402120356.s1C3uKg5092728>