diff options
author | Yen-Ming Lee <leeym@FreeBSD.org> | 2005-12-30 20:38:46 +0000 |
---|---|---|
committer | Yen-Ming Lee <leeym@FreeBSD.org> | 2005-12-30 20:38:46 +0000 |
commit | c06da79cfbfa4a8514ef25edd8257750fc7b1b5e (patch) | |
tree | fa2ef34fa8947565b4718960bb88b827af3cb68b /security/p5-Crypt-Rabbit | |
parent | 29e56c9935c1a3a7d271c30a9d1db4dfbbcaa6bb (diff) |
- remove IGNORE on old perl
Submitted by: leeym
Approved by: maintainer via email
Notes
Notes:
svn path=/head/; revision=152445
Diffstat (limited to 'security/p5-Crypt-Rabbit')
-rw-r--r-- | security/p5-Crypt-Rabbit/Makefile | 12 | ||||
-rw-r--r-- | security/p5-Crypt-Rabbit/files/extrapatch-Rabbit.xs | 18 |
2 files changed, 28 insertions, 2 deletions
diff --git a/security/p5-Crypt-Rabbit/Makefile b/security/p5-Crypt-Rabbit/Makefile index e021749a99ee..6962cd42873c 100644 --- a/security/p5-Crypt-Rabbit/Makefile +++ b/security/p5-Crypt-Rabbit/Makefile @@ -18,7 +18,15 @@ PERL_CONFIGURE= yes MAN3= Crypt::Rabbit.3 .include <bsd.port.pre.mk> -.if ${PERL_LEVEL} <= 500503 -IGNORE= requires Perl 5.6. Intall lang/perl5 or lang/perl5.8, and try again + +.if ${PERL_LEVEL} < 500600 +BUILD_DEPENDS+= ${SITE_PERL}/XSLoader.pm:${PORTSDIR}/devel/p5-XSLoader +RUN_DEPENDS+= ${SITE_PERL}/XSLoader.pm:${PORTSDIR}/devel/p5-XSLoader +EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-Rabbit.xs + +post-patch: + ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/Rabbit.pm + ${PERL} -pi -e '$$_="" if m{warnings}' ${WRKSRC}/Rabbit.pm ${WRKSRC}/t/*.t .endif + .include <bsd.port.post.mk> diff --git a/security/p5-Crypt-Rabbit/files/extrapatch-Rabbit.xs b/security/p5-Crypt-Rabbit/files/extrapatch-Rabbit.xs new file mode 100644 index 000000000000..ccff81e7ae2f --- /dev/null +++ b/security/p5-Crypt-Rabbit/files/extrapatch-Rabbit.xs @@ -0,0 +1,18 @@ +--- Rabbit.xs.orig Sat Dec 31 03:49:51 2005 ++++ Rabbit.xs Sat Dec 31 03:50:13 2005 +@@ -4,6 +4,15 @@ + #include "ppport.h" + #include "_rabbit.c" + ++/* 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 ++ + typedef struct rabbit { + t_instance state; + }* Crypt__Rabbit; |