diff options
author | Stuart Herbert <stuart@gentoo.org> | 2004-07-10 16:28:15 +0000 |
---|---|---|
committer | Stuart Herbert <stuart@gentoo.org> | 2004-07-10 16:28:15 +0000 |
commit | e1b6b1629441591f2854a08800f26aab6c1b8da3 (patch) | |
tree | 6ad709f201ede7d0ff6e03111835a20c9d451e8f /dev-php | |
parent | Add dev-python/pygtk-2.3* (diff) | |
download | gentoo-2-e1b6b1629441591f2854a08800f26aab6c1b8da3.tar.gz gentoo-2-e1b6b1629441591f2854a08800f26aab6c1b8da3.tar.bz2 gentoo-2-e1b6b1629441591f2854a08800f26aab6c1b8da3.zip |
Initial import for mod_php5
Diffstat (limited to 'dev-php')
-rw-r--r-- | dev-php/mod_php/ChangeLog | 9 | ||||
-rw-r--r-- | dev-php/mod_php/Manifest | 24 | ||||
-rw-r--r-- | dev-php/mod_php/files/70_mod_php5.conf | 37 | ||||
-rw-r--r-- | dev-php/mod_php/files/digest-mod_php-5.0.0 | 1 | ||||
-rw-r--r-- | dev-php/mod_php/files/php5_soap_persistence_session.diff | 35 | ||||
-rw-r--r-- | dev-php/mod_php/mod_php-5.0.0.ebuild | 142 |
6 files changed, 237 insertions, 11 deletions
diff --git a/dev-php/mod_php/ChangeLog b/dev-php/mod_php/ChangeLog index 1b70578a7cc4..ddc004c41f13 100644 --- a/dev-php/mod_php/ChangeLog +++ b/dev-php/mod_php/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-php/mod_php # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/ChangeLog,v 1.160 2004/07/08 04:34:55 weeve Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/ChangeLog,v 1.161 2004/07/10 16:28:15 stuart Exp $ + +*mod_php-5.0.0 (10 Jul 2004) + + 10 Jul 2004; Stuart Herbert <stuart@gentoo.org> +files/70_mod_php5.conf, + +files/php5_soap_persistence_session.diff, +mod_php-5.0.0.ebuild: + Added ebuild for mod_php5; thanks to nickyk <nickyk@gmx.net> for the SOAP + persistence patch 07 Jul 2004; Jason Wever <weeve@gentoo.org> mod_php-4.3.7-r1.ebuild: Stable on sparc. diff --git a/dev-php/mod_php/Manifest b/dev-php/mod_php/Manifest index ff59451a8dfe..0ef3a4c4f94d 100644 --- a/dev-php/mod_php/Manifest +++ b/dev-php/mod_php/Manifest @@ -1,24 +1,28 @@ -MD5 04729ffd7e69985644718833f62e79ef ChangeLog 30051 +MD5 d359d353538917028b2ac303edf43419 ChangeLog 30321 MD5 38fe937e954ab7109395cefa86fcd2d4 metadata.xml 384 -MD5 442a975588910dfa87c4cf9bf1dc0b52 mod_php-4.3.6_rc2.ebuild 5784 -MD5 21988ad06da36da4ffbd7415c946893c mod_php-4.3.6.ebuild 5737 +MD5 c1070d3ccea0824a852244946e5c77ba mod_php-4.3.4-r4.ebuild 5382 +MD5 e322d1800900e6b8c76c0a3cd02e78ef mod_php-4.3.5.ebuild 5737 MD5 477decdfa7b921810928b478c0101e58 mod_php-4.3.6-r1.ebuild 5743 MD5 fe620542393d33e74a2fc3c39c39b679 mod_php-4.3.6-r2.ebuild 5762 -MD5 cc17e8ea8901d70410bd47fef4a7a8d3 mod_php-4.3.7.ebuild 5764 +MD5 21988ad06da36da4ffbd7415c946893c mod_php-4.3.6.ebuild 5737 +MD5 442a975588910dfa87c4cf9bf1dc0b52 mod_php-4.3.6_rc2.ebuild 5784 MD5 dba287b9704eb93f2d53c237e65978a4 mod_php-4.3.7-r1.ebuild 5918 -MD5 c1070d3ccea0824a852244946e5c77ba mod_php-4.3.4-r4.ebuild 5382 -MD5 e322d1800900e6b8c76c0a3cd02e78ef mod_php-4.3.5.ebuild 5737 +MD5 cc17e8ea8901d70410bd47fef4a7a8d3 mod_php-4.3.7.ebuild 5764 +MD5 2c98a2dd5d6e0f8675a22015abf3fe1f mod_php-5.0.0.ebuild 4026 +MD5 a1d65804468bb0be985496cc97065778 files/70_mod_php5.conf 1008 MD5 0c2e81f561985f3749c37cf525de7583 files/70_mod_php.conf 1364 -MD5 f00ccb8b9ef2c3da989d7ae4c2508e95 files/digest-mod_php-4.3.6_rc2 276 +MD5 0f5e1f8a748d308e073f290fe89075a1 files/digest-mod_php-4.3.4-r4 205 +MD5 c166c2da0029a4eb9b760e0aecd80ade files/digest-mod_php-4.3.5 205 MD5 707c9fff181593ffacc69ce674a92a8a files/digest-mod_php-4.3.6 350 MD5 707c9fff181593ffacc69ce674a92a8a files/digest-mod_php-4.3.6-r1 350 MD5 707c9fff181593ffacc69ce674a92a8a files/digest-mod_php-4.3.6-r2 350 +MD5 f00ccb8b9ef2c3da989d7ae4c2508e95 files/digest-mod_php-4.3.6_rc2 276 MD5 01013db7bcb660532237428f5aa61b26 files/digest-mod_php-4.3.7 281 MD5 01013db7bcb660532237428f5aa61b26 files/digest-mod_php-4.3.7-r1 281 -MD5 0f5e1f8a748d308e073f290fe89075a1 files/digest-mod_php-4.3.4-r4 205 MD5 7515e9b1dc298a0fb1c12d35a58c265d files/mod_php-4.3.4-amd64hack.diff 1028 MD5 b8cfdda8dd4c656e170607b282cb0019 files/mod_php-4.3.4-r3.diff 1717 +MD5 3bf664b414787f8f3c1dcbda5750aef4 files/mod_php-4.3.5-apache1security.diff 425 MD5 cceddd5c262e0ffef31d45b7da269851 files/mod_php.conf 148 MD5 663577b8f4b90d61f245bb6052629194 files/pear_config.diff 422 -MD5 c166c2da0029a4eb9b760e0aecd80ade files/digest-mod_php-4.3.5 205 -MD5 3bf664b414787f8f3c1dcbda5750aef4 files/mod_php-4.3.5-apache1security.diff 425 +MD5 145aa402c3215f537c8dada743b63816 files/digest-mod_php-5.0.0 66 +MD5 273799e60d5a41a1e6f5ac53781a152f files/php5_soap_persistence_session.diff 1976 diff --git a/dev-php/mod_php/files/70_mod_php5.conf b/dev-php/mod_php/files/70_mod_php5.conf new file mode 100644 index 000000000000..60a463c0d248 --- /dev/null +++ b/dev-php/mod_php/files/70_mod_php5.conf @@ -0,0 +1,37 @@ +<IfDefine PHP5> + + # Load the module first + <IfModule !sapi_apache2.c> + LoadModule php5_module extramodules/libphp5.so + </IfModule> + + # Set it to handle the files + <IfModule mod_mime.c> + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + </IfModule> + + <Files *.php> + RequestHeader unset If-Modified-Since + </Files> + <Files *.php3> + RequestHeader unset If-Modified-Since + </Files> + <Files *.php4> + RequestHeader unset If-Modified-Since + </Files> + <Files *.php5> + RequestHeader unset If-Modified-Since + </Files> + <Files *.phps> + RequestHeader unset If-Modified-Since + </Files> + <Files *.phtml> + RequestHeader unset If-Modified-Since + </Files> + +</IfDefine> diff --git a/dev-php/mod_php/files/digest-mod_php-5.0.0 b/dev-php/mod_php/files/digest-mod_php-5.0.0 new file mode 100644 index 000000000000..fd4537e875e8 --- /dev/null +++ b/dev-php/mod_php/files/digest-mod_php-5.0.0 @@ -0,0 +1 @@ +MD5 aa24589d3c173052998792e4a6d255fa php-5.0.0RC3.tar.bz2 4535975 diff --git a/dev-php/mod_php/files/php5_soap_persistence_session.diff b/dev-php/mod_php/files/php5_soap_persistence_session.diff new file mode 100644 index 000000000000..626ac67f9081 --- /dev/null +++ b/dev-php/mod_php/files/php5_soap_persistence_session.diff @@ -0,0 +1,35 @@ +diff -ruN php-5.0.0RC3.orig/ext/soap/soap.c php-5.0.0RC3/ext/soap/soap.c +--- php-5.0.0RC3.orig/ext/soap/soap.c 2004-06-22 19:35:59.801348936 +0300 ++++ php-5.0.0RC3/ext/soap/soap.c 2004-06-29 13:39:00.506820928 +0300 +@@ -1341,16 +1341,21 @@ + soap_obj = NULL; + #if HAVE_PHP_SESSION + /* If persistent then set soap_obj from from the previous created session (if available) */ ++ char soapname[32+sizeof("_bogus_session_name")]; //Now we use max 32 chars from class name, must be overwriten with dynamic allocation with exact length!! + if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { + zval **tmp_soap; + ++ bzero(soapname,32+sizeof("_bogus_session_name")); ++ strncpy(soapname,service->soap_class.ce->name,32); ++ strcat(soapname,"_bogus_session_name"); ++ + if (PS(session_status) != php_session_active && + PS(session_status) != php_session_disabled) { + php_session_start(TSRMLS_C); + } + + /* Find the soap object and assign */ +- if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), (void **) &tmp_soap) == SUCCESS && ++ if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), (void **) &tmp_soap) == SUCCESS && + Z_TYPE_PP(tmp_soap) == IS_OBJECT && + Z_OBJCE_PP(tmp_soap) == service->soap_class.ce) { + soap_obj = *tmp_soap; +@@ -1432,7 +1437,7 @@ + /* If session then update session hash with new object */ + if (service->soap_class.persistance == SOAP_PERSISTENCE_SESSION) { + zval **tmp_soap_pp; +- if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), "_bogus_session_name", sizeof("_bogus_session_name"), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { ++ if (zend_hash_update(Z_ARRVAL_P(PS(http_session_vars)), soapname, sizeof(soapname), &tmp_soap, sizeof(zval *), (void **)&tmp_soap_pp) == SUCCESS) { + soap_obj = *tmp_soap_pp; + } + } else { diff --git a/dev-php/mod_php/mod_php-5.0.0.ebuild b/dev-php/mod_php/mod_php-5.0.0.ebuild new file mode 100644 index 000000000000..957c59473f0f --- /dev/null +++ b/dev-php/mod_php/mod_php-5.0.0.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-5.0.0.ebuild,v 1.1 2004/07/10 16:28:15 stuart Exp $ + +IUSE="${IUSE} apache2" + +KEYWORDS="-x86 -ppc -sparc -alpha -hppa -ia64 -amd64 -s390" + +detectapache() { + local domsg= + [ -n "$1" ] && domsg=1 + HAVE_APACHE1= + HAVE_APACHE2= + has_version '=net-www/apache-1*' && HAVE_APACHE1=1 + has_version '=net-www/apache-2*' && HAVE_APACHE2=1 + + [ -n "${HAVE_APACHE1}" ] && APACHEVER=1 + [ -n "${HAVE_APACHE2}" ] && APACHEVER=2 + [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both' + + case "${APACHEVER}" in + 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;; + 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected';; + both) + if use apache2; then + [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)" + APACHEVER=2 + else + [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)' + APACHEVER=1 + fi ;; + *) if [ -n "${domsg}" ]; then + MSG="Unknown Apache version!"; eerror $MSG ; die $MSG + else + APACHEVER=0 + fi; ;; + esac +} + +detectapache + +SLOT="5${APACHEVER}" +[ "${APACHEVER}" -eq '2' ] && USE_APACHE2='2' || USE_APACHE2='' + +PHPSAPI="apache${APACHEVER}" +MY_P="php-${PV}RC3" + +# BIG FAT WARNING! +# the php eclass requires the PHPSAPI setting! +# In this case the PHPSAPI setting is dependant on the detectapache function +# above this point as well! +inherit php5-sapi eutils + +DESCRIPTION="Apache module for PHP 5" + +DEPEND_EXTRA=">=net-www/apache-1.3.26-r2 + apache2? ( >=net-www/apache-2.0.43-r1 )" +DEPEND="${DEPEND} ${DEPEND_EXTRA}" +RDEPEND="${RDEPEND} ${DEPEND_EXTRA}" +IUSE="${IUSE} debug" + +# Add a 'return 0' as we DON'T want the return code checked +pkg_setup() { + use debug && einfo "Installing in SLOT=${SLOT}" + return 0 +} + +src_unpack() { + detectapache domsg + + php5-sapi_src_unpack +} + +src_compile() { + # Every Apache2 MPM EXCEPT prefork needs Zend Thread Safety + if [ -n "${USE_APACHE2}" ]; then + APACHE2_MPM="`/usr/sbin/apache2 -l |egrep 'worker|perchild|leader|threadpool|prefork'|cut -d. -f1|sed -e 's/^[[:space:]]*//g;s/[[:space:]]+/ /g;'`" + einfo "Apache2 MPM: ${APACHE2_MPM}" + case "${APACHE2_MPM}" in + *prefork*) ;; + *) my_conf="${my_conf} --enable-experimental-zts" ; ewarn "Enabling ZTS for Apache2 MPM" ;; + esac; + fi + + #use apache2 \ + my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}" + + php5-sapi_src_compile +} + + +src_install() { + PHP_INSTALLTARGETS="install" + php5-sapi_src_install + + einfo "Adding extra symlink to Apache${USE_APACHE2} extramodules for PHP" + dosym /usr/lib/apache${USE_APACHE2}-extramodules ${PHPINIDIRECTORY}/lib + + if [ -n "${USE_APACHE2}" ] ; then + einfo "Installing a Apache2 config for PHP (70_mod_php5.conf)" + insinto /etc/apache2/conf/modules.d + doins ${FILESDIR}/70_mod_php5.conf + else + einfo "Installing a Apache config for PHP (mod_php5.conf)" + insinto /etc/apache/conf/addon-modules + doins ${FILESDIR}/mod_php5.conf + dosym ${PHPINIDIRECTORY}/${PHPINIFILENAME} /etc/apache/conf/addon-modules/${PHPINIFILENAME} + fi +} + +apache2msg() { + einfo "Edit /etc/conf.d/apache2 and add \"-D PHP5\" to APACHE2_OPTS" +} + +pkg_preinst() { + php5-sapi_pkg_preinst +} + +pkg_postinst() { + einfo "To have Apache run php programs, please do the following:" + if [ -n "${USE_APACHE2}" ]; then + apache2msg + else + einfo "1. Execute the command:" + einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo "2. Edit /etc/conf.d/apache and add \"-D PHP5\" to APACHE_OPTS" + einfo "That will include the php mime types in your configuration" + einfo "automagically and setup Apache to load php when it starts." + fi +} + +pkg_config() { + if [ -n "${USE_APACHE2}" ]; then + apache2msg + else + ${ROOT}/usr/sbin/apacheaddmod \ + ${ROOT}/etc/apache/conf/apache.conf \ + extramodules/libphp5.so mod_php5.c php5_module \ + before=perl define=PHP5 addconf=conf/addon-modules/mod_php.conf + :; + fi +} |