mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
- unbreak on old perl
Submitted by: leeym Approved by: maintainer via email
This commit is contained in:
parent
227b724c3e
commit
3d222d414d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=151953
@ -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>
|
||||
|
18
security/p5-Digest-FNV/files/extrapatch-FNV.xs
Normal file
18
security/p5-Digest-FNV/files/extrapatch-FNV.xs
Normal file
@ -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)
|
||||
{
|
Loading…
Reference in New Issue
Block a user