Bug 186673 - New port: japanese/font-kokuri
Summary: New port: japanese/font-kokuri
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-12 04:00 UTC by Koichiro Iwao
Modified: 2014-02-12 19:10 UTC (History)
0 users

See Also:


Attachments
file.shar (7.74 KB, text/plain)
2014-02-12 04:00 UTC, Koichiro Iwao
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Koichiro Iwao freebsd_committer freebsd_triage 2014-02-12 04:00:00 UTC
Kokuri Japanese TrueType fonts.

WWW: http://koruri.lindwurm.biz/

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-12 04:02:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Koichiro Iwao freebsd_committer freebsd_triage 2014-02-12 04:04:19 UTC
Typo. The correct font name is "Koruri".

-- 
`whois vmeta.jp | nkf -w`
meta <meta@vmeta.jp>
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-02-12 19:05:53 UTC
Author: swills
Date: Wed Feb 12 19:05:43 2014
New Revision: 343955
URL: http://svnweb.freebsd.org/changeset/ports/343955
QAT: https://qat.redports.org/buildarchive/r343955/

Log:
  Koruri Japanese TrueType fonts.
  
  WWW: http://koruri.lindwurm.biz/
  
  PR:		ports/186673
  Submitted by:	Koichiro IWAO <meta+ports@vmeta.jp>

Added:
  head/japanese/font-koruri/
  head/japanese/font-koruri/Makefile   (contents, props changed)
  head/japanese/font-koruri/distinfo   (contents, props changed)
  head/japanese/font-koruri/files/
  head/japanese/font-koruri/files/20-unhint-koruri.conf   (contents, props changed)
  head/japanese/font-koruri/files/62-fonts-koruri.conf   (contents, props changed)
  head/japanese/font-koruri/files/pkg-install.in   (contents, props changed)
  head/japanese/font-koruri/pkg-descr   (contents, props changed)
  head/japanese/font-koruri/pkg-plist   (contents, props changed)
Modified:
  head/japanese/Makefile

Modified: head/japanese/Makefile
==============================================================================
--- head/japanese/Makefile	Wed Feb 12 18:56:40 2014	(r343954)
+++ head/japanese/Makefile	Wed Feb 12 19:05:43 2014	(r343955)
@@ -78,6 +78,7 @@
     SUBDIR += font-ipaex
     SUBDIR += font-jisx0213
     SUBDIR += font-kochi
+    SUBDIR += font-koruri
     SUBDIR += font-migmix
     SUBDIR += font-migu
     SUBDIR += font-mona-ipa

Added: head/japanese/font-koruri/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/font-koruri/Makefile	Wed Feb 12 19:05:43 2014	(r343955)
@@ -0,0 +1,64 @@
+# Created by: Koichiro IWAO <meta+ports@vmeta.jp>
+# $FreeBSD$
+
+PORTNAME=	koruri
+PORTVERSION=	20131228
+CATEGORIES=	japanese x11-fonts
+MASTER_SITES=	SFJP/koruri/60169
+PKGNAMEPREFIX=	ja-font-
+DISTNAME=	Koruri-${PORTVERSION}
+
+MAINTAINER=	meta+ports@vmeta.jp
+COMMENT=	Koruri Japanese TrueType fonts
+
+LICENSE=	APACHE20
+
+RUN_DEPENDS=	fc-cache:${PORTSDIR}/x11-fonts/fontconfig
+
+USE_XZ=		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}
+DATADIR=	${PREFIX}/share/font-${PORTNAME}
+PORTDOCS=	README
+
+LOCAL_FONTSDIR=	share/fonts
+X_FONTSDIR=	lib/X11/fonts
+
+OPTIONS_DEFINE=	DOCS
+
+.include <bsd.port.options.mk>
+
+do-install:
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/*.ttf ${STAGEDIR}${DATADIR}
+	${MKDIR} ${STAGEDIR}${PREFIX}/${LOCAL_FONTSDIR}/TTF
+	cd ${STAGEDIR}${PREFIX}/${LOCAL_FONTSDIR}/TTF && ${LN} -s -f \
+	    ../${LOCAL_FONTSDIR:C,[^/]+,..,g}/${DATADIR_REL}/*.ttf .
+	${MKDIR} ${STAGEDIR}${PREFIX}/${X_FONTSDIR}/TTF
+	cd ${STAGEDIR}${PREFIX}/${X_FONTSDIR}/TTF && ${LN} -s -f \
+	    ../${X_FONTSDIR:C,[^/]+,..,g}/${DATADIR_REL}/*.ttf .
+	${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-su-install:
+	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
+.if ${PORT_OPTIONS:MDOCS}
+post-install:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>

Added: head/japanese/font-koruri/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/font-koruri/distinfo	Wed Feb 12 19:05:43 2014	(r343955)
@@ -0,0 +1,2 @@
+SHA256 (Koruri-20131228.tar.xz) = 815c4f53ee63fda58c03b73fe6ed7101fe563477a8ff2e8a48ff8c11a20c8ecb
+SIZE (Koruri-20131228.tar.xz) = 23724396

Added: head/japanese/font-koruri/files/20-unhint-koruri.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/font-koruri/files/20-unhint-koruri.conf	Wed Feb 12 19:05:43 2014	(r343955)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+	<match target="font">
+		<or>
+			<test name="family">
+				<string>Koruri</string>
+			</test>
+		</or>
+		<edit name="autohint">
+			<bool>false</bool>
+		</edit>
+	</match>
+</fontconfig>

Added: head/japanese/font-koruri/files/62-fonts-koruri.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/font-koruri/files/62-fonts-koruri.conf	Wed Feb 12 19:05:43 2014	(r343955)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+	<alias>
+		<family>sans-serif</family>
+		<prefer>
+			<family>Koruri</family>
+		</prefer>
+	</alias>
+	<alias>
+		<family>monospace</family>
+		<prefer>
+			<family>Koruri</family>
+		</prefer>
+	</alias>
+</fontconfig>

Added: head/japanese/font-koruri/files/pkg-install.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/font-koruri/files/pkg-install.in	Wed Feb 12 19:05:43 2014	(r343955)
@@ -0,0 +1,98 @@
+#!/bin/sh
+# $FreeBSD$
+
+X_FONTSDIR=%%X_FONTSDIR%%/TTF
+
+catfontsdir ()
+{
+    while read _IN
+    do
+      case "${_IN}" in
+      *-koruri-*|[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
+
+	case "${_poc}:${_enc}" in
+	p:jisx0201.1976-*)	PFIX="bw=0.5" ;;
+	c:jisx0201.1976-*)	PFIX="bw=0.5" ;;
+	p:*)			PFIX="" ;;
+	c:*)			PFIX="" ;;
+	esac
+
+	set --	"${ROMA}"	medium-r \
+		${BOLD}		bold-r \
+		${ITAL}		medium-i \
+		${ITAL}:${BOLD} bold-i \
+		${OBLI}		medium-o \
+		${OBLI}:${BOLD}	bold-o \
+		${RITA}		medium-ri \
+		${RITA}:${BOLD}	bold-ri \
+		${ROBL}		medium-ro \
+		${ROBL}:${BOLD}	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,^:,,'
+}
+
+addentries ()
+{
+	for ENC in iso8859-1 iso10646-1 jisx0201.1976-0 jisx0208.1983-0 jisx0208.1990-0
+	do
+		make_xlfd $ENC Koruri-Bold.ttf  koruri gothic p
+		make_xlfd $ENC Koruri-Bold.ttf  koruri gothic c
+		make_xlfd $ENC Koruri-Extrabold.ttf koruri gothic p
+		make_xlfd $ENC Koruri-Extrabold.ttf koruri gothic c
+		make_xlfd $ENC Koruri-Light.ttf koruri gothic p
+		make_xlfd $ENC Koruri-Light.ttf koruri gothic c
+		make_xlfd $ENC Koruri-Semibold.ttf koruri gothic p
+		make_xlfd $ENC Koruri-Semibold.ttf koruri gothic c
+		make_xlfd $ENC Koruri.ttf koruri gothic p
+		make_xlfd $ENC Koruri.ttf koruri gothic c
+	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
+	;;
+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
+	;;
+esac

Added: head/japanese/font-koruri/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/font-koruri/pkg-descr	Wed Feb 12 19:05:43 2014	(r343955)
@@ -0,0 +1,3 @@
+Koruri Japanese TrueType fonts.
+
+WWW: http://koruri.lindwurm.biz/

Added: head/japanese/font-koruri/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/font-koruri/pkg-plist	Wed Feb 12 19:05:43 2014	(r343955)
@@ -0,0 +1,27 @@
+%%DATADIR%%/Koruri-Bold.ttf
+%%DATADIR%%/Koruri-Extrabold.ttf
+%%DATADIR%%/Koruri-Light.ttf
+%%DATADIR%%/Koruri-Semibold.ttf
+%%DATADIR%%/Koruri.ttf
+@dirrmtry %%DATADIR%%
+%%LOCAL_FONTSDIR%%/TTF/Koruri-Bold.ttf
+%%LOCAL_FONTSDIR%%/TTF/Koruri-Extrabold.ttf
+%%LOCAL_FONTSDIR%%/TTF/Koruri-Light.ttf
+%%LOCAL_FONTSDIR%%/TTF/Koruri-Semibold.ttf
+%%LOCAL_FONTSDIR%%/TTF/Koruri.ttf
+@dirrmtry %%LOCAL_FONTSDIR%%/TTF
+@dirrmtry %%LOCAL_FONTSDIR%%
+etc/fonts/conf.avail/20-unhint-koruri.conf
+etc/fonts/conf.avail/62-fonts-koruri.conf
+etc/fonts/conf.d/20-unhint-koruri.conf
+etc/fonts/conf.d/62-fonts-koruri.conf
+%%X_FONTSDIR%%/TTF/Koruri-Bold.ttf
+%%X_FONTSDIR%%/TTF/Koruri-Extrabold.ttf
+%%X_FONTSDIR%%/TTF/Koruri-Light.ttf
+%%X_FONTSDIR%%/TTF/Koruri-Semibold.ttf
+%%X_FONTSDIR%%/TTF/Koruri.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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Steve Wills freebsd_committer freebsd_triage 2014-02-12 19:06:00 UTC
State Changed
From-To: open->closed

New port added, with minor changes. Thanks!