diff options
-rw-r--r-- | japanese/font-sazanami/Makefile | 7 | ||||
-rw-r--r-- | japanese/font-sazanami/files/3.sazanami-ttf.conf | 36 | ||||
-rw-r--r-- | japanese/font-sazanami/pkg-plist | 8 | ||||
-rw-r--r-- | japanese/sazanami-ttf/Makefile | 7 | ||||
-rw-r--r-- | japanese/sazanami-ttf/files/3.sazanami-ttf.conf | 36 | ||||
-rw-r--r-- | japanese/sazanami-ttf/pkg-plist | 8 |
6 files changed, 98 insertions, 4 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 diff --git a/japanese/sazanami-ttf/Makefile b/japanese/sazanami-ttf/Makefile index ea27738f5ccc..c82511e45b95 100644 --- a/japanese/sazanami-ttf/Makefile +++ b/japanese/sazanami-ttf/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/sazanami-ttf/files/3.sazanami-ttf.conf b/japanese/sazanami-ttf/files/3.sazanami-ttf.conf new file mode 100644 index 000000000000..94dea7fdcc84 --- /dev/null +++ b/japanese/sazanami-ttf/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/sazanami-ttf/pkg-plist b/japanese/sazanami-ttf/pkg-plist index 6f003acacd39..fff66431c2c6 100644 --- a/japanese/sazanami-ttf/pkg-plist +++ b/japanese/sazanami-ttf/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 |