aboutsummaryrefslogtreecommitdiff
path: root/japanese/font-sazanami
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2006-02-05 17:20:45 +0000
committerHiroki Sato <hrs@FreeBSD.org>2006-02-05 17:20:45 +0000
commitec1d1dda3b84c3b6dae84d441f83c2107629f42a (patch)
tree9a98c60403ac69b9970dc59bbe33024f95239236 /japanese/font-sazanami
parentc8cbf70c1b4afcf807fdd31f0ab6d14b884dc011 (diff)
downloadports-ec1d1dda3b84c3b6dae84d441f83c2107629f42a.tar.gz
ports-ec1d1dda3b84c3b6dae84d441f83c2107629f42a.zip
Notes
Diffstat (limited to 'japanese/font-sazanami')
-rw-r--r--japanese/font-sazanami/Makefile7
-rw-r--r--japanese/font-sazanami/files/3.sazanami-ttf.conf36
-rw-r--r--japanese/font-sazanami/pkg-plist8
3 files changed, 49 insertions, 2 deletions
diff --git a/japanese/font-sazanami/Makefile b/japanese/font-sazanami/Makefile
index ea27738f5ccc..c82511e45b95 100644
--- a/japanese/font-sazanami/Makefile
+++ b/japanese/font-sazanami/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sazanami-ttf
PORTVERSION= 20040629
+PORTREVISION= 1
CATEGORIES= japanese x11-fonts
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP}
MASTER_SITE_SUBDIR= efont/10087
@@ -52,6 +53,9 @@ do-install:
${LN} -s -f \
${PREFIX}/${FONTSDIR}/sazanami-mincho.ttf \
${LOCALBASE}/${LOCALFONTSDIR}/TrueType/sazanami-mincho.ttf
+ ${MKDIR} ${PREFIX}/etc/fonts/conf.d
+ ${INSTALL_DATA} ${FILESDIR}/3.sazanami-ttf.conf \
+ ${PREFIX}/etc/fonts/conf.d
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for F in ${DOC_FILES:Mdoc/*}
@@ -62,6 +66,9 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/${F} ${DOCSDIR}
.endfor
.endif
+
+post-install:
+ ${X11BASE}/bin/fc-cache -f -v ${PREFIX}/${FONTSDIR}
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>
diff --git a/japanese/font-sazanami/files/3.sazanami-ttf.conf b/japanese/font-sazanami/files/3.sazanami-ttf.conf
new file mode 100644
index 000000000000..94dea7fdcc84
--- /dev/null
+++ b/japanese/font-sazanami/files/3.sazanami-ttf.conf
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- $FreeBSD$ -->
+<fontconfig>
+ <alias>
+ <family>serif</family>
+ <prefer>
+ <family>Sazanami Mincho</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>sans-serif</family>
+ <prefer>
+ <family>Sazanami Gothic</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+ <family>Sazanami Gothic</family>
+ <family>Sazanami Mincho</family>
+ </prefer>
+ </alias>
+ <match target="font">
+ <test name="family">
+ <string>Sazanami Mincho</string>
+ <string>Sazanami Gothic</string>
+ </test>
+ <edit name="hintstyle">
+ <const>hintslight</const>
+ </edit>
+ <edit name="autohint">
+ <bool>false</bool>
+ </edit>
+ </match>
+</fontconfig>
diff --git a/japanese/font-sazanami/pkg-plist b/japanese/font-sazanami/pkg-plist
index 6f003acacd39..fff66431c2c6 100644
--- a/japanese/font-sazanami/pkg-plist
+++ b/japanese/font-sazanami/pkg-plist
@@ -1,4 +1,5 @@
@comment $FreeBSD$
+etc/fonts/conf.d/3.sazanami-ttf.conf
%%FONTSDIR%%/fonts.alias.sazanami
%%FONTSDIR%%/fonts.dir.sazanami
%%FONTSDIR%%/sazanami-mincho.ttf
@@ -17,10 +18,13 @@
%%PORTDOCS%%@dirrm %%DOCSDIR%%/ayu
%%PORTDOCS%%@dirrm %%DOCSDIR%%/kappa
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@exec %%X11BASE%%/bin/fc-cache -f -v %D/%%FONTSDIR%% || true
@exec mkdir -p %%LOCALFONTSDIR%%/TrueType
@exec ln -s -f %D/%%FONTSDIR%%/sazanami-mincho.ttf %%LOCALFONTSDIR%%/TrueType/sazanami-mincho.ttf
@exec ln -s -f %D/%%FONTSDIR%%/sazanami-gothic.ttf %%LOCALFONTSDIR%%/TrueType/sazanami-gothic.ttf
@unexec rm -f %%LOCALFONTSDIR%%/TrueType/sazanami-mincho.ttf
@unexec rm -f %%LOCALFONTSDIR%%/TrueType/sazanami-gothic.ttf
-@unexec rmdir %%LOCALFONTSDIR%%/TrueType 2> /dev/null || true
-@unexec rmdir %%LOCALFONTSDIR%% 2> /dev/null || true
+@dirrmtry %%LOCALFONTSDIR%%/TrueType
+@dirrmtry %%LOCALFONTSDIR%%
+@unexec %%X11BASE%%/bin/fc-cache -f -v %D/%%FONTSDIR%% || true
+@unexec if [ -s %D/%%FONTSDIR%%/fonts.cache-1 ]; then rm -f %D/%%FONTSDIR%%/fonts.cache-1; fi