aboutsummaryrefslogtreecommitdiff
path: root/chinese/ttfm
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2013-06-19 16:03:12 +0000
committerRong-En Fan <rafan@FreeBSD.org>2013-06-19 16:03:12 +0000
commit264446b6be5305fb714361d1c94df0473762d8d3 (patch)
tree61ccbbe76c6c4e3dc8b3e6c230bfe4674062f569 /chinese/ttfm
parent2f705dfa969f06d5e42336389a8c8864c0758da4 (diff)
- 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@)
Notes
Notes: svn path=/head/; revision=321284
Diffstat (limited to 'chinese/ttfm')
-rw-r--r--chinese/ttfm/Makefile2
-rw-r--r--chinese/ttfm/files/patch-modules_xttfm.ttfm26
2 files changed, 24 insertions, 4 deletions
diff --git a/chinese/ttfm/Makefile b/chinese/ttfm/Makefile
index 57825b1116ec..b47d50af8fc1 100644
--- a/chinese/ttfm/Makefile
+++ b/chinese/ttfm/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ttfm
PORTVERSION= 0.9.5
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= chinese print
MASTER_SITES= LOCAL/rafan/chinese
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}