d676e9b0e7
Major changes: - Add -E option that enables DVIPDFM emulation mode in DVIPDFMx. - Don't try to convert included PDF files whose version number is higher than output file version. (If run as dvipdfm, conversion still occurs.) - Added dvipdfm compatibility mode. This mode is triggered if dvipdfmx is called as "dvipdfm", and likewise extractbb as "ebb". (The latter mode was already present.) - Made predefined paper sizes match values given by libpaper.
44 lines
937 B
Cheetah
44 lines
937 B
Cheetah
# $NetBSD: map.tmpl,v 1.4 2010/01/16 03:52:41 minskim Exp $
|
|
#
|
|
# Update dvipdfmx.cfg.
|
|
#
|
|
|
|
###############################################################################
|
|
# replace_line(file, pattern, line)
|
|
# The first line in file that matches pattern gets replaced by line.
|
|
# line will be added at the end of the file if pattern does not match.
|
|
###############################################################################
|
|
replace_line()
|
|
{
|
|
file=$1; pat=$2; line=$3
|
|
|
|
if grep "$pat" "$file" >/dev/null; then
|
|
ed "$file" >/dev/null 2>&1 <<-eof
|
|
/$pat/
|
|
c
|
|
$line
|
|
.
|
|
w
|
|
q
|
|
eof
|
|
else
|
|
echo "$line" >> "$file"
|
|
fi
|
|
}
|
|
|
|
case ${STAGE} in
|
|
POST-INSTALL)
|
|
for map in @DVIPDFMX_FONTMAPS@; do
|
|
replace_line "@DVIPDFMX_CONFIG_DIR@/dvipdfmx.cfg" \
|
|
"^%![ ]*$map" "f $map"
|
|
done
|
|
;;
|
|
DEINSTALL)
|
|
for map in @DVIPDFMX_FONTMAPS@; do
|
|
replace_line "@DVIPDFMX_CONFIG_DIR@/dvipdfmx.cfg" \
|
|
"^f[ ]*$map" "%! f $map"
|
|
done
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|