New port: www/p5-Text-MultiMarkdown-ApacheHandler:

Processes files containing MultiMarkdown syntax into HTML files and serves
them, optionally applying CSS styles according to rules in your httpd.conf
or (more likely) .htaccess files. Optionally applies SmartyPants
post-processing using Text::Typography.

WWW: http://search.cpan.org/dist/Text-MultiMarkdown-ApacheHandler/
This commit is contained in:
Ryan Steinmetz 2013-05-06 18:39:43 +00:00
parent 472ecb4a8f
commit 7adba27c8c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=317541
7 changed files with 75 additions and 0 deletions

View file

@ -1205,6 +1205,7 @@
SUBDIR += p5-Test-HTTP
SUBDIR += p5-Test-HTTP-Server-Simple
SUBDIR += p5-TestGen4Web-Runner
SUBDIR += p5-Text-MultiMarkdown-ApacheHandler
SUBDIR += p5-Tie-TinyURL
SUBDIR += p5-Twiggy
SUBDIR += p5-Twiggy-TLS

View file

@ -0,0 +1,30 @@
# Created by: Ryan Steinmetz <zi@FreeBSD.org>
# $FreeBSD$
PORTNAME= Text-MultiMarkdown-ApacheHandler
PORTVERSION= 0.01
CATEGORIES= www perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Module for processing files with MultiMarkdown syntax for Apache
BUILD_DEPENDS= p5-Text-MultiMarkdown>=0:${PORTSDIR}/textproc/p5-Text-MultiMarkdown \
p5-Text-Typography>=0:${PORTSDIR}/textproc/p5-Text-Typography \
${APACHE_PKGNAMEPREFIX}mod_perl2>=2.0.5:${PORTSDIR}/www/mod_perl2
RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_APACHE_RUN= 22+
PERL_CONFIGURE= yes
SUB_FILES= pkg-message
MAN3= Text::MultiMarkdown::ApacheHandler.3
post-patch:
@${RM} ${WRKSRC}/lib/Text/MultiMarkdown/ApacheHandler.pm.orig
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (Text-MultiMarkdown-ApacheHandler-0.01.tar.gz) = 45552f726d878738c1ca8ce187978c2bae463292089c78cbaf0b070ab721598f
SIZE (Text-MultiMarkdown-ApacheHandler-0.01.tar.gz) = 3676

View file

@ -0,0 +1,19 @@
--- ./lib/Text/MultiMarkdown/ApacheHandler.pm.orig 2013-05-06 13:22:18.000000000 -0400
+++ ./lib/Text/MultiMarkdown/ApacheHandler.pm 2013-05-06 13:25:56.000000000 -0400
@@ -16,6 +16,7 @@
our $VERSION = '0.01';
+use Apache2::compat;
use Apache::Constants qw(:common);
use Apache::File ();
use Text::MultiMarkdown 'markdown';
@@ -52,7 +53,7 @@
return DECLINED unless $r->content_type() eq 'text/multimarkdown';
my $file = $r->filename;
- unless (-e $r->finfo) {
+ unless (-e $file) {
$r->log_error("File does not exist: $file");
return NOT_FOUND;
}

View file

@ -0,0 +1,9 @@
Please create %%PREFIX%%/etc/apache22/Includes/mmd.conf
with the following contents:
AddType text/multimarkdown .markdown .mmd
<Files ~ "\.(mmd|markdown)$">
SetHandler perl-script
PerlHandler Text::MultiMarkdown::ApacheHandler
PerlSetVar mm_useSmartyPants 1
</Files>

View file

@ -0,0 +1,6 @@
Processes files containing MultiMarkdown syntax into HTML files and serves
them, optionally applying CSS styles according to rules in your httpd.conf
or (more likely) .htaccess files. Optionally applies SmartyPants
post-processing using Text::Typography.
WWW: http://search.cpan.org/dist/Text-MultiMarkdown-ApacheHandler/

View file

@ -0,0 +1,8 @@
@comment $FreeBSD$
%%SITE_PERL%%/Text/MultiMarkdown/ApacheHandler.pm
@dirrmtry %%SITE_PERL%%/Text/MultiMarkdown
@dirrmtry %%SITE_PERL%%/Text
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Text/MultiMarkdown/ApacheHandler/.packlist
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Text/MultiMarkdown/ApacheHandler
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Text/MultiMarkdown
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Text