pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
proposal to fix print/tex-config
tired of seeing the following sort of errors with tex-config or
tex-config-sys:
richard@devzone:~$ pfexec texconfig font rw
/opt/pkg/bin/texconfig: line 950: @KPSEWHICH@: command not found
texconfig: failed to set `font rw'; reason: could not determine VARTEXFONTS
variable.
I'd like to propose a patch to clean it up a bit. The patches in the
patches subdirectory currently on replace 'kpsewhich' with '@KPSEWHICH@'
in order to use the SUBST facility to replace that with
'${KPSEWHICH_PREFIX}/bin/kpsewhich'
Is is strictly necessary to keep this sort of patch file as the SUBST
facility doesn't have a problem substituting directly 'kpsewhich'.
Understandably @KPSEWHICH@ is a *safer* replace, but isn't that
considered an upstream problem?
In any event, keeping the patches for now gives the following, after a
bit of restructuring...
richard@devzoneX:~/src/pkgsrc/print/tex-texconfig$ cvs diff
? patches/patch-texmf_scripts_tetex_texconfig.sh
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-texconfig/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile 13 Oct 2012 22:29:21 -0000 1.1
+++ Makefile 20 Jan 2013 16:28:02 -0000
@@ -3,6 +3,7 @@
DISTNAME= texconfig
PKGNAME= tex-${DISTNAME}-2012
TEXLIVE_REV= 27343
+PKGREVISION= 1
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
COMMENT= Configuration utility for TeX
@@ -17,7 +18,7 @@
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Setting paths to commands.
SUBST_STAGE.paths= pre-configure
-SUBST_FILES.paths= texmf/texconfig/tcfmgr
+SUBST_FILES.paths= texmf/texconfig/tcfmgr
texmf/scripts/tetex/texconfig.sh
SUBST_SED.paths= -e 's,@FMTUTIL@,${LOCALBASE}/bin/fmtutil,g'
SUBST_SED.paths+= -e
's,@KPSEWHICH@,${KPSEWHICH_PREFIX}/bin/kpsewhich,g'
SUBST_SED.paths+= -e
's,@MKTEXLSR@,${KPSEWHICH_PREFIX}/bin/mktexlsr,g'
@@ -25,17 +26,18 @@
SUBST_SED.paths+= -e 's,@TEXLINKS@,${LOCALBASE}/bin/texlnks,g'
SUBST_SED.paths+= -e 's,@UPDMAP@,${LOCALBASE}/bin/updmap,g'
-REPLACE_SH= bin/texconfig texmf/texconfig/tcfmgr
+REPLACE_SH= texmf/scripts/tetex/texconfig.sh texmf/texconfig/tcfmgr
+
+INSTALLATION_DIRS+= bin
TEX_TEXMF_DIRS= ${PREFIX}/share/texmf
.include "../../print/texlive/package.mk"
-post-extract:
- ${MKDIR} ${WRKSRC}/bin
- ${MV} ${WRKSRC}/texmf/scripts/tetex/texconfig.sh \
- ${WRKSRC}/bin/texconfig
- ${RMDIR} -p ${WRKSRC}/texmf/scripts/tetex 2>/dev/null || ${TRUE}
- ${CHMOD} +x ${WRKSRC}/texmf/texconfig/tcfmgr
+post-install:
+ ${LN} -sf ${TEX_TEXMF_DIRS}/scripts/tetex/texconfig.sh
${DESTDIR}${PREFIX}/bin/texconfig
+ ${CHMOD} +x ${DESTDIR}${TEX_TEXMF_DIRS}/scripts/tetex/texconfig.sh
+ ${CHMOD} +x ${DESTDIR}${TEX_TEXMF_DIRS}/texconfig/tcfmgr
+
.include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-texconfig/PLIST,v
retrieving revision 1.1
diff -u -r1.1 PLIST
--- PLIST 13 Oct 2012 22:29:21 -0000 1.1
+++ PLIST 20 Jan 2013 16:28:02 -0000
@@ -1,5 +1,6 @@
@comment $NetBSD: PLIST,v 1.1 2012/10/13 22:29:21 minskim Exp $
bin/texconfig
+share/texmf/scripts/tetex/texconfig.sh
share/texmf/texconfig/README
share/texmf/texconfig/g/generic
share/texmf/texconfig/tcfmgr
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-texconfig/distinfo,v
retrieving revision 1.1
diff -u -r1.1 distinfo
--- distinfo 13 Oct 2012 22:29:21 -0000 1.1
+++ distinfo 20 Jan 2013 16:28:02 -0000
@@ -3,5 +3,5 @@
SHA1 (tex-texconfig-27343/texconfig.tar.xz) =
2c63e1523637ac07401c046413ee0647914b39f6
RMD160 (tex-texconfig-27343/texconfig.tar.xz) =
468a236c5c961e09c9c48d8b3c25f8ec299c6c9f
Size (tex-texconfig-27343/texconfig.tar.xz) = 12308 bytes
-SHA1 (patch-bin_texconfig) = e69bd12e42371dd41e9bbd58b20752368df81d67
+SHA1 (patch-texmf_scripts_tetex_texconfig.sh) =
6cbdd7e002c38ea2efece9f496f7a4a567b052ee
SHA1 (patch-texmf_texconfig_tcfmgr) =
6833157d80ab0d5dafc4eb45b274a4256cdaf022
=====================
patches/patch-bin_texconfig is replaced with:
richard@devzoneX:~/src/pkgsrc/print/tex-texconfig$ diff -u /dev/null
patches/patch-texmf_scripts_tetex_texconfig.sh
--- /dev/null 2013-01-20 17:37:22.000000000 +0100
+++ patches/patch-texmf_scripts_tetex_texconfig.sh 2013-01-20
16:25:21.929415028 +0100
@@ -0,0 +1,129 @@
+$NetBSD$
+
+--- texmf/scripts/tetex/texconfig.sh.orig 2013-01-20
15:22:12.130574311 +0000
++++ texmf/scripts/tetex/texconfig.sh
+@@ -91,7 +91,7 @@ echoShowKpseVariable()
+ for eskv
+ do
+ var=$eskv
+- val=`kpsewhich -var-value="$eskv"`
++ val=`@KPSEWHICH@ -var-value="$eskv"`
+ echo "$var=$val"
+ done
+ }
+@@ -123,7 +123,7 @@ echoLocateCfgfile()
+ for elc
+ do
+ case $elc in
+- texmf.cnf) elcLoc=`kpsewhich $elc`;;
++ texmf.cnf) elcLoc=`@KPSEWHICH@ $elc`;;
+ *) elcLoc=`tcfmgr --cmd find --file "$elc"`;;
+ esac
+ case $elcLoc in
+@@ -190,7 +190,7 @@ setupTmpDir()
+ setupTexmfmain()
+ {
+ case $MT_TEXMFMAIN in
+- "") MT_TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`;;
++ "") MT_TEXMFMAIN=`@KPSEWHICH@ -var-value=TEXMFMAIN`;;
+ *) return;;
+ esac
+ }
+@@ -201,7 +201,7 @@ setupTexmfmain()
+ setupTexmfdist()
+ {
+ case $MT_TEXMFDIST in
+- "") MT_TEXMFDIST=`kpsewhich -var-value=TEXMFDIST`;;
++ "") MT_TEXMFDIST=`@KPSEWHICH@ -var-value=TEXMFDIST`;;
+ *) return;;
+ esac
+ }
+@@ -212,7 +212,7 @@ setupTexmfdist()
+ setupTexmfvar()
+ {
+ case $MT_TEXMVAR in
+- "") MT_TEXMVAR=`kpsewhich -var-value=TEXMFVAR`;;
++ "") MT_TEXMVAR=`@KPSEWHICH@ -var-value=TEXMFVAR`;;
+ *) return;;
+ esac
+ }
+@@ -223,7 +223,7 @@ setupTexmfvar()
+ setupSystexmf()
+ {
+ case $MT_SYSTEXMF in
+- "") MT_SYSTEXMF=`kpsewhich -var-value=SYSTEXMF`;;
++ "") MT_SYSTEXMF=`@KPSEWHICH@ -var-value=SYSTEXMF`;;
+ *) return;;
+ esac
+ }
+@@ -600,14 +600,14 @@ TeX Live home page: <http://tug.org/texl
+ echo
+ echo '==================== binaries found by searching $PATH
==================='
+ echo "PATH=$PATH"
+- echoLocateBinary kpsewhich updmap fmtutil texconfig tex pdftex
mktexpk dvips dvipdfm
++ echoLocateBinary @KPSEWHICH@ updmap fmtutil texconfig tex pdftex
mktexpk dvips dvipdfm
+ echo
+ echo '=========================== active config files
=========================='
+ echoLocateCfgfile texmf.cnf updmap.cfg fmtutil.cnf config.ps
mktex.cnf XDvi pdftexconfig.tex config | sort -k 2
+ echo
+ echo '============================= font map files
============================='
+ for m in psfonts.map pdftex.map ps2pk.map dvipdfm.map; do
+- echo "$m: `kpsewhich $m`"
++ echo "$m: `@KPSEWHICH@ $m`"
+ done
+ echo
+ echo '=========================== kpathsea variables
==========================='
+@@ -703,7 +703,7 @@ Valid PAPER settings:
+ *)
+ otherPrinter=true
+ otherPrinterName=$2
+- otherPrinterFile=`kpsewhich -format='dvips config'
"config.$otherPrinterName"`
++ otherPrinterFile=`@KPSEWHICH@ -format='dvips config'
"config.$otherPrinterName"`
+ case $otherPrinterFile in
+ "")
+ echo "$progname: configuration file
\`config.$otherPrinterName' for printer \`$otherPrinterName' not found" >&2
+@@ -736,7 +736,7 @@ Valid PAPER settings:
+ ;;
+ *)
+ printerName=$2
+- pFile=`kpsewhich -format='dvips config'
"config.$printerName"`
++ pFile=`@KPSEWHICH@ -format='dvips config'
"config.$printerName"`
+ case $pFile in
+ "")
+ setupTmpDir
+@@ -773,7 +773,7 @@ Valid PAPER settings:
+ ;;
+ *)
+ printerName=$2
+- pFile=`kpsewhich -format='dvips config'
"config.$printerName"`
++ pFile=`@KPSEWHICH@ -format='dvips config'
"config.$printerName"`
+ case $pFile in
+ "")
+ echo "$progname: configuration file for printer
\`$printerName' (config.$printerName) not found" >&2
+@@ -931,7 +931,7 @@ For more information about these \`featu
+ ;;
+ *)
+ tcBatchFontVardir=$3
+- tfc=`kpsewhich texmf.cnf`
++ tfc=`@KPSEWHICH@ texmf.cnf`
+ if test -n "$tfc"; then
+ if test -w "$tfc"; then
+ configReplace "$tfc" '^VARTEXFONTS' "VARTEXFONTS =
$tcBatchFontVardir"
+@@ -947,7 +947,7 @@ For more information about these \`featu
+ esac
+ ;;
+ rw)
+- MT_VARTEXFONTS=`kpsewhich -var-value VARTEXFONTS`
++ MT_VARTEXFONTS=`@KPSEWHICH@ -var-value VARTEXFONTS`
+ if test -z "$MT_VARTEXFONTS"; then
+ echo "$progname: failed to set \`font rw'; reason: could
not determine VARTEXFONTS variable." >&2; rc=1
+ return
+@@ -973,7 +973,7 @@ For more information about these \`featu
+ fmgrConfigReplace mktex.cnf '^: ..MT_FEATURES=' ":
\${MT_FEATURES=appendonlydir:varfonts}"
+ ;;
+ ro)
+- MT_VARTEXFONTS=`kpsewhich -var-value VARTEXFONTS`
++ MT_VARTEXFONTS=`@KPSEWHICH@ -var-value VARTEXFONTS`
+ if test -z "$MT_VARTEXFONTS"; then
+ echo "$progname: failed to set \`font ro'; reason: could
not determine VARTEXFONTS variable." >&2; rc=1
+ return
Home |
Main Index |
Thread Index |
Old Index