aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclive <clive@FreeBSD.org>2001-01-05 13:02:18 +0800
committerclive <clive@FreeBSD.org>2001-01-05 13:02:18 +0800
commited5eef7f9a7c1005b1a217de4f52dee8062c82ec (patch)
tree0b69a4fa5ce1f2346e4b96168aa0141f27f8b153
parent8743238d3adc2f1adbe842f8aebeb4d6e8b0d210 (diff)
downloadfreebsd-ports-gnome-ed5eef7f9a7c1005b1a217de4f52dee8062c82ec.tar.gz
freebsd-ports-gnome-ed5eef7f9a7c1005b1a217de4f52dee8062c82ec.tar.zst
freebsd-ports-gnome-ed5eef7f9a7c1005b1a217de4f52dee8062c82ec.zip
Strip out kc fonts alias in fonts.alias when under uninstall condition.
I know that one line perl -e script is ugly, but it works. Patches welcome.
-rw-r--r--chinese/kcfonts/pkg-plist1
1 files changed, 1 insertions, 0 deletions
diff --git a/chinese/kcfonts/pkg-plist b/chinese/kcfonts/pkg-plist
index 97c36351319e..e5f3e5aaf9e8 100644
--- a/chinese/kcfonts/pkg-plist
+++ b/chinese/kcfonts/pkg-plist
@@ -6,4 +6,5 @@ lib/X11/fonts/local/kc_fonts.alias
@exec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
@exec cd %D/lib/X11/fonts/local ; cat kc_fonts.alias >> fonts.alias ; cp fonts.alias ..fonts.alias.. ; sort ..fonts.alias.. | uniq > fonts.alias ; rm ..fonts.alias..
@unexec cd %D/lib/X11/fonts/local ; %D/bin/mkfontdir
+@unexec if [ -s %D/lib/X11/fonts/local/fonts.alias ]; then perl -e 'while (<>) { if (!/kc-fixed/) { print <>} }' < %D/lib/X11/fonts/local/fonts.alias > /tmp/fonts.alias.$$; mv /tmp/fonts.alias.$$ %D/lib/X11/fonts/local/fonts.alias; fi
@unexec if [ ! -s %D/lib/X11/fonts/local/fonts.alias ]; then rm -f %D/lib/X11/fonts/local/fonts.alias; fi