--- p5-CGI-SpeedyCGI/Makefile Wed May 21 12:43:18 2003 +++ p5-CGI-SpeedyCGI/Makefile Sat Oct 18 15:19:58 2003 @@ -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 @@ PERL_CONFIGURE= yes +.include + +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 +.include --- p5-CGI-SpeedyCGI/distinfo Sat Mar 1 02:32:56 2003 +++ p5-CGI-SpeedyCGI/distinfo Tue Oct 14 21:25:35 2003 @@ -1, +1, @@ -MD5 (CGI-SpeedyCGI-2.21.tar.gz) = ff43eaa899c5ff38f208ed692ab12bb4 +MD5 (CGI-SpeedyCGI-2.22.tar.gz) = 2f80df78874e3efa80f180923c4967a1 --- p5-CGI-SpeedyCGI/files/patch-Makefile.PL Sat Mar 1 02:32:56 2003 +++ p5-CGI-SpeedyCGI/files/patch-Makefile.PL Sat Oct 18 12:28:38 2003 @@ -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 ( =~ /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 ( =~ /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"; --- p5-CGI-SpeedyCGI/files/patch-speedy_opt.c Wed May 21 12:43:18 2003 +++ p5-CGI-SpeedyCGI/files/patch-speedy_opt.c Thu Jan 1 01:00:00 1970 @@ -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 --- p5-CGI-SpeedyCGI/pkg-plist Fri Apr 11 04:17:22 2003 +++ p5-CGI-SpeedyCGI/pkg-plist Sat Oct 18 15:19:33 2003 @@ -1,8 +1,11 @@ -lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/CGI/SpeedyCGI/.packlist -lib/perl5/site_perl/%%PERL_VER%%/CGI/SpeedyCGI.pm +%%SITE_PERL%%/%%PERL_ARCH%%/auto/CGI/SpeedyCGI/.packlist +%%SITE_PERL%%/CGI/SpeedyCGI.pm bin/speedy bin/speedy_backend bin/speedy_suid -@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/CGI/SpeedyCGI -@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/CGI 2>/dev/null || true -@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/CGI 2>/dev/null || true +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/CGI/SpeedyCGI +@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/CGI 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/CGI 2>/dev/null || true +%%APACHE%%%%AP_LIBEXEC%%/mod_speedycgi.so +%%APACHE%%@exec %D/sbin/apxs -e -a -n speedycgi %D/%F +%%APACHE%%@unexec %D/sbin/apxs -e -A -n speedycgi %D/%F