[xmlto/f15] fix the functionality of fop.extensions (#757035)

Ondrej Vasik ovasik at fedoraproject.org
Tue Nov 29 12:00:02 UTC 2011


commit 55f6cb082a6f493d7fafda2b0bdd274094eb68ba
Author: Ondřej Vašík <ovasik at redhat.com>
Date:   Tue Nov 29 12:59:57 2011 +0100

    fix the functionality of fop.extensions (#757035)

 xmlto-fopextensions.patch |   49 +++++++++++++++++++++++++++++++++++++++++++++
 xmlto.spec                |    8 ++++++-
 2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/xmlto-fopextensions.patch b/xmlto-fopextensions.patch
new file mode 100644
index 0000000..b16ef3a
--- /dev/null
+++ b/xmlto-fopextensions.patch
@@ -0,0 +1,49 @@
+diff -urNp xmlto-0.0.24-orig/configure.in xmlto-0.0.24/configure.in
+--- xmlto-0.0.24-orig/configure.in	2011-07-14 12:50:47.000000000 +0200
++++ xmlto-0.0.24/configure.in	2011-11-29 12:53:50.614481739 +0100
+@@ -109,6 +109,9 @@ AC_PATH_PROG([W3M], [w3m], [w3m])
+ AC_ARG_VAR([TAIL], [Name and path of a tail binary that supports -n.])
+ AC_PATH_PROG([TAIL], [tail], [tail])
+ 
++AC_ARG_VAR([GREP], [Name and path of a GNU grep binary.])
++AC_PATH_PROG([GREP], [grep], [grep])
++
+ AC_ARG_VAR([GCP], [Name and path of a GNU cp binary (need at least -P)])
+ AC_PATH_PROG([GCP], [cp], [cp])
+ 
+Binary files xmlto-0.0.24-orig/.configure.in.swp and xmlto-0.0.24/.configure.in.swp differ
+diff -urNp xmlto-0.0.24-orig/xmlto.in xmlto-0.0.24/xmlto.in
+--- xmlto-0.0.24-orig/xmlto.in	2011-07-14 12:41:25.000000000 +0200
++++ xmlto-0.0.24/xmlto.in	2011-11-29 12:53:02.105195055 +0100
+@@ -22,6 +22,7 @@ MKTEMP=@MKTEMP@ # See http://www.mktemp.
+ BASH=@BASH@     # GNU bash, for running the format scripts
+ GETOPT=@GETOPT@ # a getopt that supports --longoptions
+ TAIL=@TAIL@     # a tail that supports -n (posix)
++GREP=@GREP@     # GNU grep, for searching patterns
+ 
+ version () {
+   echo "@PACKAGE@ version @VERSION@"
+@@ -236,6 +237,14 @@ then
+   echo >&2 "@PACKAGE@: Warning: fop not found or not executable."
+   echo >&2 "@PACKAGE@: Using default backend..."
+   USE_BACKEND=DEFAULT
++else
++  # we should enable fop.extensions for fop 0_17,0_18 and 0_20*,
++  # fop1.extensions for the rest
++  if [ x`$FOP_PATH -v 2>/dev/null | $GREP 0_[12]` = x ]; then
++    FOPVERSION="fop1"
++  else
++    FOPVERSION="fop"
++  fi
+ fi
+ if [ x"$USE_BACKEND" = xDBLATEX ] && \
+    [ -z "`type -t $DBLATEX_PATH`" ]
+@@ -385,7 +394,7 @@ if [ "$BACKEND_EXTENSIONS" -eq 1 ]
+ then
+   case "$USE_BACKEND" in
+   FOP)
+-      XSLTOPTS="$XSLTOPTS --param fop.extensions '1' --param fop1.extensions '1'" ;;
++      XSLTOPTS="$XSLTOPTS --param $FOPVERSION.extensions '1'" ;;
+   DBLATEX)
+       ;;
+   DEFAULT)
diff --git a/xmlto.spec b/xmlto.spec
index e2f5b6c..ea7b661 100644
--- a/xmlto.spec
+++ b/xmlto.spec
@@ -1,7 +1,7 @@
 Summary: A tool for converting XML files to various formats
 Name: xmlto
 Version: 0.0.24
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: Applications/System
 #Older versions up to xmlto-0.0.20
@@ -9,6 +9,7 @@ Group: Applications/System
 #Source0: http://cyberelk.net/tim/data/xmlto/stable/%{name}-%{version}.tar.bz2
 URL: https://fedorahosted.org/xmlto/
 Source0: https://fedorahosted.org/releases/x/m/%{name}/%{name}-%{version}.tar.bz2
+Patch1: xmlto-fopextensions.patch
 
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -58,8 +59,10 @@ xhtml1 source format.
 
 %prep
 %setup -q
+%patch1 -p1 -b .extensions
 
 %build
+autoreconf
 %configure BASH=/bin/bash
 make %{?_smp_mflags}
 
@@ -99,6 +102,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Nov 29 2011 Ondrej Vasik <ovasik at redhat.com> - 9.0.24-2
+- fix the functionality of fop.extensions (#757035)
+
 * Thu Jul 14 2011 Ondrej Vasik <ovasik at redhat.com> - 0.0.24-1
 - new release 0.0.24, basic support for docbook->epub
   conversion, use backend extensions by default


More information about the scm-commits mailing list