mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-19 08:13:21 +00:00
Add p5-HTML-Template-JIT 0.04, perl module to compile HTML Templates
with Inline::C. PR: ports/66351 Submitted by: alex@kapranoff.ru
This commit is contained in:
parent
2c45508dbc
commit
88fa065a3a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108608
@ -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
|
||||
|
39
www/p5-HTML-Template-JIT/Makefile
Normal file
39
www/p5-HTML-Template-JIT/Makefile
Normal file
@ -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>
|
2
www/p5-HTML-Template-JIT/distinfo
Normal file
2
www/p5-HTML-Template-JIT/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (HTML-Template-JIT-0.04.tar.gz) = 5814cd407e3dcca9704188d7b1332b48
|
||||
SIZE (HTML-Template-JIT-0.04.tar.gz) = 28874
|
21
www/p5-HTML-Template-JIT/files/5.005-JIT-Compiler.pm
Normal file
21
www/p5-HTML-Template-JIT/files/5.005-JIT-Compiler.pm
Normal file
@ -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
|
13
www/p5-HTML-Template-JIT/pkg-descr
Normal file
13
www/p5-HTML-Template-JIT/pkg-descr
Normal file
@ -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
|
10
www/p5-HTML-Template-JIT/pkg-plist
Normal file
10
www/p5-HTML-Template-JIT/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user