aboutsummaryrefslogtreecommitdiffstats
path: root/security/p5-Crypt-Khazad
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2005-12-31 04:38:46 +0800
committerleeym <leeym@FreeBSD.org>2005-12-31 04:38:46 +0800
commit35eb7bc43e052958b25c8f8d3bc18344b97ea49e (patch)
tree103fdc1ba49d56446a14ad56585eef818b558917 /security/p5-Crypt-Khazad
parent2261c8374a7659ced17cb21e85132a66638967af (diff)
downloadfreebsd-ports-gnome-35eb7bc43e052958b25c8f8d3bc18344b97ea49e.tar.gz
freebsd-ports-gnome-35eb7bc43e052958b25c8f8d3bc18344b97ea49e.tar.zst
freebsd-ports-gnome-35eb7bc43e052958b25c8f8d3bc18344b97ea49e.zip
- remove IGNORE on old perl
Submitted by: leeym Approved by: maintainer via email
Diffstat (limited to 'security/p5-Crypt-Khazad')
-rw-r--r--security/p5-Crypt-Khazad/Makefile13
-rw-r--r--security/p5-Crypt-Khazad/files/extrapatch-Khazad.xs18
2 files changed, 29 insertions, 2 deletions
diff --git a/security/p5-Crypt-Khazad/Makefile b/security/p5-Crypt-Khazad/Makefile
index eba084670386..09635ac0bf08 100644
--- a/security/p5-Crypt-Khazad/Makefile
+++ b/security/p5-Crypt-Khazad/Makefile
@@ -18,7 +18,16 @@ PERL_CONFIGURE= yes
MAN3= Crypt::Khazad.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-Khazad.xs
+
+post-patch:
+ ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1); $$1/;' ${WRKSRC}/Khazad.pm
+ ${PERL} -pi -e '$$_="" if m{warnings}' ${WRKSRC}/Khazad.pm ${WRKSRC}/t/*.t
+ ${PERL} -pi -e 's/void/int argc, char**argv, char**env/ if m{int main}' ${WRKSRC}/_khazad.c
.endif
+
.include <bsd.port.post.mk>
diff --git a/security/p5-Crypt-Khazad/files/extrapatch-Khazad.xs b/security/p5-Crypt-Khazad/files/extrapatch-Khazad.xs
new file mode 100644
index 000000000000..b7c12bca7356
--- /dev/null
+++ b/security/p5-Crypt-Khazad/files/extrapatch-Khazad.xs
@@ -0,0 +1,18 @@
+--- Khazad.xs.orig Sat Dec 31 02:51:21 2005
++++ Khazad.xs Sat Dec 31 02:51:56 2005
+@@ -4,6 +4,15 @@
+ #include "ppport.h"
+ #include "_khazad.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 khazad {
+ NESSIEstruct key;
+ }* Crypt__Khazad;