aboutsummaryrefslogtreecommitdiff
path: root/security/p5-Crypt-Shark
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2005-12-30 20:38:46 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2005-12-30 20:38:46 +0000
commitc06da79cfbfa4a8514ef25edd8257750fc7b1b5e (patch)
treefa2ef34fa8947565b4718960bb88b827af3cb68b /security/p5-Crypt-Shark
parent29e56c9935c1a3a7d271c30a9d1db4dfbbcaa6bb (diff)
downloadports-c06da79cfbfa4a8514ef25edd8257750fc7b1b5e.tar.gz
ports-c06da79cfbfa4a8514ef25edd8257750fc7b1b5e.zip
Notes
Diffstat (limited to 'security/p5-Crypt-Shark')
-rw-r--r--security/p5-Crypt-Shark/Makefile13
-rw-r--r--security/p5-Crypt-Shark/files/extrapatch-Shark.xs18
2 files changed, 29 insertions, 2 deletions
diff --git a/security/p5-Crypt-Shark/Makefile b/security/p5-Crypt-Shark/Makefile
index 8d3548140cb6..740b28c4d6ef 100644
--- a/security/p5-Crypt-Shark/Makefile
+++ b/security/p5-Crypt-Shark/Makefile
@@ -18,7 +18,16 @@ PERL_CONFIGURE= yes
MAN3= Crypt::Shark.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
+BUILD_DEPENDS+= ${SITE_PERL}/XSLoader.pm:${PORTSDIR}/devel/p5-XSLoader
+RUN_DEPENDS+= ${SITE_PERL}/XSLoader.pm:${PORTSDIR}/devel/p5-XSLoader
+EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-Shark.xs
+
+post-patch:
+ ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/Shark.pm
+ ${PERL} -pi -e 's/void/int argc, char**argv, char**env/ if m{int main}' ${WRKSRC}/_shark.c
+ ${PERL} -pi -e '$$_="" if m{warnings}' ${WRKSRC}/Shark.pm ${WRKSRC}/t/*.t
.endif
+
.include <bsd.port.post.mk>
diff --git a/security/p5-Crypt-Shark/files/extrapatch-Shark.xs b/security/p5-Crypt-Shark/files/extrapatch-Shark.xs
new file mode 100644
index 000000000000..baec9dae7647
--- /dev/null
+++ b/security/p5-Crypt-Shark/files/extrapatch-Shark.xs
@@ -0,0 +1,18 @@
+--- Shark.xs.orig Sat Dec 31 04:10:06 2005
++++ Shark.xs Sat Dec 31 04:10:37 2005
+@@ -4,6 +4,15 @@
+ #include "ppport.h"
+ #include "_shark.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 shark {
+ ddword roundkey_enc[14];
+ ddword roundkey_dec[14];