From 264446b6be5305fb714361d1c94df0473762d8d3 Mon Sep 17 00:00:00 2001 From: Rong-En Fan Date: Wed, 19 Jun 2013 16:03:12 +0000 Subject: - Fix ttfm's xttfm module to really update fonts.{dir,scale} to reflect the fonts installed - Bump PORTREVISION for all ports using chinese/ttfm/Makefile.ttf PR: ports/179608 Reported by: Antoine Brodin (antoine@) Tested by: Antoine Brodin (antoine@) --- chinese/ttfm/files/patch-modules_xttfm.ttfm | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'chinese/ttfm/files') diff --git a/chinese/ttfm/files/patch-modules_xttfm.ttfm b/chinese/ttfm/files/patch-modules_xttfm.ttfm index a786db8441fa..9bea10cfa422 100644 --- a/chinese/ttfm/files/patch-modules_xttfm.ttfm +++ b/chinese/ttfm/files/patch-modules_xttfm.ttfm @@ -1,5 +1,5 @@ ---- ./modules/xttfm.ttfm.orig Tue Nov 4 07:08:32 2003 -+++ ./modules/xttfm.ttfm Mon Nov 27 02:06:25 2006 +--- modules/xttfm.ttfm.orig 2003-11-04 07:08:32.000000000 +0800 ++++ modules/xttfm.ttfm 2013-06-18 01:32:45.000000000 +0800 @@ -25,8 +25,8 @@ # Global constants @@ -11,9 +11,16 @@ export PATH; PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PREFIX/bin:$PREFIX/sbin:$X11BASE/bin export TEMPFILE; TEMPFILE="`mktemp /tmp/ttfm.tmpXXX`" export DefaultFontPath; DefaultFontPath=$PREFIX/share/fonts/TrueType -@@ -87,15 +87,11 @@ +@@ -86,16 +86,18 @@ + for f in "$@"; do targetname=`basename $f` ++ # Remove font files. ++ # We only remove those fonts in $DefaultFontPath which are symbolic. ++ filetype=`file "$DefaultFontPath/$targetname" |grep -e "^$DefaultFontPath/$targetname: symbolic link to"` ++ [ ! "X$filetype" = "X" ] && rm -f "$DefaultFontPath/$targetname" ++ rm -f "$XTTFFONTPATH/$targetname" ++ # Update fonts.scale - rm -f $TEMPFILE - if [ ! -r $XTTFFONTPATH/fonts.scale ]; then @@ -30,6 +37,19 @@ if [ -r $XTTFFONTPATH/../encodings/large/encodings.dir ]; then mkfontdir -e $XTTFFONTPATH/../encodings/large $XTTFFONTPATH else +@@ -107,12 +109,6 @@ + ALIASPATTERN=`eval echo $ALIASPATTERN` + sed -e "/$ALIASPATTERN/d" $XTTFFONTPATH/fonts.alias > $TEMPFILE + mv -f $TEMPFILE $XTTFFONTPATH/fonts.alias +- +- # Remove font files. +- # We only remove those fonts in $DefaultFontPath which are symbolic. +- filetype=`file "$DefaultFontPath/$targetname" |grep -e "^$DefaultFontPath/$targetname: symbolic link to"` +- [ ! "X$filetype" = "X" ] && rm -f "$DefaultFontPath/$targetname" +- rm -f "$XTTFFONTPATH/$targetname" + done + } + @@ -133,29 +129,11 @@ fontencoding=${10} -- cgit v1.2.3