summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Markus With <olemarkus@gentoo.org>2013-04-06 10:45:51 +0000
committerOle Markus With <olemarkus@gentoo.org>2013-04-06 10:45:51 +0000
commit3f16ebfa106d36b22c72ae1d11b4f06e1565079f (patch)
treefb6434f7350efa585a3c3986e708b2e7a77e6de2 /dev-lang
parentDoes not actually use libpng (diff)
downloadhistorical-3f16ebfa106d36b22c72ae1d11b4f06e1565079f.tar.gz
historical-3f16ebfa106d36b22c72ae1d11b4f06e1565079f.tar.bz2
historical-3f16ebfa106d36b22c72ae1d11b4f06e1565079f.zip
Use pkg-config for iodbc dependencies. Bug 464300
Package-Manager: portage-2.1.11.55/cvs/Linux x86_64 Manifest-Sign-Key: 0xC4A92BF5
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/php/ChangeLog8
-rw-r--r--dev-lang/php/Manifest20
-rw-r--r--dev-lang/php/files/iodbc-pkgconfig.patch52
-rw-r--r--dev-lang/php/php-5.5.0_beta2-r4.ebuild772
4 files changed, 850 insertions, 2 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog
index e8537351bc92..7b14d2999b45 100644
--- a/dev-lang/php/ChangeLog
+++ b/dev-lang/php/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-lang/php
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.699 2013/04/02 19:10:34 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.700 2013/04/06 10:45:25 olemarkus Exp $
+
+*php-5.5.0_beta2-r4 (06 Apr 2013)
+
+ 06 Apr 2013; Ole Markus With <olemarkus@gentoo.org>
+ +files/iodbc-pkgconfig.patch, +php-5.5.0_beta2-r4.ebuild:
+ Use pkg-config for iodbc dependencies. Bug 464300
02 Apr 2013; Fabian Groffen <grobian@gentoo.org> php-5.4.13-r3.ebuild,
php-5.5.0_beta2-r3.ebuild:
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
index 9c11569418ed..70fa1630c62c 100644
--- a/dev-lang/php/Manifest
+++ b/dev-lang/php/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX 20php5-envd 145 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4 SHA512 581aa86479e3cd584ee1bc6dc6d4a135fe8ec343fe5519566d728d81f7018cfb23658bd0c0368951d380982c75adbb4f45acf3c146868aaf4e4ec8e9f2fad1ce WHIRLPOOL b9cfe0e80ba437bbc6008223c268bdafcde306ba8083dce96815804f3e1ec0937706e0db091149785a0076a6c6eaab8f7dff28578b706e84b4bb4e67850a4ecd
AUX 70_mod_php5.conf-apache2 348 SHA256 5bb8a45570582b4389a7d3feea0398e1c13ed4ced96e559b9406ed8c965dea8c SHA512 c74ec09c3c4124a15e14ece4bb769bb889466160cc0878ca3d55d5afc30fd4c05673c40428b75be669f72e82ba29f60ed19767caca77bba8adc12aae1c83f6f3 WHIRLPOOL fd503ec904a3853b90f8f4cc2042cf9014fdb1383a508d22e680559009b5b1e0beb5a09909a393e53868a64712c63e35642915787fa4176af07cb594adedb441
AUX all_mysql_socket_location-gentoo.patch 633 SHA256 d1c0fcea4509cdb7504701e5b1996661483c3b5eea194c07fdaef91a1ce18a27 SHA512 cc55b3c1cd2e9fe4d4aa887146de9306afbbc44a3bd652225982cc04b9aefa8ca094448a765f52bc36e49726034cc702d9ef41e6da518946813103920f5ccf4e WHIRLPOOL e06c83a8852fcb1387a38774e91377464086a4908aee379d7196bc9ce2a76c6850399266aa0390e8f9885f6812c1ea717c8d98a4eb9949c3d86db357f95c18ac
@@ -18,6 +21,7 @@ AUX eblits/src_prepare-v3.eblit 2649 SHA256 7ea3a5351fabeb050161e64c09b98ff945bb
AUX eblits/src_prepare-v4.eblit 2317 SHA256 7c18252a49a6d8e071471d14624f284d7b3ad8b95cad4a001e10e6e521f4c9b1 SHA512 e5c8200cd393266f9e608ebe680e74d539f897ab288303ba4b09963c09c3fdcdcd850443c7e76b0f9343f977fec148f448391e94ffb0e81fe46c69e7e9d7bca6 WHIRLPOOL 0246d02c8e1856acbae723ed53f8286921fed7b671ecf2fd7c712d7345ca6dcebfe79e09e83c77df06e4fa6dff0f3e25c92027f2bc9bed2c2b69018cbbcac987
AUX eblits/src_test-v1.eblit 1556 SHA256 c8459832955cdb3c35bcdc43dca5e20a1133012f955b75c8469003ca3f2c4d69 SHA512 58dd00322e2dd9bd9e8efb20e08fcaf22e45185c454b79faeb2b125dfe9a8548cc3842d0a6bf352103058fa8ede7487b1f5632da4caab7d817bd0eab335e4405 WHIRLPOOL b2370e7361379796e7d56949418cae78fce72ec169ec61d86cf1c60c70b03c6f650671ad7b4440558ec8a462086f83e05b4bc7e4be501b9ac738a2ed97565bd7
AUX fix-libstdc++-underlinking.patch 264 SHA256 c174fbe838373d3fad9536c621685426c71ccfea73371889f60d7bed07efc230 SHA512 3b91b6917c8d452cbeaf98c445b989f1e0d2c86a02598b5e6647625289868eaf51eee253db8909fb5faada3b588f22b3bfee44b679d6257bcc00c067a80938d6 WHIRLPOOL b7024c2f478e79967e81f938d36689c2cd968b3db2a05f9ce3a57721cd3727046b300d1b436e73cd0ae31393d3e572164743ffe139d36798f41a3e88e86c4239
+AUX iodbc-pkgconfig.patch 1820 SHA256 11c4e2f1d0c34bd5a7264fed11bb1786af0341e9756649d842ef90eadc815be8 SHA512 283c06aaa01aac76b71cd30bc5a1e882f14c02c63696c4a349a3338163a216e1adcc1149c9c5be8fbcb40554717406c8a9d6c5f8f8aa5c01a155b9993f280966 WHIRLPOOL 2057400bfeac10b115b5705eefb824e945305594ade2536c3d88c29b988a841bda29a4f0b41895df10e4696204c08327d4d2da33c6596a43ab798f83eabdcc95
AUX missing-openssl-include.patch 456 SHA256 40d7a7de8dfde9844c12a03f96c2b4c78b08b776505f94abdddb6f5c7617454c SHA512 e6c663e508772e403e540fc900f752f18d12eef35526154716728da0ba89a8eb48f12bbb7611c0672f22a1d0b6814365e90ecabb8b8e78411816b8b8889f03ea WHIRLPOOL 258448576333077c14ba5181ab4e6de2ecc75d4811aeac5fc2e71ba22e8f4644db43998c50db6423cda55c82039c1f6cf5ee16ef79b84bd4c3161b33776b9936
AUX php-fpm-r1.conf 12966 SHA256 c4308a92ade93812c6579b74a72cd1f3e1a35f7e63289722f461771d5702448c SHA512 3d421c1e8b8f6ecffbf8284a7f79a1e5cc3f0893b1a47f5ccd980d554b058c363c1e236aa3157c2b66791b3291c6e98981cc527d501328ccc3ccb34eee2950ef WHIRLPOOL 1f591597698e28fc47197e02ba680728363c50781d146cf2598403f4678781eabc4f4d2abe2c0bfe9a25065491d3cb514cc5a9dcee4edd9d9438f51181f43b2a
AUX php-fpm-r4.init 1157 SHA256 37e34461babfb5881169f9729fbdde7d4aba533f123e2c480fe25ac3b863d3e7 SHA512 3555a2210104185b93b3805400995ed987076429c47b0950f58396c535d7ea99a5d2e7eedde071e2de06f4e248e0cb9bd27ccbf01b5606152a2f559fe874afbe WHIRLPOOL 6f5f0e45004275c7c984e68c293282db23461a64965b7d7c4a0ded682140177989ed50217aea6253178cc18fa9f9d202a69383400dc1a53271f00e85884849a1
@@ -49,7 +53,21 @@ EBUILD php-5.5.0_beta1.ebuild 22966 SHA256 2a2478a40b970e50b9469e33b57e625e3bbdc
EBUILD php-5.5.0_beta2-r1.ebuild 21961 SHA256 04139fcdd280422f0d4a1df90a56703ee63d1e97366ccb6a45991e857a7aa6d3 SHA512 27aa8af707352d2c86f07a1495abc0d6841c97547b59436e6faceafe622f8844cfef49875b99073fa68f65f63ae8c1b7f1f99f29e251b029e1deed880aaae113 WHIRLPOOL e8d5c155adca4936d816646e509a4c073b82435478e10ee754a45cbda03429ee333b48e1010237890619851697c15b19f3df0dc3804d975c64f739840f628345
EBUILD php-5.5.0_beta2-r2.ebuild 21961 SHA256 56b1b8ed68d17f46ab18785c5a0017021b2dc6370a5a1c602621e23d9b5aa663 SHA512 8fed437ec1bf1ad649e81c4b1e121bd60a95881d86ea3374b20844bf36d5ecae8444b5c3e59eb77deb2e61196a2ac6ae5b796989c5f6d7bb7ba450cb1af02b28 WHIRLPOOL 7d2c816790251494b04a6d355622fd3097bfcd5e32c9c62a02079a63ec94c775e36816cc88c508053aa2cc724cfac8acefde6685938febfaa3aba35f129a47a1
EBUILD php-5.5.0_beta2-r3.ebuild 21902 SHA256 708fe7d3c903bfa3734f4c24ec55a96f18b92c2eaf87e532239e535f25ccc69d SHA512 99cfa5957073a27f4aab65731e8b1ff3f78095541ebc4a22daf8ecb257c0845e8094b37bd2350c45a453b0f99215fb9594b59b591c0589478d006fe03635d338 WHIRLPOOL 22d818954e876e983d3993b27af53a91c2addecd0b280e30cef9b138e4aee74d9d83541a1b77fe9cde2c8440771a8f913d0f82c6e9254c137c35605a35e71fd4
+EBUILD php-5.5.0_beta2-r4.ebuild 21963 SHA256 527045a865f2aeba1be79c7412412602ac6f4533e3214a929fb3a169e17bb321 SHA512 3364e27797722c0c693267bc336586a8ac27c9c904d880c23fce93bf85ce674e2dd10e1b136d11e20044b864eb6c0068aed87ff466e44c60598fcec9fee89582 WHIRLPOOL 397c74ba872dbd040243c3ab4910c3789c7158845071a3f64b5ab0e2ec5103fadb40686718f1fd06054eedeb4a3211c28080987f9c095ec270c14e340b84c6a7
EBUILD php-5.5.0_beta2.ebuild 22031 SHA256 76025fd7aabf8ecca12370cb42a275e20ee32d60762aa2b5c5aec1bd964a167b SHA512 2446aedf6285a11ecab6370b8af60dfcb65516a5e0366a041a5123230ed0367ac7f609a1f81cec887872a7fc1a37e32628c6ffed41d6d172897f1ef4e7fd5015 WHIRLPOOL 0f8578fbd4cc28bfa2e50b2fc46253c219cc80cdc1183ab53f2aae2f0466b13d16a76daad85e5c2122d19dcbf7e83c82b076406e3b1ece2110424e3fcf02926b
-MISC ChangeLog 6281 SHA256 579017e5fdbda5276250ac6668596d1f43bab21bb9ccf978a6f3f5f6082ef490 SHA512 dd2dd81842f5874b014b65fa6fb05783ad24c8d5c8e40c0fd5e6088190f7c3ae015449da563f059121cda28a7ee264141acfb72471daa7a5ff7bc40994e95fb3 WHIRLPOOL dc3396ad25e547d93de202c84a7f8c4be7c789a69d92d0ccc5e57e86fc6a2e6a4c6d76842c60a947725a17de0fd6922cb08e288f17134245245d35f0eeb29f4c
+MISC ChangeLog 6485 SHA256 6415cae36a60f641683e6c94cb8c0fa341aa1ea5aedfcd0aac31650c24dd2f7f SHA512 6ea1c95db82fec385b0f1b836dcbfbb811a643afa620c9ec29e62f2fb331604e5167796b78577cecbb89cff00917814cea0a9e0c047799470602d1e4edadd93c WHIRLPOOL b4cc95ec663da38e91ba700427695f49b1ed85de9e2f6fce2ae6da8da625ac6837dbb549de83871d66b5b7fe2856f9a0d80a68f1c8e01bc7bf73b8251dfd0cb2
MISC ChangeLog-2012 108488 SHA256 c2eea36502d34eadc7995d546f78aaa553ba07beeb51ea738715ad7f2e51b08d SHA512 eb25224993eff1ea42ea133302991a3ffad3adda0bc524cfa4fae49574230a8e65b35b08750d780c11cc9c152435fadbf2c416241fac28dcbb025e060e96cd7a WHIRLPOOL 82f627853fa961f3f3707fb2c8757acbc8fc644e89121d78703b40ff0f668aa7d0f1aa26c77f8f503e4f6da22ed865e4cb7c02d5d112c89488b12aa6b0d80568
MISC metadata.xml 1600 SHA256 f69cee357d251547d4e97cbb562ad6ab6b78383b4bcd8e183523b29a63c2f214 SHA512 2c7f74d61e6b9e86f9ece5981a26868316c4dc0ad759cc4eeacece9e33854d33d6265b4ee2d00e2e36baad6ec09ee916114f3dde6ded9cc9e45bef0c560e335b WHIRLPOOL dc007ba84a95d047f01d789302246033363bc412ebbdb75fe50e67088e91356c0c8cee76f2da59f771bbf99ad3f0113860852c82ac0ae5ad1c2a21a380e3ae0b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQF8BAEBCABmBQJRX/zJXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyOEZEMjNGNzBENkE5N0Q2Q0ZFMkFDNDA2
+QkFCNEFFNUM0QTkyQkY1AAoJEGurSuXEqSv1Ro8IAKmA5N5KW7mgrkO6W2YDdVhN
+1+m8JvhyINMeXzk9enCE+xODbPvVh9L9Br5VJgOty84+SKVAV/sobxaufbAqGE7f
+1VTwta6Wk7fHJhtn5HRAo0ziYwFKoVbS623qPVrYnFKdvu1lx/CV+L5Sj8a1G6Zv
+kL+LH7/w3zGt62lCQmWdu/XfvixSJUdm7phlEFX9/hY8RPwqAY4hMXKVkKi7i3a7
+oeQOgL3gE5dvgIee2IbuWqMF4xIMr8ZYah1qY9bxobMqMaN/vJ+0WE4eNzecyEjf
+TBWxNyTGYJRK0XTx7aeFvNGBdRUbwotdIKu8yHirYvnFdqFcrjHCYbBvD+puv98=
+=0p0Z
+-----END PGP SIGNATURE-----
diff --git a/dev-lang/php/files/iodbc-pkgconfig.patch b/dev-lang/php/files/iodbc-pkgconfig.patch
new file mode 100644
index 000000000000..f32f8eb7ef14
--- /dev/null
+++ b/dev-lang/php/files/iodbc-pkgconfig.patch
@@ -0,0 +1,52 @@
+--- ext/odbc/config.m4.old 2013-04-06 11:26:04.047017826 +0200
++++ ext/odbc/config.m4 2013-04-06 12:29:47.180617161 +0200
+@@ -366,22 +366,37 @@
+
+ if test -z "$ODBC_TYPE"; then
+ PHP_ARG_WITH(iodbc,,
+-[ --with-iodbc[=DIR] Include iODBC support [/usr/local]])
++[ --with-iodbc[=DIR] Include iODBC support])
+
+ if test "$PHP_IODBC" != "no"; then
+ AC_MSG_CHECKING(for iODBC support)
+- if test "$PHP_IODBC" = "yes"; then
+- PHP_IODBC=/usr/local
++ if test -z "$PKG_CONFIG"; then
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ fi
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libiodbc ; then
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
++ ODBC_TYPE=iodbc
++ ODBC_INCLUDE=`$PKG_CONFIG --cflags-only-I libiodbc`
++ ODBC_LFLAGS=`$PKG_CONFIG --libs-only-L libiodbc`
++ ODBC_LIBS=`$PKG_CONFIG --libs-only-l libiodbc`
++ PHP_EVAL_INCLINE($ODBC_INCLUDE)
++ AC_DEFINE(HAVE_IODBC,1,[ ])
++ AC_DEFINE(HAVE_ODBC2,1,[ ])
++ AC_MSG_RESULT([$ext_output])
++ else
++ if test "$PHP_IODBC" = "yes"; then
++ PHP_IODBC=/usr/local
++ fi
++ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
++ PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
++ ODBC_TYPE=iodbc
++ ODBC_INCLUDE=-I$PHP_IODBC/include
++ ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
++ ODBC_LIBS=-liodbc
++ AC_DEFINE(HAVE_IODBC,1,[ ])
++ AC_DEFINE(HAVE_ODBC2,1,[ ])
++ AC_MSG_RESULT([$ext_output])
+ fi
+- PHP_ADD_LIBRARY_WITH_PATH(iodbc, $PHP_IODBC/$PHP_LIBDIR)
+- PHP_ADD_INCLUDE($PHP_IODBC/include, 1)
+- ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$PHP_IODBC/include
+- ODBC_LFLAGS=-L$PHP_IODBC/$PHP_LIBDIR
+- ODBC_LIBS=-liodbc
+- AC_DEFINE(HAVE_IODBC,1,[ ])
+- AC_DEFINE(HAVE_ODBC2,1,[ ])
+- AC_MSG_RESULT([$ext_output])
+ fi
+ fi
+
diff --git a/dev-lang/php/php-5.5.0_beta2-r4.ebuild b/dev-lang/php/php-5.5.0_beta2-r4.ebuild
new file mode 100644
index 000000000000..20486213218b
--- /dev/null
+++ b/dev-lang/php/php-5.5.0_beta2-r4.ebuild
@@ -0,0 +1,772 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.5.0_beta2-r4.ebuild,v 1.1 2013/04/06 10:45:25 olemarkus Exp $
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module db-use libtool
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+function php_get_uri ()
+{
+ case "${1}" in
+ "php-pre")
+ echo "http://downloads.php.net/dsp/${2}"
+ ;;
+ "php")
+ echo "http://www.php.net/distributions/${2}"
+ ;;
+ "olemarkus")
+ echo "http://dev.gentoo.org/~olemarkus/php/${2}"
+ ;;
+ "gentoo")
+ echo "mirror://gentoo/${2}"
+ ;;
+ *)
+ die "unhandled case in php_get_uri"
+ ;;
+ esac
+}
+
+PHP_MV="$(get_major_version)"
+SLOT="$(get_version_component_range 1-2)"
+
+# 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_PV="${PHP_PV/_alpha/alpha}"
+PHP_PV="${PHP_PV/_beta/beta}"
+PHP_RELEASE="php"
+[[ ${PV} == ${PV/_alpha/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_beta/} ]] || PHP_RELEASE="php-pre"
+[[ ${PV} == ${PV/_rc/} ]] || PHP_RELEASE="php-pre"
+PHP_P="${PN}-${PHP_PV}"
+
+PHP_SRC_URI="$(php_get_uri "${PHP_RELEASE}" "${PHP_P}.tar.bz2")"
+
+PHP_FPM_CONF_VER="1"
+
+SRC_URI="${PHP_SRC_URI}"
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI, FPM/FastCGI, Apache2 and embed SAPIs."
+HOMEPAGE="http://php.net/"
+LICENSE="PHP-3"
+
+S="${WORKDIR}/${PHP_P}"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
+ crypt +ctype curl curlwrappers debug
+ enchant exif frontbase +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
+ mssql mysql libmysqlclient mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets spell sqlite ssl
+ sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
+
+DEPEND="
+ >=app-admin/eselect-php-0.7.0[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ apache2? ( www-servers/apache[threads=] )
+ berkdb? ( =sys-libs/db-4* )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( >=dev-libs/gmp-4.1.2 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ libmysqlclient? (
+ 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 )
+ 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 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.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? (
+ virtual/jpeg media-libs/libpng:0= 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
+ virtual/jpeg
+ media-libs/libpng:0= 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}"
+
+REQUIRED_USE="
+ truetype? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xsl? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysql !mysqli )
+ sharedmem? ( !threads )
+
+ !cli? ( !cgi? ( !fpm? ( !apache2? ( !embed? ( cli ) ) ) ) )"
+
+RDEPEND="${DEPEND}"
+
+RDEPEND="${RDEPEND} fpm? ( selinux? ( sec-policy/selinux-phpfpm ) )"
+
+DEPEND="${DEPEND}
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Allow users to install production version if they want to
+
+case "${PHP_INI_VERSION}" in
+ production|development)
+ ;;
+ *)
+ PHP_INI_VERSION="development"
+ ;;
+esac
+
+PHP_INI_UPSTREAM="php.ini-${PHP_INI_VERSION}"
+PHP_INI_FILE="php.ini"
+
+want_apache
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+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 /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/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 = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}"
+
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" "${PHP_INI_FILE}"
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use_if_iuse opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+
+ if [[ "${sapi}" == "fpm" ]] ; then
+ [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
+ einfo "Installing FPM CGI config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${ED}/etc/php-fpm.conf.default" ]] && rm "${ED}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+
+ dodoc php.ini-development
+ dodoc php.ini-production
+
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+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
+
+ # Change PHP branding
+ # Get the alpha/beta/rc version
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+
+ epatch "${FILESDIR}"/iodbc-pkgconfig.patch
+ epatch "${FILESDIR}"/stricter-libc-client-symlink-check.patch
+ epatch "${FILESDIR}"/all_strict_aliasing.patch
+
+ # 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
+
+ #Add user patches #357637
+ epatch_user
+
+ #force rebuilding aclocal.m4
+ rm aclocal.m4
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/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)"
+
+ # extension USE flag shared
+ my_conf+="
+ $(use_enable bcmath bcmath )
+ $(use_with bzip2 bz2 "${EPREFIX}"/usr)
+ $(use_enable calendar calendar )
+ $(use_enable ctype ctype )
+ $(use_with curl curl "${EPREFIX}"/usr)
+ $(use_with curlwrappers curlwrappers "${EPREFIX}"/usr)
+ $(use_enable xml dom )
+ $(use_with enchant enchant "${EPREFIX}"/usr)
+ $(use_enable exif exif )
+ $(use_enable fileinfo fileinfo )
+ $(use_enable filter filter )
+ $(use_enable ftp ftp )
+ $(use_with nls gettext "${EPREFIX}"/usr)
+ $(use_with gmp gmp "${EPREFIX}"/usr)
+ $(use_enable hash hash )
+ $(use_with mhash mhash "${EPREFIX}"/usr)
+ $(use_with iconv iconv $(use elibc_glibc || echo "${EPREFIX}"/usr))
+ $(use_enable intl intl )
+ $(use_enable ipv6 ipv6 )
+ $(use_enable json json )
+ $(use_with kerberos kerberos "${EPREFIX}"/usr)
+ $(use_enable xml libxml )
+ $(use_with xml libxml-dir "${EPREFIX}"/usr)
+ $(use_enable unicode mbstring )
+ $(use_with crypt mcrypt "${EPREFIX}"/usr)
+ $(use_with mssql mssql "${EPREFIX}"/usr)
+ $(use_with unicode onig "${EPREFIX}"/usr)
+ $(use_with ssl openssl "${EPREFIX}"/usr)
+ $(use_with ssl openssl-dir "${EPREFIX}"/usr)
+ $(use_enable pcntl pcntl )
+ $(use_enable phar phar )
+ $(use_enable pdo pdo )
+ $(use_enable opcache opcache )
+ $(use_with postgres pgsql "${EPREFIX}"/usr)
+ $(use_enable posix posix )
+ $(use_with spell pspell "${EPREFIX}"/usr)
+ $(use_with recode recode "${EPREFIX}"/usr)
+ $(use_enable simplexml simplexml )
+ $(use_enable sharedmem shmop )
+ $(use_with snmp snmp "${EPREFIX}"/usr)
+ $(use_enable soap soap )
+ $(use_enable sockets sockets )
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr)
+ $(use_with sybase-ct sybase-ct "${EPREFIX}"/usr)
+ $(use_enable sysvipc sysvmsg )
+ $(use_enable sysvipc sysvsem )
+ $(use_enable sysvipc sysvshm )
+ $(use_with tidy tidy "${EPREFIX}"/usr)
+ $(use_enable tokenizer tokenizer )
+ $(use_enable wddx wddx )
+ $(use_enable xml xml )
+ $(use_enable xmlreader xmlreader )
+ $(use_enable xmlwriter xmlwriter )
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xsl xsl "${EPREFIX}"/usr)
+ $(use_enable zip zip )
+ $(use_with zlib zlib "${EPREFIX}"/usr)
+ $(use_enable debug debug )"
+
+ # 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
+ my_conf+="
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 ${EPREFIX}/usr)
+ $(use_enable flatfile flatfile )
+ $(use_with gdbm gdbm ${EPREFIX}/usr)
+ $(use_enable inifile inifile )
+ $(use_with qdbm qdbm ${EPREFIX}/usr)"
+
+ # Support for the GD graphics library
+ my_conf+="
+ $(use_with truetype freetype-dir ${EPREFIX}/usr)
+ $(use_with truetype t1lib ${EPREFIX}/usr)
+ $(use_enable cjk gd-jis-conv )
+ $(use_with gd jpeg-dir ${EPREFIX}/usr)
+ $(use_with gd png-dir ${EPREFIX}/usr)
+ $(use_with xpm xpm-dir ${EPREFIX}/usr)"
+ # enable gd last, so configure can pick up the previous settings
+ my_conf+="
+ $(use_with gd gd)"
+
+ # IMAP support
+ if use imap ; then
+ my_conf+="
+ $(use_with imap imap ${EPREFIX}/usr)
+ $(use_with ssl imap-ssl ${EPREFIX}/usr)"
+ fi
+
+ # Interbase/firebird support
+
+ if use firebird ; then
+ my_conf+="
+ $(use_with firebird interbase ${EPREFIX}/usr)"
+ fi
+
+ # LDAP support
+ if use ldap ; then
+ my_conf+="
+ $(use_with ldap ldap ${EPREFIX}/usr)
+ $(use_with ldap-sasl ldap-sasl ${EPREFIX}/usr)"
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+ use libmysqlclient && mysqllib="${EPREFIX}/usr"
+ use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
+
+ my_conf+=" $(use_with mysql mysql $mysqllib)"
+ my_conf+=" $(use_with mysqli mysqli $mysqlilib)"
+
+ local mysqlsock=" $(use_with mysql mysql-sock ${EPREFIX}/var/run/mysqld/mysqld.sock)"
+ if use mysql ; then
+ my_conf+="${mysqlsock}"
+ elif use mysqli ; then
+ my_conf+="${mysqlsock}"
+ fi
+
+ # ODBC support
+ if use odbc ; then
+ my_conf+="
+ $(use_with odbc unixODBC ${EPREFIX}/usr)"
+ fi
+
+ if use iodbc ; then
+ my_conf+="
+ $(use_with iodbc iodbc ${EPREFIX}/usr)"
+ fi
+
+ # Oracle support
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client oci8)"
+ fi
+
+ # PDO support
+ if use pdo ; then
+ my_conf+="
+ $(use_with mssql pdo-dblib )
+ $(use_with mysql pdo-mysql ${mysqllib})
+ $(use_with postgres pdo-pgsql )
+ $(use_with sqlite pdo-sqlite ${EPREFIX}/usr)
+ $(use_with odbc pdo-odbc unixODBC,${EPREFIX}/usr)"
+ if use oci8-instant-client ; then
+ my_conf+="
+ $(use_with oci8-instant-client pdo-oci)"
+ fi
+ fi
+
+ # readline/libedit support
+ my_conf+="
+ $(use_with readline readline ${EPREFIX}/usr)
+ $(use_with libedit libedit ${EPREFIX}/usr)"
+
+ # Session support
+ if use session ; then
+ my_conf+="
+ $(use_with sharedmem mm ${EPREFIX}/usr)"
+ else
+ my_conf+="
+ $(use_enable session session )"
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ my_conf="${my_conf} --with-pic"
+
+ # 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=${EPREFIX}/usr --with-pcre-dir=${EPREFIX}/usr"
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # 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=${EPREFIX}/usr/sbin/apxs"
+ else
+ sapi_conf="${sapi_conf} --without-apxs2"
+ fi
+ ;;
+ esac
+ done
+
+ econf ${sapi_conf}
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake || die "emake failed"
+ fi
+ done
+}
+
+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#${EPREFIX}}/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="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # 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}"
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp5$(get_libname)" "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+ fi
+ 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
+
+ # Installing opcache module
+ if use_if_iuse opcache ; then
+ dolib.so "modules/opcache$(get_libname)" || die "Unable to install opcache module"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" \
+ "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+ "${ED}/etc/env.d/20php${SLOT}"
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+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
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT}
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ elog "Make sure that PHP_TARGETS in ${EPREFIX}/etc/make.conf includes php${SLOT/./-} in order"
+ elog "to compile extensions for the ${SLOT} ABI"
+ elog
+ 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
+ elog
+ elog "This ebuild installed a version of php.ini based on php.ini-${PHP_INI_VERSION} version."
+ elog "You can chose which version of php.ini to install by default by setting PHP_INI_VERSION to either"
+ elog "'production' or 'development' in ${EPREFIX}/etc/make.conf"
+ elog "Both versions of php.ini can be found in ${EPREFIX}/usr/share/doc/${PF}"
+
+ elog
+ elog "For more details on how minor version slotting works (PHP_TARGETS) please read the upgrade guide:"
+ elog "http://www.gentoo.org/proj/en/php/php-upgrading.xml"
+ elog
+}
+
+pkg_prerm() {
+ eselect php cleanup
+}