Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 2006 15:45:50 +0800 (CST)
From:      Yen-Ming Lee <leeym@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        mat@FreeBSD.org
Subject:   ports/91862: [PATCH] textproc/p5-XML-LibXML-XPathContext: unbreak on old perl
Message-ID:  <20060116074550.4F8A0B29D0D@utopia.leeym.com>
Resent-Message-ID: <200601160750.k0G7o5B1070714@freefall.freebsd.org>

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

>Number:         91862
>Category:       ports
>Synopsis:       [PATCH] textproc/p5-XML-LibXML-XPathContext: unbreak on old perl
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 16 07:50:05 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
FreeBSD Taiwan
>Environment:
System: FreeBSD utopia.leeym.com 6.0-STABLE FreeBSD 6.0-STABLE #1: Sat Jan 14 20:28:49 CST 2006
>Description:
- unbreak on old perl

Added file(s):
- files/extrapatch-XPathContext.xs

Port maintainer (mat@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- p5-XML-LibXML-XPathContext-0.07.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/textproc/p5-XML-LibXML-XPathContext/Makefile,v
retrieving revision 1.5
diff -u -u -r1.5 Makefile
--- Makefile	22 Nov 2005 11:26:19 -0000	1.5
+++ Makefile	16 Jan 2006 07:45:28 -0000
@@ -24,8 +24,8 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${PERL_LEVEL} < 500601
-IGNORE="Need at least perl 5.6.1 to build"
+.if ${PERL_LEVEL} < 500600
+EXTRA_PATCHES=	${FILESDIR}/extrapatch-XPathContext.xs
 .endif
 
 .include <bsd.port.post.mk>
Index: files/extrapatch-XPathContext.xs
===================================================================
RCS file: files/extrapatch-XPathContext.xs
diff -N files/extrapatch-XPathContext.xs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/extrapatch-XPathContext.xs	16 Jan 2006 07:45:28 -0000
@@ -0,0 +1,18 @@
+--- XPathContext.xs.orig	Mon Jan 16 11:27:29 2006
++++ XPathContext.xs	Mon Jan 16 11:28:54 2006
+@@ -11,6 +11,15 @@
+ #include "XSUB.h"
+ #include "ppport.h"
+ 
++/* try to be compatible with older perls */
++/* SvPV_nolen() macro first defined in 5.005_55 */
++/* this is slow, not threadsafe, but works */
++#include "patchlevel.h"
++#if (PATCHLEVEL == 4) || ((PATCHLEVEL == 5) && (SUBVERSION < 55))
++static STRLEN nolen_na;
++# define SvPV_nolen(sv) SvPV ((sv), nolen_na)
++#endif
++
+ /* libxml2 stuff */
+ #include <libxml/xpath.h>
+ #include <libxml/xpathInternals.h>
--- p5-XML-LibXML-XPathContext-0.07.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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