diff options
author | leeym <leeym@FreeBSD.org> | 2005-12-24 10:58:47 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2005-12-24 10:58:47 +0800 |
commit | 52d2c3cb6764709b02beb046d581502709a185af (patch) | |
tree | 258476ee3f0c5ad0e14d86970c905c87818ebe51 /security/p5-Digest-FNV | |
parent | 1d3379833bc7a4c6bde258f12aa429bb5980445b (diff) | |
download | freebsd-ports-gnome-52d2c3cb6764709b02beb046d581502709a185af.tar.gz freebsd-ports-gnome-52d2c3cb6764709b02beb046d581502709a185af.tar.zst freebsd-ports-gnome-52d2c3cb6764709b02beb046d581502709a185af.zip |
- unbreak on old perl
Submitted by: leeym
Approved by: maintainer via email
Diffstat (limited to 'security/p5-Digest-FNV')
-rw-r--r-- | security/p5-Digest-FNV/Makefile | 13 | ||||
-rw-r--r-- | security/p5-Digest-FNV/files/extrapatch-FNV.xs | 18 |
2 files changed, 28 insertions, 3 deletions
diff --git a/security/p5-Digest-FNV/Makefile b/security/p5-Digest-FNV/Makefile index db7b6b32e2e4..038214451dff 100644 --- a/security/p5-Digest-FNV/Makefile +++ b/security/p5-Digest-FNV/Makefile @@ -13,12 +13,19 @@ PKGNAMEPREFIX= p5- MAINTAINER= gkovesdan@t-hosting.hu COMMENT= Perl extension for Fowler/Noll/Vo hash algorithm -PERL_CONFIGURE= yes +PERL_CONFIGURE= yes MAN3= Digest::FNV.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 +EXTRA_PATCHES= ${PATCHDIR}/extrapatch-FNV.xs + +post-patch: + ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/FNV.pm + ${PERL} -pi -e '$$_="" if m{5.006|warnings}' ${WRKSRC}/FNV.pm + ${PERL} -pi -e 's/ our / my /' ${WRKSRC}/FNV.pm .endif + .include <bsd.port.post.mk> diff --git a/security/p5-Digest-FNV/files/extrapatch-FNV.xs b/security/p5-Digest-FNV/files/extrapatch-FNV.xs new file mode 100644 index 000000000000..a8f06b4fb8e5 --- /dev/null +++ b/security/p5-Digest-FNV/files/extrapatch-FNV.xs @@ -0,0 +1,18 @@ +--- FNV.xs.orig Sat Dec 24 10:51:11 2005 ++++ FNV.xs Sat Dec 24 10:51:55 2005 +@@ -4,6 +4,15 @@ + + #include "fnvlib/fnv.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 ++ + static int + not_here(char *s) + { |