Alexander Pyhalov
2016-03-17 8acafbdbc1b3e47303e55db13a9cd4a9b52d6ee6
Merge pull request #1762 from pyhalov/xmlto

Update xmlto to 0.0.28, add upstream patches
3 files added
3 files renamed
127 ■■■■■ changed files
components/text/xmlto/Makefile 27 ●●●●● patch | view | raw | blame | history
components/text/xmlto/patches/fix-val.patch 43 ●●●●● patch | view | raw | blame | history
components/text/xmlto/patches/use-lynx-in-txt.patch 33 ●●●●● patch | view | raw | blame | history
components/text/xmlto/test/results-32.master 14 ●●●●● patch | view | raw | blame | history
components/text/xmlto/xmlto.license patch | view | raw | blame | history
components/text/xmlto/xmlto.p5m 10 ●●●●● patch | view | raw | blame | history
components/text/xmlto/Makefile
File was renamed from components/xmlto/Makefile
@@ -10,18 +10,18 @@
#
#
# Copyright 2013 Alexander Pyhalov.  All rights reserved.
#
# Copyright 2016 Alexander Pyhalov
#
include ../../make-rules/shared-macros.mk
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME=     xmlto
COMPONENT_VERSION=     0.0.25
COMPONENT_VERSION=     0.0.28
COMPONENT_SUMMARY=     xmlto is a shell-script tool for converting XML files to various formats
COMPONENT_SRC=         $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=     $(COMPONENT_SRC).tar.bz2
COMPONENT_ARCHIVE_HASH= \
  sha256:361cb70d5d0b4b753db00b67ed8bc1d53d0bc96c407d0310aefe854470b7e536
  sha256:1130df3a7957eb9f6f0d29e4aa1c75732a7dfb6d639be013859b5c7ec5421276
COMPONENT_ARCHIVE_URL= \
  https://fedorahosted.org/releases/x/m/xmlto/$(COMPONENT_ARCHIVE)
COMPONENT_PROJECT_URL = https://fedorahosted.org/xmlto/
@@ -30,13 +30,20 @@
include $(WS_TOP)/make-rules/configure.mk
include $(WS_TOP)/make-rules/ips.mk
# Missing files in build dir for configure without this.
#COMPONENT_PRE_CONFIGURE_ACTION =        ($(CP) -a  $(SOURCE_DIR)/* $(@D))
#CONFIGURE_OPTIONS +=  --sysconfdir=/etc
CONFIGURE_ENV += GETOPT=/usr/gnu/bin/getopt
# Strip compilation lines from test output
COMPONENT_TEST_TRANSFORMS += \
    '-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
    '-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
    '-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
    '-e "s|^.*xmlif.l.*$$|XXX_CC_XXX|g" ' \
    '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
    '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
    '-e "/^XXX_CC_XXX$$/d" '
build: $(BUILD_32)
install: $(INSTALL_32)
test: $(TEST_32)
components/text/xmlto/patches/fix-val.patch
New file
@@ -0,0 +1,43 @@
This patch uses a "belt & suspenders" approach: either the inclusion of
<sys/types.h> before the define, or changing the variable name is sufficient,
but both are used out of precaution.  The patch was developed in-house;
the changing of the variable name part has been fed upstream and will be
included in the next version.
--- xmlto-0.0.28/xmlif/xmlif.c.~1~    2015-11-10 04:05:27.000000000 -0800
+++ xmlto-0.0.28/xmlif/xmlif.c    2016-03-14 13:33:03.905766962 -0700
@@ -20,6 +20,7 @@
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <sys/types.h>
 /* end standard C headers. */
@@ -1306,7 +1307,7 @@
 #define INITIAL 0
 #define attrib 1
-#define val 2
+#define xmlif_val 2
 #ifndef YY_NO_UNISTD_H
 /* Special case for "unistd.h", since it is non-ANSI. We include it way
@@ -1594,7 +1595,7 @@
 case 8:
 YY_RULE_SETUP
 #line 217 "xmlif/xmlif.l"
-{BEGIN(val);}
+{BEGIN(xmlif_val);}
     YY_BREAK
 case 9:
 YY_RULE_SETUP
@@ -1636,7 +1637,7 @@
 #line 1637 "xmlif/xmlif.c"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(attrib):
-case YY_STATE_EOF(val):
+case YY_STATE_EOF(xmlif_val):
     yyterminate();
     case YY_END_OF_BUFFER:
components/text/xmlto/patches/use-lynx-in-txt.patch
New file
@@ -0,0 +1,33 @@
Adjusted two files in the xmlto package to always use lynx to convert to
text (rather than w3m).
This patch will not be sent upstream.
--- xmlto-0.0.26/format/docbook/txt.orig    2015-09-22 07:24:15.113641794 -0700
+++ xmlto-0.0.26/format/docbook/txt    2015-09-22 07:24:47.569354480 -0700
@@ -1,10 +1,6 @@
 case "$USE_BACKEND" in
 DEFAULT|DBLATEX)
-    if [ -n "`type -t $W3M_PATH`" ]
-    then
-      CONVERT="$W3M_PATH"
-      ARGS="-T text/html -dump"
-    elif [ -n "`type -t $LYNX_PATH`" ]
+    if [ -n "`type -t $LYNX_PATH`" ]
     then
       CONVERT="$LYNX_PATH"
       ARGS="-force_html -dump -nolist -width=72"
--- xmlto-0.0.26/format/xhtml1/txt.orig    2015-09-22 07:29:23.866130037 -0700
+++ xmlto-0.0.26/format/xhtml1/txt    2015-09-22 07:29:42.989011718 -0700
@@ -1,10 +1,6 @@
 case "$USE_BACKEND" in
 DEFAULT|DBLATEX)
-  if [ -n "`type -t $W3M_PATH`" ]
-  then
-    CONVERT="$W3M_PATH"
-    ARGS="-T text/html -dump"
-  elif [ -n "`type -t $LYNX_PATH`" ]
+  if [ -n "`type -t $LYNX_PATH`" ]
   then
     CONVERT="$LYNX_PATH"
     ARGS="-force_html -dump -nolist -width=72"
components/text/xmlto/test/results-32.master
New file
@@ -0,0 +1,14 @@
/usr/gnu/bin/make  check-TESTS
PASS: xmlif/test/run-test
/usr/gnu/bin/make  all-am
============================================================================
Testsuite summary for xmlto 0.0.28
============================================================================
# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
components/text/xmlto/xmlto.license
components/text/xmlto/xmlto.p5m
File was renamed from components/xmlto/xmlto.p5m
@@ -22,7 +22,15 @@
license xmlto.license license="GPLv2"
depend fmri=shell/gnu-getopt type=require
# xmlto script dependencies that aren't automatically found:
depend type=require fmri=__TBD pkg.debug.depend.file=usr/bin/lynx
depend type=require fmri=__TBD pkg.debug.depend.file=usr/bin/xmllint
depend type=require fmri=__TBD pkg.debug.depend.file=usr/bin/xsltproc
depend type=require fmri=__TBD pkg.debug.depend.file=usr/gnu/bin/find
depend type=require fmri=__TBD pkg.debug.depend.file=usr/gnu/bin/getopt
depend type=require fmri=__TBD pkg.debug.depend.file=usr/gnu/bin/grep
depend type=require fmri=__TBD pkg.debug.depend.file=usr/gnu/bin/tail
<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
<transform file path=usr/share/xmlto/format/docbook/man -> delete facet.doc.man all>