diff options
author | Ole Markus With <olemarkus@gentoo.org> | 2010-10-08 18:25:10 +0000 |
---|---|---|
committer | Ole Markus With <olemarkus@gentoo.org> | 2010-10-08 18:25:10 +0000 |
commit | 18af026d73e5696e8a4060484642661f9213d7c7 (patch) | |
tree | 1b312f6a3a9556241424ee1ead468758c61ff989 /dev-lang/php | |
parent | Introduce today's snapshot ebuild. (diff) | |
download | historical-18af026d73e5696e8a4060484642661f9213d7c7.tar.gz historical-18af026d73e5696e8a4060484642661f9213d7c7.tar.bz2 historical-18af026d73e5696e8a4060484642661f9213d7c7.zip |
Added ebuilds supporting minor version slotting
Package-Manager: portage-2.1.8.3/cvs/Linux i686
Diffstat (limited to 'dev-lang/php')
-rw-r--r-- | dev-lang/php/ChangeLog | 9 | ||||
-rw-r--r-- | dev-lang/php/Manifest | 13 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/common-v1.eblit | 4 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/common-v2.eblit | 9 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/pkg_postinst-v2.eblit | 37 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/pkg_setup-v2.eblit | 21 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_configure-v2.eblit | 274 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_configure-v521.eblit | 273 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_install-v2.eblit | 147 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_prepare-v2.eblit | 66 | ||||
-rw-r--r-- | dev-lang/php/php-5.2.14-r1.ebuild | 313 | ||||
-rw-r--r-- | dev-lang/php/php-5.3.3-r2.ebuild | 337 |
12 files changed, 1498 insertions, 5 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog index ea50c1d45808..5c8e49c273bf 100644 --- a/dev-lang/php/ChangeLog +++ b/dev-lang/php/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-lang/php # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.418 2010/09/19 15:15:08 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.419 2010/10/08 18:25:10 olemarkus Exp $ + +*php-5.3.3-r2 (06 Oct 2010) +*php-5.2.14-r1 (06 Oct 2010) + + 06 Oct 2010; <olemarkus@gentoo.org> +php-5.2.14-r1.ebuild, + +php-5.3.3-r2.ebuild: + Added PHP ebuilds with minor version slotting support 19 Sep 2010; Matti Bickel <mabi@gentoo.org> files/eblits/src_configure-v1.eblit, files/eblits/src_configure-v52.eblit: diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index 695451ced02b..fb4fb7c0ab9e 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -3,14 +3,21 @@ AUX 70_mod_php5.conf-apache2 348 RMD160 9f3f49a52ebf92c2650501c5ceb6f95ce4bb2e76 AUX 70_mod_php5.conf-apache2-r1 374 RMD160 ca06cdc9d1a3dc4129a60c938ee3a1b542497fbb SHA1 4733066b6324c5870e716485484c44c7c26a9ff1 SHA256 815c1ca23c9afe8479568ceaac4057eb91ea5444fbd863866b29adb4eea2c82b AUX 70_mod_php5_concurr.conf-apache2 348 RMD160 9f3f49a52ebf92c2650501c5ceb6f95ce4bb2e76 SHA1 62992e793446b4a9a64900d1ecba7bae06873382 SHA256 5bb8a45570582b4389a7d3feea0398e1c13ed4ced96e559b9406ed8c965dea8c AUX 70_mod_php5_concurr.conf-apache2-r1 376 RMD160 4f7de5c0784b6191450b5c1a7de7ad941620e199 SHA1 c42a23bd7a1d3e8c7e0ac906f50f180116349f76 SHA256 c05f499d9c8927391c586b94716a9f59d63767165552ea527ec7ff63c36eaa40 -AUX eblits/common-v1.eblit 376 RMD160 524d38035ef01b215c6dc06699c41550c246de9d SHA1 b85091f9e56b20217e5c2d3e25cef055642cd088 SHA256 d395752919fe05fa64a0e09deaf690e008a04f2c580f42233b5a854a1012045e +AUX eblits/common-v1.eblit 379 RMD160 60b526e9a736553f6e4883c9fb9525464192bde2 SHA1 97c4e1c9475d73227f26cbef80640f43d838af6f SHA256 65c909a6d0501a6746518f539c4a4021426469cbf20b2a212fb0d60b48da5362 +AUX eblits/common-v2.eblit 379 RMD160 595fd6c6be1e0ac15012ea78497a4d2c287c6754 SHA1 98e28261e32bda53c7dfef88def615f633af7c44 SHA256 8c15442b04b0216342ef6f2b8565cb3510f6850fe67745d5697861e2f7759194 AUX eblits/pkg_postinst-v1.eblit 2184 RMD160 ce65ba811eab10862d067c7e2b4bdc8d2b0aee56 SHA1 11c14f2235041cfb08e33cf2550bebef2037e92b SHA256 9e1cd81be4f051f3156de0ce5398a338b2ab6f8e73047c5983beda47f2f762b0 +AUX eblits/pkg_postinst-v2.eblit 1106 RMD160 3eafd829d2af922cded80c3ffbf78becffce506b SHA1 08af1f3705adcf7112ddfb89bfb5687d7c62c6f6 SHA256 2d487d524cfbf4fccaff481966872f5dc02a7de803690bd8e751ab9ae4064846 AUX eblits/pkg_setup-v1.eblit 777 RMD160 aa63e7ab1bae34feffbbfaae902f11c6e797ba9d SHA1 f7334a4750b1a1bb2f24021dff884733a88ac347 SHA256 2613f51ee9e3a258dbab38ff2df724f2971a50a5ad8c097cb5a4e3744df5fc8a +AUX eblits/pkg_setup-v2.eblit 527 RMD160 c8700795e0c3a38538622a02d2dd7d5a34438783 SHA1 affda60b6e4501fb2bc0d50f6d63b6bc78cd6205 SHA256 f7dca5b41844d87cbbcf06d3f46952d892ff0edf58a8b0fc7ba79459180596b5 AUX eblits/src_compile-v1.eblit 1283 RMD160 83fbb374e2dfaa9d164e6b32b57c268ed06bf519 SHA1 09124cbc9008bfb72eb24cd24b2319d22df52c2c SHA256 5ec76ae24304c5f803a615a98394c219018da1b1ce2018f92f6ac8c5becf6c99 AUX eblits/src_configure-v1.eblit 10978 RMD160 5cd978ef123771d00c9ddedcf130359ce07744c1 SHA1 7f024d82b08abcda59c4efe73617ca85531fb838 SHA256 e8885fd590903a5d9d2f775a161a351dbe0b9e1dfac959f2c1a9b0af65532990 +AUX eblits/src_configure-v2.eblit 10802 RMD160 c132856e8a9db17177445709c6e13f021b55ce4a SHA1 c74613cf98a5f60aa3917a02ef8cca69ff09b85d SHA256 5b5bc204e659a5c23a69a934a19e8fbe6f80c8c6c24d7a80af62fdf595b56dca AUX eblits/src_configure-v52.eblit 11017 RMD160 4a804e4b021d2454c81c33644a744b72eec1e65d SHA1 f30392f1727592ad5de79934042d9d0b09c4ba41 SHA256 784ec5482362cc8f0725ca30a186e08958d7e8e752a238af043cfa8c7a68ed85 +AUX eblits/src_configure-v521.eblit 10844 RMD160 90513f59b5f17d680004d3e74581d9eedc8af490 SHA1 a369e2cf7816799f7e2bead8b6eccc2115d0ecdc SHA256 ad875ca45e9ad975c0d7a3cbedc27c5035aa048d7aa935221a15e47cbca63c3d AUX eblits/src_install-v1.eblit 5021 RMD160 39e8103e1aec27587b03100ce58e64922b119a79 SHA1 9c7d72ca8311c63013216c3ce3c50621aaba79f8 SHA256 f3e056e582d6eee4ce5cae8a62431c73719e57ee475d9531a9004aee2a12e28d +AUX eblits/src_install-v2.eblit 4629 RMD160 0f411fdb4396690c30bab498661da297379e797f SHA1 8e8668e0452f53e6f0b9ffcc3851d041afec25e2 SHA256 c5978d0efc6c21dfbaa9310711c0b8e1d9eceefbd997dac5c2fa862cb8885221 AUX eblits/src_prepare-v1.eblit 2616 RMD160 ccff64d09cc90ada1ea5d1311457cf9a05f12f8e SHA1 7db40d0ca7ef01e5b61962f261511803f768f1bc SHA256 915b9755a37f7670f6e436fe5072dae8f5e6b437ccdfbff835e26bb2f9d22b1e +AUX eblits/src_prepare-v2.eblit 2472 RMD160 6ab5ec0487d489b07540f3cedde5d6a00c0235b7 SHA1 e4200d9cd4810b36db468ace4add8a2d0a3501ec SHA256 2d914be15985b7a303069f2b0a5987a522428ffe8519a7c932f10f75b23cc5bf AUX eblits/src_test-v1.eblit 1530 RMD160 10031a5128dab729106c6fbfe4e899b1583818cb SHA1 0f1abf995913c2c381e2496b8670ea4f6e97964b SHA256 67501925cfdaf9043e4985d0f1c797e62fb42bf47e6863b5ffdecb104888e82c AUX php-5.2.10-pdo_dblib.patch 559 RMD160 062604e291113b2bb86044b5eeffb72fad210fbc SHA1 d59d26e6557dac86e582e1a6ed7bb4795cf150c6 SHA256 0548d63d7379cd19f7ade6ca1222b1b577f684b142ff6b0e8e23742b1f7f9794 AUX php-5.2.12-libpng14.patch 222 RMD160 d63bd712d077d9606a02d6620c7084bca7197c01 SHA1 a25a47386d625a47698094fc4825208c6ec8f2a4 SHA256 af94a9c2a104dcb037aa059dd46b6f534adb939ea44ad4cb9e3a0a7c49b64fab @@ -27,7 +34,9 @@ DIST suhosin-patch-5.2.13-0.9.7.patch.gz 22989 RMD160 63a022a5bf0fb8c6688f4c0ebc DIST suhosin-patch-5.2.14-0.9.7.patch.gz 23057 RMD160 bc7790cd36dc4101322684b754db3ca2d4385ba6 SHA1 0a12d3589f9c26dc7d6b6452ef7987b2e6527a30 SHA256 bd03ade44673f7e6fa116d746350f16c60be7170d6c41816a2d51faaeb5a31ae DIST suhosin-patch-5.3.3-0.9.10.patch.gz 41298 RMD160 8dcd8b51ea0357b6cc51e70e495e18f341c62f7c SHA1 76675242cfdeff763767900213346af622002490 SHA256 f48489ff7d3fd3fc30429f7349f181c84caf2e03e672eb2d2b55b46adf6f602c EBUILD php-5.2.13.ebuild 16859 RMD160 e899ea551626ec77614931e052189a51b52cac5f SHA1 9092d7dd5eb208954096f67df1a36eef8be37ffa SHA256 95e359d899c9e42e358789029e535a4b54d8ab428a3c83503e0964831ed1775d +EBUILD php-5.2.14-r1.ebuild 9076 RMD160 32d76a68c0c011216b75acc4f8bd4f5a4cc2c990 SHA1 f9b96ba2dda28dda46ad0718f8d1381901ab78a3 SHA256 461d4fcf78761324de1f00317e12232bd30b63724492ead9dd415810bd2b9106 EBUILD php-5.2.14.ebuild 9164 RMD160 893778d74f25ee5a0f1310be970499152102c7f6 SHA1 4f82548143854bcb759eda79a040b40d160408c3 SHA256 0c91e2a72176d103d377f328af20f759fd087ebb00e761b28d3fc372dfb09a59 EBUILD php-5.3.3-r1.ebuild 9495 RMD160 4a83ee70121196dee97e416dea2507b6174003fd SHA1 d7b74de403cabf6c58452f65729e140c9c8e794f SHA256 835f3310852b8aaf9e13b0d368409c6030e39017e6ce7a993b31bc668550dff3 -MISC ChangeLog 71952 RMD160 666a8b18cfb6264e529a01c9293eb94312897338 SHA1 d848892e2a49f16f8c4d781ea3bbc065d3c1d00d SHA256 62c02b26c078de63a256216288386eedca214bcd5a3bf0cdb987b589c2598298 +EBUILD php-5.3.3-r2.ebuild 9555 RMD160 388c1ee5c20ec3ac2dc2d4bc1d47f64d48ffe401 SHA1 63670cc947d0be2bf66b2978df33084cf31c0887 SHA256 a917186cd972833dba16ffd1b570295fd6bf5b127da038cb3001d166d4decc62 +MISC ChangeLog 72157 RMD160 daac0f9d6878b090208fd832c65cf70f95572b8a SHA1 59b8809ab10556c0fd17952c1d22d7a2a1f52256 SHA256 57f9a828e4441734135f7a70737f4ba58f33547949aaf4028da77f4382c32d32 MISC metadata.xml 2251 RMD160 4167b367fe5472e090fec27c09a465e558b8caf9 SHA1 059e3863cc1e500cf438f12ca98fe7f4ebd24722 SHA256 f402e3753e18c32922a694ab1bbde615754f26bbebc401b90b18f57bf5e49342 diff --git a/dev-lang/php/files/eblits/common-v1.eblit b/dev-lang/php/files/eblits/common-v1.eblit index 56ec5108b13c..ae2147531e38 100644 --- a/dev-lang/php/files/eblits/common-v1.eblit +++ b/dev-lang/php/files/eblits/common-v1.eblit @@ -1,9 +1,9 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit,v 1.1 2010/05/27 23:05:04 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v1.eblit,v 1.2 2010/10/08 18:25:10 olemarkus Exp $ php_set_ini_dir() { - PHP_INI_DIR="/etc/php/${1}-php${PHP_MV}" + PHP_INI_DIR="/etc/php/${1}-php${SLOT}" PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" } diff --git a/dev-lang/php/files/eblits/common-v2.eblit b/dev-lang/php/files/eblits/common-v2.eblit new file mode 100644 index 000000000000..394dacbedee2 --- /dev/null +++ b/dev-lang/php/files/eblits/common-v2.eblit @@ -0,0 +1,9 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/common-v2.eblit,v 1.3 2010/10/08 18:25:10 olemarkus Exp $ + +php_set_ini_dir() { + PHP_INI_DIR="/etc/php/${1}-php${SLOT}" + PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" + PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" +} diff --git a/dev-lang/php/files/eblits/pkg_postinst-v2.eblit b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit new file mode 100644 index 000000000000..80fb0da05225 --- /dev/null +++ b/dev-lang/php/files/eblits/pkg_postinst-v2.eblit @@ -0,0 +1,37 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_postinst-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ + +eblit-php-pkg_postinst() { + # Output some general info to the user + if use apache2 ; then + APACHE2_MOD_DEFINE="PHP5" + APACHE2_MOD_CONF="70_mod_php5" + apache-module_pkg_postinst + fi + + + # Create the symlinks for php + local m modules="cli apache2" + for m in modules; do + if use $m ; then + local ci=$(eselect php show $m) + if [[ -z $ci ]]; then + eselect php set $m php${SLOT} + elif [[ $ci != "php{$SLOT}" ]] ; then + ewarn "To switch $m to use php-${SLOT}, run" + ewarn " eselect php set $m php${SLOT}" + ewarn + fi + fi + done + + ewarn "You may have to recompile third-party extensions now" + ewarn "(includes every dev-php5/pecl-* package and probably others in that category)" + if ! use readline && use cli ; then + ewarn "Note that in order to use php interactivly, you need to enable" + ewarn "the readline USE flag or php -a will hang" + fi + ewarn +} + diff --git a/dev-lang/php/files/eblits/pkg_setup-v2.eblit b/dev-lang/php/files/eblits/pkg_setup-v2.eblit new file mode 100644 index 000000000000..4c12887572c7 --- /dev/null +++ b/dev-lang/php/files/eblits/pkg_setup-v2.eblit @@ -0,0 +1,21 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/pkg_setup-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ + +eblit-php-pkg_setup() { + # Mail support + php_check_mta + + # imap support + # if virtuals/imap-c-client goes to new style virtual, we can exchange this + # for proper use-deps + php_check_imap + + # Oracle support + php_check_oracle_8 + + phpconfutils_warn_about_external_deps + depend.apache_pkg_setup +} + + diff --git a/dev-lang/php/files/eblits/src_configure-v2.eblit b/dev-lang/php/files/eblits/src_configure-v2.eblit new file mode 100644 index 000000000000..085715f05f3c --- /dev/null +++ b/dev-lang/php/files/eblits/src_configure-v2.eblit @@ -0,0 +1,274 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ + +eblit-php-src_configure() { + PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}" + + # This is a global variable and should be in caps. It isn't because the + # phpconfutils eclass relies on exactly this name... + # for --with-libdir see bug #327025 + my_conf=" + --prefix="${PHP_DESTDIR}" + --mandir="${PHP_DESTDIR}"/man + --infodir="${PHP_DESTDIR}"/info + --libdir="${PHP_DESTDIR}"/lib + --with-libdir=$(get_libdir) + --without-pear + $(use_enable threads maintainer-zts)" + + phpconfutils_init + + # extension USE flag shared + phpconfutils_extension_enable "bcmath" "bcmath" 1 + phpconfutils_extension_with "bz2" "bzip2" 1 + phpconfutils_extension_enable "calendar" "calendar" 1 + phpconfutils_extension_disable "ctype" "ctype" 0 + phpconfutils_extension_with "curl" "curl" 1 + phpconfutils_extension_with "curlwrappers" "curlwrappers" 0 + phpconfutils_extension_disable "dom" "xml" 0 + phpconfutils_extension_with "enchant" "enchant" 1 "/usr" + phpconfutils_extension_enable "exif" "exif" 1 + phpconfutils_extension_disable "fileinfo" "fileinfo" 1 + phpconfutils_extension_disable "filter" "filter" 0 + phpconfutils_extension_enable "ftp" "ftp" 1 + phpconfutils_extension_with "gettext" "nls" 1 + phpconfutils_extension_with "gmp" "gmp" 1 + phpconfutils_extension_disable "hash" "hash" 0 + phpconfutils_extension_without "iconv" "iconv" 0 + phpconfutils_extension_enable "intl" "intl" 1 + phpconfutils_extension_disable "ipv6" "ipv6" 0 + phpconfutils_extension_disable "json" "json" 0 + phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr" + phpconfutils_extension_disable "libxml" "xml" 0 + phpconfutils_extension_enable "mbstring" "unicode" 1 + phpconfutils_extension_with "mcrypt" "crypt" 1 + phpconfutils_extension_with "mssql" "mssql" 1 + phpconfutils_extension_with "onig" "unicode" 0 "/usr" + phpconfutils_extension_with "openssl" "ssl" 0 + phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr" + phpconfutils_extension_enable "pcntl" "pcntl" 1 + phpconfutils_extension_disable "phar" "phar" 1 + phpconfutils_extension_disable "pdo" "pdo" 0 + phpconfutils_extension_with "pgsql" "postgres" 1 + phpconfutils_extension_disable "posix" "posix" 0 + phpconfutils_extension_with "pspell" "spell" 1 + phpconfutils_extension_with "recode" "recode" 1 + phpconfutils_extension_disable "simplexml" "simplexml" 0 + phpconfutils_extension_enable "shmop" "sharedmem" 0 + phpconfutils_extension_with "snmp" "snmp" 1 + phpconfutils_extension_enable "soap" "soap" 1 + phpconfutils_extension_enable "sockets" "sockets" 1 + phpconfutils_extension_without "sqlite3" "sqlite3" 1 "/usr" + phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 + phpconfutils_extension_enable "sysvmsg" "sysvipc" 1 + phpconfutils_extension_enable "sysvsem" "sysvipc" 1 + phpconfutils_extension_enable "sysvshm" "sysvipc" 1 + phpconfutils_extension_with "tidy" "tidy" 1 + phpconfutils_extension_disable "tokenizer" "tokenizer" 0 + phpconfutils_extension_enable "wddx" "wddx" 1 + phpconfutils_extension_disable "xml" "xml" 0 + phpconfutils_extension_disable "xmlreader" "xmlreader" 0 + phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0 + phpconfutils_extension_with "xmlrpc" "xmlrpc" 1 + phpconfutils_extension_with "xsl" "xsl" 1 + phpconfutils_extension_enable "zip" "zip" 1 + phpconfutils_extension_with "zlib" "zlib" 1 + phpconfutils_extension_enable "debug" "debug" 0 + + # DBA support + if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ + || use qdbm ; then + my_conf="${my_conf} --enable-dba${shared}" + fi + + # DBA drivers support + phpconfutils_extension_with "cdb" "cdb" 0 + phpconfutils_extension_with "db4" "berkdb" 0 + phpconfutils_extension_enable "flatfile" "flatfile" 0 + phpconfutils_extension_with "gdbm" "gdbm" 0 + phpconfutils_extension_enable "inifile" "inifile" 0 + phpconfutils_extension_with "qdbm" "qdbm" 0 + + # Support for the GD graphics library + if use gd-external ; then + phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" + phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" + phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 + phpconfutils_extension_with "gd" "gd-external" 1 "/usr" + else + phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" + phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" + phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 + phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr" + phpconfutils_extension_with "png-dir" "gd" 0 "/usr" + phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr" + # enable gd last, so configure can pick up the previous settings + phpconfutils_extension_with "gd" "gd" 0 + fi + + # IMAP support + if use imap ; then + phpconfutils_extension_with "imap" "imap" 1 + phpconfutils_extension_with "imap-ssl" "ssl" 0 + fi + + phpconfutils_extension_with "interbase" "interbase" 0 "/opt" + phpconfutils_extension_with "interbase" "firebird" 0 "/usr" + + # LDAP support + if use ldap ; then + if use oci8 ; then + phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}" + else + phpconfutils_extension_with "ldap" "ldap" 1 + phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 + fi + fi + + # MySQL support + if use mysql ; then + if use mysqlnd ; then + phpconfutils_extension_with "mysql" "mysql" 1 "mysqlnd" + else + phpconfutils_extension_with "mysql" "mysql" 1 "/usr" + fi + phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock" + fi + + # MySQLi support + if use mysqlnd ; then + phpconfutils_extension_with "mysqli" "mysqli" 1 "mysqlnd" + else + phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config" + fi + + # ODBC support + if use odbc ; then + phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr" + phpconfutils_extension_with "adabas" "adabas" 1 + phpconfutils_extension_with "birdstep" "birdstep" 1 + phpconfutils_extension_with "dbmaker" "dbmaker" 1 + phpconfutils_extension_with "empress" "empress" 1 + if use empress ; then + phpconfutils_extension_with "empress-bcs" "empress-bcs" 0 + fi + phpconfutils_extension_with "esoob" "esoob" 1 + # Needed to run conftest for IBM DB2 + [[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`" + phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}" + phpconfutils_extension_with "sapdb" "sapdb" 1 + phpconfutils_extension_with "solid" "solid" 1 + fi + + if use iodbc ; then + phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr" + fi + + # Oracle support + phpconfutils_extension_with "oci8" "oci8" 1 + if use oci8-instant-client ; then + OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \ + sed -e 's|dev-db/oracle-instantclient-basic-||g' | \ + sed -e 's|-r.*||g')" + + phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \ + "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib" + fi + + # PDO support + if use pdo ; then + phpconfutils_extension_with "pdo-dblib" "mssql" 1 + if use mysqlnd ; then + phpconfutils_extension_with "pdo-mysql" "mysql" 1 "mysqlnd" + else + phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr" + fi + phpconfutils_extension_with "pdo-pgsql" "postgres" 1 + phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr" + phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr" + if use oci8 ; then + phpconfutils_extension_with "pdo-oci" "oci8" 1 + fi + if use oci8-instant-client ; then + phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \ + "instantclient,/usr,${OCI8IC_PKG}" + fi + fi + + # readline/libedit support + phpconfutils_extension_with "readline" "readline" 0 + phpconfutils_extension_with "libedit" "libedit" 0 + + # Session support + if use session ; then + phpconfutils_extension_with "mm" "sharedmem" 0 + else + phpconfutils_extension_disable "session" "session" 0 + fi + + # SQLite support + if use sqlite ; then + phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr" + phpconfutils_extension_enable "sqlite-utf8" "unicode" 0 + else + phpconfutils_extension_without "sqlite" "sqlite" 0 + fi + + if use pic ; then + my_conf="${my_conf} --with-pic" + fi + + if has fpm ${IUSE//+} && use fpm ; then + my_conf="${my_conf} --with-libevent-dir=/usr/`get_libdir`" + fi + + + # we use the system copy of pcre + # --with-pcre-regex affects ext/pcre + # --with-pcre-dir affects ext/filter and ext/zip + my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr" + + # Catch CFLAGS problems + php_check_cflags + + # Support user-passed configuration parameters + my_conf="${my_conf} ${EXTRA_ECONF:-}" + + # Support the Apache2 extras, they must be set globally for all + # SAPIs to work correctly, especially for external PHP extensions + + mkdir -p "${WORKDIR}/sapis-build" + for one_sapi in $SAPIS ; do + use "${one_sapi}" || continue + php_set_ini_dir "${one_sapi}" + + cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}" + cd "${WORKDIR}/sapis-build/${one_sapi}" + + sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} + --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}" + + for sapi in $SAPIS ; do + case "$sapi" in + cli|cgi|embed|fpm) + if [[ "${one_sapi}" == "${sapi}" ]] ; then + sapi_conf="${sapi_conf} --enable-${sapi}" + else + sapi_conf="${sapi_conf} --disable-${sapi}" + fi + ;; + + apache2) + if [[ "${one_sapi}" == "${sapi}" ]] ; then + sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs" + else + sapi_conf="${sapi_conf} --without-apxs2" + fi + ;; + esac + done + + econf ${sapi_conf} + done +} diff --git a/dev-lang/php/files/eblits/src_configure-v521.eblit b/dev-lang/php/files/eblits/src_configure-v521.eblit new file mode 100644 index 000000000000..61e63891acf3 --- /dev/null +++ b/dev-lang/php/files/eblits/src_configure-v521.eblit @@ -0,0 +1,273 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v521.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ + +eblit-php-src_configure() { + export CFLAGS="${CFLAGS} -D_GNU_SOURCE" + PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}" + + # This is a global variable and should be in caps. It isn't because the + # phpconfutils eclass relies on exactly this name... + my_conf=" + --prefix="${PHP_DESTDIR}" + --mandir="${PHP_DESTDIR}"/man + --infodir="${PHP_DESTDIR}"/info + --libdir="${PHP_DESTDIR}"/lib + --with-libdir=$(get_libdir) + --without-pear + $(use_enable threads maintainer-zts)" + + phpconfutils_init + + # extension USE flag shared + phpconfutils_extension_enable "bcmath" "bcmath" 1 + phpconfutils_extension_with "bz2" "bzip2" 1 + phpconfutils_extension_enable "calendar" "calendar" 1 + phpconfutils_extension_disable "ctype" "ctype" 0 + phpconfutils_extension_with "curl" "curl" 1 + phpconfutils_extension_with "curlwrappers" "curlwrappers" 0 + phpconfutils_extension_enable "dbase" "dbase" 1 + phpconfutils_extension_disable "dom" "xml" 0 + phpconfutils_extension_enable "exif" "exif" 1 + phpconfutils_extension_with "fbsql" "frontbase" 1 + phpconfutils_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0" + phpconfutils_extension_disable "filter" "filter" 0 + phpconfutils_extension_enable "ftp" "ftp" 1 + phpconfutils_extension_with "gettext" "nls" 1 + phpconfutils_extension_with "gmp" "gmp" 1 + phpconfutils_extension_disable "hash" "hash" 0 + phpconfutils_extension_without "iconv" "iconv" 0 + phpconfutils_extension_disable "ipv6" "ipv6" 0 + phpconfutils_extension_disable "json" "json" 0 + phpconfutils_extension_with "kerberos" "kerberos" 0 "/usr" + phpconfutils_extension_disable "libxml" "xml" 0 + phpconfutils_extension_enable "mbstring" "unicode" 1 + phpconfutils_extension_with "mcrypt" "crypt" 1 + phpconfutils_extension_with "mhash" "mhash" 1 + phpconfutils_extension_with "msql" "msql" 1 + phpconfutils_extension_with "mssql" "mssql" 1 + phpconfutils_extension_with "ncurses" "ncurses" 1 + phpconfutils_extension_with "openssl" "ssl" 0 + phpconfutils_extension_with "openssl-dir" "ssl" 0 "/usr" + phpconfutils_extension_enable "pcntl" "pcntl" 1 + phpconfutils_extension_without "pcre-regex" "pcre" 0 + phpconfutils_extension_disable "pdo" "pdo" 0 + phpconfutils_extension_with "pgsql" "postgres" 1 + phpconfutils_extension_disable "posix" "posix" 0 + phpconfutils_extension_with "pspell" "spell" 1 + phpconfutils_extension_with "recode" "recode" 1 + phpconfutils_extension_disable "reflection" "reflection" 0 + phpconfutils_extension_disable "simplexml" "simplexml" 0 + phpconfutils_extension_enable "shmop" "sharedmem" 0 + phpconfutils_extension_with "snmp" "snmp" 1 + phpconfutils_extension_enable "soap" "soap" 1 + phpconfutils_extension_enable "sockets" "sockets" 1 + phpconfutils_extension_disable "spl" "spl" 0 + phpconfutils_extension_with "sybase-ct" "sybase-ct" 1 + phpconfutils_extension_enable "sysvmsg" "sysvipc" 1 + phpconfutils_extension_enable "sysvsem" "sysvipc" 1 + phpconfutils_extension_enable "sysvshm" "sysvipc" 1 + phpconfutils_extension_with "tidy" "tidy" 1 + phpconfutils_extension_disable "tokenizer" "tokenizer" 0 + phpconfutils_extension_enable "wddx" "wddx" 1 + phpconfutils_extension_disable "xml" "xml" 0 + phpconfutils_extension_disable "xmlreader" "xmlreader" 0 + phpconfutils_extension_disable "xmlwriter" "xmlwriter" 0 + phpconfutils_extension_with "xmlrpc" "xmlrpc" 1 + phpconfutils_extension_with "xsl" "xsl" 1 + phpconfutils_extension_enable "zip" "zip" 1 + phpconfutils_extension_with "zlib" "zlib" 1 + phpconfutils_extension_enable "debug" "debug" 0 + + # DBA support + if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ + || use qdbm ; then + my_conf="${my_conf} --enable-dba${shared}" + fi + + # DBA drivers support + phpconfutils_extension_with "cdb" "cdb" 0 + phpconfutils_extension_with "db4" "berkdb" 0 + phpconfutils_extension_enable "flatfile" "flatfile" 0 + phpconfutils_extension_with "gdbm" "gdbm" 0 + phpconfutils_extension_enable "inifile" "inifile" 0 + phpconfutils_extension_with "qdbm" "qdbm" 0 + + # Support for the GD graphics library + if use gd-external ; then + phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" + phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" + phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 + phpconfutils_extension_with "gd" "gd-external" 1 "/usr" + else + phpconfutils_extension_with "freetype-dir" "truetype" 0 "/usr" + phpconfutils_extension_with "t1lib" "truetype" 0 "/usr" + phpconfutils_extension_enable "gd-jis-conv" "cjk" 0 + phpconfutils_extension_with "jpeg-dir" "gd" 0 "/usr" + phpconfutils_extension_with "png-dir" "gd" 0 "/usr" + phpconfutils_extension_with "xpm-dir" "xpm" 0 "/usr" + # enable gd last, so configure can pick up the previous settings + phpconfutils_extension_with "gd" "gd" 0 + fi + + # IMAP support + if use imap ; then + phpconfutils_extension_with "imap" "imap" 1 + phpconfutils_extension_with "imap-ssl" "ssl" 0 + fi + + phpconfutils_extension_with "interbase" "interbase" 0 "/opt" + phpconfutils_extension_with "interbase" "firebird" 0 "/usr" + + # LDAP support + if use ldap ; then + if use oci8 ; then + phpconfutils_extension_with "ldap" "ldap" 1 "${ORACLE_HOME}" + else + phpconfutils_extension_with "ldap" "ldap" 1 + phpconfutils_extension_with "ldap-sasl" "ldap-sasl" 0 + fi + fi + + # MySQL support + if use mysql ; then + phpconfutils_extension_with "mysql" "mysql" 1 "/usr" + phpconfutils_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock" + fi + + # MySQLi support + phpconfutils_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config" + + # ODBC support + if use odbc ; then + phpconfutils_extension_with "unixODBC" "odbc" 1 "/usr" + phpconfutils_extension_with "adabas" "adabas" 1 + phpconfutils_extension_with "birdstep" "birdstep" 1 + phpconfutils_extension_with "dbmaker" "dbmaker" 1 + phpconfutils_extension_with "empress" "empress" 1 + if use empress ; then + phpconfutils_extension_with "empress-bcs" "empress-bcs" 0 + fi + phpconfutils_extension_with "esoob" "esoob" 1 + # Needed to run conftest for IBM DB2 + [[ -n ${DB2_HOME} ]] && export LD_LIBRARY_PATH="${DB2_HOME}/`get_libdir`" + phpconfutils_extension_with "ibm-db2" "db2" 1 "${DB2_HOME}" + phpconfutils_extension_with "sapdb" "sapdb" 1 + phpconfutils_extension_with "solid" "solid" 1 + fi + + if use iodbc ; then + phpconfutils_extension_with "iodbc" "iodbc" 1 "/usr" + fi + + # Oracle support + phpconfutils_extension_with "oci8" "oci8" 1 + if use oci8-instant-client ; then + OCI8IC_PKG="$(best_version dev-db/oracle-instantclient-basic | \ + sed -e 's|dev-db/oracle-instantclient-basic-||g' | \ + sed -e 's|-r.*||g')" + + phpconfutils_extension_with "oci8" "oci8-instant-client" 1 \ + "instantclient,/usr/lib/oracle/${OCI8IC_PKG}/client/lib" + fi + + # PDO support + if use pdo ; then + phpconfutils_extension_with "pdo-dblib" "mssql" 1 + phpconfutils_extension_with "pdo-mysql" "mysql" 1 "/usr" + phpconfutils_extension_with "pdo-pgsql" "postgres" 1 + phpconfutils_extension_with "pdo-sqlite" "sqlite" 1 "/usr" + phpconfutils_extension_with "pdo-odbc" "odbc" 1 "unixODBC,/usr" + if use oci8 ; then + phpconfutils_extension_with "pdo-oci" "oci8" 1 + fi + if use oci8-instant-client ; then + phpconfutils_extension_with "pdo-oci" "oci8-instant-client" 1 \ + "instantclient,/usr,${OCI8IC_PKG}" + fi + fi + + # readline/libedit support + phpconfutils_extension_with "readline" "readline" 0 + phpconfutils_extension_with "libedit" "libedit" 0 + + # Session support + if use session ; then + phpconfutils_extension_with "mm" "sharedmem" 0 + else + phpconfutils_extension_disable "session" "session" 0 + fi + + # SQLite support + if use sqlite ; then + phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr" + phpconfutils_extension_enable "sqlite-utf8" "unicode" 0 + else + phpconfutils_extension_without "sqlite" "sqlite" 0 + fi + + if use pic ; then + my_conf="${my_conf} --with-pic" + fi + + + # we use the system copy of pcre + # --with-pcre-regex affects ext/pcre + # --with-pcre-dir affects ext/filter and ext/zip + if use pcre ; then + my_conf="${my_conf} --with-pcre-regex=/usr --with-pcre-dir=/usr" + fi + + # Catch CFLAGS problems + php_check_cflags + + # Support user-passed configuration parameters + my_conf="${my_conf} ${EXTRA_ECONF:-}" + + # Support the Apache2 extras, they must be set globally for all + # SAPIs to work correctly, especially for external PHP extensions + + mkdir -p "${WORKDIR}/sapis-build" + for one_sapi in $SAPIS ; do + use "${one_sapi}" || continue + php_set_ini_dir "${one_sapi}" + + cp -r "${S}" "${WORKDIR}/sapis-build/${one_sapi}" + cd "${WORKDIR}/sapis-build/${one_sapi}" + + sapi_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR} + --with-config-file-scan-dir=${PHP_EXT_INI_DIR_ACTIVE}" + + for sapi in $SAPIS ; do + case "$sapi" in + cli|embed) + if [[ "${one_sapi}" == "${sapi}" ]] ; then + sapi_conf="${sapi_conf} --enable-${sapi}" + else + sapi_conf="${sapi_conf} --disable-${sapi}" + fi + ;; + + cgi) + if [[ "${one_sapi}" == "${sapi}" ]] ; then + sapi_conf+=" --enable-cgi --enable-fastcgi" + use discard-path && sapi_conf+=" --enable-discard-path" + use force-cgi-redirect && sapi_conf+=" --enable-force-cgi-redirect" + else + sapi_conf+=" --disable-${sapi}" + fi + ;; + + apache2) + if [[ "${one_sapi}" == "${sapi}" ]] ; then + sapi_conf="${sapi_conf} --with-apxs2=/usr/sbin/apxs" + else + sapi_conf="${sapi_conf} --without-apxs2" + fi + ;; + esac + done + + econf ${sapi_conf} + done +} diff --git a/dev-lang/php/files/eblits/src_install-v2.eblit b/dev-lang/php/files/eblits/src_install-v2.eblit new file mode 100644 index 000000000000..84c624c0d1b0 --- /dev/null +++ b/dev-lang/php/files/eblits/src_install-v2.eblit @@ -0,0 +1,147 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit,v 1.3 2010/10/08 18:25:10 olemarkus Exp $ + +eblit-php-src_install() { + # see bug #324739 for what happens when we don't have that + addpredict /usr/share/snmp/mibs/.index + + # grab the first SAPI that got built and install common files from there + local first_sapi="" + for sapi in $SAPIS ; do + if use $sapi ; then + first_sapi=$sapi + break + fi + done + + # Makefile forgets to create this before trying to write to it... + dodir "${PHP_DESTDIR}/bin" + + # Install php environment (without any sapis) + cd "${WORKDIR}/sapis-build/$first_sapi" + emake INSTALL_ROOT="${D}" \ + install-build install-headers install-programs \ + || die "emake install failed" + + local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)" + + # And install the modules to it + if use sharedext ; then + insinto "${extension_dir}" + doins "${WORKDIR}/sapis-build/${first_sapi}/modules/"*.so + fi + + # Generate the USE file for PHP + phpconfutils_generate_usefile + + # Create the directory where we'll put version-specific php scripts + keepdir /usr/share/php${PHP_MV} + + local sapi="", file="" + local sapi_list="" + + for sapi in ${SAPIS}; do + if use "${sapi}" ; then + einfo "Installing SAPI: ${sapi}" + cd "${WORKDIR}/sapis-build/${sapi}" + # needed each time, php_install_ini would reset it + into "${PHP_DESTDIR}" + file=$(find "${SAPI_DIR}/${sapi}/" -type f | head -n 1) + + if [[ "${file: -3}" == ".so" ]]; then + if [[ "${sapi}" == "apache2" ]]; then + insinto "${PHP_DESTDIR}/apache2/" + newins "${file}" "${file/*\/}" + else + dolib.so "${file}" || die "Unable to install ${sapi} sapi" + fi + else + dobin "${file}" || die "Unable to install ${sapi} sapi" + fi + + php_install_ini "${sapi}" + + # construct correct SAPI string for php-config + # thanks to ferringb for the bash voodoo + if [[ "${sapi}" == "apache2" ]]; then + sapi_list="${sapi_list:+${sapi_list} }apache2handler" + else + sapi_list="${sapi_list:+${sapi_list} }${sapi}" + fi + fi + done + + # Install env.d files + newenvd "${FILESDIR}/20php5-envd" \ + "20php${SLOT}" + sed -e "s|/lib/|/$(get_libdir)/|g" -i \ + "${D}/etc/env.d/20php${SLOT}" + sed -e "s|php5|php${SLOT}|g" -i \ + "${D}/etc/env.d/20php${SLOT}" + + # set php-config variable correctly (bug #278439) + sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ + "${D}/usr/$(get_libdir)/php${SLOT}/bin/php-config" +} + +php_install_ini() { + local phpsapi="${1}" + + # work out where we are installing the ini file + php_set_ini_dir "${phpsapi}" + + local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}" + cp "${PHP_INI_UPSTREAM}" "${phpinisrc}" + + # default to expose_php=Off, bug 300695 + sed -e 's|^expose_php .*|expose_php = Off|g' -i "${phpinisrc}" + + # default to /tmp for save_path, bug #282768 + sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}" + + # Set the extension dir + sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}" + + # Set the include path to point to where we want to find PEAR packages + sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php'${PHP_MV}':/usr/share/php"|' -i "${phpinisrc}" + + dodir "${PHP_INI_DIR}" + insinto "${PHP_INI_DIR}" + newins "${phpinisrc}" "${PHP_INI_FILE}" + + dodir "${PHP_EXT_INI_DIR}" + dodir "${PHP_EXT_INI_DIR_ACTIVE}" + + # Install any extensions built as shared objects + if use sharedext ; then + insinto "${PHP_EXT_INI_DIR}" + for extension in "${D}/${extension_dir}/"*.so ; do + extension="${extension##*/}" + inifilename="${extension/.so/.ini}" + echo "extension=${extension}" > "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename" + doins "${WORKDIR}/sapis-build/${phpsapi}/modules/$inifilename" + dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}" + done + fi + + # SAPI-specific handling + if [[ "${sapi}" == "apache2" ]] ; then + einfo "Installing Apache2 config 70_mod_php${PHP_MV}.conf" + insinto ${PHP_DESTDIR}/apache2 + newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \ + "70_mod_php${PHP_MV}.conf" + fi + + if [[ "${sapi}" == "fpm" ]] ; then + einfo "Installing FPM CGI config file php-fpm.conf" + epatch "${FILESDIR}/php-fpm-gentooified.patch" + insinto ${PHP_INI_DIR} + doins "${WORKDIR}/sapis-build/fpm/sapi/fpm/php-fpm.conf" + dodir "/etc/init.d" + insinto "/etc/init.d" + newins "${FILESDIR}/php-fpm.init" "php-fpm" + fperms 755 "/etc/init.d/php-fpm" +# dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm" + fi +} diff --git a/dev-lang/php/files/eblits/src_prepare-v2.eblit b/dev-lang/php/files/eblits/src_prepare-v2.eblit new file mode 100644 index 000000000000..78b4769d2245 --- /dev/null +++ b/dev-lang/php/files/eblits/src_prepare-v2.eblit @@ -0,0 +1,66 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_prepare-v2.eblit,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ + +eblit-php-src_prepare() { + # USE=sharedmem (session/mod_mm to be exact) tries to mmap() this path + # ([empty session.save_path]/session_mm_[sapi][gid].sem) + # there is no easy way to circumvent that, all php calls during + # install use -n, so no php.ini file will be used. + # As such, this is the easiest way to get around + addpredict /session_mm_cli250.sem + addpredict /session_mm_cli0.sem + + # kolab support (support for imap annotations) + use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch" + + # Change PHP branding + sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \ + -i configure.in || die "Unable to change PHP branding" + + # Apply generic PHP patches + EPATCH_SOURCE="${WORKDIR}/${PV}/generic" EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch + + # Patch PHP to show Gentoo as the server platform + sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \ + -i configure.in || die "Failed to fix server platform name" + + # Prevent PHP from activating the Apache config, + # as we will do that ourselves + sed -i \ + -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \ + -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \ + configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 + + # Patch PHP to support heimdal instead of mit-krb5 + if has_version "app-crypt/heimdal" ; then + sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \ + || die "Failed to fix heimdal libname" + sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \ + || die "Failed to fix heimdal crypt library reference" + fi + + # Suhosin support + if use suhosin ; then + epatch "${WORKDIR}/${SUHOSIN_PATCH}" + fi + + # rebuild the whole autotools stuff as we are heavily patching it + # (suhosin, fastbuild, ...) + + # eaclocal doesn't accept --force, so we try to force re-generation + # this way + rm aclocal.m4 + + # work around divert() issues with newer autoconf, bug #281697 + if has_version '>=sys-devel/autoconf-2.64' ; then + sed -i -r \ + -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \ + $(grep -l divert $(find . -name '*.m4') configure.in) || die + fi + eautoreconf --force -W no-cross +} + + diff --git a/dev-lang/php/php-5.2.14-r1.ebuild b/dev-lang/php/php-5.2.14-r1.ebuild new file mode 100644 index 000000000000..834992e088ce --- /dev/null +++ b/dev-lang/php/php-5.2.14-r1.ebuild @@ -0,0 +1,313 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.14-r1.ebuild,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ + +EAPI=2 + +PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob +interbase msql oci8 sapdb solid" + +inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool + +PHP_PATCHSET="" +SUHOSIN_VERSION="$PV-0.9.7" +EXPECTED_TEST_FAILURES="" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" + +function php_get_uri () +{ + case "${1}" in + "php-pre") + echo "http://downloads.php.net/johannes/${2}" + ;; + "php") + echo "http://www.php.net/distributions/${2}" + ;; + "suhosin") + echo "http://download.suhosin.org/${2}" + ;; + "gentoo") + echo "mirror://gentoo/${2}" + ;; + *) + die "unhandled case in php_get_uri" + ;; + esac +} + +PHP_MV="$(get_major_version)" + +# alias, so we can handle different types of releases (finals, rcs, alphas, +# betas, ...) w/o changing the whole ebuild +PHP_PV="${PV/_rc/RC}" +PHP_RELEASE="php" +PHP_P="${PN}-${PHP_PV}" +PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")" + +PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}" +PHP_PATCHSET_URI=" + $(php_get_uri gentoo "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")" + +if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then + # in some cases we use our own suhosin patch (very recent version, + # patch conflicts, etc.) + SUHOSIN_TYPE="gentoo" +else + SUHOSIN_TYPE="suhosin" +fi + +SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch" +SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )" + +SRC_URI=" + ${PHP_SRC_URI} + ${PHP_PATCHSET_URI} + suhosin? ( ${SUHOSIN_URI} )" + +DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and embed SAPIs." +HOMEPAGE="http://php.net/" +LICENSE="PHP-3" + +# We can build the following SAPIs in the given order +SAPIS="cli cgi embed apache2" + +# Gentoo-specific, common features +IUSE="kolab" + +# SAPIs and SAPI-specific USE flags (cli SAPI is default on): +IUSE="${IUSE} + ${SAPIS/cli/+cli} + threads" + +IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk + crypt +ctype curl curlwrappers db2 dbase dbmaker debug doc empress + empress-bcs esoob exif fdftk frontbase +filter firebird + flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile + interbase iodbc ipv6 +json kerberos ldap ldap-sasl libedit + mcve mhash msql mssql mysql mysqli ncurses nls oci8 + oci8-instant-client odbc pcntl +pcre pdo pic +posix postgres qdbm + readline recode reflection sapdb +session sharedext sharedmem + +simplexml snmp soap sockets solid spell spl sqlite ssl suhosin + sybase-ct sysvipc tidy +tokenizer truetype unicode wddx + xml xmlreader xmlwriter xmlrpc xpm xsl yaz zip zlib" + +DEPEND="app-admin/eselect-php + pcre? ( >=dev-libs/libpcre-7.9[unicode] ) + adabas? ( >=dev-db/unixODBC-1.8.13 ) + apache2? ( www-servers/apache[threads=] ) + berkdb? ( =sys-libs/db-4* ) + birdstep? ( >=dev-db/unixODBC-1.8.13 ) + bzip2? ( app-arch/bzip2 ) + cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) + cjk? ( !gd? ( !gd-external? ( + >=media-libs/jpeg-6b + media-libs/libpng + sys-libs/zlib + ) ) ) + crypt? ( >=dev-libs/libmcrypt-2.4 ) + curl? ( >=net-misc/curl-7.10.5 ) + db2? ( >=dev-db/unixODBC-1.8.13 ) + dbmaker? ( >=dev-db/unixODBC-1.8.13 ) + empress? ( >=dev-db/unixODBC-1.8.13 ) + empress-bcs? ( >=dev-db/unixODBC-1.8.13 ) + esoob? ( >=dev-db/unixODBC-1.8.13 ) + exif? ( !gd? ( !gd-external? ( + >=media-libs/jpeg-6b + media-libs/libpng + sys-libs/zlib + ) ) ) + fdftk? ( app-text/fdftk ) + firebird? ( dev-db/firebird ) + gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) + gd-external? ( media-libs/gd ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + gmp? ( >=dev-libs/gmp-4.1.2 ) + iconv? ( virtual/libiconv ) + imap? ( virtual/imap-c-client ) + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + kolab? ( >=net-libs/c-client-2004g-r1 ) + ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) ) + ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) ) + libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) + mhash? ( app-crypt/mhash ) + mssql? ( dev-db/freetds[mssql] ) + mysql? ( virtual/mysql ) + mysqli? ( >=virtual/mysql-4.1 ) + ncurses? ( sys-libs/ncurses ) + nls? ( sys-devel/gettext ) + oci8-instant-client? ( dev-db/oracle-instantclient-basic ) + odbc? ( >=dev-db/unixODBC-1.8.13 ) + postgres? ( dev-db/postgresql-base ) + qdbm? ( dev-db/qdbm ) + readline? ( sys-libs/readline ) + recode? ( app-text/recode ) + sapdb? ( >=dev-db/unixODBC-1.8.13 ) + sharedmem? ( dev-libs/mm ) + simplexml? ( >=dev-libs/libxml2-2.6.8 ) + snmp? ( >=net-analyzer/net-snmp-5.2 ) + soap? ( >=dev-libs/libxml2-2.6.8 ) + solid? ( >=dev-db/unixODBC-1.8.13 ) + spell? ( >=app-text/aspell-0.50 ) + sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) ) + ssl? ( >=dev-libs/openssl-0.9.7 ) + sybase-ct? ( dev-db/freetds ) + tidy? ( app-text/htmltidy ) + truetype? ( + =media-libs/freetype-2* + >=media-libs/t1lib-5.0.0 + !gd? ( !gd-external? ( + >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) + ) + wddx? ( >=dev-libs/libxml2-2.6.8 ) + xml? ( >=dev-libs/libxml2-2.6.8 ) + xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) + xmlreader? ( >=dev-libs/libxml2-2.6.8 ) + xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) + xpm? ( + x11-libs/libXpm + >=media-libs/jpeg-6b + media-libs/libpng sys-libs/zlib + ) + xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) + zip? ( sys-libs/zlib ) + zlib? ( sys-libs/zlib ) + virtual/mta +" + +php="=${CATEGORY}/${PF}" +RDEPEND="${DEPEND} + truetype? ( || ( $php[gd] $php[gd-external] ) ) + cjk? ( || ( $php[gd] $php[gd-external] ) ) + exif? ( || ( $php[gd] $php[gd-external] ) ) + + xpm? ( $php[gd] ) + gd? ( $php[zlib,-gd-external] ) + gd-external? ( $php[-gd] ) + simplexml? ( $php[xml] ) + soap? ( $php[xml] ) + wddx? ( $php[xml] ) + xmlrpc? ( || ( $php[xml] $php[iconv] ) ) + xmlreader? ( $php[xml] ) + xsl? ( $php[xml] ) + ldap-sasl? ( $php[ldap,-oci8] ) + suhosin? ( $php[unicode] ) + adabas? ( $php[odbc] ) + birdstep? ( $php[odbc] ) + dbmaker? ( $php[odbc] ) + empress-bcs? ( $php[empress] ) + empress? ( $php[odbc] ) + esoob? ( $php[odbc] ) + db2? ( $php[odbc] ) + sapdb? ( $php[odbc] ) + solid? ( $php[odbc] ) + kolab? ( $php[imap] ) + + oci8? ( $php[-oci8-instant-client,-ldap-sasl] ) + oci8-instant-client? ( $php[-oci8] ) + + qdbm? ( $php[-gdbm] ) + readline? ( $php[-libedit] ) + recode? ( $php[-imap,-mysql,-mysqli] ) + firebird? ( $php[-interbase] ) + sharedmem? ( $php[-threads] ) + + !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) + + filter? ( !dev-php${PHP_MV}/pecl-filter ) + json? ( !dev-php${PHP_MV}/pecl-json ) + zip? ( !dev-php${PHP_MV}/pecl-zip )" + +DEPEND="${DEPEND} + sys-devel/flex + >=sys-devel/m4-1.4.3 + >=sys-devel/libtool-1.5.18" + +# They are in PDEPEND because we need PHP installed first! +PDEPEND="doc? ( app-doc/php-docs ) + suhosin? ( dev-php${PHP_MV}/suhosin ) + mcve? ( dev-php${PHP_MV}/pecl-mcve ) + yaz? ( dev-php${PHP_MV}/pecl-yaz )" + +# Portage doesn't support setting PROVIDE based on the USE flags that +# have been enabled, so we have to PROVIDE everything for now and hope +# for the best +PROVIDE="virtual/php" + +SLOT="$(get_version_component_range 1-2)" +S="${WORKDIR}/${PHP_P}" + +PHP_INI_FILE="php.ini" +PHP_INI_UPSTREAM="php.ini-dist" + +want_apache + +# eblit-core +# Usage: <function> [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" + if [[ -e ${e} ]] ; then + . "${e}" + [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }" + return 0 + fi + done + return 1 +} + +# eblit-include +# Usage: [--skip] <function> [version] +# Includes an "eblit" -- a chunk of common code among ebuilds in a given +# package so that its functions can be sourced and utilized within the +# ebuild. +eblit-include() { + local skipable=false r=0 + [[ $1 == "--skip" ]] && skipable=true && shift + [[ $1 == pkg_* ]] && skipable=true + + [[ -z $1 ]] && die "Usage: eblit-include <function> [version]" + eblit-core $1 $2 + r="$?" + ${skipable} && return 0 + [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/" +} + +# eblit-run-maybe +# Usage: <function> +# Runs a function if it is defined in an eblit +eblit-run-maybe() { + [[ $(type -t "$@") == "function" ]] && "$@" +} + +# eblit-run +# Usage: <function> [version] +# Runs a function defined in an eblit +eblit-run() { + eblit-include --skip common "${*:2}" + eblit-include "$@" + eblit-run-maybe eblit-$1-pre + eblit-${PN}-$1 + eblit-run-maybe eblit-$1-post +} + +# eblit-pkg +# Usage: <phase> [version] +# Includes the given functions AND evals them so they're included in the binpkgs +eblit-pkg() { + [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]" + eblit-core $1 $2 1 +} + +eblit-pkg pkg_setup v2 + +src_prepare() { eblit-run src_prepare v2 ; } +src_configure() { eblit-run src_configure v521 ; } +src_compile() { eblit-run src_compile v1 ; } +src_install() { eblit-run src_install v2 ; } +src_test() { eblit-run src_test v1 ; } +pkg_postinst() { eblit-run pkg_postinst v2 ; } diff --git a/dev-lang/php/php-5.3.3-r2.ebuild b/dev-lang/php/php-5.3.3-r2.ebuild new file mode 100644 index 000000000000..d177a7f7dd88 --- /dev/null +++ b/dev-lang/php/php-5.3.3-r2.ebuild @@ -0,0 +1,337 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.3.3-r2.ebuild,v 1.1 2010/10/08 18:25:10 olemarkus Exp $ + +EAPI=2 + +PHPCONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob interbase oci8 sapdb solid" + +inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use phpconfutils php-common-r1 libtool + +PHP_PATCHSET="2" +SUHOSIN_VERSION="${PV}-0.9.10" +FPM_VERSION="builtin" +EXPECTED_TEST_FAILURES="" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" + +function php_get_uri () +{ + case "${1}" in + "php-pre") + echo "http://downloads.php.net/johannes/${2}" + ;; + "php") + echo "http://www.php.net/distributions/${2}" + ;; + "suhosin") + echo "http://download.suhosin.org/${2}" + ;; + "ntnu") + echo "http://folk.ntnu.no/olemarku/gentoo/${2}" + ;; + "gentoo") + echo "mirror://gentoo/${2}" + ;; + *) + die "unhandled case in php_get_uri" + ;; + esac +} + +PHP_MV="$(get_major_version)" + +# alias, so we can handle different types of releases (finals, rcs, alphas, +# betas, ...) w/o changing the whole ebuild +PHP_PV="${PV/_rc/RC}" +PHP_RELEASE="php" +PHP_P="${PN}-${PHP_PV}" + +PHP_PATCHSET_LOC="gentoo" + +PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")" + +PHP_PATCHSET="${PHP_PATCHSET:-${PR/r/}}" +PHP_PATCHSET_URI=" + $(php_get_uri "${PHP_PATCHSET_LOC}" "php-patchset-${PV}-r${PHP_PATCHSET}.tar.bz2")" + +if [[ ${SUHOSIN_VERSION} == *-gentoo ]]; then + # in some cases we use our own suhosin patch (very recent version, + # patch conflicts, etc.) + SUHOSIN_TYPE="gentoo" +else + SUHOSIN_TYPE="suhosin" +fi + +if [[ -n ${SUHOSIN_VERSION} ]]; then + SUHOSIN_PATCH="suhosin-patch-${SUHOSIN_VERSION}.patch"; + SUHOSIN_URI="$(php_get_uri ${SUHOSIN_TYPE} ${SUHOSIN_PATCH}.gz )" +fi + +SRC_URI=" + ${PHP_SRC_URI} + ${PHP_PATCHSET_URI}" + +if [[ -n ${SUHOSIN_VERSION} ]]; then + SRC_URI="${SRC_URI} + suhosin? ( ${SUHOSIN_URI} )" +fi + +DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs." +HOMEPAGE="http://php.net/" +LICENSE="PHP-3" + +# We can build the following SAPIs in the given order +SAPIS="cli cgi fpm embed apache2" + +# Gentoo-specific, common features +IUSE="kolab" + +# SAPIs and SAPI-specific USE flags (cli SAPI is default on): +IUSE="${IUSE} + ${SAPIS/cli/+cli} + threads" + +IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk + crypt +ctype curl curlwrappers db2 dbmaker debug doc empress + empress-bcs enchant esoob exif frontbase +fileinfo +filter firebird + flatfile ftp gd gd-external gdbm gmp +hash +iconv imap inifile + interbase intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit + mssql mysql mysqlnd mysqli nls oci8 + oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm + readline recode sapdb +session sharedext sharedmem + +simplexml snmp soap sockets solid spell sqlite sqlite3 ssl suhosin + sybase-ct sysvipc tidy +tokenizer truetype unicode wddx + xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib" + +DEPEND="!dev-lang/php:5 + app-admin/eselect-php + >=dev-libs/libpcre-7.9[unicode] + adabas? ( >=dev-db/unixODBC-1.8.13 ) + apache2? ( www-servers/apache[threads=] ) + berkdb? ( =sys-libs/db-4* ) + birdstep? ( >=dev-db/unixODBC-1.8.13 ) + bzip2? ( app-arch/bzip2 ) + cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) + cjk? ( !gd? ( !gd-external? ( + >=media-libs/jpeg-6b + media-libs/libpng + sys-libs/zlib + ) ) ) + crypt? ( >=dev-libs/libmcrypt-2.4 ) + curl? ( >=net-misc/curl-7.10.5 ) + db2? ( >=dev-db/unixODBC-1.8.13 ) + dbmaker? ( >=dev-db/unixODBC-1.8.13 ) + empress? ( >=dev-db/unixODBC-1.8.13 ) + empress-bcs? ( >=dev-db/unixODBC-1.8.13 ) + enchant? ( app-text/enchant ) + esoob? ( >=dev-db/unixODBC-1.8.13 ) + exif? ( !gd? ( !gd-external? ( + >=media-libs/jpeg-6b + media-libs/libpng + sys-libs/zlib + ) ) ) + firebird? ( dev-db/firebird ) + fpm? ( >=dev-libs/libevent-1.4.12 ) + gd? ( >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) + gd-external? ( media-libs/gd ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + gmp? ( >=dev-libs/gmp-4.1.2 ) + iconv? ( virtual/libiconv ) + imap? ( virtual/imap-c-client ) + intl? ( dev-libs/icu ) + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + kolab? ( >=net-libs/c-client-2004g-r1 ) + ldap? ( !oci8? ( >=net-nds/openldap-1.2.11 ) ) + ldap-sasl? ( !oci8? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) ) + libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) + mssql? ( dev-db/freetds[mssql] ) + !mysqlnd? ( + mysql? ( virtual/mysql ) + mysqli? ( >=virtual/mysql-4.1 ) + ) + nls? ( sys-devel/gettext ) + oci8-instant-client? ( dev-db/oracle-instantclient-basic ) + odbc? ( >=dev-db/unixODBC-1.8.13 ) + postgres? ( dev-db/postgresql-base ) + qdbm? ( dev-db/qdbm ) + readline? ( sys-libs/readline ) + recode? ( app-text/recode ) + sapdb? ( >=dev-db/unixODBC-1.8.13 ) + sharedmem? ( dev-libs/mm ) + simplexml? ( >=dev-libs/libxml2-2.6.8 ) + snmp? ( >=net-analyzer/net-snmp-5.2 ) + soap? ( >=dev-libs/libxml2-2.6.8 ) + solid? ( >=dev-db/unixODBC-1.8.13 ) + spell? ( >=app-text/aspell-0.50 ) + sqlite? ( =dev-db/sqlite-2* pdo? ( =dev-db/sqlite-3* ) ) + sqlite3? ( =dev-db/sqlite-3* ) + ssl? ( >=dev-libs/openssl-0.9.7 ) + sybase-ct? ( dev-db/freetds ) + tidy? ( app-text/htmltidy ) + truetype? ( + =media-libs/freetype-2* + >=media-libs/t1lib-5.0.0 + !gd? ( !gd-external? ( + >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) ) + ) + unicode? ( dev-libs/oniguruma ) + wddx? ( >=dev-libs/libxml2-2.6.8 ) + xml? ( >=dev-libs/libxml2-2.6.8 ) + xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) + xmlreader? ( >=dev-libs/libxml2-2.6.8 ) + xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) + xpm? ( + x11-libs/libXpm + >=media-libs/jpeg-6b + media-libs/libpng sys-libs/zlib + ) + xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) + zip? ( sys-libs/zlib ) + zlib? ( sys-libs/zlib ) + virtual/mta +" + +php="=${CATEGORY}/${PF}" +RDEPEND="${DEPEND} + truetype? ( || ( $php[gd] $php[gd-external] ) ) + cjk? ( || ( $php[gd] $php[gd-external] ) ) + exif? ( || ( $php[gd] $php[gd-external] ) ) + + xpm? ( $php[gd] ) + gd? ( $php[zlib,-gd-external] ) + gd-external? ( $php[-gd] ) + simplexml? ( $php[xml] ) + soap? ( $php[xml] ) + wddx? ( $php[xml] ) + xmlrpc? ( || ( $php[xml] $php[iconv] ) ) + xmlreader? ( $php[xml] ) + xsl? ( $php[xml] ) + ldap-sasl? ( $php[ldap,-oci8] ) + suhosin? ( $php[unicode] ) + adabas? ( $php[odbc] ) + birdstep? ( $php[odbc] ) + dbmaker? ( $php[odbc] ) + empress-bcs? ( $php[empress] ) + empress? ( $php[odbc] ) + esoob? ( $php[odbc] ) + db2? ( $php[odbc] ) + sapdb? ( $php[odbc] ) + solid? ( $php[odbc] ) + kolab? ( $php[imap] ) + phar? ( $php[hash] ) + mysqlnd? ( || ( + $php[mysql] + $php[mysqli] + $php[pdo] + ) ) + + oci8? ( $php[-oci8-instant-client,-ldap-sasl] ) + oci8-instant-client? ( $php[-oci8] ) + + qdbm? ( $php[-gdbm] ) + readline? ( $php[-libedit] ) + recode? ( $php[-imap,-mysql,-mysqli] ) + firebird? ( $php[-interbase] ) + sharedmem? ( $php[-threads] ) + + !cli? ( !cgi? ( !apache2? ( !embed? ( $php[cli] ) ) ) ) + + enchant? ( !dev-php${PHP_MV}/pecl-enchant ) + fileinfo? ( !dev-php${PHP_MV}/pecl-fileinfo ) + filter? ( !dev-php${PHP_MV}/pecl-filter ) + json? ( !dev-php${PHP_MV}/pecl-json ) + phar? ( !dev-php${PHP_MV}/pecl-phar ) + zip? ( !dev-php${PHP_MV}/pecl-zip )" + +DEPEND="${DEPEND} + sys-devel/flex + >=sys-devel/m4-1.4.3 + >=sys-devel/libtool-1.5.18" + +# They are in PDEPEND because we need PHP installed first! +PDEPEND="doc? ( app-doc/php-docs ) + suhosin? ( dev-php${PHP_MV}/suhosin )" + +# Portage doesn't support setting PROVIDE based on the USE flags that +# have been enabled, so we have to PROVIDE everything for now and hope +# for the best +PROVIDE="virtual/php" + +SLOT="$(get_version_component_range 1-2)" +S="${WORKDIR}/${PHP_P}" + +PHP_INI_FILE="php.ini" +PHP_INI_UPSTREAM="php.ini-production" + +want_apache + +# eblit-core +# Usage: <function> [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" + if [[ -e ${e} ]] ; then + . "${e}" + [[ ${eval_} == 1 ]] && eval "${func}() { eblit-run ${func} ${ver} ; }" + return 0 + fi + done + return 1 +} + +# eblit-include +# Usage: [--skip] <function> [version] +# Includes an "eblit" -- a chunk of common code among ebuilds in a given +# package so that its functions can be sourced and utilized within the +# ebuild. +eblit-include() { + local skipable=false r=0 + [[ $1 == "--skip" ]] && skipable=true && shift + [[ $1 == pkg_* ]] && skipable=true + + [[ -z $1 ]] && die "Usage: eblit-include <function> [version]" + eblit-core $1 $2 + r="$?" + ${skipable} && return 0 + [[ "$r" -gt "0" ]] && die "Could not locate requested eblit '$1' in ${FILESDIR}/eblits/" +} + +# eblit-run-maybe +# Usage: <function> +# Runs a function if it is defined in an eblit +eblit-run-maybe() { + [[ $(type -t "$@") == "function" ]] && "$@" +} + +# eblit-run +# Usage: <function> [version] +# Runs a function defined in an eblit +eblit-run() { + eblit-include --skip common "${*:2}" + eblit-include "$@" + eblit-run-maybe eblit-$1-pre + eblit-${PN}-$1 + eblit-run-maybe eblit-$1-post +} + +# eblit-pkg +# Usage: <phase> [version] +# Includes the given functions AND evals them so they're included in the binpkgs +eblit-pkg() { + [[ -z $1 ]] && die "Usage: eblit-pkg <phase> [version]" + eblit-core $1 $2 1 +} + +eblit-pkg pkg_setup v2 + +src_prepare() { eblit-run src_prepare v2 ; } +src_configure() { eblit-run src_configure v2 ; } +src_compile() { eblit-run src_compile v1 ; } +src_install() { eblit-run src_install v2 ; } +src_test() { eblit-run src_test v1 ; } +pkg_postinst() { eblit-run pkg_postinst v2 ; } |