1994-09-29 08:56:20 +00:00
|
|
|
#define this if you want to build LaTeX too
|
1994-12-23 00:45:07 +00:00
|
|
|
MAKE_LATEX= yes
|
1994-09-29 08:56:20 +00:00
|
|
|
|
1994-12-12 12:53:06 +00:00
|
|
|
PKGNAME= tex
|
1994-09-29 08:56:20 +00:00
|
|
|
DISTFILES= web2c.tar.gz web.tar.gz tex_base.tar.gz cm_tfm.tar.gz \
|
|
|
|
mf_lib.tar.gz cm_mf.tar.gz modes.mf
|
|
|
|
|
|
|
|
EXTRACT_ONLY= web2c.tar.gz web.tar.gz tex_base.tar.gz cm_tfm.tar.gz \
|
|
|
|
mf_lib.tar.gz cm_mf.tar.gz
|
|
|
|
|
|
|
|
|
|
|
|
FTPGET= ${WRKDIR}/ftpget
|
1994-10-12 03:00:12 +00:00
|
|
|
CURDIR= ${.CURDIR}
|
1994-09-29 08:56:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
DISTNAME= web2c-6.1
|
|
|
|
|
1994-11-11 22:29:14 +00:00
|
|
|
#other equivalent sites: ftp.shsu.edu ftp.dante.de
|
1994-09-29 08:56:20 +00:00
|
|
|
CTAN= ftp.tex.ac.uk
|
|
|
|
|
|
|
|
|
|
|
|
.if defined (MAKE_LATEX)
|
|
|
|
DISTFILES+= latex_mf.tar.gz latex_tfm.tar.gz latex_base.tar.gz
|
|
|
|
EXTRACT_ONLY+= latex_base.tar.gz latex_mf.tar.gz latex_tfm.tar.gz
|
|
|
|
.endif
|
|
|
|
|
|
|
|
BASES= mf.base cmmf.base
|
|
|
|
FORMATS= tex.fmt
|
|
|
|
|
|
|
|
CFLAGS= -O2
|
|
|
|
|
1994-12-12 12:53:06 +00:00
|
|
|
BUILD_COOKIE= ${WRKDIR}/.build_done
|
|
|
|
|
1994-09-29 08:56:20 +00:00
|
|
|
pre-fetch:
|
|
|
|
@if [ ! -d ${DISTDIR} ]; then mkdir -p ${DISTDIR}; fi
|
|
|
|
@mkdir -p ${WRKDIR}
|
|
|
|
@${SCRIPTDIR}/ftpget magic ${WRKDIR}
|
|
|
|
|
|
|
|
fetch: pre-fetch ${DISTFILES}
|
|
|
|
|
|
|
|
fetch-file:
|
|
|
|
@echo ">> ${file_out} doesn't seem to exist on this system.";
|
|
|
|
@echo ">> Attempting to fetch it from a master site.";
|
|
|
|
@${FTPGET} ${CTAN} ${ftp_dir} ${file_in} ${file_out}
|
|
|
|
@if [ ! -f ${file_out} ]; then \
|
|
|
|
echo ">> Couldn't fetch it - please try to retreive this";\
|
|
|
|
echo ">> port manually into ${DISTDIR} and try again."; \
|
|
|
|
exit 1; \
|
|
|
|
else \
|
|
|
|
echo ">> ${file_out} Fetched!" ; \
|
|
|
|
fi;
|
|
|
|
|
|
|
|
web2c.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/systems/web2c file_in=web2c.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
web.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/systems/web2c file_in=web.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
cm_mf.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/fonts file_in=cm/mf.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
cm_tfm.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/fonts file_in=cm/tfm.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
mf_lib.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/systems/knuth file_in=lib.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
modes.mf:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-11-11 22:29:14 +00:00
|
|
|
ftp_dir=/tex-archive/fonts/modes file_in=modes.mf file_out=$@; \
|
1994-09-29 08:56:20 +00:00
|
|
|
fi;)
|
|
|
|
tex_base.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/macros file_in=plain/base.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
latex_base.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/macros file_in=latex/base.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
latex_mf.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/fonts file_in=latex/mf.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
latex_tfm.tar.gz:
|
|
|
|
@(cd ${DISTDIR}; if [ ! -f $@ ]; then \
|
1994-10-12 03:00:12 +00:00
|
|
|
make -f ${CURDIR}/Makefile fetch-file FTPGET=${FTPGET} \
|
1994-09-29 08:56:20 +00:00
|
|
|
ftp_dir=/tex-archive/fonts file_in=latex/tfm.tar.gz file_out=$@; \
|
|
|
|
fi;)
|
|
|
|
|
1994-12-12 12:53:06 +00:00
|
|
|
build: ${BUILD_COOKIE}
|
1994-09-29 08:56:20 +00:00
|
|
|
|
1994-12-12 12:53:06 +00:00
|
|
|
${BUILD_COOKIE}:
|
1994-09-29 08:56:20 +00:00
|
|
|
@echo "===> Building for ${DISTNAME}"
|
|
|
|
@(cd ${WRKSRC}/web2c; make triptrap)
|
|
|
|
@(cd ${WRKSRC}/web2c; make run-triptrap)
|
|
|
|
@(cd ${WRKSRC}/web2c; make clean-triptrap)
|
1994-10-12 03:00:12 +00:00
|
|
|
|
1994-09-29 08:56:20 +00:00
|
|
|
@(cd ${WRKSRC}; make CFLAGS="${CFLAGS}" programs)
|
|
|
|
@(cd ${WRKSRC}; MFINPUTS=${WRKDIR}/mf; export MFINPUTS;\
|
|
|
|
make bases="${BASES}" bases)
|
|
|
|
.if defined (MAKE_LATEX)
|
|
|
|
@(cd ${WRKDIR}/latex/base; TEXPOOL=${WRKSRC}/web2c/tex; export TEXPOOL; \
|
|
|
|
${WRKSRC}/web2c/tex/initex unpack.ins)
|
1994-10-12 03:00:12 +00:00
|
|
|
@(cd ${WRKDIR}/latex/base; TEXFONTS=${WRKDIR}/cm/tfm:${WRKDIR}/latex/tfm; \
|
|
|
|
export TEXFONTS; TEXINPUTS=${WRKDIR}/lib:.; export TEXINPUTS; \
|
|
|
|
TEXPOOL=${WRKSRC}/web2c/tex; export TEXPOOL;\
|
1994-09-29 08:56:20 +00:00
|
|
|
${WRKSRC}/web2c/tex/initex latex.ltx)
|
|
|
|
.endif
|
|
|
|
@(cd ${WRKSRC}/web2c; TEXINPUTS=${WRKDIR}/lib:${WRKSRC}; export TEXINPUTS;\
|
|
|
|
TEXFONTS=${WRKDIR}/cm/tfm:${WRKDIR}/latex/tfm; export TEXFONTS; \
|
|
|
|
make fmts="${FORMATS}" fmts)
|
1994-12-12 12:53:06 +00:00
|
|
|
@touch -f ${BUILD_COOKIE}
|
1994-09-29 08:56:20 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
@echo "===> Installing for ${DISTNAME}"
|
|
|
|
@(cd ${WRKSRC}/web2c; make install-exec INSTALL_PROGRAM="/usr/bin/install -c -s")
|
|
|
|
.if defined(MAKE_LATEX)
|
|
|
|
@(/usr/bin/install -c -m 644 ${WRKDIR}/latex/base/latex.fmt \
|
|
|
|
${PREFIX}/lib/texmf/ini/)
|
|
|
|
.endif
|
|
|
|
@(cd ${WRKSRC}/web2c; make install-manpages)
|
|
|
|
@(cd ${WRKSRC}/web2c; make install-data bases="${BASES}" fmts="${FORMATS}")
|
|
|
|
@mkdir -p ${PREFIX}/lib/texmf/fonts/tfm
|
|
|
|
@(cd ${WRKDIR}/cm/tfm; install -c -m 644 *.tfm ${PREFIX}/lib/texmf/fonts/tfm)
|
|
|
|
.if defined(MAKE_LATEX)
|
|
|
|
@(cd ${WRKDIR}/latex/tfm; install -c -m 644 *.tfm ${PREFIX}/lib/texmf/fonts/tfm)
|
|
|
|
.endif
|
|
|
|
@mkdir -p ${PREFIX}/lib/texmf/mf
|
|
|
|
@(cd ${WRKDIR}/mf; install -c -m 644 *.mf ${PREFIX}/lib/texmf/mf)
|
|
|
|
@mkdir -p ${PREFIX}/lib/texmf/tex
|
|
|
|
@(cd ${WRKDIR}/lib; install -c -m 644 *.tex ${PREFIX}/lib/texmf/tex)
|
|
|
|
@(cd ${WRKDIR}/plain/base; install -c -m 644 *.tex ${PREFIX}/lib/texmf/tex)
|
|
|
|
.if defined(MAKE_LATEX)
|
1994-12-23 00:45:07 +00:00
|
|
|
@(cd ${WRKDIR}/latex/base; for f in latexbug.tex testpage.tex \
|
1994-09-29 08:56:20 +00:00
|
|
|
lablst.tex idx.tex nfssfont.tex small2e.tex sample2e.tex docstrip.tex \
|
1994-10-12 03:00:12 +00:00
|
|
|
*.cls *.clo *.sty *.fd *.def *.cfg ; do \
|
1994-12-23 00:45:07 +00:00
|
|
|
if [ -f $${f} ]; then install -c -m 644 $${f} ${PREFIX}/lib/texmf/tex; fi; done)
|
|
|
|
@(cd ${WRKDIR}/latex/base; for f in *.ist ; do \
|
|
|
|
install -c -m 644 $${f} ${PREFIX}/lib/makeindex ; done)
|
1994-09-29 08:56:20 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|