freebsd-ports/editors/AbiWord/files/patch-au
2001-08-08 15:46:45 +00:00

47 lines
1.4 KiB
Plaintext

$FreeBSD$
--- src/pkg/common/unix/scripts/makewrapper.sh.orig Mon Jun 11 02:14:43 2001
+++ src/pkg/common/unix/scripts/makewrapper.sh Wed Aug 8 13:38:34 2001
@@ -66,23 +66,31 @@
if [ -z "\$locale" ]
then
locale=\$LANG
+elif [ -z \$locale ]
+then
+ locale=\$LC_CTYPE
fi
if [ ! -z "\$locale" ]
then
- #now guess encoding
+ #now guess country/region/encoding
+ country=\`echo \$locale | sed -e 's/\(.*\)_.*\$/\1/'\`
+ region=\`echo \$locale | sed -e 's/^.*_\(.*\)\..*/\1/'\`
encoding=\`echo \$locale | sed -e 's/^.*\.\(.*\)\$/\1/'\`
- if [ ! -z "\$encoding" ]
+ if [ ! -z \$country -o ! -z \$region -o ! -z \$encoding ]
then
- addfontdir=\$ABISUITE_FONT_HOME/\$encoding
- if [ ! -z "\$addfontdir" ]
- then
- if [ -d "\$addfontdir" ]
+ addfontdirlst="\$ABISUITE_FONT_HOME/\$country \$ABISUITE_FONT_HOME/\${country}-\${region} \$ABISUITE_FONT_HOME/\$encoding \$ABISUITE_FONT_HOME/\${country}-\${region}.\${encoding}"
+ for addfontdir in \$addfontdirlst
+ do
+ if [ ! -z \$addfontdir ]
then
- #add directory with locale-specific fonts to font path
- ABISUITE_FONT_PATH=\$ABISUITE_FONT_PATH,\$addfontdir
+ if [ -d \$addfontdir -a ! -f \$addfontdir/.already-in-fp ]
+ then
+ #add directory with locale-specific fonts to font path
+ ABISUITE_FONT_PATH=\$ABISUITE_FONT_PATH,\$addfontdir
+ fi
fi
- fi
+ done
fi
fi