pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print/teTeX3-bin * Move all the handling of files that...
details: https://anonhg.NetBSD.org/pkgsrc/rev/bab63d8756cf
branches: trunk
changeset: 510863:bab63d8756cf
user: jlam <jlam%pkgsrc.org@localhost>
date: Wed Apr 05 16:04:01 2006 +0000
description:
* Move all the handling of files that are user-modifiable or generated
at run-time into the INSTALL/DEINSTALL scripts instead. This includes
running: mktexlsr, fmtutil, texlinks, and updmap. The INSTALL script
now unpacks a separate scriptlet +TETEX that can be called independently
to fix up the teTeX installation in case it gets messed up.
* USE_TOOLS+=bison instead of a direct BUILD_DEPENDS on the bison package.
* List info file entries directly in the PLIST.
Bump PKGREVISION to 8.
diffstat:
print/teTeX3-bin/DEINSTALL | 8 ++
print/teTeX3-bin/INSTALL | 143 ++++++++++++++++++++++++++++++++++++++
print/teTeX3-bin/Makefile | 15 ++-
print/teTeX3-bin/Makefile.common | 7 +-
print/teTeX3-bin/PLIST | 75 +------------------
print/teTeX3-bin/distinfo | 6 +-
print/teTeX3-bin/patches/patch-aq | 26 ++++--
print/teTeX3-bin/patches/patch-ar | 13 ++-
print/teTeX3-bin/patches/patch-as | 13 +++
9 files changed, 216 insertions(+), 90 deletions(-)
diffs (truncated from 489 to 300 lines):
diff -r 4ba48440fc0b -r bab63d8756cf print/teTeX3-bin/DEINSTALL
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/teTeX3-bin/DEINSTALL Wed Apr 05 16:04:01 2006 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: DEINSTALL,v 1.1 2006/04/05 16:04:01 jlam Exp $
+
+case ${STAGE} in
+DEINSTALL)
+ ${TEST} ! -x ./+TETEX ||
+ ./+TETEX REMOVE ${PKG_METADATA_DIR}
+ ;;
+esac
diff -r 4ba48440fc0b -r bab63d8756cf print/teTeX3-bin/INSTALL
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/teTeX3-bin/INSTALL Wed Apr 05 16:04:01 2006 +0000
@@ -0,0 +1,143 @@
+# $NetBSD: INSTALL,v 1.1 2006/04/05 16:04:01 jlam Exp $
+
+case "${STAGE}" in
+POST-INSTALL)
+ ${TEST} ! -x ./+TETEX ||
+ ./+TETEX ADD ${PKG_METADATA_DIR}
+ ;;
+esac
+
+#
+# Generate a +TETEX script that updates the teTeX installation
+# based on user-modifiable configuration files.
+#
+case "${STAGE},$1" in
+UNPACK,|UNPACK,+TETEX)
+ ${CAT} > ./+TETEX << 'EOF'
+#!@SH@
+#
+# +TETEX - teTeX installation update script
+#
+# Usage: ./+TETEX ADD|REMOVE [metadatadir]
+
+CAT="@CAT@"
+ECHO="@ECHO@"
+GREP="@GREP@"
+PWD_CMD="@PWD_CMD@"
+RM="@RM@"
+RMDIR="@RMDIR@"
+TEST="@TEST@"
+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@"
+TEXMF_DATADIR="${PKG_PREFIX}/share/texmf"
+TEXMF_VARDIR="${PKG_PREFIX}/share/texmf-var"
+
+exitcode=0
+case $ACTION in
+ADD)
+ # Create ls-R databases in all of the usual TeX directories.
+ ${TEST} ! -x ${PKG_PREFIX}/bin/mktexlsr ||
+ ${PKG_PREFIX}/bin/mktexlsr
+
+ # Update teTeX installation to support different TeX formats.
+ ${TEST} ! -x ${PKG_PREFIX}/bin/fmtutil-sys ||
+ ${PKG_PREFIX}/bin/fmtutil-sys --all
+ ${TEST} ! -x ${PKG_PREFIX}/bin/texlinks ||
+ ${PKG_PREFIX}/bin/texlinks
+
+ # Update the font map files for TeX output drivers.
+ ${TEST} ! -x ${PKG_PREFIX}/bin/updmap-sys ||
+ ${PKG_PREFIX}/bin/updmap-sys
+ ;;
+
+REMOVE)
+ # Remove the ls-R databases from the usual TeX directories
+ # generated by mktexlsr.
+ #
+ ${RM} -f ${TEXFONTS_DIR}/ls-R
+ ${RM} -f ${TEXMF_DATADIR}/ls-R
+ ${RM} -f ${TEXMF_VARDIR}/ls-R
+
+ # We inspect both the user-modified and distributed fmtutil.cnf
+ # files because we want to ensure we remove bits corresponding
+ # to both files.
+ #
+ FMTUTIL_CNF=
+ for cnf in fmtutil.cnf.dist fmtutil.cnf; do
+ file="${TEXMF_DATADIR}/web2c/$cnf"
+ ${TEST} ! -f "$file" ||
+ FMTUTIL_CNF="${FMTUTIL_CNF} $file"
+ done
+
+ # Remove fmt, mem, and log files generated by fmtutil-sys.
+ ${TEST} -z "${FMTUTIL_CNF}" ||
+ ${CAT} ${FMTUTIL_CNF} | ${GREP} "^[^#]" |
+ while read format junk; do
+ ${RM} -f ${TEXMF_VARDIR}/web2c/$format.base
+ ${RM} -f ${TEXMF_VARDIR}/web2c/$format.fmt
+ ${RM} -f ${TEXMF_VARDIR}/web2c/$format.log
+ ${RM} -f ${TEXMF_VARDIR}/web2c/$format.mem
+ done
+
+ # Remove engines generated by texlinks. This is related to the
+ # install_link() function in texlinks.
+ #
+ ${TEST} -z "${FMTUTIL_CNF}" ||
+ ${CAT} ${FMTUTIL_CNF} | ${GREP} "^[^#]" |
+ while read format engine junk; do
+ case "$format" in
+ cont-??|metafun|mptopdf)
+ ;;
+ *)
+ ${TEST} "$format" = "$engine" ||
+ ${RM} -f ${PKG_PREFIX}/bin/$format
+ ;;
+ esac
+ done
+
+ # Remove font map files generated by updmap-sys. The list of
+ # files is taken from the updmap man page and matches the
+ # "output files" for updmap.
+ #
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvipdfm/updmap/dvipdfm.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvipdfm/updmap/dvipdfm_dl14.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvipdfm/updmap/dvipdfm_ndl14.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvips/updmap/builtin35.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvips/updmap/download35.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvips/updmap/ps2pk.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvips/updmap/psfonts.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvips/updmap/psfonts_pk.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/dvips/updmap/psfonts_t1.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/pdftex/updmap/pdftex.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/pdftex/updmap/pdftex_dl14.map
+ ${RM} -f ${TEXMF_VARDIR}/fonts/map/pdftex/updmap/pdftex_ndl14.map
+ ${RM} -f ${TEXMF_VARDIR}/web2c/updmap.log
+
+ # Remove stray directores.
+ for dir in \
+ ${TEXMF_VARDIR}/web2c \
+ ${TEXMF_VARDIR}/fonts/map/dvipdfm/updmap \
+ ${TEXMF_VARDIR}/fonts/map/dvips/updmap \
+ ${TEXMF_VARDIR}/fonts/map/pdftex/updmap
+ do
+ ${RMDIR} -p "$dir" 2>/dev/null || ${TRUE}
+ done
+ ;;
+
+*)
+ ${ECHO} "Usage: ./+TETEX ADD|REMOVE [metadatadir]"
+ ;;
+esac
+exit $exitcode
+EOF
+ ${CHMOD} +x ./+TETEX
+ ;;
+esac
diff -r 4ba48440fc0b -r bab63d8756cf print/teTeX3-bin/Makefile
--- a/print/teTeX3-bin/Makefile Wed Apr 05 15:50:27 2006 +0000
+++ b/print/teTeX3-bin/Makefile Wed Apr 05 16:04:01 2006 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2006/02/05 23:10:39 joerg Exp $
+# $NetBSD: Makefile,v 1.15 2006/04/05 16:04:01 jlam Exp $
DISTNAME= tetex-src-3.0
PKGNAME= ${DISTNAME:C/tetex/teTeX/:C/src/bin/}
-PKGREVISION= 7
+PKGREVISION= 8
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_TEX_CTAN:=systems/unix/teTeX/3.0/distrib/}
@@ -10,15 +10,15 @@
HOMEPAGE= http://www.tug.org/tetex/
COMMENT= TeX distribution for UNIX compatible systems - binaries
-BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
DEPENDS+= teTeX-texmf>=3.0:../../print/teTeX3-texmf
DEPENDS+= dialog>=0.6z:../../misc/dialog
# games/omega previously installed an omega executable too
CONFLICTS+= omega<0.90.4nb1
-INFO_FILES= latex.info dvips.info web2c.info kpathsea.info
+INFO_FILES= # PLIST
+USE_TOOLS+= bison
REPLACE_PERL= texk/xdvik/t1mapper \
texk/oxdvik/t1mapper
@@ -33,8 +33,13 @@
TEXCONFIG= ${SETENV} TEXMFCONFIG=${PREFIX}/share/texmf \
${PREFIX}/bin/texconfig
+CONF_FILES+= ${PREFIX}/share/texmf/web2c/fmtutil.cnf.dist \
+ ${PREFIX}/share/texmf/web2c/fmtutil.cnf
+CONF_FILES+= ${PREFIX}/share/texmf/web2c/texmf.cnf.dist \
+ ${PREFIX}/share/texmf/web2c/texmf.cnf
+OWN_DIRS+= ${PREFIX}/share/texmf-var
+
post-install:
- @${RM} -f ${PREFIX}/share/texmf/web2c/*.log
.if defined(PAPERSIZE)
${TEXCONFIG} dvips paper ${LOWER_PAPERSIZE}
. if ${PAPERSIZE} == "Letter"
diff -r 4ba48440fc0b -r bab63d8756cf print/teTeX3-bin/Makefile.common
--- a/print/teTeX3-bin/Makefile.common Wed Apr 05 15:50:27 2006 +0000
+++ b/print/teTeX3-bin/Makefile.common Wed Apr 05 16:04:01 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.6 2005/12/29 06:22:08 jlam Exp $
+# $NetBSD: Makefile.common,v 1.7 2006/04/05 16:04:01 jlam Exp $
TETEX_BIN_VERS= 3.0
DIST_SUBDIR= teTeX
@@ -48,8 +48,9 @@
INSTALL_DATA=${INSTALL_DATA:Q}
TEXFONTSDIR= ${VARBASE}/spool/texfonts
-OWN_DIRS= ${TEXFONTSDIR}
-OWN_DIRS_PERMS= ${TEXFONTSDIR}/pk ${ROOT_USER} ${ROOT_GROUP} 1777
+FILES_SUBST+= TEXFONTSDIR=${TEXFONTSDIR}
+OWN_DIRS+= ${TEXFONTSDIR}
+OWN_DIRS_PERMS+= ${TEXFONTSDIR}/pk ${ROOT_USER} ${ROOT_GROUP} 1777
OWN_DIRS_PERMS+= ${TEXFONTSDIR}/source ${ROOT_USER} ${ROOT_GROUP} 1777
OWN_DIRS_PERMS+= ${TEXFONTSDIR}/tfm ${ROOT_USER} ${ROOT_GROUP} 1777
diff -r 4ba48440fc0b -r bab63d8756cf print/teTeX3-bin/PLIST
--- a/print/teTeX3-bin/PLIST Wed Apr 05 15:50:27 2006 +0000
+++ b/print/teTeX3-bin/PLIST Wed Apr 05 16:04:01 2006 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2005/11/15 07:00:08 minskim Exp $
+@comment $NetBSD: PLIST,v 1.4 2006/04/05 16:04:01 jlam Exp $
bin/a2ping
bin/afm2tfm
bin/aleph
@@ -29,7 +29,6 @@
bin/e2pall
bin/ebb
bin/epstopdf
-bin/etex
bin/fdf2tan
bin/fdf2tex
bin/fmtutil
@@ -47,9 +46,6 @@
bin/kpsewhere
bin/kpsewhich
bin/kpsexpand
-bin/lambda
-bin/lamed
-bin/latex
bin/mag
bin/makeindex
bin/makempx
@@ -85,8 +81,6 @@
bin/patgen
bin/pdfcrop
bin/pdfetex
-bin/pdflatex
-bin/pdftex
bin/pdfxtex
bin/pfb2pfa
bin/pk2bm
@@ -177,6 +171,10 @@
include/kpathsea/variable.h
include/kpathsea/xopendir.h
include/kpathsea/xstat.h
+info/latex.info
+info/dvips.info
+info/web2c.info
+info/kpathsea.info
lib/libkpathsea.la
man/man1/afm2tfm.1
man/man1/allcm.1
@@ -297,49 +295,6 @@
man/man1/xdvi.1
man/man1/xdvizilla.1
man/man5/fmtutil.cnf.5
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvipdfm/updmap/dvipdfm.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvipdfm/updmap/dvipdfm_dl14.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvipdfm/updmap/dvipdfm_ndl14.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvips/updmap/builtin35.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvips/updmap/download35.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvips/updmap/ps2pk.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvips/updmap/psfonts.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvips/updmap/psfonts_pk.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/dvips/updmap/psfonts_t1.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map
-@unexec ${RM} -f %D/share/texmf-var/fonts/map/pdftex/updmap/pdftex_ndl14.map
-share/texmf-var/web2c/aleph.fmt
-share/texmf-var/web2c/aleph.log
-share/texmf-var/web2c/cont-en.fmt
-share/texmf-var/web2c/cont-en.log
-share/texmf-var/web2c/etex.fmt
-share/texmf-var/web2c/etex.log
-share/texmf-var/web2c/lambda.fmt
-share/texmf-var/web2c/lambda.log
-share/texmf-var/web2c/lamed.fmt
-share/texmf-var/web2c/lamed.log
Home |
Main Index |
Thread Index |
Old Index