summaryrefslogtreecommitdiff
path: root/lang/perl5
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-05-06 12:32:20 +0000
committerjlam <jlam@pkgsrc.org>2006-05-06 12:32:20 +0000
commitdc6d9903177976fd2ee793f320e7347ab72b4334 (patch)
tree7e1c51ade36fcb4d7bf192d170b438a38f2db8a4 /lang/perl5
parenta1d00c39318f5d5f66f9a640fd28ea7b068e4bda (diff)
downloadpkgsrc-dc6d9903177976fd2ee793f320e7347ab72b4334.tar.gz
GCC versions prior to 3.4 have a bug handling the "unused" attribute
in declarations when compiling C++ code. Patch the perl.h and XSUB.h headers to avoid using this attribute if using GCC<3.4 and building C++ modules. This fixes PR pkg/33403 by OBATA Akio. Bump PKGREVISION to 2.
Diffstat (limited to 'lang/perl5')
-rw-r--r--lang/perl5/Makefile4
-rw-r--r--lang/perl5/distinfo4
-rw-r--r--lang/perl5/patches/patch-aq26
-rw-r--r--lang/perl5/patches/patch-ar33
4 files changed, 64 insertions, 3 deletions
diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile
index 3a94114f3b9..19d97d6cd34 100644
--- a/lang/perl5/Makefile
+++ b/lang/perl5/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.119 2006/04/11 22:51:23 jlam Exp $
+# $NetBSD: Makefile,v 1.120 2006/05/06 12:32:20 jlam Exp $
DISTNAME= perl-5.8.8
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:S,/modules/by-module/$,/src/,}
EXTRACT_SUFX= .tar.bz2
diff --git a/lang/perl5/distinfo b/lang/perl5/distinfo
index fa93a2bb36f..86ba332df50 100644
--- a/lang/perl5/distinfo
+++ b/lang/perl5/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.33 2006/04/09 06:34:32 jlam Exp $
+$NetBSD: distinfo,v 1.34 2006/05/06 12:32:20 jlam Exp $
SHA1 (perl-5.8.8.tar.bz2) = 4aab490040727ca4419098720eca2ba4367df539
RMD160 (perl-5.8.8.tar.bz2) = e78f26d9b96e6db35f946ad4ff55e3a69385c71b
@@ -9,6 +9,8 @@ SHA1 (patch-ah) = 39b1a46a0ee5e73b4707a3d947fe17016df9630a
SHA1 (patch-am) = cf1687063d0c0542e811545aaaad291bad12d75e
SHA1 (patch-an) = 987763c3098bf4356993dd6d8741962a1ff8190d
SHA1 (patch-ap) = 178d6909a8aa6544b849c2b63530fcf1893b77ea
+SHA1 (patch-aq) = b9569d0cd74a06912e82498cd2bfba131c0b6f3b
+SHA1 (patch-ar) = 9d257ceeca337e3d477b80215560bbc290d19dd2
SHA1 (patch-ba) = 096835f71a69f29e50bdad47944afa838dba5aec
SHA1 (patch-ca) = 5ed14e043a6d5f8dadf5711b59418f01aa5f6f21
SHA1 (patch-cb) = 65e523885a404b79349a5c9601fe52965772d820
diff --git a/lang/perl5/patches/patch-aq b/lang/perl5/patches/patch-aq
new file mode 100644
index 00000000000..76765fc4106
--- /dev/null
+++ b/lang/perl5/patches/patch-aq
@@ -0,0 +1,26 @@
+$NetBSD: patch-aq,v 1.1 2006/05/06 12:32:20 jlam Exp $
+
+--- XSUB.h.orig 2006-01-02 09:45:29.000000000 -0500
++++ XSUB.h
+@@ -85,17 +85,16 @@ handled automatically by C<xsubpp>.
+ #ifndef PERL_UNUSED_VAR
+ # define PERL_UNUSED_VAR(x) ((void)x)
+ #endif
++#ifndef PERL_UNUSED_DECL
++# define PERL_UNUSED_DECL
++#endif
+
+ #define ST(off) PL_stack_base[ax + (off)]
+
+ #if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
+ # define XS(name) __declspec(dllexport) void name(pTHX_ CV* cv)
+ #else
+-# ifdef HASATTRIBUTE_UNUSED
+-# define XS(name) void name(pTHX_ CV* cv __attribute__unused__)
+-# else
+-# define XS(name) void name(pTHX_ CV* cv)
+-# endif
++# define XS(name) void name(pTHX_ CV* cv PERL_UNUSED_DECL)
+ #endif
+
+ #define dAX const I32 ax = MARK - PL_stack_base + 1
diff --git a/lang/perl5/patches/patch-ar b/lang/perl5/patches/patch-ar
new file mode 100644
index 00000000000..ddc939b25bd
--- /dev/null
+++ b/lang/perl5/patches/patch-ar
@@ -0,0 +1,33 @@
+$NetBSD: patch-ar,v 1.1 2006/05/06 12:32:20 jlam Exp $
+
+--- perl.h.orig 2006-01-13 13:17:12.000000000 -0500
++++ perl.h
+@@ -150,6 +150,15 @@ struct perl_thread;
+ # define CALLPROTECT CALL_FPTR(PL_protect)
+ #endif
+
++/* GCC versions prior to 3.4 have a bug handling the "unused" attribute
++ * in declarations when compiling C++ code.
++ */
++#if defined(__GNUC__) && defined(__cplusplus)
++# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
++# define PERL_UNUSED_DECL
++# endif
++#endif
++
+ #if defined(SYMBIAN) && defined(__GNUC__)
+ # ifdef __cplusplus
+ # define PERL_UNUSED_DECL
+@@ -2375,7 +2384,11 @@ typedef struct clone_params CLONE_PARAMS
+ # define HASATTRIBUTE_PURE
+ # endif
+ # if __GNUC__ >= 3 /* gcc 3.0 -> */ /* XXX Verify this version */
+-# define HASATTRIBUTE_UNUSED
++# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3) /* 3.4 -> */
++# define HASATTRIBUTE_UNUSED
++# elif !defined(__cplusplus)
++# define HASATTRIBUTE_UNUSED
++# endif
+ # endif
+ # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */
+ # define HASATTRIBUTE_WARN_UNUSED_RESULT