aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2004-08-19 16:20:11 +0000
committerMathieu Arnold <mat@FreeBSD.org>2004-08-19 16:20:11 +0000
commit0dcbb3207ce6a44cfa30fb333e3d6067bf9223ce (patch)
tree9648b1b78eeba2a08498e52dd9a154a5465d8d2a /www
parentd4540c96cf197e97f68a88c9d4c56904a6805791 (diff)
downloadports-0dcbb3207ce6a44cfa30fb333e3d6067bf9223ce.tar.gz
ports-0dcbb3207ce6a44cfa30fb333e3d6067bf9223ce.zip
Notes
Diffstat (limited to 'www')
-rw-r--r--www/p5-HTML-Template-JIT/Makefile10
-rw-r--r--www/p5-HTML-Template-JIT/files/patch-Compiler.pm11
-rw-r--r--www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm11
-rw-r--r--www/p5-HTML-Template-JIT/files/patch-t::03loops.t22
-rw-r--r--www/p5-HTML-Template-JIT/files/patch-t::10escape.t22
5 files changed, 73 insertions, 3 deletions
diff --git a/www/p5-HTML-Template-JIT/Makefile b/www/p5-HTML-Template-JIT/Makefile
index 712f2499eec5..85a8aac7bfe7 100644
--- a/www/p5-HTML-Template-JIT/Makefile
+++ b/www/p5-HTML-Template-JIT/Makefile
@@ -7,7 +7,7 @@
PORTNAME= HTML-Template-JIT
PORTVERSION= 0.04
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= HTML
@@ -22,12 +22,17 @@ BUILD_DEPENDS= ${SITE_PERL}/HTML/Template.pm:${PORTSDIR}/www/p5-HTML-Template \
RUN_DEPENDS= ${BUILD_DEPENDS}
PERL_CONFIGURE= yes
+INSTALL_TARGET= pure_install
MAN3= HTML::Template::JIT.3 HTML::Template::JIT::Compiler.3 \
HTML::Template::JIT::Base.3
.include <bsd.port.pre.mk>
+.if ${PERL_LEVEL} < 500600
+EXTRA_PATCHES= ${PATCHDIR}/5.005-JIT-Compiler.pm
+.endif
+
post-patch:
@${PERL} -i -pe 's/indent -kr/indent/' \
${WRKSRC}/JIT/Compiler.pm
@@ -36,8 +41,7 @@ post-patch:
-e 's/\bour ([^ ;]+)/use vars qw{$$1};$$1/g;' \
${WRKSRC}/Makefile.PL ${WRKSRC}/JIT.pm \
${WRKSRC}/JIT/Base.pm ${WRKSRC}/JIT/Compiler.pm
-
-EXTRA_PATCHES= ${PATCHDIR}/5.005-JIT-Compiler.pm
.endif
+ @${FIND} ${WRKSRC} -name '*.orig' -delete
.include <bsd.port.post.mk>
diff --git a/www/p5-HTML-Template-JIT/files/patch-Compiler.pm b/www/p5-HTML-Template-JIT/files/patch-Compiler.pm
new file mode 100644
index 000000000000..70315eb7a2dd
--- /dev/null
+++ b/www/p5-HTML-Template-JIT/files/patch-Compiler.pm
@@ -0,0 +1,11 @@
+--- Compiler.pm.orig Tue May 18 18:32:59 2004
++++ JIT/Compiler.pm Tue May 18 18:33:52 2004
+@@ -131,7 +131,7 @@
+ SV * temp_sv;
+ int i;
+ STRLEN len;
+- char c;
++ unsigned char c;
+ char buf[4];
+
+ SvPOK_on(result);
diff --git a/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm b/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm
new file mode 100644
index 000000000000..22b99d125050
--- /dev/null
+++ b/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm
@@ -0,0 +1,11 @@
+--- JIT/Base.pm Wed Jun 9 15:31:15 2004
++++ JIT/Base.pm Wed Jun 9 15:34:32 2004
+@@ -75,7 +75,7 @@
+
+ foreach my $row (@$array) {
+ croak("Bad param settings - found non hash-ref for loop row in loop $loop_name!")
+- unless ref $row eq 'HASH';
++ unless ref $row && UNIVERSAL::isa($row, 'HASH');
+
+ my $lc_name;
+ foreach my $name (keys %$row) {
diff --git a/www/p5-HTML-Template-JIT/files/patch-t::03loops.t b/www/p5-HTML-Template-JIT/files/patch-t::03loops.t
new file mode 100644
index 000000000000..83ebcd4f2ea1
--- /dev/null
+++ b/www/p5-HTML-Template-JIT/files/patch-t::03loops.t
@@ -0,0 +1,22 @@
+--- t/03loops.t Wed Jun 9 15:57:13 2004
++++ t/03loops.t Wed Jun 9 16:00:15 2004
+@@ -1,4 +1,4 @@
+-use Test::More tests => 8;
++use Test::More tests => 9;
+ use HTML::Template::JIT;
+
+ my $debug = 0;
+@@ -69,3 +69,13 @@
+ like($output, qr/Apples, Oranges, Brains, Toes, and Kiwi./);
+ like($output, qr/pingpongpingpongpingpong/);
+
++$template = HTML::Template::JIT->new(filename => 'loop.tmpl',
++ path => ['t/templates'],
++ jit_path => 't/jit_path',
++ jit_debug => $debug,
++ );
++$template->param(foo => "FOO");
++$template->param(bar => [ bless({ val => 'foo' }, 'barfoo'),
++ bless({ val => 'bar' }, 'barbar') ]);
++$output = $template->output();
++like($output, qr/bar: foo,bar,/);
diff --git a/www/p5-HTML-Template-JIT/files/patch-t::10escape.t b/www/p5-HTML-Template-JIT/files/patch-t::10escape.t
new file mode 100644
index 000000000000..a2f5f54eab5f
--- /dev/null
+++ b/www/p5-HTML-Template-JIT/files/patch-t::10escape.t
@@ -0,0 +1,22 @@
+--- t/10escape.t Tue May 18 18:39:12 2004
++++ t/10escape.t Tue May 18 18:42:03 2004
+@@ -1,4 +1,4 @@
+-use Test::More tests => 3;
++use Test::More tests => 4;
+ use HTML::Template::JIT;
+ my $debug = 0;
+
+@@ -35,3 +35,13 @@
+ $output = $template->output;
+ like($output, qr/Some URL escaped stuff:/);
+
++# test 8bit char in urlescaped var
++$template = HTML::Template::JIT->new(
++ filename => 'urlescape.tmpl',
++ path => ['t/templates'],
++ jit_path => 't/jit_path',
++ jit_debug => $debug,
++ );
++$template->param(STUFF => "\xf4"); #"
++$output = $template->output;
++like($output, qr/%F4/); #"