aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textproc/p5-XML-LibXML-XPathContext/Makefile4
-rw-r--r--textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs18
2 files changed, 20 insertions, 2 deletions
diff --git a/textproc/p5-XML-LibXML-XPathContext/Makefile b/textproc/p5-XML-LibXML-XPathContext/Makefile
index c57fceda2826..75846ddfa386 100644
--- a/textproc/p5-XML-LibXML-XPathContext/Makefile
+++ b/textproc/p5-XML-LibXML-XPathContext/Makefile
@@ -24,8 +24,8 @@ MAN3= XML::LibXML::XPathContext.3
.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>
diff --git a/textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs b/textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs
new file mode 100644
index 000000000000..c7c70048dec1
--- /dev/null
+++ b/textproc/p5-XML-LibXML-XPathContext/files/extrapatch-XPathContext.xs
@@ -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>