ports/150149: [update] Fix p5-Data-Alias to compile on Perl 5.12
Bill Brinzer
bill.brinzer at gmail.com
Tue Aug 31 13:30:03 UTC 2010
>Number: 150149
>Category: ports
>Synopsis: [update] Fix p5-Data-Alias to compile on Perl 5.12
>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: Tue Aug 31 13:30:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:
>Release: FreeBSD 7.3-RELEASE-p2 i386
>Organization:
Meyer & Associates, Inc.
>Environment:
System: FreeBSD water.mfrac.vpn 7.3-RELEASE-p2 FreeBSD 7.3-RELEASE-p2 #7: Tue Jul 13 13:58:34 EDT 2010 root at water.mfrac.vpn:/export/FreeBSD/7.x/obj/usr/src/sys/SMITHWICKS i386
>Description:
Perl port devel/p5-Data-Alias fails to build on Perl 5.12:
===> Building for p5-Data-Alias-1.07
cp lib/Data/Alias.pm blib/lib/Data/Alias.pm
/usr/local/bin/perl5.12.1 "-Iinc" /usr/local/lib/perl5/site_perl/5.12.1/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.12.1/ExtUtils/typemap Alias.xs > Alias.xsc && mv Alias.xsc Alias.c
cc -c -O -pipe -O -pipe -DVERSION=\"1.07\" -DXS_VERSION=\"1.07\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.12.1/mach/CORE" Alias.c
Alias.xs: In function 'da_localize_gvar':
Alias.xs:369: error: 'Nullsv' undeclared (first use in this function)
Alias.xs:369: error: (Each undeclared identifier is reported only once
Alias.xs:369: error: for each function it appears in.)
Alias.xs: In function 'da_refgen':
Alias.xs:376: error: 'SVt_RV' undeclared (first use in this function)
Alias.xs: In function 'DataAlias_pp_rv2sv':
Alias.xs:690: warning: 'PL_no_symref' is deprecated (declared at /usr/local/lib/perl5/5.12.1/mach/CORE/perl.h:4241)
Alias.xs: In function 'DataAlias_pp_rv2gv':
Alias.xs:747: warning: 'PL_no_symref' is deprecated (declared at /usr/local/lib/perl5/5.12.1/mach/CORE/perl.h:4241)
Alias.xs: In function 'DataAlias_pp_return':
Alias.xs:1251: error: 'Nullsv' undeclared (first use in this function)
Alias.xs: In function 'da_transform':
Alias.xs:1436: error: 'Nullop' undeclared (first use in this function)
Alias.xs:1450: error: 'OP_SETSTATE' undeclared (first use in this function)
Alias.xs: In function 'da_peep2':
Alias.xs:1589: error: 'OP_SETSTATE' undeclared (first use in this function)
Alias.xs: In function 'da_ck_entersub':
Alias.xs:1767: error: 'Nullop' undeclared (first use in this function)
*** Error code 1
Stop in /usr/ports/devel/p5-Data-Alias/work/Data-Alias-1.07.
*** Error code 1
Stop in /usr/ports/devel/p5-Data-Alias.
>How-To-Repeat:
Attempt to build devel/p5-Data-Alias with Perl 5.12 installed.
Upstream has been broken since May with no fix in sight:
<https://rt.cpan.org/Public/Bug/Display.html?id=36165>
>Fix:
This patch is based on the one in Debian bug #578547:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578547>
This patch just gets the port compiling. As noted in the Debian
bug, only Data::Alias::deref() works with the patch. This is all
that's needed for devel/p5-Data-Visitor, which in turn is used by
p5-Catalyst-Devel and some other major Catalyst ports.
--- p5-Data-Alias-1.07_1.patch begins here ---
diff -urN p5-Data-Alias.orig/Makefile p5-Data-Alias/Makefile
--- p5-Data-Alias.orig/Makefile 2007-10-05 02:41:05.000000000 -0400
+++ p5-Data-Alias/Makefile 2010-08-25 09:38:59.000000000 -0400
@@ -7,6 +7,7 @@
PORTNAME= Data-Alias
PORTVERSION= 1.07
+PORTREVISION= 1
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
diff -urN p5-Data-Alias.orig/files/patch-Alias.xs p5-Data-Alias/files/patch-Alias.xs
--- p5-Data-Alias.orig/files/patch-Alias.xs 1969-12-31 19:00:00.000000000 -0500
+++ p5-Data-Alias/files/patch-Alias.xs 2010-08-25 09:36:02.000000000 -0400
@@ -0,0 +1,69 @@
+--- Alias.xs
++++ Alias.xs
+@@ -75,6 +75,10 @@
+ #define SvPVX_const SvPVX
+ #endif
+
++#if (PERL_COMBI_VERSION >= 5011000)
++#define SVt_RV SVt_IV
++#endif
++
+ #ifndef SvREFCNT_inc_NN
+ #define SvREFCNT_inc_NN SvREFCNT_inc
+ #endif
+@@ -366,7 +370,7 @@ STATIC void da_localize_gvar(pTHX_ GP *gp, SV **sptr) {
+ SSPUSHPTR(gp);
+ SSPUSHINT(SAVEt_DESTRUCTOR_X);
+ ++gp->gp_refcnt;
+- *sptr = Nullsv;
++ *sptr = NULL;
+ }
+
+ STATIC SV *da_refgen(pTHX_ SV *sv) {
+@@ -1248,7 +1252,7 @@ OP *DataAlias_pp_return(pTHX) {
+ cxstack_ix--;
+ POPSUB(cx, sv);
+ } else {
+- sv = Nullsv;
++ sv = NULL;
+ }
+ PL_curpm = newpm;
+ LEAVESUB(sv);
+@@ -1433,7 +1437,7 @@ STATIC int da_transform(pTHX_ OP *op, int sib) {
+ int hits = 0;
+
+ while (op) {
+- OP *kid = Nullop, *tmp;
++ OP *kid = NULL, *tmp;
+ int ksib = TRUE;
+ OPCODE optype;
+
+@@ -1447,7 +1451,9 @@ STATIC int da_transform(pTHX_ OP *op, int sib) {
+ default:
+ --hits;
+ switch (optype) {
++#if PERL_COMBI_VERSION < 5006000
+ case OP_SETSTATE:
++#endif
+ case OP_NEXTSTATE:
+ case OP_DBSTATE:
+ PL_curcop = (COP *) op;
+@@ -1586,7 +1592,9 @@ STATIC int da_peep2(pTHX_ OP *o) {
+ if (da_peep2(aTHX_ k))
+ return 1;
+ } else switch (o->op_type ? o->op_type : o->op_targ) {
++#if PERL_COMBI_VERSION < 5006000
+ case OP_SETSTATE:
++#endif
+ case OP_NEXTSTATE:
+ case OP_DBSTATE:
+ PL_curcop = (COP *) o;
+@@ -1764,7 +1772,7 @@ STATIC OP *da_ck_entersub(pTHX_ OP *o) {
+ kUNOP->op_first = last;
+ while (kid->op_sibling != last)
+ kid = kid->op_sibling;
+- kid->op_sibling = Nullop;
++ kid->op_sibling = NULL;
+ cLISTOPx(cUNOPo->op_first)->op_last = kid;
+ if (kid->op_type == OP_NULL && inside)
+ kid->op_flags &= ~OPf_SPECIAL;
--- p5-Data-Alias-1.07_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list