aboutsummaryrefslogtreecommitdiff
path: root/www/p5-CGI-SpeedyCGI
diff options
context:
space:
mode:
authorFoxfair Hu <foxfair@FreeBSD.org>2003-10-30 13:04:22 +0000
committerFoxfair Hu <foxfair@FreeBSD.org>2003-10-30 13:04:22 +0000
commit367f3965dcb0a5d0785e2980525aee85ed627cbe (patch)
tree79fdb926a62890e704ffcec912aa185d542d6cce /www/p5-CGI-SpeedyCGI
parent4188bfa3187767da4cfc8c24ef6a52bd1062dc5c (diff)
downloadports-367f3965dcb0a5d0785e2980525aee85ed627cbe.tar.gz
ports-367f3965dcb0a5d0785e2980525aee85ed627cbe.zip
Notes
Diffstat (limited to 'www/p5-CGI-SpeedyCGI')
-rw-r--r--www/p5-CGI-SpeedyCGI/Makefile31
-rw-r--r--www/p5-CGI-SpeedyCGI/distinfo2
-rw-r--r--www/p5-CGI-SpeedyCGI/files/patch-Makefile.PL43
-rw-r--r--www/p5-CGI-SpeedyCGI/files/patch-speedy_opt.c20
4 files changed, 36 insertions, 60 deletions
diff --git a/www/p5-CGI-SpeedyCGI/Makefile b/www/p5-CGI-SpeedyCGI/Makefile
index 421d1208a053..4063bfac823a 100644
--- a/www/p5-CGI-SpeedyCGI/Makefile
+++ b/www/p5-CGI-SpeedyCGI/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= CGI-SpeedyCGI
-PORTVERSION= 2.21
-PORTREVISION= 3
+PORTVERSION= 2.22
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= CGI
@@ -18,11 +17,35 @@ COMMENT= Speed up perl CGI scripts by running them persistently
PERL_CONFIGURE= yes
+.include <bsd.port.pre.mk>
+
+APXS?= ${LOCALBASE}/sbin/apxs
+
+# define WITHOUT_APACHE to prevent mod_speedycgi from being built even if Apache is installed
+
+.if !exists(${APXS}) || defined(WITHOUT_APACHE)
+PLIST_SUB+= APACHE="@comment "
+CONFIGURE_ENV+= WITHOUT_APACHE=yes
+.else
+PLIST_SUB+= APACHE=""
+.if exists(${APXS})
+APXS_WORKS!= ${APXS} -q TARGET 2>/dev/null || echo no
+.endif
+.if exists(${APXS}) && ${APXS_WORKS} != no
+AP_LIBEXEC!= ${APXS} -q LIBEXECDIR
+.else
+AP_LIBEXEC?= ${PREFIX}/libexec/apache
+.endif
+PLIST_SUB+= AP_LIBEXEC=${AP_LIBEXEC:S/^${PREFIX}\///}
+.endif
+
post-configure:
- @${PERL} -pi.bak -e 's,^PREFIX = /usr$$,PREFIX = ${PREFIX},g' ${WRKSRC}/*/Makefile
+ @${PERL} -pi -e 's,^PREFIX = /usr$$,PREFIX = ${PREFIX},g;' \
+ -e 's,/usr/local,${PREFIX},g;' \
+ ${WRKSRC}/Makefile ${WRKSRC}/*/Makefile
post-install:
@${INSTALL_PROGRAM} ${WRKSRC}/speedy/speedy ${PREFIX}/bin/speedy_suid
@${CHMOD} 4755 ${PREFIX}/bin/speedy_suid
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/www/p5-CGI-SpeedyCGI/distinfo b/www/p5-CGI-SpeedyCGI/distinfo
index ec387e95b11b..14336489508b 100644
--- a/www/p5-CGI-SpeedyCGI/distinfo
+++ b/www/p5-CGI-SpeedyCGI/distinfo
@@ -1 +1 @@
-MD5 (CGI-SpeedyCGI-2.21.tar.gz) = ff43eaa899c5ff38f208ed692ab12bb4
+MD5 (CGI-SpeedyCGI-2.22.tar.gz) = 2f80df78874e3efa80f180923c4967a1
diff --git a/www/p5-CGI-SpeedyCGI/files/patch-Makefile.PL b/www/p5-CGI-SpeedyCGI/files/patch-Makefile.PL
index 6e9b42eee860..95e57d578486 100644
--- a/www/p5-CGI-SpeedyCGI/files/patch-Makefile.PL
+++ b/www/p5-CGI-SpeedyCGI/files/patch-Makefile.PL
@@ -1,6 +1,6 @@
---- Makefile.PL.orig Sat Mar 1 09:16:07 2003
-+++ Makefile.PL Sat Mar 1 09:17:19 2003
-@@ -6,26 +6,26 @@
+--- Makefile.PL.orig Sat Oct 18 12:27:13 2003
++++ Makefile.PL Sat Oct 18 12:28:18 2003
+@@ -6,22 +6,23 @@
import SpeedyMake qw(%write_makefile_common);
}
@@ -29,37 +29,10 @@
my @dirs = qw(src speedy_backend speedy);
my $macro = $write_makefile_common{macro};
+ my $apache_module = 0;
-if (<STDIN> =~ /y/i) {
-- die "ERROR: Could not find a working copy of 'apxs' in your path.\n"
-- unless $macro->{APACHE_APXS_WORKS};
-- print "Compiling for Apache version $macro->{APACHE_VERSION}\n";
-- push(@dirs, $macro->{MOD_SPEEDYCGI_DIR});
--}
+#if (<STDIN> =~ /y/i) {
-+# die "ERROR: Could not find a working copy of 'apxs' in your path.\n"
-+# unless $macro->{APACHE_APXS_WORKS};
-+# print "Compiling for Apache version $macro->{APACHE_VERSION}\n";
-+# push(@dirs, $macro->{MOD_SPEEDYCGI_DIR});
-+#}
-
- WriteMakefile(
- NAME => 'CGI::SpeedyCGI',
-@@ -47,12 +47,12 @@
- sub postamble {
- my $extra = SpeedyMake->optdefs_cmds('src');
- my $test_install_extra;
-- if (my $mod_dir = $macro->{MOD_SPEEDYCGI_DIR}) {
-- $extra .=
-- "\ninstall ::\n\tcd $mod_dir && \$(MAKE) install\n";
-- $test_install_extra =
-- "\t\@cd $mod_dir && \$(MAKE) test_install \$(PASTHRU)\n";
-- }
-+# if (my $mod_dir = $macro->{MOD_SPEEDYCGI_DIR}) {
-+# $extra .=
-+# "\ninstall ::\n\tcd $mod_dir && \$(MAKE) install\n";
-+# $test_install_extra =
-+# "\t\@cd $mod_dir && \$(MAKE) test_install \$(PASTHRU)\n";
-+# }
-
- '
- test_install:
++unless ($ENV{WITHOUT_APACHE}) {
+ die "ERROR: Command 'apxs -q CC' failed.\n"
+ unless $macro->{APACHE_APXS_WORKS};
+ print "Compiling for Apache version $macro->{APACHE_VERSION}\n";
diff --git a/www/p5-CGI-SpeedyCGI/files/patch-speedy_opt.c b/www/p5-CGI-SpeedyCGI/files/patch-speedy_opt.c
deleted file mode 100644
index e83793b7d986..000000000000
--- a/www/p5-CGI-SpeedyCGI/files/patch-speedy_opt.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/speedy_opt.c Mon Sep 30 07:19:54 2002
-+++ /tmp/speedy_opt.c Tue May 20 11:11:28 2003
-@@ -165,6 +165,8 @@ static void cmdline_split(
- ++p;
- if (*p)
- strlist_append(doing_speedy_opts ? speedy_opts : perl_args, *p);
-+ else
-+ break;
- }
-
- if (*p) {
-@@ -422,7 +424,7 @@ const char * const *speedy_opt_script_ar
- }
-
- SPEEDY_INLINE const char *speedy_opt_script_fname(void) {
-- return exec_argv.ptrs[script_argv_loc];
-+ return exec_argv.len > script_argv_loc ? exec_argv.ptrs[script_argv_loc] : NULL;
- }
-
- #ifdef SPEEDY_BACKEND