summaryrefslogtreecommitdiff
path: root/print/kpathsea
diff options
context:
space:
mode:
Diffstat (limited to 'print/kpathsea')
-rw-r--r--print/kpathsea/Makefile12
-rw-r--r--print/kpathsea/distinfo11
-rw-r--r--print/kpathsea/patches/patch-ac24
-rw-r--r--print/kpathsea/patches/patch-ad51
-rw-r--r--print/kpathsea/patches/patch-ae71
-rw-r--r--print/kpathsea/patches/patch-af17
-rw-r--r--print/kpathsea/patches/patch-ag15
-rw-r--r--print/kpathsea/patches/patch-ah15
-rw-r--r--print/kpathsea/patches/patch-ai40
-rw-r--r--print/kpathsea/patches/patch-aj42
-rw-r--r--print/kpathsea/patches/patch-ak22
11 files changed, 317 insertions, 3 deletions
diff --git a/print/kpathsea/Makefile b/print/kpathsea/Makefile
index 9124a7bbc3a..d2782093f5e 100644
--- a/print/kpathsea/Makefile
+++ b/print/kpathsea/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2009/09/02 06:02:25 dsainty Exp $
+# $NetBSD: Makefile,v 1.9 2009/09/20 18:50:03 minskim Exp $
DISTNAME= luatex-beta-0.40.2
PKGNAME= kpathsea-5.0.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= print
MASTER_SITES= http://foundry.supelec.fr/gf/download/frsrelease/341/1275/
EXTRACT_SUFX= .tar.bz2
@@ -47,6 +47,14 @@ SUBST_SED.texmfdir+= -e 's,@TEXMFLOCAL@,${TEXMFLOCAL:C;///*;/;g:C;/$;;},'
SUBST_SED.texmfdir+= -e 's,@VARBASE@,${VARBASE:C;///*;/;g:C;/$;;},'
SUBST_SED.texmfdir+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:C;///*;/;g:C;/$;;},'
+SUBST_CLASSES+= paths
+SUBST_MESSAGE.paths= Setting paths to commands.
+SUBST_STAGE.paths= pre-configure
+SUBST_FILES.paths= mktex.opt mktexdir mktexlsr mktexmf \
+ mktexnam mktexnam.opt mktexpk mktextfm mktexupd
+SUBST_SED.paths= -e 's,@KPSEWHICH@,${PREFIX}/bin/kpsewhich,g' \
+ -e 's,@MKTEXMF@,${PREFIX}/bin/mktexmf,g'
+
PKG_SYSCONFSUBDIR= texmf
BUILD_DEFS+= VARBASE
diff --git a/print/kpathsea/distinfo b/print/kpathsea/distinfo
index f33d501e460..78db0cbdcff 100644
--- a/print/kpathsea/distinfo
+++ b/print/kpathsea/distinfo
@@ -1,7 +1,16 @@
-$NetBSD: distinfo,v 1.5 2009/06/09 21:29:17 minskim Exp $
+$NetBSD: distinfo,v 1.6 2009/09/20 18:50:03 minskim Exp $
SHA1 (luatex-beta-0.40.2.tar.bz2) = 8af574490abb5cbcf9b8c2540ad2f623ec66babe
RMD160 (luatex-beta-0.40.2.tar.bz2) = 2a05f51fdcb869f6398d6e643373ccb99246458f
Size (luatex-beta-0.40.2.tar.bz2) = 7475791 bytes
SHA1 (patch-aa) = f22538ddcb94566542984216103da97885377bcf
SHA1 (patch-ab) = 241176f612485a800ec94974ab00419c92043243
+SHA1 (patch-ac) = cf7a574f78f13b4ff662e97da4b6a4bcfcd002b0
+SHA1 (patch-ad) = b9ff0a7d906c8ed613b84de9f200629d37e8ef40
+SHA1 (patch-ae) = b85fd269d86bbc878bc4622f1cdbbdebb5c320bf
+SHA1 (patch-af) = 390783ba6ad88208df1b7be0bf9e52e2ceb81c13
+SHA1 (patch-ag) = 0590a33b0f557d9f6fbf13fdf59469c9345445fe
+SHA1 (patch-ah) = 15a0026ed21d732504d50af9597e53197aca038e
+SHA1 (patch-ai) = 28042f47978fe7df907a5e0d3600ac2e1bd17022
+SHA1 (patch-aj) = 97235f77188a1923d87d6992defb4c0cc2e050f4
+SHA1 (patch-ak) = 32f05795006fccba782ec02313159966daa0577a
diff --git a/print/kpathsea/patches/patch-ac b/print/kpathsea/patches/patch-ac
new file mode 100644
index 00000000000..4c5191cbe1f
--- /dev/null
+++ b/print/kpathsea/patches/patch-ac
@@ -0,0 +1,24 @@
+$NetBSD: patch-ac,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktexupd.orig 2009-06-03 06:07:18.000000000 -0700
++++ mktexupd
+@@ -10,8 +10,8 @@ mt_min_args=2
+ mt_max_args=2
+
+ # Common code for all scripts.
+-: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}
+-: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}
++: ${MT_TEXMFMAIN=`@KPSEWHICH@ --expand-path='$TEXMFMAIN'`}
++: ${MT_MKTEX_OPT=`@KPSEWHICH@ --format='web2c files' mktex.opt`}
+ test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"
+ if test ! -f "$MT_MKTEX_OPT"; then
+ echo "$0: Cannot find mktex.opt; check your installation." >&2
+@@ -25,7 +25,7 @@ file=$2
+ test -d "$dir" || { echo "$0: $dir not a directory." >&2; exit 1; }
+ test -f "$dir/$file" || { echo "$0: $dir/$file not a file." >&2; exit 1; }
+
+-OIFS=$IFS; IFS=$SEP; set x `kpsewhich -show-path=ls-R`; shift; IFS=$OIFS
++OIFS=$IFS; IFS=$SEP; set x `@KPSEWHICH@ -show-path=ls-R`; shift; IFS=$OIFS
+ TEXMFLS_R=
+ for d in "$@"; do
+ case $dir in
diff --git a/print/kpathsea/patches/patch-ad b/print/kpathsea/patches/patch-ad
new file mode 100644
index 00000000000..39206a3d56e
--- /dev/null
+++ b/print/kpathsea/patches/patch-ad
@@ -0,0 +1,51 @@
+$NetBSD: patch-ad,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktex.opt.orig 2009-06-03 06:07:19.000000000 -0700
++++ mktex.opt
+@@ -9,7 +9,7 @@ if test "x$1" = x--help || test "x$1" =
+ exit 0
+ elif test "x$1" = x--version || test "x$1" = x-version; then
+ echo "`basename $0` $version"
+- kpsewhich --version
++ @KPSEWHICH@ --version
+ exit 0
+ elif test $# -lt ${mt_min_args-1}; then
+ echo "$0: Missing argument(s)." >&2
+@@ -63,22 +63,22 @@ cd "$TEMPDIR" || exit 1
+
+ # The alternative location for fonts. The directory need not exist,
+ # so we use --expand-var here. We also perform a sanity check.
+-: ${MT_VARTEXFONTS=`kpsewhich --expand-var='$VARTEXFONTS' | sed 's%^!!%%'`}
++: ${MT_VARTEXFONTS=`@KPSEWHICH@ --expand-var='$VARTEXFONTS' | sed 's%^!!%%'`}
+ if test -z "$MT_VARTEXFONTS"; then
+ echo "$0: VARTEXFONTS is not defined. Defaulting to \`$KPSE_DOT'." >&2
+ MT_VARTEXFONTS='$KPSE_DOT'
+ fi
+
+ # The supporting scripts:
+-: ${MT_MKTEXNAM=`kpsewhich --format='web2c files' mktexnam`}
++: ${MT_MKTEXNAM=`@KPSEWHICH@ --format='web2c files' mktexnam`}
+ test -n "$MT_MKTEXNAM" || MT_MKTEXNAM="$MT_TEXMFMAIN/web2c/mktexnam"
+-: ${MT_MKTEXNAM_OPT=`kpsewhich --format='web2c files' mktexnam.opt`}
++: ${MT_MKTEXNAM_OPT=`@KPSEWHICH@ --format='web2c files' mktexnam.opt`}
+ test -n "$MT_MKTEXNAM_OPT" || MT_MKTEXNAM_OPT="$MT_TEXMFMAIN/web2c/mktexnam.opt"
+-: ${MT_MKTEXDIR=`kpsewhich --format='web2c files' mktexdir`}
++: ${MT_MKTEXDIR=`@KPSEWHICH@ --format='web2c files' mktexdir`}
+ test -n "$MT_MKTEXDIR" || MT_MKTEXDIR="$MT_TEXMFMAIN/web2c/mktexdir"
+-: ${MT_MKTEXDIR_OPT=`kpsewhich --format='web2c files' mktexdir.opt`}
++: ${MT_MKTEXDIR_OPT=`@KPSEWHICH@ --format='web2c files' mktexdir.opt`}
+ test -n "$MT_MKTEXDIR_OPT" || MT_MKTEXDIR_OPT="$MT_TEXMFMAIN/web2c/mktexdir.opt"
+-: ${MT_MKTEXUPD=`kpsewhich --format='web2c files' mktexupd`}
++: ${MT_MKTEXUPD=`@KPSEWHICH@ --format='web2c files' mktexupd`}
+ test -n "$MT_MKTEXUPD" || MT_MKTEXUPD="$MT_TEXMFMAIN/web2c/mktexupd"
+
+ # mktexupd and mktexlsr make sure they're coordinated via this. A copy of
+@@ -92,7 +92,7 @@ old_ls_R_magic='% ls-R -- maintained by
+ # given here (e.g. ``: ${MODE=ljfour}'', not just ``MODE=ljfour'', as
+ # this can cause trouble (e.g. when the mode for mktexnam is
+ # already specified on the command line).
+-: ${MT_MKTEX_CNF=`kpsewhich --format='web2c files' mktex.cnf`}
++: ${MT_MKTEX_CNF=`@KPSEWHICH@ --format='web2c files' mktex.cnf`}
+ test -n "$MT_MKTEX_CNF" && test -r "$MT_MKTEX_CNF" && . "$MT_MKTEX_CNF"
+
+ # Possible features: appendonlydir dosnames fontmaps nomfdrivers nomode
diff --git a/print/kpathsea/patches/patch-ae b/print/kpathsea/patches/patch-ae
new file mode 100644
index 00000000000..ea7760270a4
--- /dev/null
+++ b/print/kpathsea/patches/patch-ae
@@ -0,0 +1,71 @@
+$NetBSD: patch-ae,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktexnam.orig 2009-06-03 06:07:23.000000000 -0700
++++ mktexnam
+@@ -9,8 +9,8 @@ usage="Usage: $0 NAME [DPI MODE] [DESTDI
+ mt_max_args=4
+
+ # Common code for all scripts.
+-: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}
+-: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}
++: ${MT_TEXMFMAIN=`@KPSEWHICH@ --expand-path='$TEXMFMAIN'`}
++: ${MT_MKTEX_OPT=`@KPSEWHICH@ --format='web2c files' mktex.opt`}
+ test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"
+ if test ! -f "$MT_MKTEX_OPT"; then
+ echo "$0: Cannot find mktex.opt; check your installation." >&2
+@@ -41,23 +41,23 @@ esac
+ : ${MT_DEFAULT_DESTROOT=$KPSE_DOT}
+
+ # Find the font: test tfm first, then mf, then possible sauterized mf.
+-fullname=`kpsewhich "$NAME.tfm" 2>/dev/null`
+-test -z "$fullname" && fullname=`kpsewhich "$NAME.mf" 2>/dev/null`
++fullname=`@KPSEWHICH@ "$NAME.tfm" 2>/dev/null`
++test -z "$fullname" && fullname=`@KPSEWHICH@ "$NAME.mf" 2>/dev/null`
+ if test -z "$fullname"; then
+ rootname=`echo $NAME | sed 's/[0-9]*$//'`
+- fullname=`kpsewhich "b-$rootname.mf" 2>/dev/null`
++ fullname=`@KPSEWHICH@ "b-$rootname.mf" 2>/dev/null`
+ # LH fonts get special treatment:
+ if test -z "$fullname"; then
+ case $rootname in
+ # Czech/Slovak fonts get special treatment:
+ cs*|lcsss*|icscsc*|icstt*|ilcsss*)
+- fullname=`kpsewhich cscode.mf`
++ fullname=`@KPSEWHICH@ cscode.mf`
+ ;;
+ # LH fonts get special treatment:
+ wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*)
+ lhprefix=`echo $NAME | sed 's/^\(..\).*/\1/'`
+- fullname=`kpsewhich "${lhprefix}codes.mf" 2>/dev/null`;;
+- *) fullname=`kpsewhich "$rootname.mf" 2>/dev/null`
++ fullname=`@KPSEWHICH@ "${lhprefix}codes.mf" 2>/dev/null`;;
++ *) fullname=`@KPSEWHICH@ "$rootname.mf" 2>/dev/null`
+ ;;
+ esac
+ fi
+@@ -71,7 +71,7 @@ else
+ fullname=`echo "$fullname" | sed 's%//*%/%g'`
+ # See if $fullname comes from a standard location.
+ OIFS=$IFS;IFS=$SEP
+- set x `kpsewhich --expand-path='$TEXMF/fonts'"$SEP$MT_VARTEXFONTS"`
++ set x `@KPSEWHICH@ --expand-path='$TEXMF/fonts'"$SEP$MT_VARTEXFONTS"`
+ shift; IFS=$OIFS
+ for i
+ do
+@@ -138,14 +138,14 @@ test -n "$MT_MKTEXNAM_OPT" && . "$MT_MKT
+ # Adjust MT_DESTROOT, if necessary.
+ if test -n "${MT_DESTROOT}"; then
+ # We distinguish system trees from the rest.
+- systexmf="`kpsewhich --expand-path='{$SYSTEXMF}/fonts'`$SEP$MT_VARTEXFONTS"
++ systexmf="`@KPSEWHICH@ --expand-path='{$SYSTEXMF}/fonts'`$SEP$MT_VARTEXFONTS"
+ case "$SEP$systexmf$SEP" in
+ *$SEP$MT_DESTROOT$SEP*) # A system tree.
+ # If the texmfvar option is set, use TEXMFVAR tree.
+ # Some additional uglyness handles the case where $TEXMFVAR exists
+ # but $TEXMFVAR/fonts doesn't (yet).
+ if test "x$USE_TEXMFVAR" = x1; then
+- : ${MT_TEXMFVAR=`kpsewhich --var-value=TEXMFVAR`}
++ : ${MT_TEXMFVAR=`@KPSEWHICH@ --var-value=TEXMFVAR`}
+ MT_DESTROOT=$MT_TEXMFVAR/fonts
+ if test -z "$MT_TEXMFVAR"; then
+ # Path expansion of $TEXMFVAR was empty.
diff --git a/print/kpathsea/patches/patch-af b/print/kpathsea/patches/patch-af
new file mode 100644
index 00000000000..44daa25c4fe
--- /dev/null
+++ b/print/kpathsea/patches/patch-af
@@ -0,0 +1,17 @@
+$NetBSD: patch-af,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktexnam.opt.orig 2009-06-03 06:07:23.000000000 -0700
++++ mktexnam.opt
+@@ -24,9 +24,9 @@ case "$MT_FEATURES" in
+ MT_PKDESTREL='pk/$MT_MODE/$MT_NAMEPART'
+ MT_TFMDESTREL='tfm/$MT_NAMEPART'
+ MT_MFDESTREL='source/$MT_NAMEPART'
+- SPECIALMAP=`kpsewhich special.map`
+- TYPEFACEMAP=`kpsewhich typeface.map`
+- SUPPLIERMAP=`kpsewhich supplier.map`
++ SPECIALMAP=`@KPSEWHICH@ special.map`
++ TYPEFACEMAP=`@KPSEWHICH@ typeface.map`
++ SUPPLIERMAP=`@KPSEWHICH@ supplier.map`
+ if test -r "$SPECIALMAP"; then
+ set x `awk \
+ '{if ($1 == NAME || (substr (NAME, 1, length ($1)) == $1 \
diff --git a/print/kpathsea/patches/patch-ag b/print/kpathsea/patches/patch-ag
new file mode 100644
index 00000000000..316ee6ba674
--- /dev/null
+++ b/print/kpathsea/patches/patch-ag
@@ -0,0 +1,15 @@
+$NetBSD: patch-ag,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktexdir.orig 2009-06-03 06:07:17.000000000 -0700
++++ mktexdir
+@@ -12,8 +12,8 @@ usage="Usage: $0 DIRS...
+ mt_max_args=$#
+
+ # Common code for all scripts.
+-: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}
+-: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}
++: ${MT_TEXMFMAIN=`@KPSEWHICH@ --expand-path='$TEXMFMAIN'`}
++: ${MT_MKTEX_OPT=`@KPSEWHICH@ --format='web2c files' mktex.opt`}
+ test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"
+ if test ! -f "$MT_MKTEX_OPT"; then
+ echo "$0: Cannot find mktex.opt; check your installation." >&2
diff --git a/print/kpathsea/patches/patch-ah b/print/kpathsea/patches/patch-ah
new file mode 100644
index 00000000000..9990cceca20
--- /dev/null
+++ b/print/kpathsea/patches/patch-ah
@@ -0,0 +1,15 @@
+$NetBSD: patch-ah,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktextfm.orig 2009-06-03 06:07:27.000000000 -0700
++++ mktextfm
+@@ -27,8 +27,8 @@ while test $# -gt 0; do
+ done
+
+ # Common code for all scripts.
+-: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}
+-: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}
++: ${MT_TEXMFMAIN=`@KPSEWHICH@ --expand-path='$TEXMFMAIN'`}
++: ${MT_MKTEX_OPT=`@KPSEWHICH@ --format='web2c files' mktex.opt`}
+ test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"
+ if test ! -f "$MT_MKTEX_OPT"; then
+ echo "$progname: Cannot find mktex.opt; check your installation." >&2
diff --git a/print/kpathsea/patches/patch-ai b/print/kpathsea/patches/patch-ai
new file mode 100644
index 00000000000..233f456113e
--- /dev/null
+++ b/print/kpathsea/patches/patch-ai
@@ -0,0 +1,40 @@
+$NetBSD: patch-ai,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktexmf.orig 2009-06-03 06:07:17.000000000 -0700
++++ mktexmf
+@@ -15,8 +15,8 @@ Makes the Metafont source file for FONT,
+ \`ecr12' or \`cmr11'."
+
+ # Common code for all scripts.
+-: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}
+-: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}
++: ${MT_TEXMFMAIN=`@KPSEWHICH@ --expand-path='$TEXMFMAIN'`}
++: ${MT_MKTEX_OPT=`@KPSEWHICH@ --format='web2c files' mktex.opt`}
+ test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"
+ if test ! -f "$MT_MKTEX_OPT"; then
+ echo "$progname: Cannot find mktex.opt; check your installation." >&2
+@@ -31,7 +31,7 @@ name="`echo $1 | sed 's%.*/%%; s%\.mf$%%
+ rootname=`echo "$name" | sed 's/[0-9]*$//'`
+ pointsize=`echo "$name" | sed "s/^$rootname//"`
+
+-sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null`
++sauterroot=`@KPSEWHICH@ b-$rootname.mf 2>/dev/null`
+ if test -n "$sauterroot"; then
+ rootfile=$sauterroot
+ rootname=b-$rootname
+@@ -41,12 +41,12 @@ else
+ csso12[0-5][0-9])
+ rootfile=;;
+ cs*|lcsss*|icscsc*|icstt*|ilcsss*)
+- rootfile=`kpsewhich cscode.mf`;;
++ rootfile=`@KPSEWHICH@ cscode.mf`;;
+ wn[bcdfirstuv]*|rx[bcdfiorstuvx][bcfhilmostx]|l[abcdhl][bcdfiorstuvx]*)
+ lhprefix=`echo "$name" | sed 's/^\(..\).*/\1/'`
+- rootfile=`kpsewhich ${lhprefix}codes.mf 2>/dev/null`;;
++ rootfile=`@KPSEWHICH@ ${lhprefix}codes.mf 2>/dev/null`;;
+ *)
+- rootfile=`kpsewhich $rootname.mf 2>/dev/null`;;
++ rootfile=`@KPSEWHICH@ $rootname.mf 2>/dev/null`;;
+ esac
+ fi
+ { test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1
diff --git a/print/kpathsea/patches/patch-aj b/print/kpathsea/patches/patch-aj
new file mode 100644
index 00000000000..500d84d01ae
--- /dev/null
+++ b/print/kpathsea/patches/patch-aj
@@ -0,0 +1,42 @@
+$NetBSD: patch-aj,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktexpk.orig 2009-06-03 06:07:21.000000000 -0700
++++ mktexpk
+@@ -60,8 +60,8 @@ fi
+ mt_max_args=2
+
+ # Common code for all scripts.
+-: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}
+-: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}
++: ${MT_TEXMFMAIN=`@KPSEWHICH@ --expand-path='$TEXMFMAIN'`}
++: ${MT_MKTEX_OPT=`@KPSEWHICH@ --format='web2c files' mktex.opt`}
+ test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"
+ if test ! -f "$MT_MKTEX_OPT"; then
+ echo "$progname: Cannot find mktex.opt; check your installation." >&2
+@@ -87,7 +87,7 @@ esac
+
+ NAME=$1
+
+-if kpsewhich $NAME.mf >/dev/null 2>&1 || mktexmf $NAME >/dev/null 2>&1; then
++if @KPSEWHICH@ $NAME.mf >/dev/null 2>&1 || @MKTEXMF@ $NAME >/dev/null 2>&1; then
+ # determine the progname of metafont to use; prefer mf-nowin.
+ if (mf-nowin --version) >/dev/null 2>&1; then
+ MF="mf-nowin -progname=mf"
+@@ -145,7 +145,7 @@ else
+ ps2pk)
+ # grep for the font in $PSMAPFILE. These are base font names, such as
+ # rpplr (the original) or pplr0 (an interim step) or pplr8r (current).
+- : ${PSMAPFILE=`kpsewhich --format=map psfonts.map ps2pk.map`}
++ : ${PSMAPFILE=`@KPSEWHICH@ --format=map psfonts.map ps2pk.map`}
+ pattern="^$NAME"'([ ]|$)'
+ psline=`egrep "$pattern" $PSMAPFILE | tail -1`
+ if test -n "$psline"; then
+@@ -165,7 +165,7 @@ else
+ # Guessing the name of the type1 font file as fallback:
+ ANAME=`echo $NAME | sed 's/8r$/8a/'`
+ for i in $NAME.pfa $NAME.pfb $ANAME.pfa $ANAME.pfb; do
+- if kpsewhich $i >/dev/null 2>&1; then
++ if @KPSEWHICH@ $i >/dev/null 2>&1; then
+ psname=$i
+ break
+ fi
diff --git a/print/kpathsea/patches/patch-ak b/print/kpathsea/patches/patch-ak
new file mode 100644
index 00000000000..52c0944e9b4
--- /dev/null
+++ b/print/kpathsea/patches/patch-ak
@@ -0,0 +1,22 @@
+$NetBSD: patch-ak,v 1.1 2009/09/20 18:50:03 minskim Exp $
+
+--- mktexlsr.orig 2009-06-03 06:07:21.000000000 -0700
++++ mktexlsr
+@@ -70,7 +70,7 @@ while test $# -gt 0; do
+ exit 0
+ elif test "x$1" = x--version || test "x$1" = x-version; then
+ echo "`basename $0` $version"
+- kpsewhich --version
++ @KPSEWHICH@ --version
+ exit 0
+ elif test "x$1" = x--verbose || test "x$1" = x-verbose; then
+ verbose=true
+@@ -107,7 +107,7 @@ trap 'cd /; test -z "$db_dir_tmp" || rm
+ OIFS=$IFS # want just a newline
+ IFS='
+ '
+- set x `kpsewhich --show-path=ls-R | tr : '
++ set x `@KPSEWHICH@ --show-path=ls-R | tr : '
+ ' | sort | uniq`
+ IFS=$OIFS
+ fi