Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jun 2005 12:10:52 GMT
From:      skv@FreeBSD.org
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/81802: Update port: p5-XML-LibXSLT - fix xinclude
Message-ID:  <200506021210.j52CAqvm085027@freefall.freebsd.org>
Resent-Message-ID: <200506021220.j52CK2Rr085377@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         81802
>Category:       ports
>Synopsis:       Update port: p5-XML-LibXSLT - fix xinclude
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 02 12:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Skvortsov
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
<Organization of PR author (multiple lines)>
>Environment:

	<Relevant environment information (multiple lines)>

>Description:

Update port: p5-XML-LibXSLT

xinclude does not work with latest libxslt due to API changes.

Add patch to explicitly pass xsltTransformContext to processing methods.

>How-To-Repeat:

	<Code/input/activities to reproduce the problem (multiple lines)>

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/textproc/p5-XML-LibXSLT/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	16 May 2004 16:23:57 -0000	1.10
+++ Makefile	2 Jun 2005 12:03:54 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	XML-LibXSLT
 PORTVERSION=	1.57
+PORTREVISION=	1
 CATEGORIES=	textproc perl5
 MASTER_SITES=	${MASTER_SITE_PERL_CPAN}
 MASTER_SITE_SUBDIR=	XML
Index: files/patch-LibXSLT.xs
===================================================================
RCS file: files/patch-LibXSLT.xs
diff -N files/patch-LibXSLT.xs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-LibXSLT.xs	2 Jun 2005 12:03:03 -0000
@@ -0,0 +1,33 @@
+--- LibXSLT.xs.orig	Mon Mar  1 18:42:43 2004
++++ LibXSLT.xs	Mon Apr 11 08:07:33 2005
+@@ -772,6 +772,7 @@
+         xmlDocPtr real_dom;
+         xmlDocPtr doc;
+         STRLEN len;
++        xsltTransformContextPtr ctxt;
+     CODE:
+         if (sv_doc == NULL) {
+             XSRETURN_UNDEF;
+@@ -806,10 +807,21 @@
+                               (xmlInputOpenCallback) LibXSLT_input_open,
+                               (xmlInputReadCallback) LibXSLT_input_read,
+                               (xmlInputCloseCallback) LibXSLT_input_close);
+-        real_dom = xsltApplyStylesheet(self, doc, xslt_params);
++        
++        ctxt = xsltNewTransformContext(self, doc);
++        if (ctxt == NULL)
++                return;
++
++        xsltSetCtxtParseOptions(ctxt, 0);
++
++        if (xsltGetXIncludeDefault())
++                ctxt->xinclude = 1;
++
++        real_dom = xsltApplyStylesheetUser(self, doc, xslt_params, NULL, NULL, ctxt);
+ 
+         xmlCleanupInputCallbacks();
+         xmlRegisterDefaultInputCallbacks();
++        xsltFreeTransformContext(ctxt);
+ 
+         if (real_dom == NULL) {
+             if (SvTRUE(ERRSV)) {
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506021210.j52CAqvm085027>