1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

PR: 57925

Submitted by:	Cheng-Lung Sung <clsung@dragon2.net>
Reviewed by:	[1]
Approved by:
Obtained from:
MFC after:
Upgrade p5-CGI-SpeedyCGI to 2.22

[1] Actually use the patch provided by the maintainer.
This commit is contained in:
Foxfair Hu 2003-10-30 13:04:22 +00:00
parent 4188bfa318
commit 367f3965dc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=92640
4 changed files with 36 additions and 60 deletions

View File

@ -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>

View File

@ -1 +1 @@
MD5 (CGI-SpeedyCGI-2.21.tar.gz) = ff43eaa899c5ff38f208ed692ab12bb4
MD5 (CGI-SpeedyCGI-2.22.tar.gz) = 2f80df78874e3efa80f180923c4967a1

View File

@ -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";

View File

@ -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