1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

[PATCH] textproc/xmlto: important fixes, general overhaul, take maintainership

Supersedes: ports/123952 - please close that one, in favour
	of this one.  (Note, if that one should have been committed
	before this one, please bump PORTREVISION to 2!)

	Changes that were already in ports/123952:
	- Fix all scripts that use cp -a to instead use cp -PpR,
	fixing output formats such as html, html-nochunks and others.
	- Take maintainership of port.

	Additional changes since ports/123952, a.k.a. "overhaul":
	- Drop non-functional passivetex autodetection
	- Make WITH_PASSIVETEX an official OPTION (default: OFF, as previously)
	- Add COPYING ChangeLog THANKS to PORTDOCS
	- Use PORTDOCS instead of pkg-plist
	- Properly depend on print/passivetex (so the build system doesn't get away
	with just TeX installed but PassiveTeX missing)
	- Fix bug (missing "export USE_BACKEND"), amending to files/patch-xmlto.in,
	reported, with fix, by Ondrej Vasik; the bug rendered "xmlto txt ..." unusable
	- Complete pkg-plist for WITH_PASSIVETEX case, it missed some files;
	thus fixing packages.
	- Mention Ondrej Vasik, current xmlto maintainer, in pkg-descr.

	Dropped from ports/123952 (i. e. deliberately omitted from this PR,
	and not part of 0.0.20):
	- Move files/patch-xmlto.in into post-patch section of Makefile
	but keep the file.

PR:		ports/123979
Submitted by:	Matthias Andree <matthias.andree@gmx.de>
This commit is contained in:
Edwin Groothuis 2008-05-28 12:40:05 +00:00
parent 9680598cb0
commit f945c80e68
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=213805
4 changed files with 42 additions and 23 deletions

View File

@ -5,15 +5,14 @@
# $FreeBSD$
#
# The following compile-time options are available:
# WITH_PASSIVETEX Enable PassiveTex support for DVI/PDF/PS output
PORTNAME= xmlto
PORTVERSION= 0.0.20
PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= http://cyberelk.net/tim/data/xmlto/stable/
# Master Site is subject to change with 0.0.21 release
MAINTAINER= ports@FreeBSD.org
MAINTAINER= matthias.andree@gmx.de
COMMENT= Front-end to an XSL toolchain
BUILD_DEPENDS= ${BASH_CMD}:${PORTSDIR}/shells/bash \
@ -23,12 +22,7 @@ BUILD_DEPENDS= ${BASH_CMD}:${PORTSDIR}/shells/bash \
${XSL_DIR}:${PORTSDIR}/textproc/docbook-xsl
RUN_DEPENDS= ${BUILD_DEPENDS}
.if defined(WITH_PASSIVETEX) || exists(${PASSIVETEX})
BUILD_DEPENDS+= ${PASSIVETEX}:${PORTSDIR}/print/passivetex
PLIST_SUB= PASSIVETEX=""
.else
PLIST_SUB= PASSIVETEX="@comment "
.endif
OPTIONS= PASSIVETEX "Enable PassiveTeX support for DVI/PS/PDF" OFF
USE_BZIP2= yes
GNU_CONFIGURE= yes
@ -37,15 +31,30 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
BASH_CMD= ${LOCALBASE}/bin/bash
GETOPT_CMD= ${LOCALBASE}/bin/getopt
PASSIVETEX?= mktexlsr
XSL_DIR= ${LOCALBASE}/share/xsl/docbook
MAN1= xmlif.1 xmlto.1
DOCS= AUTHORS NEWS
PORTDOCS= AUTHORS COPYING ChangeLog NEWS THANKS
# these two documentation files do not convey information useful for
# the FreeBSD port at this time:
# PORTDOCS+= FAQ README
.include <bsd.port.pre.mk>
.if defined(WITH_PASSIVETEX)
BUILD_DEPENDS+= ${LOCALBASE}/share/texmf-local/tex/passivetex/fotex.sty:${PORTSDIR}/print/passivetex
RUN_DEPENDS+= ${LOCALBASE}/share/texmf-local/tex/passivetex/fotex.sty:${PORTSDIR}/print/passivetex
PLIST_SUB= PASSIVETEX=""
.else
PLIST_SUB= PASSIVETEX="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-a|-PpR|' \
${WRKSRC}/format/docbook/man
.for i in docbook/htmlhelp docbook/xhtml-nochunks docbook/javahelp \
docbook/html docbook/html-nochunks docbook/xhtml docbook/fo \
docbook/man fo/dvi fo/pdf
@${REINPLACE_CMD} -e 's|-a|-PpR|' ${WRKSRC}/format/${i}
.endfor
.if !defined(WITH_PASSIVETEX)
@${REINPLACE_CMD} -e '/format\/fo\//d' ${WRKSRC}/Makefile.in
.endif
@ -57,7 +66,7 @@ post-build:
.if !defined(NOPORTDOCS)
post-install:
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1,8 +1,16 @@
--- xmlto.in.orig Mon Jan 5 09:20:01 2004
+++ xmlto.in Mon Jan 5 09:20:32 2004
--- xmlto.in.orig 2008-01-17 10:39:02.000000000 +0100
+++ xmlto.in 2008-05-25 13:43:48.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
#
# @PACKAGE@ - apply an XSL stylesheet to an XML document
# Copyright (C) 2001, 2002, 2003 Tim Waugh <twaugh@redhat.com>
@@ -326,6 +326,7 @@
# Ask the format script what stylesheet to use.
XSLT_PROCESSOR=xsltproc # We only know about xsltproc right now.
export XSLT_PROCESSOR
+export USE_BACKEND
if [ -z "$STYLESHEET" ]
then
STYLESHEET="$(${BASH} "$FORMAT" stylesheet)" || exit 1

View File

@ -8,5 +8,5 @@ htmlhelp, javahelp, man, pdf, ps, txt, xhtml, xhtml-nochunks.
Currently the only XSL-T processor supported is xsltproc (textproc/libxslt).
For DVI, PDF and PostScript output, PassiveTeX (print/passivetex) is required.
Author: Tim Waugh <tim@cyberelk.net>
WWW: http://cyberelk.net/tim/software/xmlto/
Authors: Tim Waugh <tim@cyberelk.net>, Ondrej Vasik <ovasik@redhat.com>
WWW: http://cyberelk.net/tim/software/xmlto/

View File

@ -1,9 +1,6 @@
@comment $FreeBSD$
bin/xmlif
bin/xmlto
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%DATADIR%%/format/docbook/awt
%%DATADIR%%/format/docbook/dvi
%%DATADIR%%/format/docbook/fo
@ -21,9 +18,14 @@ bin/xmlto
%%DATADIR%%/format/docbook/htmlhelp
%%DATADIR%%/format/docbook/javahelp
@dirrm %%DATADIR%%/format/docbook
%%PASSIVETEX%%%%DATADIR%%/format/fo/awt
%%PASSIVETEX%%%%DATADIR%%/format/fo/dvi
%%PASSIVETEX%%%%DATADIR%%/format/fo/mif
%%PASSIVETEX%%%%DATADIR%%/format/fo/pcl
%%PASSIVETEX%%%%DATADIR%%/format/fo/pdf
%%PASSIVETEX%%%%DATADIR%%/format/fo/ps
%%PASSIVETEX%%%%DATADIR%%/format/fo/svg
%%PASSIVETEX%%%%DATADIR%%/format/fo/txt
%%PASSIVETEX%%@dirrm %%DATADIR%%/format/fo
@dirrm %%DATADIR%%/format
%%DATADIR%%/xmlto.mak