blob: d8894bb7dd0432a36b9d69175a00740fb309e6d3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Created by: Sergei Kolobov <sergei@kolobov.com>
# $FreeBSD$
PORTNAME= xmlto
PORTVERSION= 0.0.26
PORTREVISION= 2
CATEGORIES= textproc
MASTER_SITES= https://fedorahosted.org/releases/x/m/xmlto/:xmlto \
LOCAL/mandree/:xmlto \
http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/:xsl \
LOCAL/mandree/:xsl
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:xmlto \
xhtml2fo.xsl:xsl
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= mandree@FreeBSD.org
COMMENT= Front-end to an XSL toolchain
LICENSE= GPLv2
BUILD_DEPENDS= ${BASH_CMD}:${PORTSDIR}/shells/bash \
${GETOPT_CMD}:${PORTSDIR}/misc/getopt \
xmllint:${PORTSDIR}/textproc/libxml2 \
xsltproc:${PORTSDIR}/textproc/libxslt \
docbook-xsl>0:${PORTSDIR}/textproc/docbook-xsl \
paperconf:${PORTSDIR}/print/libpaper \
w3m:${PORTSDIR}/www/w3m \
docbook-xml>0:${PORTSDIR}/textproc/docbook-xml
RUN_DEPENDS:= ${BUILD_DEPENDS}
SUB_FILES= pkg-message
OPTIONS_DEFINE= DOCS
OPTIONS_GROUP= BACKEND
OPTIONS_GROUP_BACKEND= DBLATEX FOP PASSIVETEX
BACKEND_DESC= Postprocessor backends to enable
DBLATEX_DESC= Add dependency on DBlatex (DB for DocBook)
FOP_DESC= Add dependency on FOP (requires Java)
PASSIVETEX_DESC= Add dependency on XMLTeX/PassiveTeX
USES= tar:bzip2
GNU_CONFIGURE= yes
CONFIGURE_ARGS= BASH=${BASH_CMD} GETOPT=${GETOPT_CMD} PDFXMLTEX=${PDFXMLTEX_CMD}
MAKE_ENV+= HOME=/dev/null
BASH_CMD= ${LOCALBASE}/bin/bash
GETOPT_CMD= ${LOCALBASE}/bin/getopt
XSL_DIR= ${LOCALBASE}/share/xsl/docbook
PDFXMLTEX_CMD= ${LOCALBASE}/bin/pdftex
PORTDOCS= AUTHORS ChangeLog NEWS THANKS
# these documentation files do not convey information useful for
# the FreeBSD port at this time, or are provided by the ports framework:
# PORTDOCS+= COPYING FAQ README
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MPASSIVETEX}
USE_TEX+= xmltex
.endif
.if ${PORT_OPTIONS:MFOP}
RUN_DEPENDS+= fop>=0.90:${PORTSDIR}/textproc/fop
CONFIGURE_ARGS+= --with-backend=fop
.endif
.if ${PORT_OPTIONS:MDBLATEX}
RUN_DEPENDS+= ${LOCALBASE}/bin/dblatex:${PORTSDIR}/textproc/dblatex
.if ! ${PORT_OPTIONS:MFOP}
CONFIGURE_ARGS+= --with-backend=dblatex
.endif
.endif
post-patch:
@# get rid of nonstandard "type" option -t:
cd ${WRKSRC} && ${FIND} . -type f -exec ${REINPLACE_CMD} -i '' -e 's/type -t/which/;' '{}' '+'
@# get rid of GNU-make-ism (BSD make defines $< only in suffix rules)
${REINPLACE_CMD} -e '/^GEN_MANPAGE/{s/\$$</$$>/;}' ${WRKSRC}/Makefile.in
post-install:
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/xhtml2fo.xsl ${STAGEDIR}${DATADIR}/
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.post.mk>
|