freebsd-ports/textproc/dblatex/Makefile

40 lines
1 KiB
Makefile
Raw Normal View History

# Created by: Peter Johnson <johnson.peter@gmail.com>
# $FreeBSD$
PORTNAME= dblatex
PORTVERSION= 0.3.9
CATEGORIES= textproc
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= DocBook to LaTeX/ConTeXt Publishing
LICENSE= GPLv2+
BUILD_DEPENDS= ${LOCALBASE}/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty:print/texlive-texmf
RUN_DEPENDS= xsltproc:textproc/libxslt \
docbook-xml>0:textproc/docbook-xml
USES= tar:bzip2 python:2
USE_PYTHON= distutils autoplist
Make print/tex-dvipsk a runtime dependency. Two reasons for this: 1. Document builds can fail without it even when using pdftex. From dblatex -d -D: Build uwm-pc-user-guide.pdf pdflatex failed Unexpected error occured Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/dbtexmf/core/dbtex.py", line 332, in compile donefiles = self._compile() File "/usr/local/lib/python2.7/site-packages/dbtexmf/core/dbtex.py", line 400, in _compile self.make_bin() File "/usr/local/lib/python2.7/site-packages/dbtexmf/core/dbtex.py", line 317, in make_bin batch=self.texbatch) File "/usr/local/lib/python2.7/site-packages/dbtexmf/dblatex/runtex.py", line 113, in compile self.texer.compile(texfile) File "/usr/local/lib/python2.7/site-packages/dbtexmf/dblatex/grubber/texbuilder.py", line 73, in compile raise OSError("%s compilation failed" % self.tex.program) OSError: pdflatex compilation failed /tmp/tmpe0bJK0 not removed From tail -n 11 /tmp/tmpe0bJK0/uwm-pc-user-guide.log: Here is how much of TeX's memory you used: 22571 strings out of 493117 331796 string characters out of 6138550 659827 words of memory out of 5000000 19593 multiletter control sequences out of 15000+600000 89643 words of font info for 150 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 48i,21n,51p,484b,2429s stack positions out of 5000i,2500n,10000p,300000b,80000s !pdfTeX error: pdflatex (file 8r.enc): cannot open encoding file for reading ==> Fatal error occurred, no output PDF file produced! 2. dvips is a valid backend to specify with dblatex -b. PR: 201592 Submitted by: Jason Bacon <bacon4000@gmail.com> MFH: 2016Q1
2016-03-04 11:54:06 +01:00
USE_TEX= dvipsk:run tex
NO_ARCH= yes
PYDISTUTILS_INSTALLARGS+= --catalogs=${LOCALBASE}/share/xml/catalog.ports \
--prefix=${PREFIX}
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e "s,share/man/man1,man/man1,g" ${WRKSRC}/setup.py
post-patch-DOCS-off:
@${REINPLACE_CMD} -e '/pdfdocs),/d ; /htmldoc)/d' ${WRKSRC}/setup.py
post-install:
# shebangfix can't be used because dblatex is built from scratch
${REINPLACE_CMD} -e 's|/usr/bin/env python|${PREFIX}/bin/python2|' \
${STAGEDIR}${PREFIX}/bin/dblatex
.include <bsd.port.mk>