From sgk@kolobov.com  Tue Jun 10 17:05:48 2003
Return-Path: <sgk@kolobov.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4D6D737B404
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Jun 2003 17:05:46 -0700 (PDT)
Received: from outpost.globcon.net (outpost.globcon.net [62.141.88.161])
	by mx1.FreeBSD.org (Postfix) with SMTP id 12B2243FBD
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Jun 2003 17:05:45 -0700 (PDT)
	(envelope-from sgk@kolobov.com)
Received: (qmail 99000 invoked from network); 11 Jun 2003 00:05:32 -0000
Received: from h166.lukarcos.com (HELO kolobov.com) (62.141.88.166)
  by outpost.globcon.net with SMTP; 11 Jun 2003 00:05:32 -0000
Received: (qmail 16842 invoked by uid 911); 10 Jun 2003 22:06:40 -0000
Message-Id: <20030610220640.16841.qmail@kolobov.com>
Date: 10 Jun 2003 22:06:40 -0000
From: Sergei Kolobov <sergei@kolobov.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] textproc/xmlto: Front-end to an XSL toolchain
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         53173
>Category:       ports
>Synopsis:       [NEW PORT] textproc/xmlto: Front-end to an XSL toolchain
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 10 17:10:09 PDT 2003
>Closed-Date:    Fri Jun 20 09:29:28 PDT 2003
>Last-Modified:  Fri Jun 20 09:29:28 PDT 2003
>Originator:     Sergei Kolobov
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD elf.chetwood.ru 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Thu Jun  5 02:19:41 MSD
>Description:
xmlto is a front-end to an XSL toolchain. It chooses an appropriate
stylesheet for the conversion you want and applies it using an external
XSL-T processor.  It also performs any necessary post-processing.

Supported conversions from DocBook XML: dvi, fo, html, html-nochunks,
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/xmlto/

This port requires misc/getopt (submitted separately) and is required for
update of devel/makeplus port.

Tested on 4.8-STABLE and 5.1-CURRENT (i386).
>How-To-Repeat:
>Fix:

--- xmlto.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	xmlto
#	xmlto/pkg-descr
#	xmlto/distinfo
#	xmlto/Makefile
#	xmlto/pkg-plist
#
echo c - xmlto
mkdir -p xmlto > /dev/null 2>&1
echo x - xmlto/pkg-descr
sed 's/^X//' >xmlto/pkg-descr << 'END-of-xmlto/pkg-descr'
Xxmlto is a front-end to an XSL toolchain. It chooses an appropriate
Xstylesheet for the conversion you want and applies it using an external
XXSL-T processor.  It also performs any necessary post-processing.
X
XSupported conversions from DocBook XML: dvi, fo, html, html-nochunks,
Xhtmlhelp, javahelp, man, pdf, ps, txt, xhtml, xhtml-nochunks.
X
XCurrently the only XSL-T processor supported is xsltproc (textproc/libxslt).
XFor DVI, PDF and PostScript output, PassiveTeX (print/passivetex) is required.
X
XAuthor:	Tim Waugh <tim@cyberelk.net>
XWWW:	http://cyberelk.net/tim/xmlto/
END-of-xmlto/pkg-descr
echo x - xmlto/distinfo
sed 's/^X//' >xmlto/distinfo << 'END-of-xmlto/distinfo'
XMD5 (xmlto-0.0.14.tar.bz2) = 834c7cce7210dd45c8a2c6a964b87bb4
END-of-xmlto/distinfo
echo x - xmlto/Makefile
sed 's/^X//' >xmlto/Makefile << 'END-of-xmlto/Makefile'
X# New ports collection makefile for:	xmlto
X# Date created:		2003-06-05
X# Whom:			Sergei Kolobov <sergei@kolobov.com>
X#
X# $FreeBSD$
X#
X
X# The following compile-time options are available:
X# WITH_PASSIVETEX	Enable PassiveTex support for DVI/PDF/PS output
X
XPORTNAME=	xmlto
XPORTVERSION=	0.0.14
XCATEGORIES=	textproc
XMASTER_SITES=	http://cyberelk.net/tim/data/xmlto/stable/
X
XMAINTAINER=	sergei@kolobov.com
XCOMMENT=	Front-end to an XSL toolchain
X
XBUILD_DEPENDS=	${BASH_CMD}:${PORTSDIR}/shells/bash2 \
X		${GETOPT_CMD}:${PORTSDIR}/misc/getopt \
X		xmllint:${PORTSDIR}/textproc/libxml2 \
X		xsltproc:${PORTSDIR}/textproc/libxslt
XRUN_DEPENDS=	${BUILD_DEPENDS}
X
X.if defined(WITH_PASSIVETEX) || exists(${PASSIVETEX})
XBUILD_DEPENDS+=	${PASSIVETEX}:${PORTSDIR}/print/passivetex
XPLIST_SUB=	PASSIVETEX=""
X.else
XPLIST_SUB=	PASSIVETEX="@comment "
X.endif
X
XUSE_BZIP2=	yes
XUSE_REINPLACE=	yes
XGNU_CONFIGURE=	yes
XCONFIGURE_ARGS=	--with-bash=${BASH_CMD} --with-getopt=${GETOPT_CMD}
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
X
XBASH_CMD=	${LOCALBASE}/bin/bash
XGETOPT_CMD=	${LOCALBASE}/bin/getopt
XPASSIVETEX=	${LOCALBASE}/share/texmf/tex/passivetex
X
XMAN1=		xmlif.1 xmlto.1
XDOCS=		AUTHORS NEWS
X
Xdo-patch:
X	${REINPLACE_CMD} -e 's,/bin/bash,${BASH_CMD},' -e '/--nonet/d' \
X		${WRKSRC}/xmlto.in
X.if !defined(WITH_PASSIVETEX)
X	${REINPLACE_CMD} -e '/format\/fo\//d' ${WRKSRC}/Makefile.in
X.endif
X
X.if !defined(NOPORTDOCS)
Xpost-install:
X	@${MKDIR} ${DOCSDIR}
X	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
X.endif
X
X.include <bsd.port.mk>
END-of-xmlto/Makefile
echo x - xmlto/pkg-plist
sed 's/^X//' >xmlto/pkg-plist << 'END-of-xmlto/pkg-plist'
Xbin/xmlif
Xbin/xmlto
X%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
X%%PORTDOCS%%%%DOCSDIR%%/NEWS
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X%%DATADIR%%/format/docbook/dvi
X%%DATADIR%%/format/docbook/fo
X%%DATADIR%%/format/docbook/html
X%%DATADIR%%/format/docbook/html-nochunks
X%%DATADIR%%/format/docbook/xhtml
X%%DATADIR%%/format/docbook/xhtml-nochunks
X%%DATADIR%%/format/docbook/man
X%%DATADIR%%/format/docbook/pdf
X%%DATADIR%%/format/docbook/ps
X%%DATADIR%%/format/docbook/txt
X%%DATADIR%%/format/docbook/htmlhelp
X%%DATADIR%%/format/docbook/javahelp
X@dirrm %%DATADIR%%/format/docbook
X%%PASSIVETEX%%%%DATADIR%%/format/fo/dvi
X%%PASSIVETEX%%%%DATADIR%%/format/fo/pdf
X%%PASSIVETEX%%%%DATADIR%%/format/fo/ps
X%%PASSIVETEX%%@dirrm %%DATADIR%%/format/fo
X@dirrm %%DATADIR%%/format
X%%DATADIR%%/xmlto.mak
X@dirrm %%DATADIR%%
END-of-xmlto/pkg-plist
exit
--- xmlto.shar ends here ---

>Release-Note:
>Audit-Trail:

From: Sergei Kolobov <sergei@kolobov.com>
To: FreeBSD-gnats-submit@FreeBSD.org,
	"Sergey A. Osokin" <osa@FreeBSD.org>
Cc:  
Subject: Re: ports/53173: [NEW PORT] textproc/xmlto: Front-end to an XSL toolchain
Date: Fri, 20 Jun 2003 16:56:08 +0400

 The patch below fixes (finally) xmlto port:
 - avoid fetching DocBook XSL stylesheets via HTTP by redirecting to the
   installed docbook-xsl port; add dependency
 
 --- Makefile.orig	Tue Jun 17 12:50:46 2003
 +++ Makefile	Fri Jun 20 16:49:55 2003
 @@ -19,7 +19,8 @@
  BUILD_DEPENDS=	${BASH_CMD}:${PORTSDIR}/shells/bash2 \
  		${GETOPT_CMD}:${PORTSDIR}/misc/getopt \
  		xmllint:${PORTSDIR}/textproc/libxml2 \
 -		xsltproc:${PORTSDIR}/textproc/libxslt
 +		xsltproc:${PORTSDIR}/textproc/libxslt \
 +		${XSL_DIR}:${PORTSDIR}/textproc/docbook-xsl
  RUN_DEPENDS=	${BUILD_DEPENDS}
  
  .if defined(WITH_PASSIVETEX) || exists(${PASSIVETEX})
 @@ -39,12 +40,16 @@
  GETOPT_CMD=	${LOCALBASE}/bin/getopt
  PASSIVETEX=	${LOCALBASE}/share/texmf/tex/passivetex
  
 +XSL_URL=	http://docbook.sourceforge.net/release/xsl/current
 +XSL_DIR=	${LOCALBASE}/share/xsl/docbook
 +
  MAN1=		xmlif.1 xmlto.1
  DOCS=		AUTHORS NEWS
  
  do-patch:
 -	${REINPLACE_CMD} -e 's,/bin/bash,${BASH_CMD},' -e '/--nonet/d' \
 -		${WRKSRC}/xmlto.in
 +	${REINPLACE_CMD} -e 's,/bin/bash,${BASH_CMD},' ${WRKSRC}/xmlto.in
 +	${REINPLACE_CMD} -e 's,${XSL_URL},${XSL_DIR},' \
 +		${WRKSRC}/format/docbook/*
  .if !defined(WITH_PASSIVETEX)
  	${REINPLACE_CMD} -e '/format\/fo\//d' ${WRKSRC}/Makefile.in
  .endif

From: Sergei Kolobov <sergei@kolobov.com>
To: "Sergey A. Osokin" <osa@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/53173: [NEW PORT] textproc/xmlto: Front-end to an XSL toolchain
Date: Fri, 20 Jun 2003 17:56:11 +0400

 On 2003-06-20 at 17:30 +0400, Sergey A. Osokin wrote:
 > Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
 > /usr/home/ports/src/xmlto/work/xmlto-0.0.14/./doc/xmlif.xml:4: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
 
 Oops, that escaped my testing since I had XML_CATALOG_FILES defined.
 Use this patch (in addition to the previous one):
 
 --- Makefile.orig2	Fri Jun 20 17:48:11 2003
 +++ Makefile	Fri Jun 20 17:50:11 2003
 @@ -40,6 +40,8 @@
  GETOPT_CMD=	${LOCALBASE}/bin/getopt
  PASSIVETEX=	${LOCALBASE}/share/texmf/tex/passivetex
  
 +DOCBOOK_URL=	http://www.oasis-open.org/docbook/xml
 +DOCBOOK_DIR=	${LOCALBASE}/share/xml/docbook
  XSL_URL=	http://docbook.sourceforge.net/release/xsl/current
  XSL_DIR=	${LOCALBASE}/share/xsl/docbook
  
 @@ -48,6 +50,8 @@
  
  do-patch:
  	${REINPLACE_CMD} -e 's,/bin/bash,${BASH_CMD},' ${WRKSRC}/xmlto.in
 +	${REINPLACE_CMD} -e 's,${DOCBOOK_URL},${DOCBOOK_DIR},' \
 +		${WRKSRC}/doc/xml*.xml
  	${REINPLACE_CMD} -e 's,${XSL_URL},${XSL_DIR},' \
  		${WRKSRC}/format/docbook/*
  .if !defined(WITH_PASSIVETEX)
 
 > file:///usr/local/share/xml/catalog:1: error: Start tag expected, '<' not found
 > CATALOG "dtd/catalog"
 > ^
 
 For some reason, it expects an XML catalog at that location, but it isn't.
 Nonetheless, it should not affect the build.
 
 Sergei
State-Changed-From-To: open->closed 
State-Changed-By: osa 
State-Changed-When: Fri Jun 20 09:29:02 PDT 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53173 
>Unformatted:
