pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print/teTeX3-bin * Set the default texfonts directory ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c7237ac24a78
branches: trunk
changeset: 510903:c7237ac24a78
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Apr 06 14:39:11 2006 +0000
description:
* Set the default texfonts directory during the build instead of setting
it during installation. The default texmf.cnf file now has the correct
VARTEXFONTS default without any extra configuration.
* Move texconfig papersize setting to a +TEXCONFIG scriptlet that is
called during POST-INSTALL. You can invoke ./+TEXCONFIG PAPER <paper>
to set the papersize for dvips and xdvi.
This fixes problems with installing teTeX3-bin where invoking texconfig
failed because texmf.cnf didn't (yet) exist during the post-install
target.
Bump the PKGREVISION to 9.
diffstat:
print/teTeX3-bin/DEINSTALL | 5 +-
print/teTeX3-bin/INSTALL | 72 ++++++++++++++++++++++++++++++++++++++++-----
print/teTeX3-bin/Makefile | 26 +++------------
3 files changed, 72 insertions(+), 31 deletions(-)
diffs (172 lines):
diff -r 1032022f2a00 -r c7237ac24a78 print/teTeX3-bin/DEINSTALL
--- a/print/teTeX3-bin/DEINSTALL Thu Apr 06 13:49:37 2006 +0000
+++ b/print/teTeX3-bin/DEINSTALL Thu Apr 06 14:39:11 2006 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: DEINSTALL,v 1.1 2006/04/05 16:04:01 jlam Exp $
+# $NetBSD: DEINSTALL,v 1.2 2006/04/06 14:39:11 jlam Exp $
case ${STAGE} in
DEINSTALL)
- ${TEST} ! -x ./+TETEX ||
- ./+TETEX REMOVE ${PKG_METADATA_DIR}
+ ${TEST} ! -x ./+TETEX || ./+TETEX REMOVE
;;
esac
diff -r 1032022f2a00 -r c7237ac24a78 print/teTeX3-bin/INSTALL
--- a/print/teTeX3-bin/INSTALL Thu Apr 06 13:49:37 2006 +0000
+++ b/print/teTeX3-bin/INSTALL Thu Apr 06 14:39:11 2006 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: INSTALL,v 1.1 2006/04/05 16:04:01 jlam Exp $
+# $NetBSD: INSTALL,v 1.2 2006/04/06 14:39:11 jlam Exp $
case "${STAGE}" in
POST-INSTALL)
- ${TEST} ! -x ./+TETEX ||
- ./+TETEX ADD ${PKG_METADATA_DIR}
+ ${TEST} ! -x ./+TEXCONFIG || ./+TEXCONFIG PAPER
+ ${TEST} ! -x ./+TETEX || ./+TETEX ADD
;;
esac
@@ -18,12 +18,11 @@
#
# +TETEX - teTeX installation update script
#
-# Usage: ./+TETEX ADD|REMOVE [metadatadir]
+# Usage: ./+TETEX ADD|REMOVE
CAT="@CAT@"
ECHO="@ECHO@"
GREP="@GREP@"
-PWD_CMD="@PWD_CMD@"
RM="@RM@"
RMDIR="@RMDIR@"
TEST="@TEST@"
@@ -31,9 +30,6 @@
SELF=$0
ACTION=$1
-PKG_METADATA_DIR="${2-`${PWD_CMD}`}"
-: ${PKGNAME=${PKG_METADATA_DIR##*/}}
-: ${PKG_DBDIR=${PKG_METADATA_DIR%/*}}
: ${PKG_PREFIX=@PREFIX@}
TEXFONTS_DIR="@TEXFONTSDIR@"
@@ -141,3 +137,63 @@
${CHMOD} +x ./+TETEX
;;
esac
+
+#
+# Generate a +TEXCONFIG script sets the initial font and papersize
+# settings for the teTeX installation.
+#
+case "${STAGE},$1" in
+UNPACK,|UNPACK,+TEXCONFIG)
+ ${CAT} > ./+TEXCONFIG << 'EOF'
+#!@SH@
+#
+# +TEXCONFIG - default font and papersize settings for teTeX
+#
+# Usage: ./+TEXCONFIG FONTS [fontdir]
+# ./+TEXCONFIG PAPER [papersize]
+
+ECHO="@ECHO@"
+TEST="@TEST@"
+
+SELF=$0
+ACTION=$1
+: ${PKG_PREFIX=@PREFIX@}
+
+TEXCONFIG="${PKG_PREFIX}/bin/texconfig"
+
+exitcode=0
+case $ACTION in
+FONTS)
+ # Set the default texfonts directory to the specified directory.
+ VARTEXFONTS="${2-@VARTEXFONTS@}"
+ ${TEST} ! -x ${TEXCONFIG} ||
+ ${TEXCONFIG} font vardir "$VARTEXFONTS"
+ ${TEST} ! -x ${TEXCONFIG} ||
+ ${TEXCONFIG} font rw
+ ;;
+
+PAPER)
+ # Set the paper size for dvips and xdvi to the specified papersize.
+ PAPERSIZE="${2-@PAPERSIZE@}"
+ PAPERSIZE_dvips="$PAPERSIZE"
+ PAPERSIZE_xdvi="$PAPERSIZE"
+ case "$PAPERSIZE" in
+ letter) PAPERSIZE_xdvi="us" ;;
+ us) PAPERSIZE_dvips="letter" ;;
+ esac
+ ${TEST} ! -x ${TEXCONFIG} ||
+ ${TEXCONFIG} dvips paper $PAPERSIZE_dvips
+ ${TEST} ! -x ${TEXCONFIG} ||
+ ${TEXCONFIG} xdvi paper $PAPERSIZE_xdvi
+ ;;
+
+*)
+ ${ECHO} "Usage: ./+TEXCONFIG FONTS [fontdir]"
+ ${ECHO} " ./+TEXCONFIG PAPER [papersize]"
+ ;;
+esac
+exit $exitcode
+EOF
+ ${CHMOD} +x ./+TEXCONFIG
+ ;;
+esac
diff -r 1032022f2a00 -r c7237ac24a78 print/teTeX3-bin/Makefile
--- a/print/teTeX3-bin/Makefile Thu Apr 06 13:49:37 2006 +0000
+++ b/print/teTeX3-bin/Makefile Thu Apr 06 14:39:11 2006 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2006/04/05 16:04:01 jlam Exp $
+# $NetBSD: Makefile,v 1.16 2006/04/06 14:39:11 jlam Exp $
DISTNAME= tetex-src-3.0
PKGNAME= ${DISTNAME:C/tetex/teTeX/:C/src/bin/}
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_TEX_CTAN:=systems/unix/teTeX/3.0/distrib/}
@@ -24,14 +24,13 @@
CONFIGURE_ARGS+= --without-texinfo --without-texi2html
CONFIGURE_ARGS+= --with-xdvi-x-toolkit=xaw
+MAKE_FLAGS+= vartexfonts=${VARTEXFONTS:Q}
-.if defined(PAPERSIZE)
+VARTEXFONTS?= ${VARBASE:Q}/spool/texfonts
LOWER_PAPERSIZE_cmd= ${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'
LOWER_PAPERSIZE= ${LOWER_PAPERSIZE_cmd:sh}
-.endif
-
-TEXCONFIG= ${SETENV} TEXMFCONFIG=${PREFIX}/share/texmf \
- ${PREFIX}/bin/texconfig
+FILES_SUBST+= PAPERSIZE=${LOWER_PAPERSIZE:Q}
+FILES_SUBST+= VARTEXFONTS=${VARTEXFONTS:Q}
CONF_FILES+= ${PREFIX}/share/texmf/web2c/fmtutil.cnf.dist \
${PREFIX}/share/texmf/web2c/fmtutil.cnf
@@ -39,20 +38,7 @@
${PREFIX}/share/texmf/web2c/texmf.cnf
OWN_DIRS+= ${PREFIX}/share/texmf-var
-post-install:
-.if defined(PAPERSIZE)
- ${TEXCONFIG} dvips paper ${LOWER_PAPERSIZE}
-. if ${PAPERSIZE} == "Letter"
- ${TEXCONFIG} xdvi paper us
-. else
- ${TEXCONFIG} xdvi paper ${LOWER_PAPERSIZE}
-. endif
-.endif
- ${TEXCONFIG} font rw
- ${TEXCONFIG} font vardir ${VARBASE}/spool/texfonts
-
.include "../../print/teTeX3-bin/Makefile.common"
.include "../../graphics/xpm/buildlink3.mk"
.include "../../mk/xaw.buildlink3.mk"
-
.include "../../mk/bsd.pkg.mk"
Home |
Main Index |
Thread Index |
Old Index