aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorclsung <clsung@FreeBSD.org>2004-10-23 16:13:38 +0800
committerclsung <clsung@FreeBSD.org>2004-10-23 16:13:38 +0800
commit3adf00daf3a5d8e3331af102a66c4d135dccf655 (patch)
treece203c4eba2fc1950d02f35c38935ac8d4ba0321 /www
parent5c15819b317eab46cc8b3b47971b1fe44f558259 (diff)
downloadfreebsd-ports-graphics-3adf00daf3a5d8e3331af102a66c4d135dccf655.tar.gz
freebsd-ports-graphics-3adf00daf3a5d8e3331af102a66c4d135dccf655.tar.zst
freebsd-ports-graphics-3adf00daf3a5d8e3331af102a66c4d135dccf655.zip
- update to 1.00
- make it run with mod_perl2 Approved by: co-mentor (vanilla)
Diffstat (limited to 'www')
-rw-r--r--www/p5-Apache-AuthenCache/Makefile16
-rw-r--r--www/p5-Apache-AuthenCache/distinfo4
-rw-r--r--www/p5-Apache-AuthenCache/files/patch-AuthenCache.pm79
-rw-r--r--www/p5-Apache-AuthenCache/files/patch-Makefile.PL16
4 files changed, 109 insertions, 6 deletions
diff --git a/www/p5-Apache-AuthenCache/Makefile b/www/p5-Apache-AuthenCache/Makefile
index 95d08af0fc0..7114a813d21 100644
--- a/www/p5-Apache-AuthenCache/Makefile
+++ b/www/p5-Apache-AuthenCache/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= Apache-AuthenCache
-PORTVERSION= 0.05
+PORTVERSION= 1.00
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Apache
@@ -15,13 +15,21 @@ PKGNAMEPREFIX= p5-
MAINTAINER= ports@FreeBSD.org
COMMENT= Perl module that implements authentication caching
-BUILD_DEPENDS= ${SITE_PERL}/Tie/IxHash.pm:${PORTSDIR}/devel/p5-Tie-IxHash \
- ${SITE_PERL}/IPC/Cache.pm:${PORTSDIR}/devel/p5-IPC-Cache \
- ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www/mod_perl
+BUILD_DEPENDS= ${SITE_PERL}/Time/Object.pm:${PORTSDIR}/devel/p5-Time-Object \
+ ${SITE_PERL}/IPC/Cache.pm:${PORTSDIR}/devel/p5-IPC-Cache
RUN_DEPENDS= ${BUILD_DEPENDS}
+.if defined(WITH_APACHE2)
+BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache2/mod_perl.so:${PORTSDIR}/www/mod_perl2
+.else
+BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/libperl.so:${PORTSDIR}/www/mod_perl
+.endif
+
PERL_CONFIGURE= yes
MAN3= Apache::AuthenCache.3
+post-patch:
+ @${FIND} ${WRKSRC} -name "*.orig" -a -exec ${RM} -f {} \;
+
.include <bsd.port.mk>
diff --git a/www/p5-Apache-AuthenCache/distinfo b/www/p5-Apache-AuthenCache/distinfo
index 9d159b9ed77..a9af459967a 100644
--- a/www/p5-Apache-AuthenCache/distinfo
+++ b/www/p5-Apache-AuthenCache/distinfo
@@ -1,2 +1,2 @@
-MD5 (Apache-AuthenCache-0.05.tar.gz) = d6d19a1dca46ad03c7504fbc8d435fca
-SIZE (Apache-AuthenCache-0.05.tar.gz) = 4686
+MD5 (Apache-AuthenCache-1.00.tar.gz) = 0353e14098906ddc5df9e48830e5e6c8
+SIZE (Apache-AuthenCache-1.00.tar.gz) = 9244
diff --git a/www/p5-Apache-AuthenCache/files/patch-AuthenCache.pm b/www/p5-Apache-AuthenCache/files/patch-AuthenCache.pm
new file mode 100644
index 00000000000..00df14fbe00
--- /dev/null
+++ b/www/p5-Apache-AuthenCache/files/patch-AuthenCache.pm
@@ -0,0 +1,79 @@
+--- AuthenCache.pm Tue Jun 24 02:44:48 2003
++++ AuthenCache.pm Sat Oct 23 15:20:00 2004
+@@ -263,8 +263,26 @@
+
+ # Required libraries
+ use strict;
++BEGIN { local $@; eval { require Apache2; } }
+ use mod_perl ();
+-use Apache::Constants qw(OK AUTH_REQUIRED DECLINED DONE);
++use constant MP2 => $mod_perl::VERSION < 1.99 ? 0 : 1;
++BEGIN {
++ if (MP2) {
++ require Apache2;
++ require Apache::Access;
++ require Apache::RequestRec;
++ require Apache::RequestUtil;
++ require Apache::RequestIO;
++ require Apache::ServerUtil;
++ require Apache::Const;
++ Apache::Const->import(-compile => qw(OK AUTH_REQUIRED DECLINED DONE));
++ require APR::Table;
++ } else {
++ require Apache;
++ require Apache::Constants;
++ Apache::Constants->import(qw(OK AUTH_REQUIRED DECLINED DONE));
++ }
++}
+ use Apache::Log ();
+ use Cache::FileCache;
+ use Time::Object;
+@@ -294,14 +312,21 @@
+ my $auth_name = $r->auth_name;
+
+ # Clear for paranoid security precautions
+- $r->notes('AuthenCache' => 'miss');
++ my %notes = ('AuthenCache' => 'miss');
++ if (MP2) {
++ my $table = APR::Table::make($r->pool, 1);
++ $table->set(%notes);
++ $r->notes($table);
++ } else {
++ $r->notes(%notes);
++ }
+
+ # Get response and password
+ my($res, $passwd_sent) = $r->get_basic_auth_pw;
+ return $res if $res; # e.g. HTTP_UNAUTHORIZED
+
+ # Get username
+- my $user_sent = $r->connection->user;
++ my $user_sent = MP2 ? $r->user : $r->connection->user;
+ # If the user left the username field blank, we must catch it and DECLINE
+ # for the downstream handler
+ unless ($user_sent) {
+@@ -373,7 +398,14 @@
+ # } else {
+ $r->log->debug("handler: user in cache and password matches; ",
+ "returning OK and setting notes");
+- $r->notes('AuthenCache' => 'hit');
++ %notes = ('AuthenCache' => 'hit');
++ if (MP2) {
++ my $table = APR::Table::make($r->pool, 1);
++ $table->set(%notes);
++ $r->notes($table);
++ } else {
++ $r->notes(%notes);
++ }
+ #}
+ return OK;
+ } # End if()
+@@ -406,7 +438,7 @@
+ # The below test is dubious. I'm putting it in as a hack around the
+ # problems with set_handlers not working quite right until 1.26 is
+ # released (according to Doug MacEachern).
+- my $cache_result = $r->notes('AuthenCache');
++ my $cache_result = MP2 ? $r->notes->get('AuthenCache') : $r->notes('AuthenCache');
+ if ($cache_result eq 'hit') {
+ $r->log->debug("manage_cache: upstream cache hit for username=",
+ "$user_sent");
diff --git a/www/p5-Apache-AuthenCache/files/patch-Makefile.PL b/www/p5-Apache-AuthenCache/files/patch-Makefile.PL
new file mode 100644
index 00000000000..3196bdbba42
--- /dev/null
+++ b/www/p5-Apache-AuthenCache/files/patch-Makefile.PL
@@ -0,0 +1,16 @@
+--- Makefile.PL Sat Oct 23 15:26:40 2004
++++ Makefile.PL Sat Oct 23 15:27:02 2004
+@@ -4,10 +4,12 @@
+ use Config qw(%Config);
+ use ExtUtils::MakeMaker;
+
++eval { require Apache2 };
++
+ WriteMakefile
+ (
+ 'NAME' => 'Apache::AuthenCache',
+ 'VERSION_FROM' => 'AuthenCache.pm',
+- 'PREREQ_PM' => { 'Apache' => '1.26', 'Cache::Cache' => '1.01' },
++ 'PREREQ_PM' => { 'mod_perl' => '1.26', 'Cache::Cache' => '1.01', 'Time::Object' => '0' },
+ 'dist' => { 'COMPRESS' => 'gzip -9f', 'SUFFIX' => 'gz', },
+ );