This cleans up a bit things in texlive_base port, mostly adjusting
shebangs. I also fixed a few shell scripts; for example, calling
variable for storing own temporary directory "TMPDIR" is a bad idea.
The result is that many binaries installed in ${PREFIX}/bin are not
broken anymore, e.g.: epstopdf, epspdftk...Comments are welcome. This requires ruby.port.mk shebang patch I've sent earlier: http://marc.info/?l=openbsd-ports&m=136429056003729&w=2 -- WBR, Vadim Zhukov Index: Makefile =================================================================== RCS file: /cvs/ports/print/texlive/base/Makefile,v retrieving revision 1.64 diff -u -p -r1.64 Makefile --- Makefile 11 Mar 2013 11:37:54 -0000 1.64 +++ Makefile 26 Mar 2013 09:58:44 -0000 @@ -4,6 +4,7 @@ COMMENT = base binaries for TeXLive typ DISTNAME = texlive-${DIST_V}-source PKGNAME = texlive_base-${V} +REVISION = 0 DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \ texlive-${DIST_V}-extra${EXTRACT_SUFX} @@ -34,13 +35,62 @@ LIB_DEPENDS = devel/t1lib \ MODULES = textproc/intltool converters/libiconv # These following two modules are just for variable substitution in patches # They are not real dependencies of _base, but of _texmf-full -MODULES += lang/ruby lang/python +MODULES += lang/ruby lang/python lang/tcl MODRUBY_BUILDDEP = No MODRUBY_RUNDEP = No MODPY_BUILDDEP = No MODPY_RUNDEP = No SUBST_VARS += MODRUBY_BINREV MODPY_VERSION +MODPY_ADJ_FILES = texk/texlive/linked_scripts/de-macro/de-macro \ + texk/texlive/linked_scripts/dviasm/dviasm.py \ + texk/texlive/linked_scripts/ebong/ebong.py \ + texk/texlive/linked_scripts/texliveonfly/texliveonfly.py + +MODRUBY_ADJ_FILES = convbkmk.rb \ + epstopdf.rb \ + match_parens + +PERL_ADJ_SCRIPTS = authorindex/authorindex \ + bundledoc/arlatex \ + bundledoc/bundledoc \ + ctanify/ctanify \ + dosepsbin/dosepsbin.pl \ + epstopdf/epstopdf.pl \ + fig4latex/fig4latex \ + fontools/afm2afm \ + fontools/autoinst \ + fontools/ot2kpx \ + glossaries/makeglossaries \ + jfontmaps/updmap-setup-kanji.pl \ + latex2man/latex2man \ + latexmk/latexmk.pl \ + mkgrkindex/mkgrkindex \ + mkjobtexmf/mkjobtexmf.pl \ + oberdiek/pdfatfi.pl \ + pax/pdfannotextractor.pl \ + pdfcrop/pdfcrop.pl \ + pedigree-perl/pedigree.pl \ + perltex/perltex.pl \ + pkfix-helper/pkfix-helper \ + purifyeps/purifyeps \ + sty2dtx/sty2dtx.pl \ + tetex/e2pall.pl \ + tetex/texdoctk.pl \ + texcount/texcount.pl \ + texdef/texdef.pl \ + texdiff/texdiff \ + texlive/tlmgr.pl \ + texloganalyser/texloganalyser + +TEXLUA_ADJ_SCRIPTS = checkcites/checkcites.lua \ + cachepic/cachepic.tlu \ + luaotfload/mkluatexfontdb.lua \ + musixtex/musixflx.lua \ + musixtex/musixflx.lua \ + texdoc/texdoc.tlu \ + texlive/rungs.tlu + # Never set SEPARATE_BUILD CONFIGURE_STYLE = gnu @@ -131,6 +181,15 @@ SUBST_VARS += TRUEPREFIX LOCALBASE # substitute ruby and python binary names pre-configure: + ${MODTCL_WISH_ADJ} ${WRKSRC}/texk/texlive/linked_scripts/epspdf/epspdftk.tcl + cd ${WRKSRC}/texk/texlive/linked_scripts && \ + for F in ${TEXLUA_ADJ_SCRIPTS}; do \ + perl -pi -e '($$. == 1) && s@^.*$$@#!${PREFIX}/bin/texlua@' $$F; \ + done + cd ${WRKSRC}/texk/texlive/linked_scripts && \ + for F in ${PERL_ADJ_SCRIPTS}; do \ + perl -pi -e '($$. == 1) && s@^.*$$@#!/usr/bin/perl@' $$F; \ + done ${SUBST_CMD} ${WRKSRC}/texk/texlive/context/mtxrun # just to silence error - never used Index: patches/patch-texk_texlive_linked_scripts_bibexport_bibexport_sh =================================================================== RCS file: patches/patch-texk_texlive_linked_scripts_bibexport_bibexport_sh diff -N patches/patch-texk_texlive_linked_scripts_bibexport_bibexport_sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-texk_texlive_linked_scripts_bibexport_bibexport_sh 26 Mar 2013 09:58:44 -0000 @@ -0,0 +1,18 @@ +$OpenBSD$ +--- texk/texlive/linked_scripts/bibexport/bibexport.sh.origy Tue Mar 26 12:40:50 2013 ++++ texk/texlive/linked_scripts/bibexport/bibexport.sh Tue Mar 26 12:42:29 2013 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + ## + ## This is file `bibexport.sh', + ## generated with the docstrip utility. +@@ -256,7 +256,7 @@ FINALFILE=${OUTPUT}; + if [ ! "${FINALFILE}" ]; then + FINALFILE="bibexport.bib"; + fi +-TMPFILE="bibexp.`date +%s`"; ++TMPFILE="`mktemp bibexp.XXXXXXXX`"; + if [ -z "${EXT}" ]; then ## we export all entries + if [ -z "${EXTRA}" ]; then ## we have no extra files + cat > ${TMPFILE}.aux <<EOF Index: patches/patch-texk_texlive_linked_scripts_installfont_installfont-tl =================================================================== RCS file: patches/patch-texk_texlive_linked_scripts_installfont_installfont-tl diff -N patches/patch-texk_texlive_linked_scripts_installfont_installfont-tl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-texk_texlive_linked_scripts_installfont_installfont-tl 26 Mar 2013 09:58:44 -0000 @@ -0,0 +1,25 @@ +$OpenBSD$ +--- texk/texlive/linked_scripts/installfont/installfont-tl.origy Tue Mar 26 12:44:36 2013 ++++ texk/texlive/linked_scripts/installfont/installfont-tl Tue Mar 26 12:45:10 2013 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/ksh + # + # installfont-tl [options] + # +@@ -85,7 +85,7 @@ then + echo -e "`basename $0`: Could not find command line arguments.\nUse the '--help' option for explanation." + echo -e "Continue with default script variables? (y/n)" + read ANSWER +- if [ $ANSWER = "n" -o $ANSWER = "N" ] ++ if [ X"$ANSWER" = "Xn" -o X"$ANSWER" = "XN" ] + then + exit 1 + fi +@@ -582,4 +582,4 @@ then + rmdir ./Backup + fi + echo -e "\n\nThe font(s) should be installed now!" +-exit 0 +\ No newline at end of file ++exit 0 Index: patches/patch-texk_texlive_linked_scripts_latexfileversion_latexfileversion =================================================================== RCS file: patches/patch-texk_texlive_linked_scripts_latexfileversion_latexfileversion diff -N patches/patch-texk_texlive_linked_scripts_latexfileversion_latexfileversion --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-texk_texlive_linked_scripts_latexfileversion_latexfileversion 26 Mar 2013 09:58:44 -0000 @@ -0,0 +1,46 @@ +$OpenBSD$ +--- texk/texlive/linked_scripts/latexfileversion/latexfileversion.origy Tue Mar 26 12:55:21 2013 ++++ texk/texlive/linked_scripts/latexfileversion/latexfileversion Tue Mar 26 12:57:55 2013 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env bash ++#!/bin/sh + ## latexfileversion + ## + ## This simple shell script prints the version and date of a LaTeX class or +@@ -41,8 +41,8 @@ then + fi + + # make temporary directory +-TMPDIR=`mktemp -d /tmp/latexfileversion.XXXXXX` || exit 1 +-cd $TMPDIR ++MYTMPDIR="`mktemp -dt latexfileversion.XXXXXX`" || exit 1 ++cd $MYTMPDIR + + # extract basenames for extensions .cls and .sty + FILE=$1 +@@ -50,7 +50,7 @@ STYLE=${1%%.sty} + CLASS=${1%%.cls} + + # handle .cls files and .sty files seperately +-if [ "$CLASS.cls" == "$FILE" ] ++if [ X"$CLASS.cls" = X"$FILE" ] + then + echo -n "Looking for class file '$CLASS.cls': " + # generate temporary LaTeX file +@@ -75,7 +75,7 @@ cat << EOM + EOM + ) > latexfileversion.tex + else +- if [ "$STYLE.sty" == "$FILE" ] ++ if [ X"$STYLE.sty" = X"$FILE" ] + then + echo -n "Looking for style file '$STYLE.sty': " + # generate temporary LaTeX file +@@ -113,6 +113,6 @@ pdflatex -interaction=nonstopmode latexfileversion.tex + grep -e '^VERSION' latexfileversion.log | sed 's/VERSION //' + + # delete temporary directory +-rm -rf $TMPDIR ++rm -rf $MYTMPDIR + + #EOF Index: patches/patch-texk_texlive_linked_scripts_typeoutfileinfo_typeoutfileinfo_sh =================================================================== RCS file: patches/patch-texk_texlive_linked_scripts_typeoutfileinfo_typeoutfileinfo_sh diff -N patches/patch-texk_texlive_linked_scripts_typeoutfileinfo_typeoutfileinfo_sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-texk_texlive_linked_scripts_typeoutfileinfo_typeoutfileinfo_sh 26 Mar 2013 09:58:44 -0000 @@ -0,0 +1,9 @@ +$OpenBSD$ +--- texk/texlive/linked_scripts/typeoutfileinfo/typeoutfileinfo.sh.origy Tue Mar 26 13:03:00 2013 ++++ texk/texlive/linked_scripts/typeoutfileinfo/typeoutfileinfo.sh Tue Mar 26 13:03:08 2013 +@@ -1,4 +1,4 @@ +-%!/usr/bin/env bash ++#!/bin/sh + ## + ## This is `typeoutfileinfo.sh', a minimalist shell script for Unices. + ## Index: pkg/README =================================================================== RCS file: /cvs/ports/print/texlive/base/pkg/README,v retrieving revision 1.8 diff -u -p -r1.8 README --- pkg/README 7 Aug 2012 15:15:09 -0000 1.8 +++ pkg/README 26 Mar 2013 09:58:44 -0000 @@ -86,6 +86,10 @@ As far as I know: * TeX Works is editors/texworks * latex-mk is print/latex-mk * textproc/py-pygments is required for the minted package. + * converters/unix2dos is needed for installfont-tl script + * lang/tcl/${MODTCL_VERSION} is needed for epspdftk + * lang/ruby/${MODRUBY_LIBREV:R} is needed for convbkmk, epstopdf, and + other stuff. If you know more, please mail the package maintainer: <[email protected]>
