summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-07 05:13:37 (GMT)
committerAnas Nashif <anas.nashif@intel.com>2012-11-07 05:13:37 (GMT)
commita093df46540ad509a7c649c702aad770f0cc1b52 (patch)
tree992ca102e0ed2ac452ed449b5c9d203507a34adc
parent406716225c95ba3ba5ab14b2ce93667225f0ad80 (diff)
downloadxmlto-a093df46540ad509a7c649c702aad770f0cc1b52.zip
xmlto-a093df46540ad509a7c649c702aad770f0cc1b52.tar.gz
xmlto-a093df46540ad509a7c649c702aad770f0cc1b52.tar.bz2
add packaging
-rw-r--r--packaging/xmlto-codecleanup.patch46
-rw-r--r--packaging/xmlto-lynx-empty-file.patch14
-rw-r--r--packaging/xmlto-nonvoid.patch24
-rw-r--r--packaging/xmlto-overflow.patch16
-rw-r--r--packaging/xmlto-xsltopts.patch32
-rw-r--r--packaging/xmlto.spec98
6 files changed, 230 insertions, 0 deletions
diff --git a/packaging/xmlto-codecleanup.patch b/packaging/xmlto-codecleanup.patch
new file mode 100644
index 0000000..fa1f258
--- /dev/null
+++ b/packaging/xmlto-codecleanup.patch
@@ -0,0 +1,46 @@
+Index: xmlif/xmlif.l
+===================================================================
+--- xmlif/xmlif.l.orig
++++ xmlif/xmlif.l
+@@ -43,7 +43,7 @@
+
+ static char **selections; /* selection tokens */
+ static int nselections; /* number of selections */
+-static ifsense; /* sense of last `if' or unless seen */
++static int ifsense; /* sense of last `if' or unless seen */
+ static char *attribute; /* last attribute scanned */
+
+ struct stack_t {
+@@ -84,7 +84,7 @@ static void pop_level(void)
+ }
+ }
+
+-static void stash_attribute(char *attr)
++static void stash_attribute(const char *attr)
+ /* stash an attribute away for comparison */
+ {
+ #ifdef DEBUG
+@@ -176,7 +176,7 @@ static void process_value(char *val)
+ end->suppressed = suppress(attribute, val);
+ }
+
+-static void process_else()
++static void process_else(void)
+ /* process <?xmlif else> tag */
+ {
+ end->suppressed = end->matched;
+@@ -230,9 +230,12 @@ WS [ \t\n]*
+
+ #include "config.h"
+
+-int yywrap() {exit(0);};
++int yywrap(void)
++{
++ exit(0);
++}
+
+-main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+ int i;
+
diff --git a/packaging/xmlto-lynx-empty-file.patch b/packaging/xmlto-lynx-empty-file.patch
new file mode 100644
index 0000000..92c8d17
--- /dev/null
+++ b/packaging/xmlto-lynx-empty-file.patch
@@ -0,0 +1,14 @@
+Index: xmlto.in
+===================================================================
+--- xmlto.in.orig
++++ xmlto.in
+@@ -584,6 +584,9 @@ else
+ #xsltproc may return no file on empty input, touch it to have it for sure
+ touch "$XSLT_PROCESSED"
+
++ #xsltproc may return no file on empty input, touch it to have it for sure
++ touch "$XSLT_PROCESSED"
++
+ if [ $? == 4 ]
+ then
+ XSLTOPTS="${XSLTOPTS} --catalogs"
diff --git a/packaging/xmlto-nonvoid.patch b/packaging/xmlto-nonvoid.patch
new file mode 100644
index 0000000..7f7a00d
--- /dev/null
+++ b/packaging/xmlto-nonvoid.patch
@@ -0,0 +1,24 @@
+Index: xmlif/xmlif.c
+===================================================================
+--- xmlif/xmlif.c.orig
++++ xmlif/xmlif.c
+@@ -2435,6 +2435,7 @@ main(int argc, char *argv[])
+ }
+
+ yylex();
++ return 0;
+ }
+
+ /*
+Index: xmlif/xmlif.l
+===================================================================
+--- xmlif/xmlif.l.orig
++++ xmlif/xmlif.l
+@@ -259,6 +259,7 @@ main(int argc, char *argv[])
+ }
+
+ yylex();
++ return 0;
+ }
+
+ /*
diff --git a/packaging/xmlto-overflow.patch b/packaging/xmlto-overflow.patch
new file mode 100644
index 0000000..3bed4e9
--- /dev/null
+++ b/packaging/xmlto-overflow.patch
@@ -0,0 +1,16 @@
+Index: xmlif/xmlif.c
+===================================================================
+--- xmlif/xmlif.c.orig
++++ xmlif/xmlif.c
+@@ -8,9 +8,10 @@
+ #define YY_FLEX_MAJOR_VERSION 2
+ #define YY_FLEX_MINOR_VERSION 5
+
++#include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-
++#include <sys/socket.h>
+
+ /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+ #ifdef c_plusplus
diff --git a/packaging/xmlto-xsltopts.patch b/packaging/xmlto-xsltopts.patch
new file mode 100644
index 0000000..8227e16
--- /dev/null
+++ b/packaging/xmlto-xsltopts.patch
@@ -0,0 +1,32 @@
+Index: xmlto.in
+===================================================================
+--- xmlto.in.orig
++++ xmlto.in
+@@ -38,6 +38,7 @@ OPTIONs are:
+ -o directory put output in the specified directory instead of
+ the current working directory
+ -p postprocopts pass option to postprocessor
++ --xsltopts use xsltproc command line options
+ --extensions turn on stylesheet extensions for this tool chain
+ --noautosize do not autodetect paper size via locales or paperconf
+ --noclean temp files are not deleted automatically
+@@ -262,7 +263,7 @@ ZIP_PATH=@ZIP@
+
+ # Process any options
+ ARGS=$(${GETOPT} \
+- --longoptions=help,version,extensions,searchpath:,skip-validation,stringparam:,noclean,noautosize,with-fop,with-dblatex \
++ --longoptions=help,version,extensions,searchpath:,skip-validation,stringparam:,noclean,noautosize,with-fop,with-dblatex,xsltopts: \
+ -n xmlto -- x:m:o:p:v "$@")
+ [ $? != 0 ] && { usage; exit 1; }
+ eval set -- "$ARGS"
+@@ -383,6 +384,10 @@ while [ "$#" -gt "0" ]; do
+ fi
+ shift
+ ;;
++ --xsltopts)
++ XSLTOPTS="$XSLTOPTS $2"
++ shift 2
++ ;;
+ --)
+ shift
+ break
diff --git a/packaging/xmlto.spec b/packaging/xmlto.spec
new file mode 100644
index 0000000..cadd029
--- /dev/null
+++ b/packaging/xmlto.spec
@@ -0,0 +1,98 @@
+#
+# spec file for package xmlto
+#
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
+%if 0%{?suse_version} < 1030
+%define dist_has_fdupes 0
+%else
+%define dist_has_fdupes 1
+%endif
+
+# support SLE 11
+%if !0%{?make_install:1}
+%define make_install %{makeinstall}
+%endif
+
+Name: xmlto
+Version: 0.0.25
+Release: 0
+License: GPL-2.0+
+Summary: Tool for Converting XML Files to Various Formats
+Url: https://fedorahosted.org/xmlto/
+Group: Productivity/Publishing/XML
+Source0: https://fedorahosted.org/releases/x/m/xmlto/%{name}-%{version}.tar.bz2
+Source10: %{name}-README.SuSE
+Patch0: xmlto-nonvoid.patch
+Patch1: xmlto-overflow.patch
+Patch3: xmlto-xsltopts.patch
+Patch4: xmlto-codecleanup.patch
+Patch5: xmlto-lynx-empty-file.patch
+BuildRequires: docbook-xsl-stylesheets
+BuildRequires: flex
+BuildRequires: libxslt
+BuildRequires: sgml-skel
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%if %{dist_has_fdupes}
+BuildRequires: fdupes
+%endif
+
+# We rely entirely on the DocBook XSL stylesheets!
+Requires: docbook-xsl-stylesheets >= 1.56.0
+Requires: docbook_4
+Requires: xsltproc
+# For full functionality, we need passivetex.
+Recommends: texlive-xmltex >= 2007
+
+%description
+This is a package for converting XML files to various formats using XSL
+stylesheets. As a processor it depends on xsltproc and as a formatter
+for print output it makes use of passivetex.
+
+%prep
+%setup -q
+%patch0
+%patch1
+%patch3
+%patch4
+%patch5
+cp %{SOURCE10} README.SuSE
+rm -f xmlif/xmlif.c
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%check
+make check
+
+%install
+%make_install
+! mkdir %{buildroot}%{_datadir}/xmlto/xsl
+%if %{dist_has_fdupes}
+%{fdupes '%{buildroot}%{_datadir}/xmlto'}
+%endif
+
+%files
+%defattr(-,root,root)
+%doc README.SuSE
+%doc COPYING
+%doc AUTHORS README ChangeLog FAQ THANKS NEWS
+%{_bindir}/*
+%{_mandir}/*/*
+%{_datadir}/xmlto
+
+%changelog