summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2006-04-06 14:39:11 +0000
committerjlam <jlam>2006-04-06 14:39:11 +0000
commitcf9c53b6950eaf917c56a556a7d95976343fd1a9 (patch)
tree78a04da7f5719f0f07d29e7748509396b18e43c2
parentfd592f8fa2ce372c4e9853f73fd60406a64461db (diff)
downloadpkgsrc-cf9c53b6950eaf917c56a556a7d95976343fd1a9.tar.gz
* 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.
-rw-r--r--print/teTeX3-bin/DEINSTALL5
-rw-r--r--print/teTeX3-bin/INSTALL72
-rw-r--r--print/teTeX3-bin/Makefile26
3 files changed, 72 insertions, 31 deletions
diff --git a/print/teTeX3-bin/DEINSTALL b/print/teTeX3-bin/DEINSTALL
index b986ed0f27a..95ce06556d9 100644
--- a/print/teTeX3-bin/DEINSTALL
+++ b/print/teTeX3-bin/DEINSTALL
@@ -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 --git a/print/teTeX3-bin/INSTALL b/print/teTeX3-bin/INSTALL
index f66a155953c..fdc292eff11 100644
--- a/print/teTeX3-bin/INSTALL
+++ b/print/teTeX3-bin/INSTALL
@@ -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 @@ UNPACK,|UNPACK,+TETEX)
#
# +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 @@ TRUE="@TRUE@"
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 @@ EOF
${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 --git a/print/teTeX3-bin/Makefile b/print/teTeX3-bin/Makefile
index 20879ff28f7..addf7467667 100644
--- a/print/teTeX3-bin/Makefile
+++ b/print/teTeX3-bin/Makefile
@@ -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 @@ REPLACE_PERL= texk/xdvik/t1mapper \
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 @@ CONF_FILES+= ${PREFIX}/share/texmf/web2c/texmf.cnf.dist \
${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"