From 0c8cc24df36735339d1091e7c57ac9435213e618 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 19 Jan 2015 17:53:41 -0500 Subject: [PATCH] Create recipe for xmlto. --- app-text/xmlto/patches/xmlto-0.0.26.patch | 62 +++++++++++++++++++++++ app-text/xmlto/xmlto-0.0.26.recipe | 52 +++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 app-text/xmlto/patches/xmlto-0.0.26.patch create mode 100644 app-text/xmlto/xmlto-0.0.26.recipe diff --git a/app-text/xmlto/patches/xmlto-0.0.26.patch b/app-text/xmlto/patches/xmlto-0.0.26.patch new file mode 100644 index 000000000..6747e0d1f --- /dev/null +++ b/app-text/xmlto/patches/xmlto-0.0.26.patch @@ -0,0 +1,62 @@ +From c1c5b8d4e142a48abb28f2c9bb81f2e170e3f564 Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Mon, 19 Jan 2015 17:49:37 -0500 +Subject: [PATCH] Make xmlif compatible with POSIX. + +--- + xmlif/xmlif.l | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/xmlif/xmlif.l b/xmlif/xmlif.l +index 0a11cdf..a6efe97 100644 +--- a/xmlif/xmlif.l ++++ b/xmlif/xmlif.l +@@ -46,22 +46,22 @@ static int nselections; /* number of selections */ + static ifsense; /* sense of last `if' or unless seen */ + static char *attribute; /* last attribute scanned */ + +-struct stack_t { ++struct stack_type { + int matched; /* matched at current level */ + int suppressed; /* suppressed branch? */ +- struct stack_t *up; ++ struct stack_type *up; + }; +-static struct stack_t head, *end = &head; ++static struct stack_type head, *end = &head; + + static void push_level(void) + /* create activation record for the current level */ + { +- struct stack_t *newelt; ++ struct stack_type *newelt; + + #ifdef DEBUG + fprintf(stderr, "{push_level()}"); + #endif /* DEBUG */ +- newelt = (struct stack_t *)malloc(sizeof(struct stack_t)); ++ newelt = (struct stack_type *)malloc(sizeof(struct stack_type)); + newelt->up = end; + end = newelt; + +@@ -72,7 +72,7 @@ static void push_level(void) + static void pop_level(void) + /* delete activation record for the current level */ + { +- struct stack_t *up = end->up; ++ struct stack_type *up = end->up; + + #ifdef DEBUG + fprintf(stderr, "{pop_level()}"); +@@ -96,7 +96,7 @@ static void stash_attribute(char *attr) + static void end_attribute(void) + /* we've seen all the attributes of a conditional, process them now */ + { +- struct stack_t *up; ++ struct stack_type *up; + + if (attribute) + free(attribute); +-- +1.8.3.4 + diff --git a/app-text/xmlto/xmlto-0.0.26.recipe b/app-text/xmlto/xmlto-0.0.26.recipe new file mode 100644 index 000000000..05f270f4b --- /dev/null +++ b/app-text/xmlto/xmlto-0.0.26.recipe @@ -0,0 +1,52 @@ +SUMMARY="Shell-script tool for converting XML files to various formats" +DESCRIPTION="xmlto is a shell-script tool for converting XML files to \ +various formats. At the moment it supports conversion from docbook, \ +xhtml1 and fo format to various output formats (awt, fo, htmlhelp, \ +javahelp, mif, pdf, svg, xhtml, dvi, html, html-nochunks, man, \ +pcl, ps, txt, xhtml-nochunks, epub). It uses \ +passivetex(default)/fop/dblatex for processing, just provides easy \ +to use command line frontend to make fine output without remembering \ +many long options and searching for syntax. " +HOMEPAGE="https://fedorahosted.org/xmlto/" +SRC_URI="https://fedorahosted.org/releases/x/m/xmlto/xmlto-$portVersion.tar.gz" +CHECKSUM_SHA256="cfd8d2a26077be1d5566dfe22dd66099ae4f4600dea97d6e113a2cc5b8708977" +PATCHES="xmlto-$portVersion.patch" +REVISION="1" +COPYRIGHT="2009 Tim Waugh + 2013 Ondrej Vasik" +LICENSE="GNU GPL v2" + +ARCHITECTURES="x86 x86_gcc2 x86_64" + +PROVIDES=" + xmlto = $portVersion compat >= 0 + cmd:xmlto + cmd:xmlif + " + +REQUIRES=" + haiku + cmd:getopt + cmd:xmllint + cmd:xsltproc + " + +BUILD_PREREQUIRES=" + haiku_devel + cmd:gcc + cmd:awk + cmd:getopt + cmd:flex + cmd:make + " + +BUILD() +{ + runConfigure --omit-dirs binDir ./configure --bindir=$prefix/bin + make $jobArgs +} + +INSTALL() +{ + make install +}