aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorskv <skv@FreeBSD.org>2005-12-29 20:42:14 +0800
committerskv <skv@FreeBSD.org>2005-12-29 20:42:14 +0800
commit76b016e212ad5dc2458d876e6991201e296a405e (patch)
treed6c413aed063fde54cd36a933dacc1286e74edf3 /security
parentac321899ce3ae1a173655eab882d182072e0a545 (diff)
downloadfreebsd-ports-gnome-76b016e212ad5dc2458d876e6991201e296a405e.tar.gz
freebsd-ports-gnome-76b016e212ad5dc2458d876e6991201e296a405e.tar.zst
freebsd-ports-gnome-76b016e212ad5dc2458d876e6991201e296a405e.zip
* unbreak on old perl.
* change MAINTAINER to perl@ PR: ports/90878 Submitted by: leeym
Diffstat (limited to 'security')
-rw-r--r--security/p5-Digest-SHA2/Makefile9
-rw-r--r--security/p5-Digest-SHA2/files/extrapatch-SHA2.xs18
2 files changed, 25 insertions, 2 deletions
diff --git a/security/p5-Digest-SHA2/Makefile b/security/p5-Digest-SHA2/Makefile
index ca3b71188b64..1f2c385c9bff 100644
--- a/security/p5-Digest-SHA2/Makefile
+++ b/security/p5-Digest-SHA2/Makefile
@@ -12,7 +12,7 @@ MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Digest
PKGNAMEPREFIX= p5-
-MAINTAINER= skv@FreeBSD.org
+MAINTAINER= perl@FreeBSD.org
COMMENT= Perl interface to the SHA-2 algorithms
BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \
@@ -26,7 +26,12 @@ MAN3= Digest::SHA2.3
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500600
-IGNORE= Perl 5.6 or newer required. Install lang/perl5 or lang/perl5.8 and try again.
+EXTRA_PATCHES= ${PATCHDIR}/extrapatch-SHA2.xs
+
+post-patch:
+ ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/SHA2.pm
+ ${PERL} -pi -e '$$_="" if m{warnings}' ${WRKSRC}/SHA2.pm ${WRKSRC}/t/*.t
+ ${PERL} -pi -e 's/\)/, char **env\)/ if m{int main}' ${WRKSRC}/_sha2.c
.endif
.include <bsd.port.post.mk>
diff --git a/security/p5-Digest-SHA2/files/extrapatch-SHA2.xs b/security/p5-Digest-SHA2/files/extrapatch-SHA2.xs
new file mode 100644
index 000000000000..714688236e03
--- /dev/null
+++ b/security/p5-Digest-SHA2/files/extrapatch-SHA2.xs
@@ -0,0 +1,18 @@
+--- SHA2.xs.orig Sat Dec 24 21:15:29 2005
++++ SHA2.xs Sat Dec 24 21:16:10 2005
+@@ -4,6 +4,15 @@
+ #include "ppport.h"
+ #include "_sha2.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 sha2 {
+ SHA256_CTX ctx256;
+ SHA384_CTX ctx384;