diff options
author | mat <mat@FreeBSD.org> | 2004-08-19 16:20:11 +0000 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2004-08-19 16:20:11 +0000 |
commit | 621881a1fe2b4e68160300af38f5bdc8396d2d40 (patch) | |
tree | 64d1fb4e58485567d5eefab8904a068c4490d30b /www | |
parent | 6205c6b433bccb5cbb99c4024f57a289fd195b73 (diff) | |
download | FreeBSD-ports-621881a1fe2b4e68160300af38f5bdc8396d2d40.zip FreeBSD-ports-621881a1fe2b4e68160300af38f5bdc8396d2d40.tar.gz |
Add some patches :
+ Fix 8bit symbols escaping.
+ Allow blessed hashrefs in loops.
+ Fix a portlint warning and make it not clutter perllocal.pod
PR: 70656
Submitted by: Alex Kapranoff <kappa@rambler-co.ru>
Diffstat (limited to 'www')
-rw-r--r-- | www/p5-HTML-Template-JIT/Makefile | 10 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-Compiler.pm | 11 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm | 11 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-t::03loops.t | 22 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-t::10escape.t | 22 |
5 files changed, 73 insertions, 3 deletions
diff --git a/www/p5-HTML-Template-JIT/Makefile b/www/p5-HTML-Template-JIT/Makefile index 712f249..85a8aac 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 0000000..70315eb --- /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 0000000..22b99d1 --- /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 0000000..83ebcd4 --- /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 0000000..a2f5f54 --- /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/); #" |