* unbreak on old perl.
* change MAINTAINER to perl@ PR: ports/90878 Submitted by: leeym
This commit is contained in:
parent
bec4485edb
commit
223116622d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=152348
2 changed files with 25 additions and 2 deletions
|
@ -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>
|
||||
|
|
18
security/p5-Digest-SHA2/files/extrapatch-SHA2.xs
Normal file
18
security/p5-Digest-SHA2/files/extrapatch-SHA2.xs
Normal file
|
@ -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;
|
Loading…
Reference in a new issue