diff options
author | leeym <leeym@FreeBSD.org> | 2005-12-24 10:50:55 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2005-12-24 10:50:55 +0800 |
commit | 1312f2873e8320b408a8c42762becf9cc3c7a2a0 (patch) | |
tree | 59ef8c195d41cbb79d2efcf930876d12f12e427f /security/p5-Digest-DJB | |
parent | 5c31719a09fef6df9b79f6fa043abcdf8bd09822 (diff) | |
download | freebsd-ports-graphics-1312f2873e8320b408a8c42762becf9cc3c7a2a0.tar.gz freebsd-ports-graphics-1312f2873e8320b408a8c42762becf9cc3c7a2a0.tar.zst freebsd-ports-graphics-1312f2873e8320b408a8c42762becf9cc3c7a2a0.zip |
- unbreak on old perl
Submitted by: leeym
Approved by: maintainer via email
Diffstat (limited to 'security/p5-Digest-DJB')
-rw-r--r-- | security/p5-Digest-DJB/Makefile | 12 | ||||
-rw-r--r-- | security/p5-Digest-DJB/files/extrapatch-DJB.xs | 18 |
2 files changed, 27 insertions, 3 deletions
diff --git a/security/p5-Digest-DJB/Makefile b/security/p5-Digest-DJB/Makefile index 6fbd06e2846..5dda97e6aad 100644 --- a/security/p5-Digest-DJB/Makefile +++ b/security/p5-Digest-DJB/Makefile @@ -13,12 +13,18 @@ PKGNAMEPREFIX= p5- MAINTAINER= gkovesdan@t-hosting.hu COMMENT= Perl extension for D.J Bernstein's hash algorithm -PERL_CONFIGURE= yes +PERL_CONFIGURE= yes MAN3= Digest::DJB.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-DJB.xs + +post-patch: + ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/DJB.pm + ${PERL} -pi -e '$$_="" if m{5.006|warnings}' ${WRKSRC}/DJB.pm .endif + .include <bsd.port.post.mk> diff --git a/security/p5-Digest-DJB/files/extrapatch-DJB.xs b/security/p5-Digest-DJB/files/extrapatch-DJB.xs new file mode 100644 index 00000000000..c019027fa0b --- /dev/null +++ b/security/p5-Digest-DJB/files/extrapatch-DJB.xs @@ -0,0 +1,18 @@ +--- DJB.xs.orig Sat Dec 24 10:44:54 2005 ++++ DJB.xs Sat Dec 24 10:45:41 2005 +@@ -2,6 +2,15 @@ + #include "perl.h" + #include "XSUB.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 ++ + #define UCHAR unsigned char + + size_t |