aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorskv <skv@FreeBSD.org>2004-05-17 00:12:38 +0800
committerskv <skv@FreeBSD.org>2004-05-17 00:12:38 +0800
commitd9b9da4f7d22c02304270cd01cd5bc66213d5e39 (patch)
treed4b1f495383f416064f8fd575255e56e816c77a0 /textproc
parent9006dc7754ff6c078c1adfd964037f1cb206b8b8 (diff)
downloadfreebsd-ports-graphics-d9b9da4f7d22c02304270cd01cd5bc66213d5e39.tar.gz
freebsd-ports-graphics-d9b9da4f7d22c02304270cd01cd5bc66213d5e39.tar.zst
freebsd-ports-graphics-d9b9da4f7d22c02304270cd01cd5bc66213d5e39.zip
Fix compile on perl 5.00503
Pinted by: Aaron Scarisbrick <aaronsca@firetrack.net>
Diffstat (limited to 'textproc')
-rw-r--r--textproc/p5-XML-LibXML/Makefile4
-rw-r--r--textproc/p5-XML-LibXML/files/500503-patch-LibXML.xs22
2 files changed, 26 insertions, 0 deletions
diff --git a/textproc/p5-XML-LibXML/Makefile b/textproc/p5-XML-LibXML/Makefile
index d88cabfb42d..2013a3e17f3 100644
--- a/textproc/p5-XML-LibXML/Makefile
+++ b/textproc/p5-XML-LibXML/Makefile
@@ -37,4 +37,8 @@ MAN3= XML::LibXML.3 XML::LibXML::Attr.3 XML::LibXML::Boolean.3 \
.include <bsd.port.pre.mk>
+.if ${PERL_LEVEL} < 500600
+EXTRA_PATCHES= ${FILESDIR}/500503-*
+.endif
+
.include <bsd.port.post.mk>
diff --git a/textproc/p5-XML-LibXML/files/500503-patch-LibXML.xs b/textproc/p5-XML-LibXML/files/500503-patch-LibXML.xs
new file mode 100644
index 00000000000..0572e45a352
--- /dev/null
+++ b/textproc/p5-XML-LibXML/files/500503-patch-LibXML.xs
@@ -0,0 +1,22 @@
+--- LibXML.xs.orig Sun May 16 19:56:30 2004
++++ LibXML.xs Sun May 16 19:57:29 2004
+@@ -75,6 +75,19 @@
+ #define TEST_PERL_FLAG(flag) \
+ SvTRUE(perl_get_sv(flag, FALSE)) ? 1 : 0
+
++#ifndef SvPV_nolen
++#define SvPV_nolen(sv) \
++ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
++ ? SvPVX(sv) : sv_2pv_nolen(sv))
++
++static char *
++sv_2pv_nolen(register SV *sv)
++{
++ STRLEN n_a;
++ return sv_2pv(sv, &n_a);
++}
++#endif
++
+ static SV * LibXML_match_cb = NULL;
+ static SV * LibXML_read_cb = NULL;
+ static SV * LibXML_open_cb = NULL;