1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

- add mod_deflate

Submitted by:	Denis Shaposhniko

- CONFLICTS extended
This commit is contained in:
Dirk Meyer 2004-03-26 07:56:10 +00:00
parent 9c8c377b10
commit d5c09ef140
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=105302
4 changed files with 119 additions and 13 deletions

View File

@ -6,19 +6,20 @@
#
PORTNAME= apache+mod_ssl
PORTVERSION= ${VERSION_APACHE}+${VERSION_MODSSL}${PVERSION_MODSNMP}${PVERSION_MODACCEL}
PORTVERSION= ${VERSION_APACHE}+${VERSION_MODSSL}${PVERSION_MODSNMP}${PVERSION_MODACCEL}${PVERSION_MODDEFLATE}
PORTREVISION= 1
CATEGORIES= www security
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
${MASTER_SITES_MODSSL:S/$/:mod_ssl/} \
http://www.mod-snmp.com/distr/:mod_snmp \
http://sysoev.ru/mod_accel/:mod_accel
PKGNAMESUFFIX= ${MODSNMP_SUFFIX}${MODACCEL_SUFFIX}${IPV6_SUFFIX}
http://sysoev.ru/mod_accel/:mod_accel \
http://sysoev.ru/mod_deflate/:mod_deflate
PKGNAMESUFFIX= ${MODSNMP_SUFFIX}${MODACCEL_SUFFIX}${MODDEFLATE_SUFFIX}${IPV6_SUFFIX}${PKGNAMESUFFIX2}
DISTNAME= apache_${VERSION_APACHE}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${MODSSL_FILE}:mod_ssl \
${MODSNMP_DISTFILE} ${MODACCEL_DISTFILE}
${MODSNMP_DISTFILE} ${MODACCEL_DISTFILE} ${MODDEFLATE_DISTFILE}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} ${MODSSL_FILE} \
${MODACCEL_FILE}
${MODACCEL_FILE} ${MODDEFLATE_FILE}
.if defined(APACHE_WITH_IPV6) || make(makesum) || defined(FETCH_ALL)
PATCH_SITES+= ftp://ftp.42.org/pub/orphan/
@ -38,6 +39,7 @@ VERSION_APACHE= 1.3.29
VERSION_MODSSL= 2.8.16
VERSION_MODSNMP= 1.3.14.12
VERSION_MODACCEL= 1.0.31
VERSION_MODDEFLATE= 1.0.20
USE_OPENSSL= yes
HAS_CONFIGURE= yes
USE_PERL5_BUILD= yes
@ -49,6 +51,7 @@ MASTER_SITES_MODSSL= http://www.modssl.org/source/ \
MODSSL_FILE= mod_ssl-${VERSION_MODSSL}-${VERSION_APACHE}${EXTRACT_SUFX}
MODSNMP_FILE= mod_snmp_${VERSION_MODSNMP}${EXTRACT_SUFX}
MODACCEL_FILE= mod_accel-${VERSION_MODACCEL}${EXTRACT_SUFX}
MODDEFLATE_FILE= mod_deflate-${VERSION_MODDEFLATE}${EXTRACT_SUFX}
.include <bsd.port.pre.mk>
@ -138,9 +141,14 @@ CFLAGS+= -O3
MODSNMP_DISTFILE= ${MODSNMP_FILE}:mod_snmp
.endif
.if defined(APACHE_WITH_MODSNMP)
CONFLICTS+= apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* \
CONFLICTS+= apache+mod_ssl-1.* \
apache+mod_ssl+ipv6-1.* \
apache+mod_ssl+mod_accel-1.* \
apache+mod_ssl+mod_accel+ipv6-1.*
apache+mod_ssl+mod_accel+ipv6-1.* \
apache+mod_ssl+mod_accel+mod_deflate-1.* \
apache+mod_ssl+mod_accel+mod_deflate+ipv6-1.* \
apache+mod_ssl+mod_deflate-1.* \
apache+mod_ssl+mod_deflate+ipv6-1.* \
MODSNMP_SUFFIX= +mod_snmp
PVERSION_MODSNMP= +${VERSION_MODSNMP}
CONFIGURE_ARGS+= --activate-module=src/modules/snmp_agt/libsnmp_agt.a
@ -156,26 +164,57 @@ PLIST_SUB+= WITHSNMP="@comment "
MODACCEL_DISTFILE= ${MODACCEL_FILE}:mod_accel
.endif
.if defined(APACHE_WITH_MODACCEL)
CONFLICTS+= apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* \
apache+mod_ssl+mod_snmp-1.* apache+mod_ssl+mod_snmp+ipv6-1.*
CONFLICTS+= apache+mod_ssl-1.* \
apache+mod_ssl+ipv6-1.* \
apache+mod_ssl+mod_snmp-1.* \
apache+mod_ssl+mod_snmp+ipv6-1.* \
apache+mod_ssl+mod_snmp+mod_deflate-1.* \
apache+mod_ssl+mod_snmp+mod_deflate+ipv6-1.* \
apache+mod_ssl+mod_deflate-1.* \
apache+mod_ssl+mod_deflate+ipv6-1.*
MODACCEL_SUFFIX= +mod_accel
PVERSION_MODACCEL= +${VERSION_MODACCEL}
CONFIGURE_ARGS+= --activate-module=src/modules/extra/mod_randban.o \
--activate-module=src/modules/extra/mod_freeze.o \
--activate-module=src/modules/accel/libaccel.a
EXTRA_PATCHES+= ${FILESDIR}/mod_accel-preservehost.patch
PLIST_SUB+= WITHACCEL=""
.else
PLIST_SUB+= WITHACCEL="@comment "
.endif
.if defined(APACHE_WITH_MODDEFLATE) || make(makesum) || defined(FETCH_ALL)
MODDEFLATE_DISTFILE= ${MODDEFLATE_FILE}:mod_deflate
.endif
.if defined(APACHE_WITH_MODDEFLATE)
CONFLICTS+= apache+mod_ssl-1.* \
apache+mod_ssl+ipv6-1.* \
apache+mod_ssl+mod_snmp-1.* \
apache+mod_ssl+mod_snmp+ipv6-1.* \
apache+mod_ssl+mod_snmp+mod_accel-1.* \
apache+mod_ssl+mod_snmp+mod_accel+ipv6-1.* \
apache+mod_ssl+mod_accel-1.* \
apache+mod_ssl+mod_accel+ipv6-1.*
MODDEFLATE_SUFFIX= +mod_deflate
PVERSION_MODDEFLATE= +${VERSION_MODDEFLATE}
CONFIGURE_ARGS+= --activate-module=src/modules/extra/mod_deflate.o
PLIST_SUB+= WITHDEFLATE=""
.else
PLIST_SUB+= WITHDEFLATE="@comment "
.endif
.if defined(APACHE_WITH_IPV6)
.if defined(APACHE_WITH_MODACCEL)
BROKEN= "mod_accel and ipv6 don't compile together"
.endif
CONFLICTS+= apache+mod_ssl-1.* apache+mod_ssl+mod_snmp-1.* \
CONFLICTS+= apache+mod_ssl-1.* \
apache+mod_ssl+mod_snmp-1.* \
apache+mod_ssl+mod_snmp+mod_accel-1.* \
apache+mod_ssl+mod_snmp+mod_accel+mod_deflate-1.* \
apache+mod_ssl+mod_accel-1.* \
apache+mod_ssl+mod_snmp+mod_accel-1.*
apache+mod_ssl+mod_accel+mod_deflate-1.* \
apache+mod_ssl+mod_deflate-1.*
IPV6_SUFFIX= +ipv6
CONFIGURE_ARGS+= --enable-rule=INET6
PLIST_SUB+= WITHIPV6=""
@ -250,6 +289,10 @@ pre-fetch:
@${ECHO_MSG} " This setting activates build of mod_accel."
@${ECHO_MSG} " [default is no]"
@${ECHO_MSG} ""
@${ECHO_MSG} " APACHE_WITH_MODDEFLATE=yes mod_deflate support."
@${ECHO_MSG} " This setting activates build of mod_deflate."
@${ECHO_MSG} " [default is no]"
@${ECHO_MSG} ""
post-extract:
@ -270,6 +313,12 @@ pre-patch:
&& ./configure --with-apache=../${DISTNAME} --with-mod_randban --with-mod_freeze \
&& ${MAKE}
.endif
.if defined(APACHE_WITH_MODDEFLATE)
@cd ${WRKDIR}/mod_deflate-${VERSION_MODDEFLATE} \
&& ${ECHO_MSG} "===> Applying mod_deflate-${VERSION_MODDEFLATE} extension" \
&& ./configure --with-apache=../${DISTNAME} \
&& ${MAKE}
.endif
post-patch:
@${PERL} -pi -e 's|-print|-print0|;s|xargs|xargs -0|' \

View File

@ -2,9 +2,11 @@ MD5 (apache_1.3.29.tar.gz) = e97fe9bf51dc2c9c233d53f63b1347e3
SIZE (apache_1.3.29.tar.gz) = 2435809
MD5 (mod_ssl-2.8.16-1.3.29.tar.gz) = 4f6c580ffa07d33e8584406132b98e86
SIZE (mod_ssl-2.8.16-1.3.29.tar.gz) = 754325
MD5 (mod_accel-1.0.31.tar.gz) = edc31714cc6dc8d24396cb4ddf2ae2f6
SIZE (mod_accel-1.0.31.tar.gz) = 85443
MD5 (mod_snmp_1.3.14.12.tar.gz) = b0bddbb4e5ff4c6a46d114998f12740a
SIZE (mod_snmp_1.3.14.12.tar.gz) = 91462
MD5 (mod_accel-1.0.31.tar.gz) = edc31714cc6dc8d24396cb4ddf2ae2f6
SIZE (mod_accel-1.0.31.tar.gz) = 85443
MD5 (mod_deflate-1.0.20.tar.gz) = 78dcc8f467ea0b216e034c9ac7d674c2
SIZE (mod_deflate-1.0.20.tar.gz) = 32383
MD5 (apache-1.3.29modssl-v6-20031204.diff.gz) = d84056da5795f7d0ba80df9e8105a94c
SIZE (apache-1.3.29modssl-v6-20031204.diff.gz) = 29440

View File

@ -0,0 +1,54 @@
--- src/modules/accel/mod_accel.c.orig Mon Mar 22 12:25:54 2004
+++ src/modules/accel/mod_accel.c Mon Mar 22 12:26:30 2004
@@ -282,6 +282,17 @@
a->pass->max_wait = a->pass->max_conn;
a->pass->sum = accel_sum(a->pass->sum_part, a->url, tag);
+
+ if (max = ap_table_get(r->notes, "rewrite_ph")) {
+ char *prefix, *port;
+ if (!(prefix = strstr(a->url, "://")))
+ return "Invalid URL prefix";
+
+ prefix += 3;
+
+ a->pass->port = (port = strchr(prefix, ':')) ? atoi(port + 1) : 80;
+ a->pass->preserve_host = 1;
+ }
#endif
}
--- src/modules/standard/mod_rewrite.c.orig Mon Mar 22 12:25:54 2004
+++ src/modules/standard/mod_rewrite.c Mon Mar 22 12:26:01 2004
@@ -947,6 +947,10 @@
|| strcasecmp(key, "MP") == 0 ) {
cfg->max_part = ap_pstrdup(p, val);
}
+ else if ( strcasecmp(key, "preservehost") == 0
+ || strcasecmp(key, "PH") == 0 ) {
+ cfg->preserve_host = 1;
+ }
#endif
else if ( strcasecmp(key, "passthrough") == 0
|| strcasecmp(key, "PT") == 0 ) {
@@ -2128,6 +2132,9 @@
ap_psprintf(r->pool, "%d", p->max_wait));
if (p->max_part)
ap_table_set(r->notes, "rewrite_mp", p->max_part);
+ if (p->preserve_host)
+ ap_table_set(r->notes, "rewrite_ph",
+ ap_psprintf(r->pool, "%d", p->preserve_host));
#endif
return 1;
}
--- src/modules/standard/mod_rewrite.h.orig Mon Mar 22 12:25:54 2004
+++ src/modules/standard/mod_rewrite.h Mon Mar 22 12:26:01 2004
@@ -298,6 +298,7 @@
int max_conn;
int max_wait;
char *max_part;
+ unsigned preserve_host:1;
#endif
} rewriterule_entry;

View File

@ -518,6 +518,7 @@ www/data-dist/index.html.zh-tw.big5
%%WITHSNMP%%%%DOCSDIR%%/snmp_agt/apache-scoreboard-mib.txt
%%WITHSNMP%%%%DOCSDIR%%/snmp_agt/apache-config-mib.txt
%%WITHACCEL%%%%DOCSDIR%%/mod/mod_accel.html
%%WITHDEFLATE%%%%DOCSDIR%%/mod/mod_deflate.html
www/cgi-bin-dist/printenv
@exec [ -d %D/www/cgi-bin/ ] || ln -fs %B %D/www/cgi-bin
www/cgi-bin-dist/test-cgi