diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -6,6 +6,7 @@ AUX eblits/pkg_postinst-v1.eblit 1990 RMD160 b14e4e622f1f73c7dbc4f55e750f04f3f720accb SHA1 75ffb9f842519509d4fa39bbd0a42756cfa36935 SHA256 8dff2514242b9ebafd743f43fcdecad4443dc315d7de6c4069d80449837a467a AUX eblits/pkg_setup-v1.eblit 539 RMD160 0726f2eb6bb6dfc6050fe1d6cdf4f68ecf1672b0 SHA1 5f5c75fbdaf254b34ac1b971999c6986f9990f50 SHA256 fda8d449e80b74e07aa264a3f9fc308929da23e1cdf5662a4df3bd28d3d23eec AUX eblits/src_compile-v1.eblit 1484 RMD160 c62b794bafe6f0df54410b7b392bb55b699e7021 SHA1 954cde2c0e1fadd3de79e0f0cff41a2bd8c1cb41 SHA256 9aa4d594c114f5d21d2fe8dfb68b648481e23fd762b174bbd92adc023d21bbfc +AUX eblits/src_compile-v2.eblit 2211 RMD160 906b73b37ee12c9c0589c6fcd1bb9175b2fecb1d SHA1 393efe35969d683913eb3965ce174e196aa80e62 SHA256 a24f9d13887de97ca00a82124b9d74633abbdc95bf97eb449662d6a9b7632f03 AUX eblits/src_configure-v1.eblit 9709 RMD160 8eb6423309428f135ba9ef82fcd874d670c7d640 SHA1 19084235b1193e75f1ca9b183c853f345e8359df SHA256 41ee59c47a092e9c7eb220a2cbf8626c4e710ff5a7810496971c48f44b1c32b3 AUX eblits/src_install-v1.eblit 3540 RMD160 098a0f691a4f47551aa7d76d865626af2985bacb SHA1 c25d5aa99e838a8b4c4999a6b1b436a92dc6a8a5 SHA256 7c3939b33c5ccb6fa83c52a252bc6d26a4fe45f36a48787f796752b4985c2144 AUX eblits/src_prepare-v1.eblit 2488 RMD160 855ce27f8748d55f11b2eae1a215cfed0bf71ce2 SHA1 dbca4f8d5b0e47098ea19ac856b60f4961b0696e SHA256 7d2baf3919a7ec7392ec4d824de936006858dba10dd8215b1eb95407f0d8e3c3 @@ -14,4 +15,5 @@ DIST php-5.3.1.tar.bz2 10457046 RMD160 01183a9f752ce5982a7b91dcd43721fd1b9cd88b SHA1 be08ca9337a4962cd4acf8709cd695e1e31c1149 SHA256 9803ce0d6eb2ae072f0149158f5921135b47b633ef5632b4688b30a23be20dba DIST php-patchset-5.3.1-r0.tar.bz2 7424 RMD160 165ba6d8aaaea756970700d808a65a640c25d39e SHA1 8a8a7124bfb6ea5c30bc290dac2f7d7553ba5c70 SHA256 ca86156c2700399bb504a01eefc648e8d265e62138d6760bc9c4f482203e9d9c DIST suhosin-patch-5.3.1-0.9.8.patch.gz 38180 RMD160 e76c7b7452b74ce198cf768d6186ee18be72bf29 SHA1 05decd322a34c2c071bd5f633457e4280aba3d0d SHA256 c5f9130e9aeec3f6ad97401aafcf78cc8c57bd367755ebdcb14b0113b446cae8 -EBUILD php-5.3.1.ebuild 2783 RMD160 6eb4ee36329404d33166c78e5222eaf7ece534df SHA1 68405409c8c49f62b1642d1c6edbfc6321d3cdfe SHA256 905e78c850c6ff8819392b3f68ff88fd40214b605f80a57041c056d4d244d662 +EBUILD php-5.3.1.ebuild 2847 RMD160 8ea69195d7f2004d3f724927d6709a4296e10aaa SHA1 e2ac6117c85bebd26cb5b56cbb374a0915a6a2ed SHA256 d2370832011e2b02a707b7c8ef70c4d1cab586900e5ed34b6f0e52d40b864b5e +MISC metadata.xml 1410 RMD160 2dcca024c6b0f17834f6cdc5b8c9086619ba8c49 SHA1 873990591e145cbb2b3734bd9bfdb53b6565a8e4 SHA256 c5fbec5879c1c169dfdfd803c74d626ae9cc46fdf2d6fb18e18d13f23e42aa3e diff --git a/dev-lang/php/files/eblits/src_compile-v2.eblit b/dev-lang/php/files/eblits/src_compile-v2.eblit new file mode 100644 --- /dev/null +++ b/dev-lang/php/files/eblits/src_compile-v2.eblit @@ -0,0 +1,86 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +eblit-php-src_compile() { + + SAPIS="${WORKDIR}/sapis" + + # set compile order + local PHP_SAPIS="cli cgi embed apache2" + + local -A PHP_SAPI_TYPE=([cli]="static" [cgi]="static" [embed]="dynamic" [apache2]="dynamic") + local PREV_SAPI="" + + for x in ${PHP_SAPIS}; do + if use ${x} ; then + + # Possible problems with some SAPIs, which are linked as dynamic libraries. For example, + # apache2 SAPI ignores-prefer-no-pic, and trying to use when linking PIC and non PIC + # objects and build the wrong libphp5.so. So make full clean, for avoid that. + if [[ ! -z "${PREV_SAPI}" ]] ; then + if [[ "${PHP_SAPI_TYPE[${x}]}" != "${PHP_SAPI_TYPE[${PREV_SAPI}]}" ]] ; then + make clean + else + rm -f main/main.o main/main.lo main/php_ini.o \ + main/php_ini.lo 2>/dev/null + fi + fi + + case ${x} in + cli) + php_sapi_build ${x} + cp sapi/cli/php "${SAPIS}/${x}/" \ + || die "Unable to copy ${x} SAPI" + ;; + cgi) + php_sapi_build ${x} + cp sapi/cgi/php-cgi "${SAPIS}/${x}/" \ + || die "Unable to copy {$x} SAPI" + ;; + embed) + php_sapi_build ${x} + cp libs/libphp${PHP_MV}.so "${SAPIS}/${x}/" \ + || die "Unable to copy ${x} SAPI" + ;; + apache2) + php_sapi_build ${x} + # apache2 is a special case; the necessary files (yes, multiple) + # are copied by make install, not by the ebuild; that's the reason, + # why apache2 has to be the last sapi + ;; + esac + + PREV_SAPI="${x}" + fi + done +} + +php_sapi_build() { + local sapi="$1" + php_set_ini_dir ${sapi} + + mkdir -p "${SAPIS}/${sapi}" + + sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} + --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}" + + for available_sapi in cli cgi embed ; do + if [[ $sapi == $available_sapi ]] ; then + sapi_conf="${sapi_conf} --enable-${available_sapi}" + else + sapi_conf="${sapi_conf} --disable-${available_sapi}" + fi + done + + if [[ $sapi == "apache2" ]] ; then + sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs" + else + sapi_conf="${sapi_conf} --without-apxs2" + fi + + econf ${sapi_conf} + emake || die "emake failed" +} + + diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml new file mode 100644 --- /dev/null +++ b/dev-lang/php/metadata.xml @@ -0,0 +1,24 @@ + + + + php + + Enable CLI SAPI + Make it possible to load both mod_php4 and mod_php5 into the same Apache2 instance (experimental) + Switch on common security setting for CGI SAPI + Add supports for Adobe's FDF toolkit. + Add filter extension support + Switch on common security setting for CGI SAPI + Enable the hash extension + Enable JSON support + Add SASL support for the PHP LDAP extension + Use native driver for mysql, mysqli, PDO_Mysql + Force shared modules to build as PIC on x86 (speed tradeoff with memory usage) + Enable the bundled PDO extensions + Enable the reflection extension (Reflection API) + Add Suhosin support (patch and extension from http://www.suhosin.org/) + Enable XMLReader support + Enable XMLWriter support + Enable ZIP file support + + diff --git a/dev-lang/php/php-5.3.1.ebuild b/dev-lang/php/php-5.3.1.ebuild --- a/dev-lang/php/php-5.3.1.ebuild +++ b/dev-lang/php/php-5.3.1.ebuild @@ -13,7 +13,7 @@ EXPECTED_TEST_FAILURES="" #KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -KEYWORDS="~amd64" +KEYWORDS="~amd64 ~x86" # Eblit Handling Functions # @@ -23,6 +23,7 @@ # Usage: [version] [eval] # Main eblit engine eblit-core() { + [[ -z $FILESDIR ]] && FILESDIR="$(dirname $EBUILD)/files" local e v func=$1 ver=$2 eval_=$3 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do e="${FILESDIR}/eblits/${func}${v}.eblit" @@ -93,7 +94,7 @@ src_prepare() { eblit-run src_prepare v1 ; } src_configure() { eblit-run src_configure v1 ; } -src_compile() { eblit-run src_compile v1 ; } +src_compile() { eblit-run src_compile v2 ; } src_install() { eblit-run src_install v1 ; } src_test() { eblit-run src_test v1 ; }