diff options
author | naddy <naddy@FreeBSD.org> | 2003-07-24 07:57:52 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2003-07-24 07:57:52 +0800 |
commit | 32d1561cf4162bd58a0da0e2a4d65bf6655fcbac (patch) | |
tree | 6b64315fcc5b43bd022985165fefec719e1c2bc3 /www/p5-Apache-MP3 | |
parent | 3543206609d915a043aa0c4020aee0e15f007c7e (diff) | |
download | freebsd-ports-gnome-32d1561cf4162bd58a0da0e2a4d65bf6655fcbac.tar.gz freebsd-ports-gnome-32d1561cf4162bd58a0da0e2a4d65bf6655fcbac.tar.zst freebsd-ports-gnome-32d1561cf4162bd58a0da0e2a4d65bf6655fcbac.zip |
Make Apache::MP3 work under apache2 and mod_perl2.
PR: 54635
Submitted by: Dominic Mitchell <dom@happygiraffe.net>
Diffstat (limited to 'www/p5-Apache-MP3')
-rw-r--r-- | www/p5-Apache-MP3/Makefile | 13 | ||||
-rw-r--r-- | www/p5-Apache-MP3/files/mod_perl2.patch | 52 |
2 files changed, 63 insertions, 2 deletions
diff --git a/www/p5-Apache-MP3/Makefile b/www/p5-Apache-MP3/Makefile index 26f9b8b4a412..445158e6166f 100644 --- a/www/p5-Apache-MP3/Makefile +++ b/www/p5-Apache-MP3/Makefile @@ -7,6 +7,7 @@ PORTNAME= Apache-MP3 PORTVERSION= 3.04 +PORTREVISION= 1 CATEGORIES= www audio perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR=Apache @@ -15,8 +16,7 @@ PKGNAMEPREFIX= p5- MAINTAINER= dom@happygiraffe.net COMMENT= MP3 browsing and streaming under mod_perl and Apache -BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www/mod_perl \ - ${SITE_PERL}/Audio/Wav.pm:${PORTSDIR}/audio/p5-Audio-Wav \ +BUILD_DEPENDS= ${SITE_PERL}/Audio/Wav.pm:${PORTSDIR}/audio/p5-Audio-Wav \ ${SITE_PERL}/MPEG/MP3Info.pm:${PORTSDIR}/audio/p5-MP3-Info \ ${SITE_PERL}/${PERL_ARCH}/Ogg/Vorbis.pm:${PORTSDIR}/audio/p5-libvorbis @@ -44,4 +44,13 @@ BUILD_DEPENDS+= ${SITE_PERL}/Locale/Maketext.pm:${PORTSDIR}/devel/p5-Locale-Make RUN_DEPENDS+= ${SITE_PERL}/Locale/Maketext.pm:${PORTSDIR}/devel/p5-Locale-Maketext .endif +.if defined(WITH_APACHE2) +BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Apache2/mod_perl.pm:${PORTSDIR}/www/mod_perl2 +RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Apache2/mod_perl.pm:${PORTSDIR}/www/mod_perl2 +EXTRA_PATCHES= ${PATCHDIR}/mod_perl2.patch +.else +BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www/mod_perl +RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www/mod_perl +.endif + .include <bsd.port.post.mk> diff --git a/www/p5-Apache-MP3/files/mod_perl2.patch b/www/p5-Apache-MP3/files/mod_perl2.patch new file mode 100644 index 000000000000..f42b54043637 --- /dev/null +++ b/www/p5-Apache-MP3/files/mod_perl2.patch @@ -0,0 +1,52 @@ +--- MP3.pm.orig Sat Feb 15 00:47:48 2003 ++++ MP3.pm Sat Jul 19 13:21:56 2003 +@@ -9,7 +9,7 @@ + } + + use Apache; +-use Apache::Constants qw(:common REDIRECT HTTP_NO_CONTENT DIR_MAGIC_TYPE HTTP_NOT_MODIFIED); ++use Apache::Constants qw(:common REDIRECT HTTP_NO_CONTENT HTTP_NOT_MODIFIED); + use Apache::MP3::L10N; + use IO::File; + use Socket 'sockaddr_in'; +@@ -25,6 +25,8 @@ + + use constant DEBUG => 0; + ++use constant DIR_MAGIC_TYPE => 'httpd/unix-directory'; ++ + # defaults: + use constant BASE_DIR => '/apache_mp3'; + use constant STYLESHEET => 'apache_mp3.css'; +@@ -75,7 +77,7 @@ + } + END + +-sub handler ($$) { ++sub handler : method { + my $class = shift; + my $obj = $class->new(@_) or die "Can't create object: $!"; + return $obj->run(); +@@ -395,14 +397,14 @@ + my $self = shift; + my $dir = shift; + +- unless ($self->r->path_info){ +- #Issue an external redirect if the dir isn't tailed with a '/' +- my $uri = $self->r->uri; +- my $query = $self->r->args; +- $query = "?" . $query if defined $query; +- $self->r->header_out(Location => "$uri/$query"); +- return REDIRECT; +- } ++# unless ($self->r->path_info){ ++# #Issue an external redirect if the dir isn't tailed with a '/' ++# my $uri = $self->r->uri; ++# my $query = $self->r->args; ++# $query = "?" . $query if defined $query; ++# $self->r->header_out(Location => "$uri/$query"); ++# return REDIRECT; ++# } + + return $self->list_directory($dir); + } |