- Add support for Apache 2.2

PR:		ports/94034
Submitted by:	Craig Boston <craig@yekse.gank.org>
Approved by:	Jeremy Chadwick <freebsd@jdc.parodius.com> (maintainer)
This commit is contained in:
Pav Lucistnik 2006-04-08 12:56:16 +00:00
parent c87acb2df6
commit f0df633c49
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=159113
4 changed files with 59 additions and 13 deletions

View file

@ -16,7 +16,7 @@ COMMENT= Securely execute ~user PHP scripts
GNU_CONFIGURE= yes
USE_PHP= yes
USE_APACHE= yes
USE_APACHE= 1.3+
WANT_PHP_CGI= yes
CONFLICTS= mod_php4-4* php-4.* mod_php5-5* php-5.*
@ -53,18 +53,11 @@ CONFIGURE_ARGS+= --with-setid-mode=${WITH_SETID_MODE}
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/include/apache2/apr.h) || defined(WITH_APACHE2)
APACHE_PORT= www/apache20
PLIST_SUB+= MODULEDIR="libexec/apache2/"
.else
PLIST_SUB+= MODULEDIR="libexec/apache/"
.endif
show-options:
@${SED} -ne 's/^##//p' ${.CURDIR}/Makefile
pre-everything::
@${MAKE} show-options
pre-everything:: show-options
@${DO_NADA}
post-install:
.if !defined(NOPORTDOCS)

View file

@ -0,0 +1,11 @@
--- configure.orig Thu Mar 2 13:38:36 2006
+++ configure Thu Mar 2 13:39:23 2006
@@ -2405,7 +2405,7 @@
| cut -f2 -d"/" \
| cut -f1 -d" "`
major_version=`echo $APACHE_VERSION|cut -f1,2 -d.`
- if test "$major_version" = "2.0"; then
+ if test "$major_version" = "2.0" -o "$major_version" = "2.2"; then
APACHE_VERSION_2=true
APACHE_VERSION_1_3=false
else

View file

@ -1,5 +1,14 @@
--- src/apache2/mod_suphp.c.orig Tue Jul 13 02:43:41 2004
+++ src/apache2/mod_suphp.c Wed Jul 14 01:51:27 2004
--- src/apache2/mod_suphp.c.orig Tue Jul 13 04:43:41 2004
+++ src/apache2/mod_suphp.c Thu Mar 2 20:14:04 2006
@@ -56,7 +56,7 @@
return -1;
rv = apr_bucket_read(b, &bucket_data, &bucket_data_len, APR_BLOCK_READ);
- if (!APR_STATUS_IS_SUCCESS(rv) || (bucket_data_len == 0))
+ if (!(rv == APR_SUCCESS) || (bucket_data_len == 0))
{
return 0;
}
@@ -463,7 +463,13 @@
if (((rv = apr_procattr_create(&procattr, p)) != APR_SUCCESS)
@ -14,3 +23,36 @@
/* set resource limits */
@@ -524,7 +530,9 @@
return rv;
}
- APR_BRIGADE_FOREACH(bucket, bb)
+ for (bucket = APR_BRIGADE_FIRST(bb);
+ bucket != APR_BRIGADE_SENTINEL(bb);
+ bucket = APR_BUCKET_NEXT(bucket))
{
const char *data;
apr_size_t len;
@@ -595,7 +603,9 @@
const char *buf;
apr_size_t blen;
- APR_BRIGADE_FOREACH(b, bb)
+ for (b = APR_BRIGADE_FIRST(bb);
+ b != APR_BRIGADE_SENTINEL(bb);
+ b = APR_BUCKET_NEXT(b))
{
if (APR_BUCKET_IS_EOS(b))
break;
@@ -616,7 +626,9 @@
/* empty brigade (script output) */
const char *buf;
apr_size_t blen;
- APR_BRIGADE_FOREACH(b, bb)
+ for (b = APR_BRIGADE_FIRST(bb);
+ b != APR_BRIGADE_SENTINEL(bb);
+ b = APR_BUCKET_NEXT(b))
{
if (APR_BUCKET_IS_EOS(b))
break;

View file

@ -1,5 +1,5 @@
sbin/suphp
%%MODULEDIR%%/mod_suphp.so
%%APACHEMODDIR%%/mod_suphp.so
@exec %D/sbin/apxs -e -a -n suphp %D/%f
@unexec %D/sbin/apxs -e -A -n suphp %D/%f
%%PORTDOCS%%%%DOCSDIR%%/en/INSTALL