aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2005-12-24 11:09:36 +0800
committerleeym <leeym@FreeBSD.org>2005-12-24 11:09:36 +0800
commit19b2cf2d5f433402dc2f7b2e2e080ad328a64458 (patch)
tree27bcb378773b5621d3a05d719bf0afc27c1516b9 /security
parent52d2c3cb6764709b02beb046d581502709a185af (diff)
downloadfreebsd-ports-gnome-19b2cf2d5f433402dc2f7b2e2e080ad328a64458.tar.gz
freebsd-ports-gnome-19b2cf2d5f433402dc2f7b2e2e080ad328a64458.tar.zst
freebsd-ports-gnome-19b2cf2d5f433402dc2f7b2e2e080ad328a64458.zip
- unbreak on old perl
Submitted by: leeym Approved by: maintainer
Diffstat (limited to 'security')
-rw-r--r--security/p5-Digest-ManberHash/Makefile11
-rw-r--r--security/p5-Digest-ManberHash/files/extrapatch-ManberHash.xs26
2 files changed, 34 insertions, 3 deletions
diff --git a/security/p5-Digest-ManberHash/Makefile b/security/p5-Digest-ManberHash/Makefile
index 80438a5c276f..31ed13cec741 100644
--- a/security/p5-Digest-ManberHash/Makefile
+++ b/security/p5-Digest-ManberHash/Makefile
@@ -13,12 +13,17 @@ PKGNAMEPREFIX= p5-
MAINTAINER= gkovesdan@t-hosting.hu
COMMENT= Perl extension for ManberHash hash algorithm
-PERL_CONFIGURE= yes
+PERL_CONFIGURE= yes
MAN3= Digest::ManberHash.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-ManberHash.xs
+
+post-patch:
+ ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/ManberHash.pm
.endif
+
.include <bsd.port.post.mk>
diff --git a/security/p5-Digest-ManberHash/files/extrapatch-ManberHash.xs b/security/p5-Digest-ManberHash/files/extrapatch-ManberHash.xs
new file mode 100644
index 000000000000..930e09254f4f
--- /dev/null
+++ b/security/p5-Digest-ManberHash/files/extrapatch-ManberHash.xs
@@ -0,0 +1,26 @@
+--- ManberHash.xs.orig Sat Dec 24 11:04:38 2005
++++ ManberHash.xs Sat Dec 24 11:04:06 2005
+@@ -3,6 +3,14 @@
+ #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 BUFFER_SIZE (8192)
+ #define BUFFER_2SIZE (BUFFER_SIZE*2)
+@@ -105,7 +113,7 @@
+ }
+ */
+
+- fh=open(filename,O_RDONLY);
++ fh=open(filename,0000);
+ if (fh<0)
+ return;
+