diff options
author | joerg <joerg> | 2006-10-12 13:38:35 +0000 |
---|---|---|
committer | joerg <joerg> | 2006-10-12 13:38:35 +0000 |
commit | 0d3339bdd1d1e2c7b0b1510a9de41d3038d23862 (patch) | |
tree | e5dd77f50ac43c66ea0b9b1566d5d1f55f6a294c /print | |
parent | 32c36ec6da678bf44be8dc69cec74b6694f2b9ac (diff) | |
download | pkgsrc-0d3339bdd1d1e2c7b0b1510a9de41d3038d23862.tar.gz |
Don't build hugelatex configuration at do-install time, but in the
INSTALL script. Use magic markers and remove the texmf.cnf fragment
at DEINSTALL time. This fixes the deinstallation when other packages
modify it and are installed afterwards, but removed out-of-order.
Bump revision.
Addresses PR 32376 and PR 34003 (the latter indirectly from myself).
Diffstat (limited to 'print')
-rw-r--r-- | print/tex-hugelatex/DEINSTALL | 16 | ||||
-rw-r--r-- | print/tex-hugelatex/INSTALL | 29 | ||||
-rw-r--r-- | print/tex-hugelatex/Makefile | 20 | ||||
-rw-r--r-- | print/tex-hugelatex/PLIST | 7 | ||||
-rw-r--r-- | print/tex-hugelatex/files/texmf.cnf-add | 15 |
5 files changed, 53 insertions, 34 deletions
diff --git a/print/tex-hugelatex/DEINSTALL b/print/tex-hugelatex/DEINSTALL new file mode 100644 index 00000000000..bde3b0d3f5d --- /dev/null +++ b/print/tex-hugelatex/DEINSTALL @@ -0,0 +1,16 @@ +# $NetBSD: DEINSTALL,v 1.1 2006/10/12 13:38:35 joerg Exp $ + +TEXMF_CNF=@PKG_TEXMFPREFIX@/web2c/texmf.cnf + +case ${STAGE} in +DEINSTALL) + ${AWK} '\ +BEGIN { do_print=1; } \ +/^%%% BEGIN hugelatex$/ { do_print=0; } \ +{ if (do_print) print $0; } \ +/^%%% END hugelatex$/ { do_print=1; }' ${TEXMF_CNF} > ${TEXMF_CNF}.tmp && + ${MV} ${TEXMF_CNF}.tmp ${TEXMF_CNF} + ${RM} @PKG_TEXMFPREFIX@/web2c/hugelatex.fmt + ${RM} @PKG_TEXMFPREFIX@/web2c/hugelatex.log + ;; +esac diff --git a/print/tex-hugelatex/INSTALL b/print/tex-hugelatex/INSTALL new file mode 100644 index 00000000000..186cc7d387e --- /dev/null +++ b/print/tex-hugelatex/INSTALL @@ -0,0 +1,29 @@ +# $NetBSD: INSTALL,v 1.1 2006/10/12 13:38:35 joerg Exp $ + +case ${STAGE} in +POST-INSTALL) + ${CAT} >> @PKG_TEXMFPREFIX@/web2c/texmf.cnf <<EOF +%%% BEGIN hugelatex +% added by hugelatex package +main_memory.hugelatex = 1100000 +param_size.hugelatex = 1500 +stack_size.hugelatex = 1500 +hash_extra.hugelatex = 15000 +string_vacancies.hugelatex = 45000 +pool_free.hugelatex = 47500 +nest_size.hugelatex = 500 +save_size.hugelatex = 5000 +pool_size.hugelatex = 500000 +max_strings.hugelatex = 55000 +font_mem_size.hugelatex= 400000 +%%% END hugelatex +EOF + cd @PKG_TEXMFPREFIX@/web2c + ${MV} latex.fmt latex.fmt.BAK || ${TRUE} + ${ECHO} "" | ${PREFIX}/bin/latex -ini -fmt=hugelatex -progname=hugelatex latex.ini || ${TRUE} + ${MV} latex.fmt hugelatex.fmt + ${MV} latex.log hugelatex.log + ${MV} latex.fmt.BAK latex.fmt || ${TRUE} + ${RM} -f texsys.aux + ;; +esac diff --git a/print/tex-hugelatex/Makefile b/print/tex-hugelatex/Makefile index dea2844cc48..451ea11c4da 100644 --- a/print/tex-hugelatex/Makefile +++ b/print/tex-hugelatex/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.19 2006/07/27 00:09:06 hubertf Exp $ +# $NetBSD: Makefile,v 1.20 2006/10/12 13:38:35 joerg Exp $ # DISTNAME= hugelatex-2.0 PKGNAME= tex-${DISTNAME} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= print MASTER_SITES= # none DISTFILES= # nada @@ -16,21 +16,15 @@ EXTRACT_ONLY= # nothing NO_CHECKSUM= yes NO_BUILD= yes -TEXMF_CNF= ${PKG_TEXMFPREFIX}/web2c/texmf.cnf +FILES_SUBST+= PKG_TEXMFPREFIX=${PKG_TEXMFPREFIX:Q} + +CHECK_FILES_SKIP+= ${PKG_TEXMFPREFIX}/web2c/hugelatex.fmt +CHECK_FILES_SKIP+= ${PKG_TEXMFPREFIX}/web2c/hugelatex.log + .include "../../print/teTeX/module.mk" do-install: - ${CP} -p ${TEXMF_CNF} ${TEXMF_CNF}-before-hugelatex - ${CAT} ${FILESDIR}/texmf.cnf-add >>${TEXMF_CNF} - cd `dirname ${TEXMF_CNF}`; \ - ${MV} latex.fmt latex.fmt.BAK || ${TRUE} ; \ - ${ECHO} "" | ${PREFIX}/bin/latex -ini -fmt=hugelatex -progname=hugelatex latex.ini || ${TRUE}; \ - ${MV} latex.fmt hugelatex.fmt ; \ - ${MV} latex.log hugelatex.log ; \ - ${MV} latex.fmt.BAK latex.fmt || ${TRUE} ; \ - ${RM} -f texsys.aux - ${RM} -f ${PREFIX}/bin/hugelatex ${LN} -s latex ${PREFIX}/bin/hugelatex .include "../../mk/bsd.pkg.mk" diff --git a/print/tex-hugelatex/PLIST b/print/tex-hugelatex/PLIST index 65adb1b5973..a52efa1f036 100644 --- a/print/tex-hugelatex/PLIST +++ b/print/tex-hugelatex/PLIST @@ -1,7 +1,2 @@ -@comment $NetBSD: PLIST,v 1.4 2005/11/13 05:30:11 minskim Exp $ +@comment $NetBSD: PLIST,v 1.5 2006/10/12 13:38:35 joerg Exp $ bin/hugelatex -${PKG_TEXMFPREFIX}/web2c/hugelatex.fmt -${PKG_TEXMFPREFIX}/web2c/hugelatex.log -@exec cp %D/${PKG_TEXMFPREFIX}/web2c/texmf.cnf %D/${PKG_TEXMFPREFIX}/web2c/texmf.cnf-before-hugelatex -${PKG_TEXMFPREFIX}/web2c/texmf.cnf -@unexec mv %D/${PKG_TEXMFPREFIX}/web2c/texmf.cnf-before-hugelatex %D/${PKG_TEXMFPREFIX}/web2c/texmf.cnf diff --git a/print/tex-hugelatex/files/texmf.cnf-add b/print/tex-hugelatex/files/texmf.cnf-add deleted file mode 100644 index a9dad313e52..00000000000 --- a/print/tex-hugelatex/files/texmf.cnf-add +++ /dev/null @@ -1,15 +0,0 @@ - -% hugelatex settings -% added by hugelatex package -main_memory.hugelatex = 1100000 -param_size.hugelatex = 1500 -stack_size.hugelatex = 1500 -hash_extra.hugelatex = 15000 -string_vacancies.hugelatex = 45000 -pool_free.hugelatex = 47500 -nest_size.hugelatex = 500 -save_size.hugelatex = 5000 -pool_size.hugelatex = 500000 -max_strings.hugelatex = 55000 -font_mem_size.hugelatex= 400000 - |