# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= xmlto VERSION= 0.0.28 REVISION= 5 KEYWORDS= textproc VARIANTS= standard SDESC[standard]= Front-end to an XSL toolchain HOMEPAGE= https://pagure.io/xmlto/ CONTACT= nobody DOWNLOAD_GROUPS= main xsl SITES[main]= https://releases.pagure.org/xmlto/ SITES[xsl]= https://raw.githubusercontent.com/jeffrafter/xhtml2fo/master/ DISTFILE[1]= xmlto-0.0.28.tar.bz2:main DISTFILE[2]= xhtml2fo.xsl:xsl DIST_SUBDIR= xmlto-2020 DF_INDEX= 1 2 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= libpaper:dev:standard BUILDRUN_DEPENDS= getopt:single:standard libpaper:primary:standard w3m:primary:standard docbook-xsl:primary:standard docbook-xml:single:standard GNOME_COMPONENTS= libxslt EXTRACT_ONLY= 1 FPC_EQUIVALENT= textproc/xmlto MUST_CONFIGURE= gnu CONFIGURE_ARGS= BASH={{SH}} GETOPT={{LOCALBASE}}/bin/getopt PDFXMLTEX={{LOCALBASE}}/bin/pdftex MAKE_ENV= HOME=/dev/null SUB_FILES= pkg-message-single SUB_LIST= DATADIR={{LOCALBASE}}/share/xmlto post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/xmlto ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/xhtml2fo.xsl \ ${STAGEDIR}${PREFIX}/share/xmlto pre-configure: # get rid of nonstandard "type" option -t: ${SED} -i'' -e 's/type -t/which/;' \ ${WRKSRC}/format/docbook/epub \ ${WRKSRC}/format/docbook/txt \ ${WRKSRC}/format/fo/dvi \ ${WRKSRC}/format/fo/pdf \ ${WRKSRC}/format/xhtml1/txt # Fix schema url ${SED} -i'' -e 's|http://docbook.sourceforge.net/release/xsl/current|file://${LOCALBASE}/share/xsl/docbook|g' \ ${WRKSRC}/format/docbook/* ${WRKSRC}/xmlto.in # get rid of GNU-make-ism (BSD make defines $< only in suffix rules) ${REINPLACE_CMD} -e '/^GEN_MANPAGE/{s/\$$/;}' ${WRKSRC}/Makefile.in [FILE:458:descriptions/desc.single] 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. For DVI, PDF and PostScript output, PassiveTeX is required. [FILE:212:distinfo] 1130df3a7957eb9f6f0d29e4aa1c75732a7dfb6d639be013859b5c7ec5421276 127921 xmlto-2020/xmlto-0.0.28.tar.bz2 41632e8abb68ab62aa4da2df2c11023bbc1395c382a4ad07e1f30d750fed750c 69261 xmlto-2020/xhtml2fo.xsl [FILE:375:manifests/plist.single] bin/ xmlif xmlto share/man/man1/ xmlif.1.gz xmlto.1.gz share/xmlto/ xhtml2fo.xsl xmlto.mak share/xmlto/format/docbook/ awt dvi epub fo html html-nochunks htmlhelp javahelp man mif pcl pdf ps svg txt xhtml xhtml-nochunks share/xmlto/format/fo/ awt dvi mif pcl pdf ps svg txt share/xmlto/format/xhtml1/ awt dvi fo mif pcl pdf ps svg txt [FILE:662:patches/patch-xmlif_xmlif.c] --- xmlif/xmlif.c.orig 2015-11-10 12:05:27 UTC +++ xmlif/xmlif.c @@ -1306,7 +1306,7 @@ static void process_else() #define INITIAL 0 #define attrib 1 -#define val 2 +#define unique_val 2 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way @@ -1594,7 +1594,7 @@ YY_RULE_SETUP case 8: YY_RULE_SETUP #line 217 "xmlif/xmlif.l" -{BEGIN(val);} +{BEGIN(unique_val);} YY_BREAK case 9: YY_RULE_SETUP @@ -1636,7 +1636,7 @@ ECHO; #line 1637 "xmlif/xmlif.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(attrib): -case YY_STATE_EOF(val): +case YY_STATE_EOF(unique_val): yyterminate(); case YY_END_OF_BUFFER: [FILE:1209:patches/patch-xmlto.in] This patch makes sure that w3m or others will not pollute $HOME/ Avoid pointless bashisms. Avoid use of non POSIX local builtin. --- xmlto.in.orig 2015-11-16 14:07:10 UTC +++ xmlto.in @@ -78,13 +78,15 @@ EOF # * Remembers the temporary file's name so it can be deleted on exit # * If the failure message is empty or missing, exits on failure make_temp () { - local dirflag="" prefix="@PACKAGE@" + dirflag="" prefix="@PACKAGE@" [ "$1" = "-d" ] && { dirflag="-d"; shift; } [ -n "$1" ] && prefix="@PACKAGE@-$1" - if eval $2='$(${MKTEMP} $dirflag "${TMPDIR:-/tmp}/${prefix}.XXXXXX")' + tmpnam=$(${MKTEMP} $dirflag "${TMPDIR:-/tmp}/${prefix}.XXXXXX") + if [ $? = 0 ] then - CLEANFILES="$CLEANFILES ${!2}" + eval $2="$tmpnam" + CLEANFILES="$CLEANFILES $tmpnam" return 0 elif [ -z "$3" ] then @@ -97,7 +99,7 @@ make_temp () { } compute_searchpath () { - local oldIFS="${IFS}" + oldIFS="${IFS}" IFS=":" for asearchpath in "$1"; do # wrangle relative paths into absolute ones so that the user @@ -651,4 +653,6 @@ then # Extremely verbose BASH="${BASH} -x" fi +make_temp -d temphome HOME || exit 1 +export HOME ${BASH} "$FORMAT" post-process || exit 1 [FILE:361:files/pkg-message-single.in] For benefits of conversions away from XHTML1 through XSL-FO, a stylesheet xhtml2fo.xsl has been installed into %%DATADIR%%. Example use: xmlto pdf -x %%DATADIR%%/xhtml2fo.xsl myXHTML1file.xml More style sheets for XHTML1 conversions can be found at under "Stylesheet for XHTML to XSL-FO transformation"