freebsd-ports/editors/abiword/files/patch-au
Maxim Sobolev 5e9116e2ae Update to 0.99.2.
PR:		35254
Submitted by:	Joe Marcus Clarke <marcus@marcuscom.com>
2002-02-25 09:33:31 +00:00

46 lines
1.3 KiB
Plaintext

--- src/pkg/common/unix/scripts/makewrapper.sh.orig Wed Jan 23 09:16:52 2002
+++ src/pkg/common/unix/scripts/makewrapper.sh Sat Feb 23 15:30:19 2002
@@ -80,23 +80,31 @@
if [ -z "\$locale" ]
then
locale=\$LANG
+elif [ -x \$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" ]
- then
- #add directory with locale-specific fonts to font path
- ABISUITE_FONT_PATH=\$ABISUITE_FONT_PATH,\$addfontdir
- fi
- fi
+ 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
+ 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
+ done
fi
fi