diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/Makefile | 39 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/distinfo | 2 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/5.005-JIT-Compiler.pm | 21 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/pkg-descr | 13 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/pkg-plist | 10 |
6 files changed, 86 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index 922679d073e2..42d50a1c4afe 100644 --- a/www/Makefile +++ b/www/Makefile @@ -430,6 +430,7 @@ SUBDIR += p5-HTML-Template SUBDIR += p5-HTML-Template-Associate SUBDIR += p5-HTML-Template-Expr + SUBDIR += p5-HTML-Template-JIT SUBDIR += p5-HTML-TokeParser-Simple SUBDIR += p5-HTML-Tree SUBDIR += p5-HTML-Webmake diff --git a/www/p5-HTML-Template-JIT/Makefile b/www/p5-HTML-Template-JIT/Makefile new file mode 100644 index 000000000000..899ab99f6376 --- /dev/null +++ b/www/p5-HTML-Template-JIT/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: p5-HTML-Template-JIT +# Date Created: 2004/04/30 +# Whom: alex@kapranoff.ru +# +# $FreeBSD$ +# + +PORTNAME= HTML-Template-JIT +PORTVERSION= 0.04 +CATEGORIES= www perl5 +MASTER_SITES= ${MASTER_SITE_PERL_CPAN} +MASTER_SITE_SUBDIR= HTML +PKGNAMEPREFIX= p5- + +MAINTAINER= mat@FreeBSD.org +COMMENT= Perl module to compile HTML Templates with Inline::C + +BUILD_DEPENDS= ${SITE_PERL}/HTML/Template.pm:${PORTSDIR}/www/p5-HTML-Template \ + ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ + ${SITE_PERL}/Inline/C.pm:${PORTSDIR}/devel/p5-Inline +RUN_DEPENDS= ${BUILD_DEPENDS} + +PERL_CONFIGURE= yes + +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 +post-patch: + @${PERL} -i -pe '$$_ = "" if /warnings|5\.006/g;' \ + -e 's/\bour ([^ ;]+)/use vars qw{$$1};$$1/g;' \ + ${WRKSRC}/Makefile.PL ${WRKSRC}/JIT.pm \ + ${WRKSRC}/JIT/Base.pm ${WRKSRC}/JIT/Compiler.pm +.endif + +.include <bsd.port.post.mk> diff --git a/www/p5-HTML-Template-JIT/distinfo b/www/p5-HTML-Template-JIT/distinfo new file mode 100644 index 000000000000..c14d513af9df --- /dev/null +++ b/www/p5-HTML-Template-JIT/distinfo @@ -0,0 +1,2 @@ +MD5 (HTML-Template-JIT-0.04.tar.gz) = 5814cd407e3dcca9704188d7b1332b48 +SIZE (HTML-Template-JIT-0.04.tar.gz) = 28874 diff --git a/www/p5-HTML-Template-JIT/files/5.005-JIT-Compiler.pm b/www/p5-HTML-Template-JIT/files/5.005-JIT-Compiler.pm new file mode 100644 index 000000000000..0b1f011e076e --- /dev/null +++ b/www/p5-HTML-Template-JIT/files/5.005-JIT-Compiler.pm @@ -0,0 +1,21 @@ +--- JIT/Compiler.pm~ Fri May 7 12:58:37 2004 ++++ JIT/Compiler.pm Fri May 7 12:58:39 2004 +@@ -87,6 +87,18 @@ + use Inline C => Config => OPTIMIZE => "$optimize", DIRECTORY => "$self->{package_dir}" $inline_debug; + use Inline C => <<'CODE_END'; + ++#ifndef SvPV_nolen ++# define SvPV_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK ? SvPVX(sv) : sv_2pv_nolen(sv)) ++ static char * ++ sv_2pv_nolen(register SV *sv) ++ { ++ STRLEN n_a; ++ return sv_2pv(sv, &n_a); ++ } ++#endif ++ ++#define get_hv(name,create) perl_get_hv(name,create) ++ + END + + # print out code diff --git a/www/p5-HTML-Template-JIT/pkg-descr b/www/p5-HTML-Template-JIT/pkg-descr new file mode 100644 index 000000000000..68b23027d8a3 --- /dev/null +++ b/www/p5-HTML-Template-JIT/pkg-descr @@ -0,0 +1,13 @@ +This module provides a just-in-time compiler for HTML::Template. + +If your template needs to be compiled - either because it has changed +or because it has never been compiled - then HTML::Template::JIT uses +HTML::Template and Inline::C to compile your template to native +machine instructions. + +The resulting compiled template is much faster than a normal cached +template. Benchmarks show HTML::Template::JIT, with a precompiled +template, performing 4 to 8 times faster than HTML::Template in cache +mode. + +WWW: http://html-template.sourceforge.net/html_template_jit.html diff --git a/www/p5-HTML-Template-JIT/pkg-plist b/www/p5-HTML-Template-JIT/pkg-plist new file mode 100644 index 000000000000..f86bf94b1544 --- /dev/null +++ b/www/p5-HTML-Template-JIT/pkg-plist @@ -0,0 +1,10 @@ +%%SITE_PERL%%/HTML/Template/JIT.pm +%%SITE_PERL%%/HTML/Template/JIT/Base.pm +%%SITE_PERL%%/HTML/Template/JIT/Compiler.pm +%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTML/Template/JIT/.packlist +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/HTML/Template/JIT +@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTML/Template 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTML 2>/dev/null || true +@dirrm %%SITE_PERL%%/HTML/Template/JIT +@unexec rmdir %D/%%SITE_PERL%%/HTML/Template 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/HTML 2>/dev/null || true |