summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Short <zul@gentoo.org>2004-05-08 13:30:02 +0000
committerChuck Short <zul@gentoo.org>2004-05-08 13:30:02 +0000
commit1f219a3986f6faa726a4633debf0b18efd194b37 (patch)
tree304eeee5d2e16596c1089e9138fabda5b3e8ad52 /net-www
parentremoved unneeded dep of paxctl (diff)
downloadhistorical-1f219a3986f6faa726a4633debf0b18efd194b37.tar.gz
historical-1f219a3986f6faa726a4633debf0b18efd194b37.tar.bz2
historical-1f219a3986f6faa726a4633debf0b18efd194b37.zip
Added patches for 1.31 in prepardenewss for next week.
Diffstat (limited to 'net-www')
-rw-r--r--net-www/apache/ChangeLog10
-rw-r--r--net-www/apache/Manifest101
-rw-r--r--net-www/apache/files/patches/1.3.31/00_gentoo_apachectl.patch806
-rw-r--r--net-www/apache/files/patches/1.3.31/00_gentoo_base.patch786
-rw-r--r--net-www/apache/files/patches/1.3.31/00_gentoo_db4_detect.patch29
-rw-r--r--net-www/apache/files/patches/1.3.31/00_gentoo_suexec_pam.patch70
-rw-r--r--net-www/apache/files/patches/1.3.31/Readme.PATCHES28
7 files changed, 1781 insertions, 49 deletions
diff --git a/net-www/apache/ChangeLog b/net-www/apache/ChangeLog
index 439b1e4a15a1..7534f9b8e839 100644
--- a/net-www/apache/ChangeLog
+++ b/net-www/apache/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-www/apache
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/apache/ChangeLog,v 1.149 2004/05/06 22:33:19 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/apache/ChangeLog,v 1.150 2004/05/08 13:30:02 zul Exp $
+
+ 09 May 2004; Chuck Short <zul@gentoo.org>
+ files/patches/1.3.31/00_gentoo_apachectl.patch,
+ files/patches/1.3.31/00_gentoo_base.patch,
+ files/patches/1.3.31/00_gentoo_db4_detect.patch,
+ files/patches/1.3.31/00_gentoo_suexec_pam.patch,
+ files/patches/1.3.31/Readme.PATCHES:
+ Added patches for 1.3.31 in readyness for relase next week.
06 May 2004; Aron Griffis <agriffis@gentoo.org> apache-2.0.49-r1.ebuild:
Stable on ia64
diff --git a/net-www/apache/Manifest b/net-www/apache/Manifest
index d0edf0b78f52..1741aad096eb 100644
--- a/net-www/apache/Manifest
+++ b/net-www/apache/Manifest
@@ -1,80 +1,85 @@
-MD5 1b12e866364f0b0b14e2ad0ed22ea464 ChangeLog 27400
-MD5 66272053c5e35229d74312f23f14ff12 apache-2.0.49-r1.ebuild 11988
MD5 406289807ec3ab35345d70b58fb810dd apache-1.3.29-r2.ebuild 7144
-MD5 7e76722e90bde33e6ba450b1c3e795f8 apache-1.3.29-r1.ebuild 7441
+MD5 66272053c5e35229d74312f23f14ff12 apache-2.0.49-r1.ebuild 11988
MD5 738de16a708fdae922876faebfa4ddd7 apache-2.0.48-r4.ebuild 12398
+MD5 7e76722e90bde33e6ba450b1c3e795f8 apache-1.3.29-r1.ebuild 7441
MD5 3fb5ff6cadc21fb817bf01cda83d0045 apache-2.0.49.ebuild 12698
+MD5 0c14a4c085a29680eb24747254ce25f1 ChangeLog 27738
MD5 5b6dd438f81019e56fa641841c0c13fe metadata.xml 501
+MD5 d4b8a4908870107e15cc1edbd0ec6ebb files/apache-1.3.29_mod_auth_db.patch 729
+MD5 161245c7aa1eb785db53b34d6a10be43 files/suexec_pam_gentoo.patch 2149
MD5 97c7a2efed7a3fd05614167426c495d9 files/apache-builtin-mods 2465
-MD5 17aee0f7a9de0f390fa046bc82436309 files/apache.confd 998
+MD5 589e8773eb94f785be510f74b2e39ad0 files/digest-apache-1.3.29-r1 211
+MD5 589e8773eb94f785be510f74b2e39ad0 files/digest-apache-1.3.29-r2 211
+MD5 d3626a1e31a675c60d066c111d552adf files/suexec.pam 59
+MD5 4cc91d25cf4117b8db0fec344bebec4d files/digest-apache-2.0.48-r4 65
+MD5 3a7818b24f0952694c7b878ba3d8e79a files/digest-apache-2.0.49-r1 65
+MD5 37d2c4ea8e1a6725deaca42b6aa22c69 files/apache-1.3.27_db4_gentoo.patch 1006
+MD5 2c7dedfa1c3b2b815d733e90acfa06fc files/apache-2.0.48-export.diff 706
+MD5 43283cd264b5b1a6b3e5a4adba5ee2c1 files/apache-2.0.48-gentoo.diff 5905
MD5 7d55db018577d9c8f779d29dad70f22d files/apache.rc6 1082
+MD5 998b4b7df08eb15641e0b9132443b365 files/apache-1.3.27-apachectl.patch 1328
+MD5 8d790bf68c47c08951c761815cd66a1c files/apachelogserverstatus 4763
+MD5 df54361aa8754197cf3bafe99d32c7ec files/robots.txt 340
MD5 02db12f0d91e1f89e0b173fea6c5151d files/apacheaddmod 5977
+MD5 b7c4fabdcb3845c4218b770acb792f73 files/apache-2.0.49-gentoo.diff 6316
MD5 bae4b9d941cd38a32943533e958aa1b3 files/apachedelmod 3185
-MD5 8d790bf68c47c08951c761815cd66a1c files/apachelogserverstatus 4763
+MD5 c4738c2f22a613ee5701ccdf61d9f7ce files/apache2 324
MD5 d3339c25967ce7b36ef24495542f044a files/apachesplitlogfile 4948
+MD5 3a7818b24f0952694c7b878ba3d8e79a files/digest-apache-2.0.49 65
MD5 b9ff3534313dae1b8ac96df0e3e01373 files/httpd-2.0.48-ipv6.patch 865
-MD5 3a7818b24f0952694c7b878ba3d8e79a files/digest-apache-2.0.49-r1 65
-MD5 df54361aa8754197cf3bafe99d32c7ec files/robots.txt 340
-MD5 8cb4313e58d7bd5dc369eb92f75daa2b files/httpd-2.0.49-ipv6.patch 788
-MD5 d3626a1e31a675c60d066c111d552adf files/suexec.pam 59
-MD5 161245c7aa1eb785db53b34d6a10be43 files/suexec_pam_gentoo.patch 2149
+MD5 17aee0f7a9de0f390fa046bc82436309 files/apache.confd 998
MD5 c2866f70c91c7c7f718b89d92530d5f2 files/apache-1.3.29-usertrack_bug.patch 2588
-MD5 589e8773eb94f785be510f74b2e39ad0 files/digest-apache-1.3.29-r2 211
-MD5 c4738c2f22a613ee5701ccdf61d9f7ce files/apache2 324
-MD5 37d2c4ea8e1a6725deaca42b6aa22c69 files/apache-1.3.27_db4_gentoo.patch 1006
-MD5 998b4b7df08eb15641e0b9132443b365 files/apache-1.3.27-apachectl.patch 1328
-MD5 43283cd264b5b1a6b3e5a4adba5ee2c1 files/apache-2.0.48-gentoo.diff 5905
-MD5 589e8773eb94f785be510f74b2e39ad0 files/digest-apache-1.3.29-r1 211
-MD5 2c7dedfa1c3b2b815d733e90acfa06fc files/apache-2.0.48-export.diff 706
-MD5 4cc91d25cf4117b8db0fec344bebec4d files/digest-apache-2.0.48-r4 65
-MD5 b7c4fabdcb3845c4218b770acb792f73 files/apache-2.0.49-gentoo.diff 6316
-MD5 3a7818b24f0952694c7b878ba3d8e79a files/digest-apache-2.0.49 65
-MD5 d4b8a4908870107e15cc1edbd0ec6ebb files/apache-1.3.29_mod_auth_db.patch 729
+MD5 8cb4313e58d7bd5dc369eb92f75daa2b files/httpd-2.0.49-ipv6.patch 788
+MD5 a7f15bdba3786353deb7bfaf8de0efb9 files/conf/apache.conf 8115
+MD5 75e88ab5a3193fe8ff31c09f5bae2c09 files/conf/commonapache.conf 22175
+MD5 c774e0c7ddc6d55bddc164a9b5af0cb6 files/conf/VirtualHomePages.conf 907
+MD5 bb04f10b8e54f2ee95a8149fc50bb35b files/conf/Vhosts.conf 1903
+MD5 fd9b211c5078739d4aadbe6b3e53aead files/conf/DynamicVhosts.conf 963
+MD5 6c5fea3288b0ca4769495060d345055d files/2.0.48-r1/commonapache2.conf 31776
+MD5 63b10f728d11f10fb24241f8322542df files/2.0.48-r1/apache2.confd 1955
+MD5 abb7eca89bc2ad072c61418195a98cd6 files/2.0.48-r1/apache2.initd 2418
+MD5 429d2311b221deba1bc181e17e046543 files/2.0.48-r1/apache2.conf 7652
+MD5 5a7b58d54689d6e9d8f8214b5150d18f files/common/config.layout 741
+MD5 fe80b29c20bb6794eb7f4a0875588306 files/common/apr-util-config.layout 437
+MD5 54c0546fa2b1985686cf22c9efa2c7dc files/common/apr-config.layout 434
MD5 869ec17a0417518aa1d9d9566a958fb5 files/2.0.40/40_mod_ssl.conf 3185
-MD5 1d10cc98714a34ddc38525743c2989f9 files/2.0.40/41_mod_ssl.default-vhost.conf 8053
MD5 819ee444395cf42ccc8009529a94af37 files/2.0.40/45_mod_dav.conf 583
MD5 50b76a8df795c79378c02f1edea750a4 files/2.0.40/46_mod_ldap.conf 902
-MD5 3dfd53805dfe77a12507c3af371dbeae files/2.0.40/apache2-builtin-mods 2213
-MD5 66bf65c4f0a2072d612b781599515807 files/2.0.40/apache2.conf 7649
-MD5 7648aa0e65d9bfd6ee5dc7109bc94fbc files/2.0.40/apache2.confd 784
-MD5 cf5600eadc7f31990840d631ef518d6c files/2.0.40/apache2.initd 1160
MD5 b610d37fd521de1f8fc782069e165969 files/2.0.40/apache2logserverstatus 4652
MD5 a14d8565fd5ca2b5753799477a85b1af files/2.0.40/apache2splitlogfile 4844
-MD5 9a54f9faa53622b7db4b7e119016c549 files/2.0.40/commonapache2.conf 31777
-MD5 23416b00cbdc46b67e672f272e49ba40 files/2.0.40/dynamic-vhosts.conf 840
+MD5 3dfd53805dfe77a12507c3af371dbeae files/2.0.40/apache2-builtin-mods 2213
MD5 b335411e582a8fd58aacf2f35e75291f files/2.0.40/gentestcrt.sh 8805
MD5 9375735d739344987fe4b2a3990de273 files/2.0.40/highperformance.conf 1959
MD5 5c47dec8c730edf1cb755b581327bd49 files/2.0.40/httpd.conf 35481
MD5 0055923f696c9ba3be7eeb5518603d40 files/2.0.40/ssl.conf 11082
+MD5 1d10cc98714a34ddc38525743c2989f9 files/2.0.40/41_mod_ssl.default-vhost.conf 8053
+MD5 9a54f9faa53622b7db4b7e119016c549 files/2.0.40/commonapache2.conf 31777
+MD5 7648aa0e65d9bfd6ee5dc7109bc94fbc files/2.0.40/apache2.confd 784
+MD5 cf5600eadc7f31990840d631ef518d6c files/2.0.40/apache2.initd 1160
+MD5 66bf65c4f0a2072d612b781599515807 files/2.0.40/apache2.conf 7649
MD5 d9e0ecfbc1591486a698494a388b091c files/2.0.40/vhosts.conf 1695
MD5 b69bf7c3126e471a2abff013e716367f files/2.0.40/virtual-homepages.conf 780
-MD5 fd9b211c5078739d4aadbe6b3e53aead files/conf/DynamicVhosts.conf 963
-MD5 bb04f10b8e54f2ee95a8149fc50bb35b files/conf/Vhosts.conf 1903
-MD5 c774e0c7ddc6d55bddc164a9b5af0cb6 files/conf/VirtualHomePages.conf 907
-MD5 a7f15bdba3786353deb7bfaf8de0efb9 files/conf/apache.conf 8115
-MD5 75e88ab5a3193fe8ff31c09f5bae2c09 files/conf/commonapache.conf 22175
-MD5 54c0546fa2b1985686cf22c9efa2c7dc files/common/apr-config.layout 434
-MD5 fe80b29c20bb6794eb7f4a0875588306 files/common/apr-util-config.layout 437
-MD5 5a7b58d54689d6e9d8f8214b5150d18f files/common/config.layout 741
-MD5 429d2311b221deba1bc181e17e046543 files/2.0.48-r1/apache2.conf 7652
-MD5 63b10f728d11f10fb24241f8322542df files/2.0.48-r1/apache2.confd 1955
-MD5 abb7eca89bc2ad072c61418195a98cd6 files/2.0.48-r1/apache2.initd 2418
-MD5 6c5fea3288b0ca4769495060d345055d files/2.0.48-r1/commonapache2.conf 31776
+MD5 23416b00cbdc46b67e672f272e49ba40 files/2.0.40/dynamic-vhosts.conf 840
MD5 869ec17a0417518aa1d9d9566a958fb5 files/2.0.49/40_mod_ssl.conf 3185
-MD5 1d10cc98714a34ddc38525743c2989f9 files/2.0.49/41_mod_ssl.default-vhost.conf 8053
MD5 819ee444395cf42ccc8009529a94af37 files/2.0.49/45_mod_dav.conf 583
MD5 50b76a8df795c79378c02f1edea750a4 files/2.0.49/46_mod_ldap.conf 902
-MD5 0fac1724d97d449d1cfb746275f7b32b files/2.0.49/apache2-builtin-mods 2211
-MD5 77785d5ff6e5a7a21425dc69a6162779 files/2.0.49/apache2.conf 7652
-MD5 bf4f5fef094c57eeef892940ea689da9 files/2.0.49/apache2.confd 1951
-MD5 6a4d7a40940ae2f3bd6500f0d07d37f9 files/2.0.49/apache2.initd 2423
MD5 b610d37fd521de1f8fc782069e165969 files/2.0.49/apache2logserverstatus 4652
MD5 a14d8565fd5ca2b5753799477a85b1af files/2.0.49/apache2splitlogfile 4844
-MD5 65f0d13e644e1dba96e3f0470488c75e files/2.0.49/commonapache2.conf 32101
-MD5 23416b00cbdc46b67e672f272e49ba40 files/2.0.49/dynamic-vhosts.conf 840
+MD5 0fac1724d97d449d1cfb746275f7b32b files/2.0.49/apache2-builtin-mods 2211
MD5 0e8867687279c44ddbf51375c537cd02 files/2.0.49/gentestcrt.sh 8800
+MD5 1d10cc98714a34ddc38525743c2989f9 files/2.0.49/41_mod_ssl.default-vhost.conf 8053
+MD5 65f0d13e644e1dba96e3f0470488c75e files/2.0.49/commonapache2.conf 32101
+MD5 bf4f5fef094c57eeef892940ea689da9 files/2.0.49/apache2.confd 1951
+MD5 6a4d7a40940ae2f3bd6500f0d07d37f9 files/2.0.49/apache2.initd 2423
+MD5 77785d5ff6e5a7a21425dc69a6162779 files/2.0.49/apache2.conf 7652
MD5 d9e0ecfbc1591486a698494a388b091c files/2.0.49/vhosts.conf 1695
MD5 b69bf7c3126e471a2abff013e716367f files/2.0.49/virtual-homepages.conf 780
+MD5 23416b00cbdc46b67e672f272e49ba40 files/2.0.49/dynamic-vhosts.conf 840
MD5 fc31be76ad482038fa9019ea59067473 files/patches/2.0.49-r1/00_ssl_engine.patch 1364
-MD5 59deb12158a55cc2259cd79c245eb00d files/patches/2.0.49-r1/00_ssl_verify_client.patch 6671
MD5 ef7b1c9f6601215108343ef13f707962 files/patches/2.0.49-r1/Readme.PATCHES 444
+MD5 59deb12158a55cc2259cd79c245eb00d files/patches/2.0.49-r1/00_ssl_verify_client.patch 6671
+MD5 3c0dfc9f2dc93ae46eb6382cf9533f18 files/patches/1.3.31/00_gentoo_base.patch 27799
+MD5 a63b9472904d3500cf72b370a9ee3200 files/patches/1.3.31/00_gentoo_db4_detect.patch 1304
+MD5 28272b16a4f701f29eb73d932fd81101 files/patches/1.3.31/Readme.PATCHES 747
+MD5 161245c7aa1eb785db53b34d6a10be43 files/patches/1.3.31/00_gentoo_suexec_pam.patch 2149
+MD5 61df284cb67dfde3085aec5543eeb03c files/patches/1.3.31/00_gentoo_apachectl.patch 32836
diff --git a/net-www/apache/files/patches/1.3.31/00_gentoo_apachectl.patch b/net-www/apache/files/patches/1.3.31/00_gentoo_apachectl.patch
new file mode 100644
index 000000000000..9315c15fbace
--- /dev/null
+++ b/net-www/apache/files/patches/1.3.31/00_gentoo_apachectl.patch
@@ -0,0 +1,806 @@
+diff -Naur apache_1.3.31/Makefile.tmpl apache_1.3.31-gentoo/Makefile.tmpl
+--- apache_1.3.31/Makefile.tmpl 2004-02-20 22:40:50.000000000 +0000
++++ apache_1.3.31-gentoo/Makefile.tmpl 2004-05-08 10:09:06.963665624 +0000
+@@ -366,7 +366,6 @@
+ fi; \
+ echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/$${apachectl}"; \
+ sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/$(TARGET).pid;' \
+- -e 's;HTTPD=.*;HTTPD=$(sbindir)/$(TARGET);' \
+ < $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \
+ $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/$${apachectl}; \
+ echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8"; \
+diff -Naur apache_1.3.31/Makefile.tmpl.orig apache_1.3.31-gentoo/Makefile.tmpl.orig
+--- apache_1.3.31/Makefile.tmpl.orig 1970-01-01 00:00:00.000000000 +0000
++++ apache_1.3.31-gentoo/Makefile.tmpl.orig 2004-02-20 22:40:50.000000000 +0000
+@@ -0,0 +1,586 @@
++# Copyright 1999-2004 The Apache Software Foundation
++#
++# Licensed under the Apache License, Version 2.0 (the "License");
++# you may not use this file except in compliance with the License.
++# You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++
++
++##
++## Makefile -- Apache Autoconf-style Interface (APACI)
++## top-level control Makefile for out-of-the-box
++## build and installation procedure.
++##
++## Written by Ralf S. Engelschall <rse@apache.org>
++##
++
++## ==================================================================
++## Options
++## ==================================================================
++
++# safe environment
++SHELL = @SHELL@
++
++# what platform are we on
++PLATFORM = @PLATFORM@
++
++# paths to the source tree parts
++TOP = .
++SRC = @SRC@
++MKF = @MKF@
++AUX = @AUX@
++
++# build tools
++CP = cp
++LN = ln
++RM = rm -f
++MKDIR = $(TOP)/$(AUX)/mkdir.sh
++INSTALL = $(TOP)/$(AUX)/install.sh -c
++IFLAGS_PROGRAM = @IFLAGS_PROGRAM@
++IFLAGS_CORE = @IFLAGS_CORE@
++IFLAGS_DSO = @IFLAGS_DSO@
++IFLAGS_SCRIPT = @IFLAGS_SCRIPT@
++IFLAGS_DATA = @IFLAGS_DATA@
++INSTALL_PROGRAM = $(INSTALL) $(IFLAGS_PROGRAM)
++INSTALL_CORE = $(INSTALL) $(IFLAGS_CORE)
++INSTALL_DSO = $(INSTALL) $(IFLAGS_DSO)
++INSTALL_SCRIPT = $(INSTALL) $(IFLAGS_SCRIPT)
++INSTALL_DATA = $(INSTALL) $(IFLAGS_DATA)
++PERL = @PERL@
++TAR = @TAR@
++TAROPT = @TAROPT@
++
++# installation name of Apache webserver
++TARGET = @TARGET@
++
++# installation root
++# (overrideable by package maintainers for
++# rolling packages without bristling the system)
++root =
++
++# installation paths
++prefix = @prefix@
++exec_prefix = @exec_prefix@
++bindir = @bindir@
++sbindir = @sbindir@
++libexecdir = @libexecdir@
++mandir = @mandir@
++sysconfdir = @sysconfdir@
++datadir = @datadir@
++iconsdir = @iconsdir@
++htdocsdir = @htdocsdir@
++manualdir = @manualdir@
++cgidir = @cgidir@
++includedir = @includedir@
++localstatedir = @localstatedir@
++runtimedir = @runtimedir@
++logfiledir = @logfiledir@
++proxycachedir = @proxycachedir@
++
++libexecdir_relative = @libexecdir_relative@
++
++# suexec details (optional)
++suexec = @suexec@
++suexec_caller = @suexec_caller@
++suexec_docroot = @suexec_docroot@
++suexec_logexec = @suexec_logexec@
++suexec_userdir = @suexec_userdir@
++suexec_uidmin = @suexec_uidmin@
++suexec_gidmin = @suexec_gidmin@
++suexec_safepath = @suexec_safepath@
++suexec_umask = @suexec_umask@
++
++# some substituted configuration parameters
++conf_user = @conf_user@
++conf_group = @conf_group@
++conf_port = @conf_port@
++conf_serveradmin = @conf_serveradmin@
++conf_servername = @conf_servername@
++
++# usage of src/support stuff
++build-support = @build_support@
++install-support = @install_support@
++clean-support = @clean_support@
++distclean-support = @distclean_support@
++
++# forwarding arguments
++MFWD = root=$(root)
++
++## ==================================================================
++## Targets
++## ==================================================================
++
++# default target
++all: build
++
++## ------------------------------------------------------------------
++## Build Target
++## ------------------------------------------------------------------
++
++# build the package
++build:
++ @echo "===> $(SRC)"
++ @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) build-std
++ @if [ "x$(build-support)" != "x" ]; then \
++ $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) $(build-support); \
++ fi
++ @touch $(TOP)/$(SRC)/.apaci.build.ok
++ @echo "<=== $(SRC)"
++
++# the non-verbose variant for package maintainers
++build-quiet:
++ @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) QUIET=1 build
++
++# build the standard stuff
++build-std:
++ @case "x$(PLATFORM)" in \
++ x*390*) _C89_STEPS="0xffffffff"; export _C89_STEPS;; \
++ esac; \
++ cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ all
++
++# build the additional support stuff
++build-support:
++ @echo "===> $(SRC)/support"; \
++ case "x$(PLATFORM)" in \
++ x*390*) _C89_STEPS="0xffffffff"; export _C89_STEPS;; \
++ esac; \
++ cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) all || exit 1; \
++ if [ ".$(suexec)" = .1 ]; then \
++ $(MAKE) $(MFLAGS) \
++ EXTRA_CFLAGS='\
++ $(suexec_umask) \
++ -DHTTPD_USER=\"$(suexec_caller)\" \
++ -DUID_MIN=$(suexec_uidmin) \
++ -DGID_MIN=$(suexec_gidmin) \
++ -DUSERDIR_SUFFIX=\"$(suexec_userdir)\" \
++ -DLOG_EXEC=\"$(suexec_logexec)\" \
++ -DDOC_ROOT=\"$(suexec_docroot)\" \
++ -DSAFE_PATH=\"$(suexec_safepath)\"' \
++ suexec; \
++ fi
++ @echo "<=== $(SRC)/support"
++
++## ------------------------------------------------------------------
++## Installation Targets
++## ------------------------------------------------------------------
++
++# indirection step to avoid conflict with INSTALL document
++# on case-insenstive filesystems, for instance on OS/2
++install: install-all
++
++# the install target for installing the complete Apache
++# package. This is implemented by running subtargets for the
++# separate parts of the installation process.
++install-all:
++ @if [ ! -f $(TOP)/$(SRC)/.apaci.build.ok ]; then \
++ $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) build; \
++ else \
++ :; \
++ fi
++ @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) \
++ install-mktree install-programs $(install-support) \
++ install-include install-data install-config
++ -@$(RM) $(SRC)/.apaci.install.tmp
++ -@$(RM) $(SRC)/.apaci.install.conf
++ -@if [ ".$(QUIET)" != .1 ]; then \
++ if [ ".$(TARGET)" = .httpd ]; then \
++ apachectl='apachectl'; \
++ else \
++ apachectl="$(TARGET)ctl"; \
++ fi; \
++ echo "+--------------------------------------------------------+"; \
++ echo "| You now have successfully built and installed the |"; \
++ echo "| Apache 1.3 HTTP server. To verify that Apache actually |"; \
++ echo "| works correctly you now should first check the |"; \
++ echo "| (initially created or preserved) configuration files |"; \
++ echo "| |"; \
++ echo "| $(sysconfdir)/$(TARGET).conf"; \
++ echo "| |"; \
++ echo "| and then you should be able to immediately fire up |"; \
++ echo "| Apache the first time by running: |"; \
++ echo "| |"; \
++ echo "| $(sbindir)/$${apachectl} start"; \
++ echo "| |"; \
++ echo "| Thanks for using Apache. The Apache Group |"; \
++ echo "| http://www.apache.org/ |"; \
++ echo "+--------------------------------------------------------+"; \
++ fi
++
++# the non-verbose variant for package maintainers
++install-quiet:
++ @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) QUIET=1 install-all
++
++# create the installation tree
++install-mktree:
++ @echo "===> [mktree: Creating Apache installation tree]"
++ $(MKDIR) $(root)$(bindir)
++ $(MKDIR) $(root)$(sbindir)
++ $(MKDIR) $(root)$(libexecdir)
++ $(MKDIR) $(root)$(mandir)/man1
++ $(MKDIR) $(root)$(mandir)/man8
++ $(MKDIR) $(root)$(sysconfdir)
++ $(MKDIR) $(root)$(htdocsdir)
++ $(MKDIR) $(root)$(manualdir)
++ $(MKDIR) $(root)$(iconsdir)
++ $(MKDIR) $(root)$(cgidir)
++ $(MKDIR) $(root)$(includedir)
++ $(MKDIR) $(root)$(includedir)/xml
++ $(MKDIR) $(root)$(runtimedir)
++ $(MKDIR) $(root)$(logfiledir)
++ $(MKDIR) $(root)$(proxycachedir)
++ -@if [ "x`$(AUX)/getuid.sh`" = "x0" ]; then \
++ echo "chown $(conf_user) $(root)$(proxycachedir)"; \
++ chown $(conf_user) $(root)$(proxycachedir); \
++ echo "chgrp $(conf_group) $(root)$(proxycachedir)"; \
++ chgrp "$(conf_group)" $(root)$(proxycachedir); \
++ fi
++ @echo "<=== [mktree]"
++
++# install the server program and optionally corresponding
++# shared object files.
++install-programs:
++ @echo "===> [programs: Installing Apache $(TARGET) program and shared objects]"
++ -@if [ ".`grep '^[ ]*AddModule.*mod_so\.o' $(TOP)/$(SRC)/Configuration.apaci`" != . ]; then \
++ echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
++ $(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
++ SHLIB_EXPORT_FILES="`grep '^SHLIB_EXPORT_FILES=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
++ if [ ".$${SHLIB_EXPORT_FILES}" != . ]; then \
++ $(CP) $(TOP)/$(SRC)/support/httpd.exp $(root)$(libexecdir)/; \
++ chmod 644 $(root)$(libexecdir)/httpd.exp; \
++ fi; \
++ else \
++ echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
++ fi
++ -@if [ ".`grep 'SUBTARGET=target_shared' $(TOP)/$(SRC)/Makefile`" != . ]; then \
++ SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
++ SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
++ echo "$(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep"; \
++ $(INSTALL_CORE) $(TOP)/$(SRC)/lib$(TARGET).ep $(root)$(libexecdir)/lib$(TARGET).ep; \
++ echo "$(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}"; \
++ $(INSTALL_DSO) $(TOP)/$(SRC)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}; \
++ if [ ".$${SHLIB_SUFFIX_LIST}" != . ]; then \
++ echo "$(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*"; \
++ $(RM) $(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.*; \
++ for suffix in $${SHLIB_SUFFIX_LIST} ""; do \
++ [ ".$${suffix}" = . ] && continue; \
++ echo "$(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}"; \
++ $(LN) $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME} $(root)$(libexecdir)/lib$(TARGET).$${SHLIB_SUFFIX_NAME}.$${suffix}; \
++ done; \
++ fi; \
++ fi
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/httpd.8 $(root)$(mandir)/man8/$(TARGET).8
++ -@$(RM) $(SRC)/.apaci.install.conf; touch $(SRC)/.apaci.install.conf
++ -@if [ ".`grep '^[ ]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci`" != . ]; then \
++ for mod in `egrep '^[ ]*SharedModule' $(TOP)/$(SRC)/Configuration.apaci |\
++ sed -e 's/^[ ]*SharedModule[ ]*//'`; do \
++ file=`echo $${mod} | sed -e 's;^.*/\([^/]*\);\1;'`; \
++ echo "$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}"; \
++ $(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}; \
++ name=`$(TOP)/$(AUX)/fmn.sh $(TOP)/$(SRC)/$${mod}`; \
++ echo dummy | awk '{ printf("LoadModule %-18s %s\n", modname, modpath); }' \
++ modname="$${name}" modpath="$(libexecdir_relative)$${file}" >>$(SRC)/.apaci.install.conf; \
++ done; \
++ echo "" >>$(SRC)/.apaci.install.conf; \
++ echo "# Reconstruction of the complete module list from all available modules" >>$(SRC)/.apaci.install.conf; \
++ echo "# (static and shared ones) to achieve correct module execution order." >>$(SRC)/.apaci.install.conf; \
++ echo "# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]" >>$(SRC)/.apaci.install.conf; \
++ echo "ClearModuleList" >>$(SRC)/.apaci.install.conf; \
++ egrep "^[ ]*(Add|Shared)Module" $(SRC)/Configuration.apaci |\
++ sed -e 's:SharedModule:AddModule:' \
++ -e 's:modules/[^/]*/::' \
++ -e 's:[ ]lib: mod_:' \
++ -e 's:\.[dsoam].*$$:.c:' >>$(SRC)/.apaci.install.conf; \
++ fi
++ @echo "<=== [programs]"
++
++# install the support programs and scripts
++install-support:
++ @echo "===> [support: Installing Apache support programs and scripts]"
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/ab $(root)$(sbindir)/ab
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/ab.8 $(root)$(mandir)/man8/ab.8
++ @if [ ".$(TARGET)" = .httpd ]; then \
++ apachectl='apachectl'; \
++ else \
++ apachectl="$(TARGET)ctl"; \
++ fi; \
++ echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/$${apachectl}"; \
++ sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/$(TARGET).pid;' \
++ -e 's;HTTPD=.*;HTTPD=$(sbindir)/$(TARGET);' \
++ < $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \
++ $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/$${apachectl}; \
++ echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8"; \
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/checkgid $(root)$(bindir)/checkgid
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htpasswd $(root)$(bindir)/htpasswd
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/htpasswd.1 $(root)$(mandir)/man1/htpasswd.1
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htdigest $(root)$(bindir)/htdigest
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/htdigest.1 $(root)$(mandir)/man1/htdigest.1
++ @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/dbmmanage[*] $(root)$(bindir)/dbmmanage"; \
++ sed -e 's;^#!/.*;#!$(PERL);' \
++ < $(TOP)/$(SRC)/support/dbmmanage > $(TOP)/$(SRC)/.apaci.install.tmp && \
++ $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(bindir)/dbmmanage
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/dbmmanage.1 $(root)$(mandir)/man1/dbmmanage.1
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/logresolve $(root)$(sbindir)/logresolve
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/logresolve.8 $(root)$(mandir)/man8/logresolve.8
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/rotatelogs $(root)$(sbindir)/rotatelogs
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/rotatelogs.8 $(root)$(mandir)/man8/rotatelogs.8
++ @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apxs[*] $(root)$(sbindir)/apxs"; \
++ sed -e 's;^#!/.*;#!$(PERL);' \
++ -e 's;\@prefix\@;$(prefix);' \
++ -e 's;\@sbindir\@;$(sbindir);' \
++ -e 's;\@libexecdir\@;$(libexecdir);' \
++ -e 's;\@includedir\@;$(includedir);' \
++ -e 's;\@sysconfdir\@;$(sysconfdir);' \
++ < $(TOP)/$(SRC)/support/apxs > $(TOP)/$(SRC)/.apaci.install.tmp && \
++ $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/apxs
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/apxs.8 $(root)$(mandir)/man8/apxs.8
++ -@if [ ".$(suexec)" = .1 ]; then \
++ echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec"; \
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec; \
++ echo "chown root $(root)$(sbindir)/suexec"; \
++ chown root $(root)$(sbindir)/suexec; \
++ echo "chmod 4711 $(root)$(sbindir)/suexec"; \
++ chmod 4711 $(root)$(sbindir)/suexec; \
++ echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8"; \
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8; \
++ fi
++ @echo "<=== [support]"
++
++# install the support programs and scripts for binary distribution
++install-binsupport:
++ @echo "===> [support: Installing Apache support programs and scripts for binary distribution]"
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/ab $(root)$(sbindir)/ab
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/ab.8 $(root)$(mandir)/man8/ab.8
++ @if [ ".$(TARGET)" = .httpd ]; then \
++ apachectl='apachectl'; \
++ else \
++ apachectl="$(TARGET)ctl"; \
++ fi; \
++ echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apachectl[*] $(root)$(sbindir)/$${apachectl}"; \
++ sed -e 's;PIDFILE=.*;PIDFILE=$(runtimedir)/$(TARGET).pid;' \
++ -e 's;HTTPD=.*;HTTPD=$(sbindir)/$(TARGET);' \
++ < $(TOP)/$(SRC)/support/apachectl > $(TOP)/$(SRC)/.apaci.install.tmp && \
++ $(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sbindir)/$${apachectl}; \
++ echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8"; \
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/apachectl.8 $(root)$(mandir)/man8/$${apachectl}.8
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/checkgid $(root)$(bindir)/checkgid
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htpasswd $(root)$(bindir)/htpasswd
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/htpasswd.1 $(root)$(mandir)/man1/htpasswd.1
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/htdigest $(root)$(bindir)/htdigest
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/htdigest.1 $(root)$(mandir)/man1/htdigest.1
++ @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/dbmmanage[*] $(root)$(bindir)/dbmmanage"; \
++ $(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/dbmmanage $(root)$(bindir)/dbmmanage
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/dbmmanage.1 $(root)$(mandir)/man1/dbmmanage.1
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/logresolve $(root)$(sbindir)/logresolve
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/logresolve.8 $(root)$(mandir)/man8/logresolve.8
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/rotatelogs $(root)$(sbindir)/rotatelogs
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/rotatelogs.8 $(root)$(mandir)/man8/rotatelogs.8
++ @echo "$(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apxs[*] $(root)$(sbindir)/apxs"; \
++ $(INSTALL_SCRIPT) $(TOP)/$(SRC)/support/apxs $(root)$(sbindir)/apxs
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/apxs.8 $(root)$(mandir)/man8/apxs.8
++ -@if [ ".$(suexec)" = .1 ]; then \
++ echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec"; \
++ $(INSTALL_PROGRAM) $(TOP)/$(SRC)/support/suexec $(root)$(sbindir)/suexec; \
++ echo "chown root $(root)$(sbindir)/suexec"; \
++ chown root $(root)$(sbindir)/suexec; \
++ echo "chmod 4711 $(root)$(sbindir)/suexec"; \
++ chmod 4711 $(root)$(sbindir)/suexec; \
++ echo "$(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8"; \
++ $(INSTALL_DATA) $(TOP)/$(SRC)/support/suexec.8 $(root)$(mandir)/man8/suexec.8; \
++ fi
++ @echo "<=== [support]"
++
++# install the Apache C header files
++install-include:
++ @echo "===> [include: Installing Apache C header files]"
++ $(CP) $(TOP)/$(SRC)/include/*.h $(root)$(includedir)/
++ $(CP) $(TOP)/$(SRC)/lib/expat-lite/*.h $(root)$(includedir)/xml/
++ @osdir=`grep '^OSDIR=' $(TOP)/$(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os/:os/:'`; \
++ echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/"; \
++ $(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/; \
++ echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/"; \
++ $(CP) $(TOP)/$(SRC)/$${osdir}/os-inline.c $(root)$(includedir)/
++ chmod 644 $(root)$(includedir)/*.h $(root)$(includedir)/xml/*.h
++ @echo "<=== [include]"
++
++# create an initial document root containing the Apache manual,
++# icons and distributed CGI scripts.
++install-data:
++ @echo "===> [data: Installing initial data files]"
++ -@if [ -f $(root)$(htdocsdir)/index.html ] || [ -f $(root)$(htdocsdir)/index.html.en ]; then \
++ echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(htdocsdir)/]"; \
++ else \
++ echo "Copying tree $(TOP)/htdocs/ -> $(root)$(htdocsdir)/"; \
++ (cd $(TOP)/htdocs/ && $(TAR) $(TAROPT) - index* apache_pb.* ) |\
++ (cd $(root)$(htdocsdir)/ && $(TAR) -xf -); \
++ find $(root)$(htdocsdir)/ -type d -exec chmod a+rx {} \; ; \
++ find $(root)$(htdocsdir)/ -type f -print | xargs chmod a+r ; \
++ fi
++ -@if [ -d $(TOP)/htdocs/manual ]; then \
++ echo "Copying tree $(TOP)/htdocs/manual -> $(root)/$(manualdir)/"; \
++ (cd $(TOP)/htdocs/manual/ && $(TAR) $(TAROPT) - *) |\
++ (cd $(root)$(manualdir)/ && $(TAR) -xf -); \
++ find $(root)$(manualdir)/ -type d -exec chmod a+rx {} \; ; \
++ find $(root)$(manualdir)/ -type f -print | xargs chmod a+r ; \
++ fi
++ -@if [ -f $(root)$(cgidir)/printenv ]; then \
++ echo "[PRESERVING EXISTING CGI SUBDIR: $(root)$(cgidir)/]"; \
++ else \
++ for script in printenv test-cgi; do \
++ cat $(TOP)/cgi-bin/$${script} |\
++ sed -e 's;^#!/.*perl;#!$(PERL);' \
++ > $(TOP)/$(SRC)/.apaci.install.tmp; \
++ echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(cgidir)/$${script}"; \
++ $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir)/$${script}; \
++ done; \
++ fi
++ @echo "Copying tree $(TOP)/icons/ -> $(root)$(iconsdir)/"; \
++ (cd $(TOP)/icons/ && $(TAR) $(TAROPT) - *) |\
++ (cd $(root)$(iconsdir)/ && $(TAR) -xf -); \
++ find $(root)$(iconsdir)/ -type d -exec chmod a+rx {} \; ;\
++ find $(root)$(iconsdir)/ -type f -exec chmod a+r {} \;
++ @echo "<=== [data]"
++
++# create the initial configuration by providing default files
++# and initial config files while preserving existing ones.
++install-config:
++ @echo "===> [config: Installing Apache configuration files]"
++ -@for conf in httpd.conf access.conf srm.conf; do \
++ if [ .$$conf = .httpd.conf ]; then \
++ target_conf="$(TARGET).conf"; \
++ else \
++ target_conf="$$conf"; \
++ fi; \
++ if [ ".$(TARGET)" = .httpd ]; then \
++ target_prefix=""; \
++ else \
++ target_prefix="$(TARGET)_"; \
++ fi; \
++ (echo "##"; \
++ echo "## $${target_conf} -- Apache HTTP server configuration file"; \
++ echo "##"; \
++ echo ""; \
++ cat $(TOP)/conf/$${conf}-dist ) |\
++ sed -e '/# LoadModule/r $(TOP)/$(SRC)/.apaci.install.conf' \
++ -e 's;@@ServerRoot@@/htdocs/manual;$(manualdir);' \
++ -e 's;@@ServerRoot@@/htdocs;$(htdocsdir);' \
++ -e 's;@@ServerRoot@@/icons;$(iconsdir);' \
++ -e 's;@@ServerRoot@@/cgi-bin;$(cgidir);' \
++ -e 's;@@ServerRoot@@/proxy;$(proxycachedir);' \
++ -e 's;@@ServerRoot@@;$(prefix);g' \
++ -e 's;httpd\.conf;$(TARGET).conf;' \
++ -e 's;logs/accept\.lock;$(runtimedir)/$(TARGET).lock;' \
++ -e 's;logs/apache_runtime_status;$(runtimedir)/$(TARGET).scoreboard;' \
++ -e 's;logs/httpd\.pid;$(runtimedir)/$(TARGET).pid;' \
++ -e "s;logs/access_log;$(logfiledir)/$${target_prefix}access_log;" \
++ -e "s;logs/error_log;$(logfiledir)/$${target_prefix}error_log;" \
++ -e "s;logs/referer_log;$(logfiledir)/$${target_prefix}referer_log;" \
++ -e "s;logs/agent_log;$(logfiledir)/$${target_prefix}agent_log;" \
++ -e 's;conf/magic;$(sysconfdir)/magic;' \
++ -e 's;conf/srm.conf;$(sysconfdir)/srm.conf;' \
++ -e 's;conf/access.conf;$(sysconfdir)/access.conf;' \
++ -e 's;conf/mime\.types;$(sysconfdir)/mime.types;' \
++ -e 's;User nobody;User $(conf_user);' \
++ -e 's;Group #-1;Group $(conf_group);' \
++ -e 's;^Group "#-1";Group $(conf_group);' \
++ -e 's;Port 80;Port $(conf_port);' \
++ -e 's;ServerAdmin you@your.address;ServerAdmin $(conf_serveradmin);' \
++ -e 's;ServerName new.host.name;ServerName $(conf_servername);' \
++ > $(TOP)/$(SRC)/.apaci.install.tmp && \
++ echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}.default"; \
++ $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}.default; \
++ if [ ! -f "$(root)$(sysconfdir)/$${target_conf}" ]; then \
++ echo "$(INSTALL_DATA) $(TOP)/conf/$${conf}-dist[*] $(root)$(sysconfdir)/$${target_conf}"; \
++ $(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(sysconfdir)/$${target_conf}; \
++ else \
++ echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${target_conf}]"; \
++ fi; \
++ done
++ -@for conf in mime.types magic; do \
++ echo "$(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}.default"; \
++ $(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}.default; \
++ if [ ! -f "$(root)$(sysconfdir)/$${conf}" ]; then \
++ echo "$(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}"; \
++ $(INSTALL_DATA) $(TOP)/conf/$${conf} $(root)$(sysconfdir)/$${conf}; \
++ else \
++ echo "[PRESERVING EXISTING CONFIG FILE: $(root)$(sysconfdir)/$${conf}]"; \
++ fi; \
++ done
++ @echo "<=== [config]"
++
++
++## ------------------------------------------------------------------
++## Cleanup Targets
++## ------------------------------------------------------------------
++
++# cleanup the source tree by removing anything which was
++# created by the build target
++clean:
++ @echo "===> $(SRC)"
++ @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) clean-std $(clean-support)
++ @echo "<=== $(SRC)"
++ @$(RM) $(TOP)/$(SRC)/.apaci.build.ok
++
++# clean the standard stuff
++clean-std:
++ @cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ clean
++
++# clean additional support stuff
++clean-support:
++ @echo "===> $(SRC)/support"; \
++ cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) clean; \
++ if [ ".$(suexec)" = .1 ]; then \
++ echo "$(RM) suexec"; \
++ $(RM) suexec; \
++ fi; \
++ echo "<=== $(SRC)/support"
++
++# cleanup the source tree by removing anything which was
++# created by the configure step and the build target.
++# When --shadow is used we just remove the complete shadow tree.
++distclean:
++ @if [ ".$(SRC)" = .src ]; then \
++ $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) distclean-normal; \
++ else \
++ $(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) distclean-shadow; \
++ fi
++
++distclean-normal:
++ @echo "===> $(SRC)"
++ @$(MAKE) -f $(TOP)/$(MKF) $(MFLAGS) $(MFWD) distclean-std $(distclean-support)
++ @echo "<=== $(SRC)"
++ -$(RM) $(SRC)/Configuration.apaci
++ -$(RM) $(SRC)/apaci
++ @$(RM) $(SRC)/.apaci.build.ok
++ -$(RM) Makefile
++ -$(RM) config.status
++
++# clean the standard stuff
++distclean-std:
++ @cd $(TOP)/$(SRC); $(MAKE) $(MFLAGS) SDP=$(SRC)/ distclean
++
++distclean-support:
++ @echo "===> $(SRC)/support"; \
++ cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) distclean; \
++ if [ ".$(suexec)" = .1 ]; then \
++ echo "$(RM) suexec"; \
++ $(RM) suexec; \
++ fi; \
++ echo "<=== $(SRC)/support"
++
++distclean-shadow:
++ $(RM) -r $(SRC)
++ $(RM) $(TOP)/$(MKF)
++ -@if [ ".`ls $(TOP)/src.* 2>/dev/null`" = . ]; then \
++ echo "$(RM) Makefile"; \
++ $(RM) Makefile; \
++ fi
++
+diff -Naur apache_1.3.31/src/support/apachectl apache_1.3.31-gentoo/src/support/apachectl
+--- apache_1.3.31/src/support/apachectl 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/apachectl 2004-05-08 10:09:07.044653312 +0000
+@@ -40,7 +40,8 @@
+ PIDFILE=/usr/local/apache/logs/httpd.pid
+ #
+ # the path to your httpd binary, including options if necessary
+-HTTPD='/usr/local/apache/src/httpd'
++. /etc/conf.d/apache
++HTTPD="/usr/sbin/apache ${APACHE_OPTS}"
+ #
+ # a command that outputs a formatted text version of the HTML at the
+ # url given on the command line. Designed for lynx, however other
+diff -Naur apache_1.3.31/src/support/apachectl.orig apache_1.3.31-gentoo/src/support/apachectl.orig
+--- apache_1.3.31/src/support/apachectl.orig 1970-01-01 00:00:00.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/apachectl.orig 2004-02-20 22:02:24.000000000 +0000
+@@ -0,0 +1,188 @@
++#!/bin/sh
++#
++# Copyright 1999-2004 The Apache Software Foundation
++#
++# Licensed under the Apache License, Version 2.0 (the "License");
++# you may not use this file except in compliance with the License.
++# You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++# See the License for the specific language governing permissions and
++# limitations under the License.
++#
++#
++# Apache control script designed to allow an easy command line interface
++# to controlling Apache. Written by Marc Slemko, 1997/08/23
++#
++# The exit codes returned are:
++# 0 - operation completed successfully
++# 1 -
++# 2 - usage error
++# 3 - httpd could not be started
++# 4 - httpd could not be stopped
++# 5 - httpd could not be started during a restart
++# 6 - httpd could not be restarted during a restart
++# 7 - httpd could not be restarted during a graceful restart
++# 8 - configuration syntax error
++#
++# When multiple arguments are given, only the error from the _last_
++# one is reported. Run "apachectl help" for usage info
++#
++#
++# |||||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||||
++# -------------------- --------------------
++#
++# the path to your PID file
++PIDFILE=/usr/local/apache/logs/httpd.pid
++#
++# the path to your httpd binary, including options if necessary
++HTTPD='/usr/local/apache/src/httpd'
++#
++# a command that outputs a formatted text version of the HTML at the
++# url given on the command line. Designed for lynx, however other
++# programs may work.
++LYNX="lynx -dump"
++#
++# the URL to your server's mod_status status page. If you do not
++# have one, then status and fullstatus will not work.
++STATUSURL="http://localhost/server-status"
++#
++# -------------------- --------------------
++# |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
++
++ERROR=0
++ARGV="$@"
++if [ "x$ARGV" = "x" ] ; then
++ ARGS="help"
++fi
++
++for ARG in $@ $ARGS
++do
++ # check for pidfile
++ if [ -f $PIDFILE ] ; then
++ PID=`cat $PIDFILE`
++ if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then
++ STATUS="httpd (pid $PID) running"
++ RUNNING=1
++ else
++ STATUS="httpd (pid $PID?) not running"
++ RUNNING=0
++ fi
++ else
++ STATUS="httpd (no pid file) not running"
++ RUNNING=0
++ fi
++
++ case $ARG in
++ start)
++ if [ $RUNNING -eq 1 ]; then
++ echo "$0 $ARG: httpd (pid $PID) already running"
++ continue
++ fi
++ if $HTTPD ; then
++ echo "$0 $ARG: httpd started"
++ else
++ echo "$0 $ARG: httpd could not be started"
++ ERROR=3
++ fi
++ ;;
++ stop)
++ if [ $RUNNING -eq 0 ]; then
++ echo "$0 $ARG: $STATUS"
++ continue
++ fi
++ if kill $PID ; then
++ echo "$0 $ARG: httpd stopped"
++ else
++ echo "$0 $ARG: httpd could not be stopped"
++ ERROR=4
++ fi
++ ;;
++ restart)
++ if [ $RUNNING -eq 0 ]; then
++ echo "$0 $ARG: httpd not running, trying to start"
++ if $HTTPD ; then
++ echo "$0 $ARG: httpd started"
++ else
++ echo "$0 $ARG: httpd could not be started"
++ ERROR=5
++ fi
++ else
++ if $HTTPD -t >/dev/null 2>&1; then
++ if kill -HUP $PID ; then
++ echo "$0 $ARG: httpd restarted"
++ else
++ echo "$0 $ARG: httpd could not be restarted"
++ ERROR=6
++ fi
++ else
++ echo "$0 $ARG: configuration broken, ignoring restart"
++ echo "$0 $ARG: (run 'apachectl configtest' for details)"
++ ERROR=6
++ fi
++ fi
++ ;;
++ graceful)
++ if [ $RUNNING -eq 0 ]; then
++ echo "$0 $ARG: httpd not running, trying to start"
++ if $HTTPD ; then
++ echo "$0 $ARG: httpd started"
++ else
++ echo "$0 $ARG: httpd could not be started"
++ ERROR=5
++ fi
++ else
++ if $HTTPD -t >/dev/null 2>&1; then
++ if kill -USR1 $PID ; then
++ echo "$0 $ARG: httpd gracefully restarted"
++ else
++ echo "$0 $ARG: httpd could not be restarted"
++ ERROR=7
++ fi
++ else
++ echo "$0 $ARG: configuration broken, ignoring restart"
++ echo "$0 $ARG: (run 'apachectl configtest' for details)"
++ ERROR=7
++ fi
++ fi
++ ;;
++ status)
++ $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
++ ;;
++ fullstatus)
++ $LYNX $STATUSURL
++ ;;
++ configtest)
++ if $HTTPD -t; then
++ :
++ else
++ ERROR=8
++ fi
++ ;;
++ *)
++ echo "usage: $0 (start|stop|restart|fullstatus|status|graceful|configtest|help)"
++ cat <<EOF
++
++start - start httpd
++stop - stop httpd
++restart - restart httpd if running by sending a SIGHUP or start if
++ not running
++fullstatus - dump a full status screen; requires lynx and mod_status enabled
++status - dump a short status screen; requires lynx and mod_status enabled
++graceful - do a graceful restart by sending a SIGUSR1 or start if not running
++configtest - do a configuration syntax test
++help - this screen
++
++EOF
++ ERROR=2
++ ;;
++
++ esac
++
++done
++
++exit $ERROR
diff --git a/net-www/apache/files/patches/1.3.31/00_gentoo_base.patch b/net-www/apache/files/patches/1.3.31/00_gentoo_base.patch
new file mode 100644
index 000000000000..e7c85b5b14bc
--- /dev/null
+++ b/net-www/apache/files/patches/1.3.31/00_gentoo_base.patch
@@ -0,0 +1,786 @@
+diff -Naur apache_1.3.31/cgi-bin/printenv apache_1.3.31-gentoo/cgi-bin/printenv
+--- apache_1.3.31/cgi-bin/printenv 1999-11-24 18:10:58.000000000 +0000
++++ apache_1.3.31-gentoo/cgi-bin/printenv 2004-05-08 09:49:06.461169744 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ ##
+ ## printenv -- demo CGI program which just prints its environment
+ ##
+diff -Naur apache_1.3.31/conf/mime.types apache_1.3.31-gentoo/conf/mime.types
+--- apache_1.3.31/conf/mime.types 2004-01-10 22:57:46.000000000 +0000
++++ apache_1.3.31-gentoo/conf/mime.types 2004-05-08 09:49:06.481166704 +0000
+@@ -344,19 +344,18 @@
+ application/x-bcpio bcpio
+ application/x-cdlink vcd
+ application/x-chess-pgn pgn
+-application/x-compress
+ application/x-cpio cpio
+ application/x-csh csh
+ application/x-director dcr dir dxr
+ application/x-dvi dvi
+ application/x-futuresplash spl
+ application/x-gtar gtar
+-application/x-gzip
+ application/x-hdf hdf
+ application/x-javascript js
+ application/x-koan skp skd skt skm
+ application/x-latex latex
+ application/x-netcdf nc cdf
++application/x-ogg ogg
+ application/x-sh sh
+ application/x-shar shar
+ application/x-shockwave-flash swf
+diff -Naur apache_1.3.31/config.layout apache_1.3.31-gentoo/config.layout
+--- apache_1.3.31/config.layout 2002-05-16 16:32:31.000000000 +0000
++++ apache_1.3.31-gentoo/config.layout 2004-05-08 09:49:06.487165792 +0000
+@@ -28,6 +28,7 @@
+ runtimedir: $localstatedir/logs
+ logfiledir: $localstatedir/logs
+ proxycachedir: $localstatedir/proxy
++ serverroot: $prefix
+ </Layout>
+
+ # GNU standards conforming path layout.
+@@ -50,6 +51,7 @@
+ runtimedir: $localstatedir/run
+ logfiledir: $localstatedir/log
+ proxycachedir: $localstatedir/proxy
++ serverroot: $prefix
+ </Layout>
+
+ # Apache binary distribution path layout
+@@ -92,6 +94,7 @@
+ runtimedir: $prefix/Logs
+ logfiledir: $prefix/Logs
+ proxycachedir: $prefix/ProxyCache
++ serverroot: $prefix
+ </Layout>
+
+ # Darwin/Mac OS Layout
+@@ -115,8 +118,8 @@
+ proxycachedir: $runtimedir/proxy
+ </Layout>
+
+-# Red Hat Linux 7.x layout
+-<Layout RedHat>
++# ADVX layout
++<Layout ADVX>
+ prefix: /usr
+ exec_prefix: $prefix
+ bindir: $prefix/bin
+@@ -134,6 +137,7 @@
+ runtimedir: $localstatedir/run
+ logfiledir: $localstatedir/log/httpd
+ proxycachedir: $localstatedir/cache/httpd
++ serverroot: /etc/httpd
+ </Layout>
+
+ # According to the /opt filesystem conventions
+diff -Naur apache_1.3.31/configure apache_1.3.31-gentoo/configure
+--- apache_1.3.31/configure 2004-02-20 22:40:50.000000000 +0000
++++ apache_1.3.31-gentoo/configure 2004-05-08 09:49:06.617146032 +0000
+@@ -460,7 +460,7 @@
+ for var in prefix exec_prefix bindir sbindir libexecdir mandir \
+ sysconfdir datadir iconsdir htdocsdir manualdir cgidir \
+ includedir localstatedir runtimedir logfiledir \
+- proxycachedir; do
++ proxycachedir serverroot; do
+ eval "val=\"\$$var\""
+ case $val in
+ *+ )
+@@ -621,6 +621,9 @@
+ sysconfdir="$apc_optarg"
+ autosuffix_sysconfdir=no
+ ;;
++ --serverroot=*)
++ serverroot="$apc_optarg"
++ ;;
+ --datadir=*)
+ datadir="$apc_optarg"
+ autosuffix_datadir=no
+@@ -1070,7 +1073,7 @@
+ for var in prefix exec_prefix bindir sbindir libexecdir mandir \
+ sysconfdir datadir iconsdir htdocsdir manualdir cgidir \
+ includedir localstatedir runtimedir logfiledir \
+- proxycachedir suexec_docroot suexec_logexec ; do
++ proxycachedir suexec_docroot suexec_logexec serverroot; do
+ eval "val=\"\$$var\"";
+ val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
+ eval "$var=\"$val\""
+@@ -1175,8 +1178,8 @@
+ ## path is just the emtpy one, i.e. ""]
+ ##
+ runtimedir_relative=`echo $runtimedir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
+-logfiledir_relative=`echo $logfiledir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
+-sysconfdir_relative=`echo $sysconfdir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
++logfiledir_relative=`echo $logfiledir | sed -e "s:^$serverroot/*::" -e 's:\(.\)$:\1/:'`
++sysconfdir_relative=`echo $sysconfdir | sed -e "s:^$serverroot/*::" -e 's:\(.\)$:\1/:'`
+ libexecdir_relative=`echo $libexecdir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
+
+ ##
+@@ -1204,7 +1207,7 @@
+ echo " proxycachedir: $proxycachedir"
+ echo ""
+ echo "Compilation paths:"
+- echo " HTTPD_ROOT: $prefix"
++ echo " HTTPD_ROOT: $serverroot"
+ echo " SHARED_CORE_DIR: $libexecdir"
+ echo " DEFAULT_PIDLOG: ${runtimedir_relative}${thetarget}.pid"
+ echo " DEFAULT_SCOREBOARD: ${runtimedir_relative}${thetarget}.scoreboard"
+@@ -1263,6 +1266,7 @@
+ -e "s%@libexecdir_relative@%$libexecdir_relative%g" \
+ -e "s%@mandir@%$mandir%g" \
+ -e "s%@sysconfdir@%$sysconfdir%g" \
++-e "s%@serverroot@%$serverroot%g" \
+ -e "s%@datadir@%$datadir%g" \
+ -e "s%@iconsdir@%$iconsdir%g" \
+ -e "s%@htdocsdir@%$htdocsdir%g" \
+@@ -1301,7 +1305,7 @@
+ echo "#!/bin/sh" >$src/apaci
+ echo "## USED AS A COMMAND LINE EXPANDER TO OVERRIDE PATHS" >>$src/apaci
+ echo "## WITHOUT DISTURBING THE KNOWN MAKE BUILD PROCESS DISPLAY" >>$src/apaci
+-echo "echo '-DHTTPD_ROOT=\"$prefix\"'" >>$src/apaci
++echo "echo '-DHTTPD_ROOT=\"$serverroot\"'" >>$src/apaci
+ echo "echo '-DSUEXEC_BIN=\"$sbindir/suexec\"'" >>$src/apaci
+ echo "echo '-DSHARED_CORE_DIR=\"$libexecdir\"'" >>$src/apaci
+ echo "echo '-DDEFAULT_PIDLOG=\"${runtimedir_relative}${thetarget}.pid\"'" >>$src/apaci
+diff -Naur apache_1.3.31/src/helpers/find-dbm-lib apache_1.3.31-gentoo/src/helpers/find-dbm-lib
+--- apache_1.3.31/src/helpers/find-dbm-lib 2004-02-16 22:23:09.000000000 +0000
++++ apache_1.3.31-gentoo/src/helpers/find-dbm-lib 2004-05-08 09:49:06.621145424 +0000
+@@ -28,17 +28,7 @@
+ *-linux*)
+ # many systems don't have -ldbm
+ DBM_LIB=""
+- if ./helpers/TestCompile lib ndbm dbm_open; then
+- DBM_LIB="-lndbm"
+- if ./helpers/TestCompile lib db1 dbm_open; then
+- # Red Hat needs this; ndbm.h lives in db1
+- CFLAGS="$CFLAGS -I/usr/include/db1"
+- fi
+- elif ./helpers/TestCompile lib db1 dbm_open; then
+- # For Red Hat 7, if not handled by the ndbm case above
+- DBM_LIB="-ldb1"
+- CFLAGS="$CFLAGS -I/usr/include/db1"
+- elif ./helpers/TestCompile lib gdbm dbm_open; then
++ if ./helpers/TestCompile lib gdbm dbm_open; then
+ DBM_LIB="-lgdbm"
+ CFLAGS="$CFLAGS -I/usr/include/gdbm"
+ elif ./helpers/TestCompile lib dbm dbm_open; then
+diff -Naur apache_1.3.31/src/include/hsregex.h apache_1.3.31-gentoo/src/include/hsregex.h
+--- apache_1.3.31/src/include/hsregex.h 2004-04-15 15:51:51.000000000 +0000
++++ apache_1.3.31-gentoo/src/include/hsregex.h 2004-05-08 09:49:06.626144664 +0000
+@@ -22,7 +22,7 @@
+ #define ap_private_extern
+ #endif
+
+-typedef off_t regoff_t;
++typedef int regoff_t;
+ typedef struct {
+ int re_magic;
+ size_t re_nsub; /* number of parenthesized subexpressions */
+diff -Naur apache_1.3.31/src/main/http_core.c apache_1.3.31-gentoo/src/main/http_core.c
+--- apache_1.3.31/src/main/http_core.c 2004-05-03 20:15:26.000000000 +0000
++++ apache_1.3.31-gentoo/src/main/http_core.c 2004-05-08 09:51:58.137071040 +0000
+@@ -2140,8 +2140,9 @@
+ else {
+ cmd->server->server_uid = ap_user_id;
+ fprintf(stderr,
+- "Warning: User directive in <VirtualHost> "
++ "ERROR: User directive in <VirtualHost> "
+ "requires SUEXEC wrapper.\n");
++ exit (1);
+ }
+ }
+ #if !defined (BIG_SECURITY_HOLE) && !defined (OS2)
+@@ -2181,8 +2182,9 @@
+ else {
+ cmd->server->server_gid = ap_group_id;
+ fprintf(stderr,
+- "Warning: Group directive in <VirtualHost> requires "
++ "ERROR: Group directive in <VirtualHost> requires "
+ "SUEXEC wrapper.\n");
++ exit (1);
+ }
+ }
+
+diff -Naur apache_1.3.31/src/main/http_main.c apache_1.3.31-gentoo/src/main/http_main.c
+--- apache_1.3.31/src/main/http_main.c 2004-04-06 16:42:19.000000000 +0000
++++ apache_1.3.31-gentoo/src/main/http_main.c 2004-05-08 09:49:06.929098608 +0000
+@@ -425,6 +425,7 @@
+ }
+ else {
+ ap_add_version_component(SERVER_BASEVERSION " (" PLATFORM ")");
++ ap_add_version_component(" (Gentoo/Linux)");
+ }
+ /*
+ * Lock the server_version string if we're not displaying
+diff -Naur apache_1.3.31/src/modules/standard/mod_auth_dbm.c apache_1.3.31-gentoo/src/modules/standard/mod_auth_dbm.c
+--- apache_1.3.31/src/modules/standard/mod_auth_dbm.c 2004-02-20 20:37:40.000000000 +0000
++++ apache_1.3.31-gentoo/src/modules/standard/mod_auth_dbm.c 2004-05-08 09:49:07.027083712 +0000
+@@ -38,7 +38,8 @@
+ #define dbm_fetch sdbm_fetch
+ #define dbm_close sdbm_close
+ #else
+-#include <ndbm.h>
++#define DB_DBM_HSEARCH 1
++#include <db.h>
+ #endif
+
+ /*
+diff -Naur apache_1.3.31/src/support/apxs.pl apache_1.3.31-gentoo/src/support/apxs.pl
+--- apache_1.3.31/src/support/apxs.pl 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/apxs.pl 2004-05-08 09:49:07.123069120 +0000
+@@ -187,15 +187,15 @@
+ ##
+ if ($^O ne "MSWin32") {
+ if (not -x "$CFG_SBINDIR/$CFG_TARGET") {
+- print STDERR "apxs:Error: $CFG_SBINDIR/$CFG_TARGET not found or not executable\n";
+- exit(1);
++ print STDERR "apxs:Warning: $CFG_SBINDIR/$CFG_TARGET not found or not executable\n";
++ print STDERR "apxs:Warning: Continuing anyway...\n";
+ }
+ if (not grep(/mod_so/, `$CFG_SBINDIR/$CFG_TARGET -l`)) {
+- print STDERR "apxs:Error: Sorry, no DSO support for Apache available\n";
+- print STDERR "apxs:Error: under your platform. Make sure the Apache\n";
+- print STDERR "apxs:Error: module mod_so is compiled into your server\n";
+- print STDERR "apxs:Error: binary `$CFG_SBINDIR/$CFG_TARGET'.\n";
+- exit(1);
++ print STDERR "apxs:Warning: No shared object support for Apache\n";
++ print STDERR "apxs:Warning: available under your platform. Make sure\n";
++ print STDERR "apxs:Warning: the Apache module mod_so is compiled into\n";
++ print STDERR "apxs:Warning: your server binary `$CFG_SBINDIR/$CFG_TARGET'.\n";
++ print STDERR "apxs:Warning: Continuing anyway...\n";
+ }
+ }
+
+@@ -469,7 +469,7 @@
+ $filename = "mod_${name}.c";
+ }
+ my $dir = $CFG_LIBEXECDIR;
+- $dir =~ s|^$CFG_PREFIX/?||;
++ $dir =~ s|^$CFG_SYSCONFDIR/?||;
+ $dir =~ s|(.)$|$1/|;
+ push(@lmd, sprintf("LoadModule %-18s %s", "${name}_module", "$dir$t"));
+ push(@amd, sprintf("AddModule %s", $filename));
+diff -Naur apache_1.3.31/src/support/dbmmanage apache_1.3.31-gentoo/src/support/dbmmanage
+--- apache_1.3.31/src/support/dbmmanage 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/dbmmanage 2004-05-08 09:53:56.276111176 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # Copyright 1999-2004 The Apache Software Foundation
+ #
+diff -Naur apache_1.3.31/src/support/htdigest.c apache_1.3.31-gentoo/src/support/htdigest.c
+--- apache_1.3.31/src/support/htdigest.c 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/htdigest.c 2004-05-08 09:49:07.153064560 +0000
+@@ -52,7 +52,7 @@
+
+ #define MAX_STRING_LEN 256
+
+-char *tn;
++char tn[MAX_STRING_LEN];
+
+
+ static void getword(char *word, char *line, char stop)
+@@ -115,7 +115,7 @@
+ ap_getpass("Re-type new password: ", pwv, sizeof(pwv));
+ if (strcmp(pwin, pwv) != 0) {
+ fprintf(stderr, "They don't match, sorry.\n");
+- if (tn) {
++ if (strlen(tn)) {
+ unlink(tn);
+ }
+ exit(1);
+@@ -146,7 +146,7 @@
+ static void interrupted(void)
+ {
+ fprintf(stderr, "Interrupted.\n");
+- if (tn)
++ if (strlen(tn))
+ unlink(tn);
+ exit(1);
+ }
+@@ -174,8 +174,9 @@
+ char x[MAX_STRING_LEN];
+ char command[MAX_STRING_LEN];
+ int found;
++ int tfd;
+
+- tn = NULL;
++ strcpy (tn, "/tmp/htdigest-XXXXXX");
+ signal(SIGINT, (void (*)(int)) interrupted);
+ if (argc == 5) {
+ if (strcmp(argv[1], "-c"))
+@@ -199,8 +200,12 @@
+ else if (argc != 4)
+ usage();
+
+- tn = tmpnam(NULL);
+- if (!(tfp = fopen(tn, "w"))) {
++ tfd = mkstemp (tn);
++ if (tfd == -1) {
++ fprintf(stderr, "Could not open temp file.\n");
++ exit(1);
++ }
++ if (!(tfp = fdopen(tfd, "w"))) {
+ fprintf(stderr, "Could not open temp file.\n");
+ exit(1);
+ }
+diff -Naur apache_1.3.31/src/support/htpasswd.c apache_1.3.31-gentoo/src/support/htpasswd.c
+--- apache_1.3.31/src/support/htpasswd.c 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/htpasswd.c 2004-05-08 09:49:07.249049968 +0000
+@@ -81,7 +81,7 @@
+ * This needs to be declared statically so the signal handler can
+ * access it.
+ */
+-static char *tempfilename;
++static char tempfilename[MAX_STRING_LEN];
+ /*
+ * If our platform knows about the tmpnam() external buffer size, create
+ * a buffer to pass in. This is needed in a threaded environment, or
+@@ -241,7 +241,7 @@
+ static void interrupted(void)
+ {
+ fprintf(stderr, "Interrupted.\n");
+- if (tempfilename != NULL) {
++ if (strlen(tempfilename) > 0) {
+ unlink(tempfilename);
+ }
+ exit(ERR_INTERRUPTED);
+@@ -333,8 +333,10 @@
+ int noninteractive = 0;
+ int i;
+ int args_left = 2;
++ int tfd;
++
++ memset (tempfilename, 0x00, sizeof(tempfilename));
+
+- tempfilename = NULL;
+ signal(SIGINT, (void (*)(int)) interrupted);
+
+ /*
+@@ -521,8 +523,9 @@
+ * to add or update. Let's do it..
+ */
+ errno = 0;
+- tempfilename = tmpnam(tname_buf);
+- if ((tempfilename == NULL) || (*tempfilename == '\0')) {
++ strcpy(tempfilename, "/tmp/htpasswd-XXXXXX");
++ tfd = mkstemp(tempfilename);
++ if (tfd == -1) {
+ fprintf(stderr, "%s: unable to generate temporary filename\n",
+ argv[0]);
+ if (errno == 0) {
+@@ -531,7 +534,7 @@
+ perror("tmpnam");
+ exit(ERR_FILEPERM);
+ }
+- ftemp = fopen(tempfilename, "w+");
++ ftemp = fdopen(tfd, "w+");
+ if (ftemp == NULL) {
+ fprintf(stderr, "%s: unable to create temporary file '%s'\n", argv[0],
+ tempfilename);
+diff -Naur apache_1.3.31/src/support/httpd.8 apache_1.3.31-gentoo/src/support/httpd.8
+--- apache_1.3.31/src/support/httpd.8 2004-02-20 22:40:51.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/httpd.8 2004-05-08 09:49:07.254049208 +0000
+@@ -153,21 +153,17 @@
+ , and then exit.
+ .SH FILES
+ .PD 0
+-.B /usr/local/apache/conf/httpd.conf
++.B /etc/apache/conf/apache.conf
+ .br
+-.B /usr/local/apache/conf/srm.conf
++.B /etc/apache/conf/apache-mime.types
+ .br
+-.B /usr/local/apache/conf/access.conf
++.B /etc/apache/conf/magic
+ .br
+-.B /usr/local/apache/conf/mime.types
++.B /var/log/apache/error_log
+ .br
+-.B /usr/local/apache/conf/magic
++.B /var/log/apache/access_log
+ .br
+-.B /usr/local/apache/logs/error_log
+-.br
+-.B /usr/local/apache/logs/access_log
+-.br
+-.B /usr/local/apache/logs/httpd.pid
++.B /var/run/apache.pid
+ .PD
+ .SH SEE ALSO
+ .BR inetd (8).
+diff -Naur apache_1.3.31/src/support/log_server_status apache_1.3.31-gentoo/src/support/log_server_status
+--- apache_1.3.31/src/support/log_server_status 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/log_server_status 2004-05-08 09:52:52.257843432 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # Copyright 1999-2004 The Apache Software Foundation
+ #
+diff -Naur apache_1.3.31/src/support/phf_abuse_log.cgi apache_1.3.31-gentoo/src/support/phf_abuse_log.cgi
+--- apache_1.3.31/src/support/phf_abuse_log.cgi 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/phf_abuse_log.cgi 2004-05-08 09:53:26.217680752 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # Copyright 1999-2004 The Apache Software Foundation
+ #
+diff -Naur apache_1.3.31/src/support/suexec.c apache_1.3.31-gentoo/src/support/suexec.c
+--- apache_1.3.31/src/support/suexec.c 2004-02-20 22:02:24.000000000 +0000
++++ apache_1.3.31-gentoo/src/support/suexec.c 2004-05-08 09:49:07.455018656 +0000
+@@ -47,6 +47,7 @@
+ #include <sys/types.h>
+
+ #include <stdarg.h>
++#include <strings.h>
+
+ #include "suexec.h"
+
+@@ -131,6 +132,8 @@
+ "UNIQUE_ID=",
+ "USER_NAME=",
+ "TZ=",
++ "HTTPS",
++ "REDIRECT_HTTPS",
+ NULL
+ };
+
+@@ -219,6 +222,244 @@
+ environ = cleanenv;
+ }
+
++#define MY_STATE_NORMAL 0
++#define MY_STATE_SPACE 1
++#define MY_STATE_QUOTES 2
++#define MY_STATE_APOSTROPHES 3
++#define MY_STATE_END 4
++
++char** param_separate(char* params, int addl_slots) {
++ int state, actpos, actarg_start, actarg_len, argnum;
++ char **res=0;
++ char backslash=0;
++
++ if (params==0) return(0);
++
++ if (*params==0) {
++ res=(char**)malloc(sizeof(char*)*(1+addl_slots));
++ for (actpos=0;actpos<addl_slots+1;++actpos) res[actpos]=0;
++ return(res);
++ }
++ actpos=0;backslash=0;argnum=0;state=MY_STATE_SPACE;
++ while (state!=MY_STATE_END) {
++ switch (state) {
++
++ case MY_STATE_SPACE:
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ break;
++
++ case ' ' :
++ case '\t':
++ break;
++
++ case '\'':
++ state=MY_STATE_APOSTROPHES;
++ actarg_start=actpos+1;
++ break;
++ case '"':
++ state=MY_STATE_QUOTES;
++ actarg_start=actpos+1;
++ break;
++ default:
++ state=MY_STATE_NORMAL;
++ actarg_start=actpos;
++ }
++ break;
++
++ case MY_STATE_NORMAL:
++
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ ++argnum;
++ actarg_len=actpos-actarg_start;
++ break;
++
++ case ' ':
++ case '\t':
++ state=MY_STATE_SPACE;
++ ++argnum;
++ actarg_len=actpos-actarg_start;
++ break;
++ }
++ break;
++
++ case MY_STATE_APOSTROPHES:
++
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ ++argnum;
++ actarg_len=actpos-actarg_start;
++ break;
++
++ case '\\':
++ backslash=1-backslash;
++ break;
++
++ case '\'':
++ if (! backslash) {
++ state=MY_STATE_SPACE;
++ ++argnum;
++ actarg_len=actpos-actarg_start;
++ }
++ break;
++ }
++ if (params[actpos]!='\\') backslash=0;
++ break;
++
++ case MY_STATE_QUOTES:
++
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ ++argnum;
++ actarg_len=actpos-actarg_start;
++ break;
++
++ case '\\':
++ backslash=1-backslash;
++ break;
++
++ case '"':
++ if (! backslash) {
++ state=MY_STATE_SPACE;
++ ++argnum;
++ actarg_len=actpos-actarg_start;
++ }
++ break;
++ }
++ if (params[actpos]!='\\') backslash=0;
++ break;
++ }
++ actpos++;
++ }
++
++ res=(char**)malloc(sizeof(char*)*(argnum+1+addl_slots));
++ for (actpos=0;actpos<argnum+addl_slots+1;++actpos) res[actpos]=0;
++
++
++ actpos=0;backslash=0;argnum=0;state=MY_STATE_SPACE;
++ while (state!=MY_STATE_END) {
++ switch (state) {
++
++ case MY_STATE_SPACE:
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ break;
++
++ case ' ' :
++ case '\t':
++ break;
++
++ case '\'':
++ state=MY_STATE_APOSTROPHES;
++ actarg_start=actpos+1;
++ break;
++ case '"':
++ state=MY_STATE_QUOTES;
++ actarg_start=actpos+1;
++ break;
++ default:
++ state=MY_STATE_NORMAL;
++ actarg_start=actpos;
++ }
++ break;
++
++ case MY_STATE_NORMAL:
++
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ actarg_len=actpos-actarg_start;
++ res[argnum]=(char*)malloc(actarg_len+1);
++ strncpy(res[argnum],&params[actarg_start],actarg_len);
++ res[argnum][actarg_len]=0;
++ ++argnum;
++ break;
++
++ case ' ':
++ case '\t':
++ state=MY_STATE_SPACE;
++ actarg_len=actpos-actarg_start;
++ res[argnum]=(char*)malloc(actarg_len+1);
++ strncpy(res[argnum],&params[actarg_start],actarg_len);
++ res[argnum][actarg_len]=0;
++ ++argnum;
++ break;
++ }
++ break;
++
++ case MY_STATE_APOSTROPHES:
++
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ actarg_len=actpos-actarg_start;
++ res[argnum]=(char*)malloc(actarg_len+1);
++ strncpy(res[argnum],&params[actarg_start],actarg_len);
++ res[argnum][actarg_len]=0;
++ ++argnum;
++ break;
++
++ case '\\':
++ backslash=1-backslash;
++ break;
++
++ case '\'':
++ if (! backslash) {
++ state=MY_STATE_SPACE;
++ actarg_len=actpos-actarg_start;
++ res[argnum]=(char*)malloc(actarg_len+1);
++ strncpy(res[argnum],&params[actarg_start],actarg_len);
++ res[argnum][actarg_len]=0;
++ ++argnum;
++ }
++ break;
++ }
++ if (params[actpos]!='\\') backslash=0;
++ break;
++
++ case MY_STATE_QUOTES:
++
++ switch (params[actpos]) {
++ case 0 :
++ state=MY_STATE_END;
++ actarg_len=actpos-actarg_start;
++ res[argnum]=(char*)malloc(actarg_len+1);
++ strncpy(res[argnum],&params[actarg_start],actarg_len);
++ res[argnum][actarg_len]=0;
++ ++argnum;
++ break;
++
++ case '\\':
++ backslash=1-backslash;
++ break;
++
++ case '"':
++ if (! backslash) {
++ state=MY_STATE_SPACE;
++ actarg_len=actpos-actarg_start;
++ res[argnum]=(char*)malloc(actarg_len+1);
++ strncpy(res[argnum],&params[actarg_start],actarg_len);
++ res[argnum][actarg_len]=0;
++ ++argnum;
++ }
++ break;
++ }
++ if (params[actpos]!='\\') backslash=0;
++ break;
++ }
++ actpos++;
++ }
++
++ return(res);
++}
++
++
+ int main(int argc, char *argv[])
+ {
+ int userdir = 0; /* ~userdir flag */
+@@ -231,6 +472,10 @@
+ char *actual_gname; /* actual group name */
+ char *prog; /* name of this program */
+ char *cmd; /* command to be executed */
++
++ int ind, ind2;
++ char **passedargv = 0;
++
+ char cwd[AP_MAXPATH]; /* current working directory */
+ char dwd[AP_MAXPATH]; /* docroot working directory */
+ struct passwd *pw; /* password entry holder */
+@@ -510,8 +755,18 @@
+ /*
+ * Error out if we cannot stat the program.
+ */
+- if (((lstat(cmd, &prg_info)) != 0) || (S_ISLNK(prg_info.st_mode))) {
+- log_err("error: cannot stat program: (%s)\n", cmd);
++ passedargv=param_separate(cmd,argc-4);
++ for (ind=0; passedargv[ind]; ++ind);
++ for (ind2=4;ind2<argc;++ind2,++ind) {
++ if (argv[ind2]!=0) if (argv[ind2][0]!=0) passedargv[ind]=strdup(argv[ind2]);
++ if (passedargv[ind]==0) {
++ passedargv[ind]=malloc(1);
++ passedargv[ind][0]=0;
++ }
++ }
++
++ if (((lstat(passedargv[0], &prg_info)) != 0) || (S_ISLNK(prg_info.st_mode))) {
++ log_err("error: cannot stat program: (%s)\n", passedargv[0]);
+ exit(117);
+ }
+
+@@ -519,7 +774,7 @@
+ * Error out if the program is writable by others.
+ */
+ if ((prg_info.st_mode & S_IWOTH) || (prg_info.st_mode & S_IWGRP)) {
+- log_err("error: file is writable by others: (%s/%s)\n", cwd, cmd);
++ log_err("error: file is writable by others: (%s/%s)\n", cwd, passedargv[0]);
+ exit(118);
+ }
+
+@@ -527,7 +782,7 @@
+ * Error out if the file is setuid or setgid.
+ */
+ if ((prg_info.st_mode & S_ISUID) || (prg_info.st_mode & S_ISGID)) {
+- log_err("error: file is either setuid or setgid: (%s/%s)\n", cwd, cmd);
++ log_err("error: file is either setuid or setgid: (%s/%s)\n", cwd, passedargv[0]);
+ exit(119);
+ }
+
+@@ -552,7 +807,7 @@
+ * "[error] Premature end of script headers: ..."
+ */
+ if (!(prg_info.st_mode & S_IXUSR)) {
+- log_err("error: file has no execute permission: (%s/%s)\n", cwd, cmd);
++ log_err("error: file has no execute permission: (%s/%s)\n", cwd, passedargv[0]);
+ exit(121);
+ }
+
+@@ -584,6 +839,8 @@
+ /*
+ * Execute the command, replacing our image with its own.
+ */
++ execv(passedargv[0], passedargv);
++#if 0
+ #ifdef NEED_HASHBANG_EMUL
+ /* We need the #! emulation when we want to execute scripts */
+ {
+@@ -594,7 +851,7 @@
+ #else /*NEED_HASHBANG_EMUL*/
+ execv(cmd, &argv[3]);
+ #endif /*NEED_HASHBANG_EMUL*/
+-
++#endif
+ /*
+ * (I can't help myself...sorry.)
+ *
+@@ -604,5 +861,10 @@
+ * Oh well, log the failure and error out.
+ */
+ log_err("emerg: (%d)%s: exec failed (%s)\n", errno, strerror(errno), cmd);
++
++ for (ind=0;passedargv[ind];++ind) free(passedargv[ind]);
++ free(passedargv);
++ passedargv=0;
++
+ exit(255);
+ }
diff --git a/net-www/apache/files/patches/1.3.31/00_gentoo_db4_detect.patch b/net-www/apache/files/patches/1.3.31/00_gentoo_db4_detect.patch
new file mode 100644
index 000000000000..1a5242366fad
--- /dev/null
+++ b/net-www/apache/files/patches/1.3.31/00_gentoo_db4_detect.patch
@@ -0,0 +1,29 @@
+diff -Naur apache_1.3.31/src/modules/standard/mod_auth_db.module apache_1.3.31-gentoo/src/modules/standard/mod_auth_db.module
+--- apache_1.3.31/src/modules/standard/mod_auth_db.module 2001-10-16 09:12:02.000000000 +0000
++++ apache_1.3.31-gentoo/src/modules/standard/mod_auth_db.module 2004-05-08 10:17:13.716667920 +0000
+@@ -2,7 +2,24 @@
+ ConfigStart
+ DB_VERSION=''
+ DB_LIB=''
+- if ./helpers/TestCompile func db_create; then
++
++ if ./helpers/TestCompile lib db-4 db_create_4000; then
++ DB_VERSION='Berkeley-DB/4.x'
++ DB_LIB='-ldb-4'
++ CFLAGS="$CFLAGS -I/usr/include/db4"
++ elif ./helpers/TestCompile lib db-4.0 db_create_4000; then
++ DB_VERSION='Berkeley-DB/4.x'
++ DB_LIB='-ldb-4.0'
++ CFLAGS="$CFLAGS -I/usr/include/db4"
++ elif ./helpers/TestCompile lib db-4.1 db_create_4001; then
++ DB_VERSION='Berkeley-DB/4.1'
++ DB_LIB='-ldb-4.1'
++ CFLAGS="$CFLAGS -I/usr/include/db4.1"
++ elif ./helpers/TestCompile lib db-4.2 db_create_4002; then
++ DB_VERSION='Berkeley-DB/4.2'
++ DB_LIB='-ldb-4.2'
++ CFLAGS="$CFLAGS -I/usr/include/db4.2"
++ elif ./helpers/TestCompile func db_create; then
+ DB_VERSION='Berkeley-DB/3.x'
+ elif ./helpers/TestCompile lib db db_create; then
+ DB_VERSION='Berkeley-DB/3.x'
diff --git a/net-www/apache/files/patches/1.3.31/00_gentoo_suexec_pam.patch b/net-www/apache/files/patches/1.3.31/00_gentoo_suexec_pam.patch
new file mode 100644
index 000000000000..cad50147b683
--- /dev/null
+++ b/net-www/apache/files/patches/1.3.31/00_gentoo_suexec_pam.patch
@@ -0,0 +1,70 @@
+diff -ur apache_1.3.27/src/support/Makefile.tmpl apache_1.3.27.old/src/support/Makefile.tmpl~
+--- apache_1.3.27/src/support/Makefile.tmpl Sat Mar 2 20:46:23 2002
++++ apache_1.3.27.old/src/support/Makefile.tmpl Mon Nov 4 14:33:14 2002
+@@ -49,6 +49,8 @@
+ -e 's%@LDFLAGS_MOD_SHLIB@%$(LDFLAGS_MOD_SHLIB)%g' \
+ -e 's%@LIBS_SHLIB@%$(LIBS_SHLIB)%g' && chmod a+x apxs
+
++suexec: CFLAGS += -DSUEXEC_PAM_SESSION
++suexec: LIBS += -lpam
+ suexec: suexec.o
+ $(CC) $(CFLAGS) -o suexec $(LDFLAGS) suexec.o $(LIBS)
+
+diff -ur apache_1.3.27/src/support/suexec.c apache_1.3.27.old/src/support/suexec.c
+--- apache_1.3.27/src/support/suexec.c Mon Nov 4 14:30:16 2002
++++ apache_1.3.27.old/src/support/suexec.c Mon Nov 4 14:35:45 2002
+@@ -92,6 +92,10 @@
+ #include <stdarg.h>
+ #include <strings.h>
+
++#ifdef SUEXEC_PAM_SESSION
++#include <security/pam_appl.h>
++#endif
++
+ #include "suexec.h"
+
+ /*
+@@ -848,6 +852,43 @@
+ #endif /* SUEXEC_UMASK */
+ clean_env();
+
++#ifdef SUEXEC_PAM_SESSION
++ /*
++ * Use PAM session support. Initial goal was to use the pam_limits module.
++ */
++
++#ifndef PAM_SERVICE_NAME
++#define PAM_SERVICE_NAME "suexec"
++#endif /* PAM_SERVICE_NAME */
++
++#define PAM_CALL(call, name, err_code, do_end) \
++ do \
++ { \
++ rc = (call); \
++ if (rc != PAM_SUCCESS) \
++ { \
++ log_err("error: %s(): [%d] %s\n", (name), rc, pam_strerror(pamh, rc)); \
++ (do_end) && pam_end(pamh, rc); \
++ exit(err_code); \
++ } \
++ } while (0)
++
++ {
++ int rc;
++ pam_handle_t *pamh = NULL;
++ struct pam_conv pamc = { NULL, NULL };
++
++ PAM_CALL(pam_start(PAM_SERVICE_NAME, actual_uname, &pamc, &pamh),
++ "pam_start", 241, 0);
++ PAM_CALL(pam_open_session(pamh, 0), "pam_open_session", 242, 1);
++ PAM_CALL(pam_close_session(pamh, 0), "pam_close_session", 243, 1);
++ PAM_CALL(pam_end(pamh, 0), "pam_end", 244, 0);
++ }
++
++#undef PAM_CALL
++#undef PAM_SERVICE_NAME
++#endif /* SUEXEC_PAM_SESSION */
++
+ /*
+ * Be sure to close the log file so the CGI can't
+ * mess with it. If the exec fails, it will be reopened
diff --git a/net-www/apache/files/patches/1.3.31/Readme.PATCHES b/net-www/apache/files/patches/1.3.31/Readme.PATCHES
new file mode 100644
index 000000000000..5fbe6465182e
--- /dev/null
+++ b/net-www/apache/files/patches/1.3.31/Readme.PATCHES
@@ -0,0 +1,28 @@
+Patch List
+Last updated May 8, 2004 < zul @ gentoo.org.
+
+00 - gentoo modifications
+01 - apache bugfixes
+02 - performance patches
+03 - other vendor patches
+04 - apache add on features
+
+00 -gentoo modifications
+-------------------------
+
+00_gentoo_base.patch - Our gentoo modifications that we do. Gentoo branding, etc.
+00_gentoo_db4_detect.patch - Proper berkely db version 4.x detection.
+00_gentoo_apachectl.patch - Modifications to apachectl so that it reads /etc/conf.d/apache.
+00_gentoo_suexec_pam.patch - Suexec pam support.
+
+01 - Apache Bugfixes
+---------------------
+
+02 - Performance Patches
+-------------------------
+
+03 - Other linux vendor patches
+-------------------------------
+
+04 - Apache add-on features
+---------------------------