a2ps/a2ps-4.14-ghostscript_fonts_path.patch

33 lines
1.0 KiB
Diff
Raw Permalink Normal View History

--- a2ps-4.14/configure 2007-12-29 04:28:03.000000000 +0100
+++ a2ps-4.14/configure.font 2008-01-07 21:29:31.000000000 +0100
@@ -30760,12 +30760,28 @@
# Find out if ghostscript is installed
ac_psfont_path=
for ac_dir in /usr/local/ghostscript/fonts \
- /usr/local/share/ghostscript/fonts;
+ /usr/local/share/ghostscript/fonts \
+ /usr/ghostscript/fonts \
+ /usr/share/ghostscript/fonts/;
do
if test "cd $ac_dir 2>/dev/null && echo *.afm"; then
ac_psfont_path="$ac_psfont_path:$ac_dir";
fi
done
+# Try to find where are the TeX fonts.
+for ac_dir in /usr/share/texmf;
+do
+ if test -d "$ac_dir/fonts"; then
+ # There are fonts here. Let's fetch all the directories.
+ for ac_dir2 in `find $ac_dir/fonts/* -type d`;
+ do
+ if test -n "`echo $ac_dir2/*.afm $ac_dir2/*.gsf $ac_dir2/*.pf?`"; then
+ ac_psfont_path="$ac_psfont_path:$ac_dir2";
+ fi
+ done
+ fi
+done
+# Remove the leading `:'
if test -n "$ac_psfont_path"; then
PSFONT_PATH=`echo "$ac_psfont_path" | sed -e 's/^://'`
fi