From leeym@utopia.leeym.com  Mon Jan 16 07:46:02 2006
Return-Path: <leeym@utopia.leeym.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EF7A616A41F;
	Mon, 16 Jan 2006 07:46:02 +0000 (GMT)
	(envelope-from leeym@utopia.leeym.com)
Received: from msr43.hinet.net (msr43.hinet.net [168.95.4.143])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E839443D5A;
	Mon, 16 Jan 2006 07:46:01 +0000 (GMT)
	(envelope-from leeym@utopia.leeym.com)
Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52])
	by msr43.hinet.net (8.9.3/8.9.3) with ESMTP id PAA07743;
	Mon, 16 Jan 2006 15:45:55 +0800 (CST)
Received: from localhost (localhost [127.0.0.1])
	by utopia.leeym.com (Postfix) with ESMTP id C4B73B29DE2;
	Mon, 16 Jan 2006 15:45:54 +0800 (CST)
Received: from utopia.leeym.com ([127.0.0.1])
 by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 04670-10; Mon, 16 Jan 2006 15:45:50 +0800 (CST)
Received: by utopia.leeym.com (Postfix, from userid 1000)
	id 4F8A0B29D0D; Mon, 16 Jan 2006 15:45:50 +0800 (CST)
Message-Id: <20060116074550.4F8A0B29D0D@utopia.leeym.com>
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: [PATCH] textproc/p5-XML-LibXML-XPathContext: unbreak on old perl
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         91862
>Category:       ports
>Synopsis:       [PATCH] textproc/p5-XML-LibXML-XPathContext: unbreak on old perl
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mat
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 16 07:50:05 GMT 2006
>Closed-Date:    Mon Jan 30 15:21:08 GMT 2006
>Last-Modified:  Mon Jan 30 15:21:08 GMT 2006
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->mat 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jan 16 07:52:11 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91862 
State-Changed-From-To: open->closed 
State-Changed-By: garga 
State-Changed-When: Mon Jan 30 15:21:06 UTC 2006 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=91862 
>Unformatted:
