diff options
author | edwin <edwin@FreeBSD.org> | 2006-01-04 17:18:05 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2006-01-04 17:18:05 +0800 |
commit | 8c1b9ca912b4a6c7759c67539161d5b7c845c005 (patch) | |
tree | 87317aee4fc891b13d2731eac58794fffb7cdb00 /www/p5-Apache-DBI | |
parent | 1499b6604f46baef39827c17010328065138b4ed (diff) | |
download | freebsd-ports-gnome-8c1b9ca912b4a6c7759c67539161d5b7c845c005.tar.gz freebsd-ports-gnome-8c1b9ca912b4a6c7759c67539161d5b7c845c005.tar.zst freebsd-ports-gnome-8c1b9ca912b4a6c7759c67539161d5b7c845c005.zip |
Update www/p5-Apache-DBI 0.94 -> 0.98, request maintainership
As I'm "maintaining" this port in the mod_perl community,
take maintainership. Update this to 0.98 which also unbreaks
AuthDBI.pm for mp2 post RC5. MY patch is sitting in files.
This also adds some encryption options
PR: ports/83980
Submitted by: Philip M. Gollucci <pgollucci@vegeta.p6m7g8.net>
Approved by: maintainer timeout
Diffstat (limited to 'www/p5-Apache-DBI')
-rw-r--r-- | www/p5-Apache-DBI/Makefile | 8 | ||||
-rw-r--r-- | www/p5-Apache-DBI/distinfo | 4 | ||||
-rw-r--r-- | www/p5-Apache-DBI/files/patch-mp2-api | 121 | ||||
-rw-r--r-- | www/p5-Apache-DBI/pkg-descr | 2 |
4 files changed, 6 insertions, 129 deletions
diff --git a/www/p5-Apache-DBI/Makefile b/www/p5-Apache-DBI/Makefile index cfee2a0e6b40..601ff1e2ce2b 100644 --- a/www/p5-Apache-DBI/Makefile +++ b/www/p5-Apache-DBI/Makefile @@ -6,14 +6,12 @@ # PORTNAME= Apache-DBI -PORTVERSION= 0.94 -PORTREVISION= 1 +PORTVERSION= 0.98 CATEGORIES= www databases perl5 -MASTER_SITES= ${MASTER_SITE_PERL_CPAN} -MASTER_SITE_SUBDIR= Apache +MASTER_SITES= http://people.apache.org/~pgollucci/CPAN/Apache-DBI/ PKGNAMEPREFIX= p5- -MAINTAINER= skv@FreeBSD.org +MAINTAINER= pgollucci@p6m7g8.com COMMENT= DBI persistent connection, authentication and authorization .if defined(WITH_MODPERL2) diff --git a/www/p5-Apache-DBI/distinfo b/www/p5-Apache-DBI/distinfo index 63b429024eb8..f295eb447a9b 100644 --- a/www/p5-Apache-DBI/distinfo +++ b/www/p5-Apache-DBI/distinfo @@ -1,2 +1,2 @@ -MD5 (Apache-DBI-0.94.tar.gz) = 70a90a6d96b3563a204996e0f8122e61 -SIZE (Apache-DBI-0.94.tar.gz) = 27548 +MD5 (Apache-DBI-0.98.tar.gz) = 2b351ba7bafc2d5add23f1e76f99b90c +SIZE (Apache-DBI-0.98.tar.gz) = 30642 diff --git a/www/p5-Apache-DBI/files/patch-mp2-api b/www/p5-Apache-DBI/files/patch-mp2-api deleted file mode 100644 index ccbd07199610..000000000000 --- a/www/p5-Apache-DBI/files/patch-mp2-api +++ /dev/null @@ -1,121 +0,0 @@ ---- AuthDBI.pm.orig Mon May 23 09:53:24 2005 -+++ AuthDBI.pm Mon May 23 09:55:38 2005 -@@ -6,13 +6,13 @@ - # 2: full debug output - $Apache::AuthDBI::DEBUG = 0; - --use constant MP2 => $mod_perl::VERSION >= 1.99; -+use constant MP2 => $ENV{MOD_PERL_API_VERSION} == 2 ? 1 : 0; - - BEGIN { - my @constants = qw( OK AUTH_REQUIRED FORBIDDEN DECLINED SERVER_ERROR ); - if (MP2) { -- require Apache::Const; -- import Apache::Const @constants; -+ require Apache2::Const; -+ import Apache2::Const @constants; - } - else { - require Apache::Constants; -@@ -25,7 +25,9 @@ - - sub push_handlers { - if ( MP2 ) { -- Apache->server->push_handlers(@_); -+ require Apache2::ServerUtil; -+ my $s = Apache2::ServerUtil->server; -+ $s->push_handlers(@_); - } - else { - Apache->push_handlers(@_); ---- DBI.pm.orig Mon May 23 09:49:38 2005 -+++ DBI.pm Mon May 23 10:08:40 2005 -@@ -4,6 +4,7 @@ - # $Id: DBI.pm,v 1.12 2004/02/18 00:18:50 ask Exp $ - - BEGIN { eval { require Apache } } -+BEGIN { eval { require mod_perl2; require Apache2::Module; } } - use DBI (); - use Carp qw(carp); - -@@ -31,11 +32,19 @@ - sub connect_on_init { - # provide a handler which creates all connections during server startup - -- # TODO - Should check for mod_perl 2 and do the right thing there -- carp "Apache.pm was not loaded\n" and return unless $INC{'Apache.pm'}; -- if(!@ChildConnect and Apache->can('push_handlers')) { -- Apache->push_handlers(PerlChildInitHandler => \&childinit); -+ if ($ENV{MOD_PERL_API_VERSION} == 2) { -+ if (!@ChildConnect) { -+ require Apache2::ServerUtil; -+ my $s = Apache2::ServerUtil->server; -+ $s->push_handlers(PerlChildInitHandler => \&childinit); -+ } -+ } else { -+ carp "Apache.pm was not loaded\n" and return unless $INC{'Apache.pm'}; -+ if (!@ChildConnect and Apache->can('push_handlers')) { -+ Apache->push_handlers(PerlChildInitHandler => \&childinit); -+ } - } -+ - # store connections - push @ChildConnect, [@_]; - } -@@ -93,10 +102,16 @@ - - # this PerlCleanupHandler is supposed to initiate a rollback after the script has finished if AutoCommit is off. - my $needCleanup = ($Idx =~ /AutoCommit[^\d]+0/) ? 1 : 0; -- # TODO - Fix mod_perl 2.0 here - if(!$Rollback{$Idx} and $needCleanup and Apache->can('push_handlers')) { - print STDERR "$prefix push PerlCleanupHandler \n" if $Apache::DBI::DEBUG > 1; -- Apache->push_handlers("PerlCleanupHandler", \&cleanup); -+ if ($ENV{MOD_PERL_API_VERSION} == 2) { -+ require Apache2::ServerUtil; -+ my $s = Apache2::ServerUtil->server; -+ $s->push_handlers('PerlCleanupHandler', \&cleanup); -+ } else { -+ Apache->push_handlers('PerlCleanupHandler', \&cleanup); -+ } -+ - # make sure, that the rollback is called only once for every - # request, even if the script calls connect more than once - $Rollback{$Idx} = 1; -@@ -193,9 +208,21 @@ - - - # prepare menu item for Apache::Status -- --Apache::Status->menu_item( -- -+if ($ENV{MOD_PERL_API_VERSION} == 2) { -+ Apache2::Status->menu_item( -+ 'DBI' => 'DBI connections', -+ sub { -+ my($r, $q) = @_; -+ my(@s) = qw(<TABLE><TR><TD>Datasource</TD><TD>Username</TD></TR>); -+ for (keys %Connected) { -+ push @s, '<TR><TD>', join('</TD><TD>', (split($;, $_))[0,1]), "</TD></TR>\n"; -+ } -+ push @s, '</TABLE>'; -+ return \@s; -+ } -+ ) if Apache2::Module::loaded('Apache2::Status'); -+} else { -+ Apache::Status->menu_item( - 'DBI' => 'DBI connections', - sub { - my($r, $q) = @_; -@@ -206,10 +233,10 @@ - push @s, '</TABLE>'; - return \@s; - } -- --) if ($INC{'Apache.pm'} # is Apache.pm loaded? -+ ) if ($INC{'Apache.pm'} # is Apache.pm loaded? - and Apache->can('module') # really? - and Apache->module('Apache::Status')); # Apache::Status too? -+} - - 1; - diff --git a/www/p5-Apache-DBI/pkg-descr b/www/p5-Apache-DBI/pkg-descr index 0b4692c02722..84940da3dad7 100644 --- a/www/p5-Apache-DBI/pkg-descr +++ b/www/p5-Apache-DBI/pkg-descr @@ -15,4 +15,4 @@ o DBI.pm provides persistent database connections: rollback to ensure data integrity - configurable verification of the connections to avoid time-outs. -WWW: http://search.cpan.org/dist/Apache-DBI/ +WWW: http://search.cpan.org/~pgollucci/Apache-DBI-0.98/ |