Ticket #36499: Portfile-libxslt-36499.diff

File Portfile-libxslt-36499.diff, 5.3 KB (added by gjasny@…, 12 years ago)

Bump to 1.1.27 and apply regression fix patch

  • Portfile

    diff -urN libxslt.orig/Portfile libxslt/Portfile
    old new  
    44PortSystem      1.0
    55
    66name            libxslt
    7 version         1.1.26
     7version         1.1.27
    88categories      textproc
    99license         MIT
    1010platforms       darwin
     
    2626# gnome mirrors only have up to 1.1.22, ticket #17737
    2727#                gnome:sources/${name}/[strsed ${version} {/\.[0-9]*$//}]/
    2828
    29 checksums       md5     e61d0364a30146aaa3001296f853b2b9 \
    30                 sha1    69f74df8228b504a87e2b257c2d5238281c65154 \
    31                 rmd160  fc7630352ae5772d25fc8132a373d477fb8d8d5f
     29checksums       rmd160  004d6ce93e714ae436c93d85a275b0b901e0a7e7 \
     30                sha256  b6a8d9a421f2630999ca91d9f8c091ee8ea2d580e6be84c1d21b2a45e11e7e26
    3231
    3332depends_lib     port:libiconv \
    3433                port:libxml2 \
     
    4241
    4342use_parallel_build  yes
    4443
     44patch.pre_args  -p1
     45patchfiles      fix-namespace-regression.diff
     46
    4547pre-configure {
    4648    reinplace s|need_relink=yes|need_relink=no| ${worksrcpath}/ltmain.sh
    4749}
  • files/fix-namespace-regression.diff

    diff -urN libxslt.orig/files/fix-namespace-regression.diff libxslt/files/fix-namespace-regression.diff
    old new  
     1From be264bd3034b352a7c768ba62bf62cca22d074d9 Mon Sep 17 00:00:00 2001
     2From: Nick Wellnhofer <wellnhofer@aevum.de>
     3Date: Fri, 28 Sep 2012 19:04:39 +0000
     4Subject: Fix regression: Default namespace not correctly used
     5
     6https://bugzilla.gnome.org/show_bug.cgi?id=684564
     7---
     8diff --git a/libxslt/transform.c b/libxslt/transform.c
     9index de2ef3c..35701de 100644
     10--- a/libxslt/transform.c
     11+++ b/libxslt/transform.c
     12@@ -4075,7 +4075,7 @@ xsltElement(xsltTransformContextPtr ctxt, xmlNodePtr node,
     13         } else if (xmlStrEqual(prefix, BAD_CAST "xml")) {
     14             prefix = NULL;
     15         }
     16-    } else if (prefix != NULL) {
     17+    } else {
     18        xmlNsPtr ns;
     19        /*
     20        * SPEC XSLT 1.0:
     21@@ -4090,11 +4090,13 @@ xsltElement(xsltTransformContextPtr ctxt, xmlNodePtr node,
     22            * TODO: Check this in the compilation layer in case it's a
     23            * static value.
     24            */
     25-            xsltTransformError(ctxt, NULL, inst,
     26-                "xsl:element: The QName '%s:%s' has no "
     27-                "namespace binding in scope in the stylesheet; "
     28-                "this is an error, since the namespace was not "
     29-                "specified by the instruction itself.\n", prefix, name);
     30+            if (prefix != NULL) {
     31+                xsltTransformError(ctxt, NULL, inst,
     32+                    "xsl:element: The QName '%s:%s' has no "
     33+                    "namespace binding in scope in the stylesheet; "
     34+                    "this is an error, since the namespace was not "
     35+                    "specified by the instruction itself.\n", prefix, name);
     36+            }
     37        } else
     38            nsName = ns->href;
     39     }
     40diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am
     41index 9e2204f..12a97a8 100644
     42--- a/tests/docs/Makefile.am
     43+++ b/tests/docs/Makefile.am
     44@@ -168,6 +168,7 @@ EXTRA_DIST =        \
     45        bug-167.xml \
     46        bug-168.xml \
     47        bug-169.xml \
     48+       bug-179.xml \
     49        character.xml \
     50        array.xml \
     51        items.xml
     52diff --git a/tests/docs/bug-179.xml b/tests/docs/bug-179.xml
     53new file mode 100644
     54index 0000000..69d62f2
     55--- a/dev/null
     56+++ b/tests/docs/bug-179.xml
     57@@ -0,0 +1 @@
     58+<doc/>
     59diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
     60index 364fdd9..762eca9 100644
     61--- a/tests/general/Makefile.am
     62+++ b/tests/general/Makefile.am
     63@@ -186,6 +186,7 @@ EXTRA_DIST = \
     64     bug-176.out bug-176.xsl \
     65     bug-177.out bug-177.xsl \
     66     bug-178.out bug-178.xsl \
     67+    bug-179.out bug-179.xsl \
     68     character.out character.xsl \
     69     character2.out character2.xsl \
     70     itemschoose.out itemschoose.xsl \
     71diff --git a/tests/general/bug-179.out b/tests/general/bug-179.out
     72new file mode 100644
     73index 0000000..0a7e67d
     74--- a/dev/null
     75+++ b/tests/general/bug-179.out
     76@@ -0,0 +1,9 @@
     77+<?xml version="1.0"?>
     78+<root xmlns="my::namespace">
     79+  <foo>...</foo>
     80+  <bar>...</bar>
     81+  <foobar>...</foobar>
     82+  <baz>...</baz>
     83+  <doc>...</doc>
     84+  <baz>...</baz>
     85+</root>
     86diff --git a/tests/general/bug-179.xsl b/tests/general/bug-179.xsl
     87new file mode 100644
     88index 0000000..5847e9a
     89--- a/dev/null
     90+++ b/tests/general/bug-179.xsl
     91@@ -0,0 +1,24 @@
     92+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     93+                              xmlns="my::namespace">
     94+
     95+<xsl:variable name="var">baz</xsl:variable>
     96+
     97+<xsl:output indent="yes"/>
     98+
     99+<xsl:template match="/">
     100+    <root> <!-- This is in the correct namespace "my::namespace" -->
     101+        <foo>...</foo> <!-- OK. -->
     102+        <xsl:element name="bar">...</xsl:element> <!-- Still okay. -->
     103+
     104+        <!-- Wrong! These are without namespace. -->
     105+        <xsl:element name="{concat('foo', 'bar')}">...</xsl:element>
     106+        <xsl:element name="{$var}">...</xsl:element>
     107+        <xsl:element name="{local-name(*)}">...</xsl:element>
     108+
     109+        <!-- Explicitly setting the namespace fixes this. -->
     110+        <xsl:element name="{$var}" namespace="my::namespace">...</xsl:element>
     111+    </root>
     112+</xsl:template>
     113+
     114+</xsl:stylesheet>
     115+
     116--
     117cgit v0.9.0.2