summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/php-5.2.17.ebuild')
-rw-r--r--dev-lang/php/php-5.2.17.ebuild96
1 files changed, 72 insertions, 24 deletions
diff --git a/dev-lang/php/php-5.2.17.ebuild b/dev-lang/php/php-5.2.17.ebuild
index 77d5796..28ce3b4 100644
--- a/dev-lang/php/php-5.2.17.ebuild
+++ b/dev-lang/php/php-5.2.17.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.17.ebuild,v 1.1 2011/01/06 23:35:43 mabi Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/Attic/php-5.2.17.ebuild,v 1.17 2011/12/14 22:48:49 mabi Exp $
EAPI=2
@@ -13,7 +13,7 @@ inherit eutils autotools flag-o-matic versionator depend.apache apache-module db
SUHOSIN_VERSION="5.2.16-0.9.7"
EXPECTED_TEST_FAILURES=""
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc64 ~x86"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
function php_get_uri ()
{
@@ -91,12 +91,12 @@ IUSE="${IUSE} adabas bcmath berkdb birdstep bzip2 calendar cdb cjk
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
+ 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"
+ xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
# Enable suhosin if available
[[ -n $SUHOSIN_VERSION ]] && IUSE="${IUSE} suhosin"
@@ -110,7 +110,7 @@ DEPEND=">=app-admin/eselect-php-0.6.2
bzip2? ( app-arch/bzip2 )
cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
cjk? ( !gd? ( !gd-external? (
- >=media-libs/jpeg-6b
+ virtual/jpeg
media-libs/libpng
sys-libs/zlib
) ) )
@@ -122,18 +122,18 @@ DEPEND=">=app-admin/eselect-php-0.6.2
empress-bcs? ( >=dev-db/unixODBC-1.8.13 )
esoob? ( >=dev-db/unixODBC-1.8.13 )
exif? ( !gd? ( !gd-external? (
- >=media-libs/jpeg-6b
+ virtual/jpeg
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? ( virtual/jpeg 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 )
+ imap? ( virtual/imap-c-client[ssl=] )
iodbc? ( dev-db/libiodbc )
kerberos? ( virtual/krb5 )
kolab? ( >=net-libs/c-client-2004g-r1 )
@@ -167,7 +167,7 @@ DEPEND=">=app-admin/eselect-php-0.6.2
=media-libs/freetype-2*
>=media-libs/t1lib-5.0.0
!gd? ( !gd-external? (
- >=media-libs/jpeg-6b media-libs/libpng sys-libs/zlib ) )
+ virtual/jpeg media-libs/libpng sys-libs/zlib ) )
)
wddx? ( >=dev-libs/libxml2-2.6.8 )
xml? ( >=dev-libs/libxml2-2.6.8 )
@@ -176,7 +176,7 @@ DEPEND=">=app-admin/eselect-php-0.6.2
xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
xpm? (
x11-libs/libXpm
- >=media-libs/jpeg-6b
+ virtual/jpeg
media-libs/libpng sys-libs/zlib
)
xsl? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
@@ -228,7 +228,7 @@ RDEPEND="${DEPEND}
json? ( !dev-php${PHP_MV}/pecl-json )
zip? ( !dev-php${PHP_MV}/pecl-zip )"
-[[ -n $SUHOSIN_VERSION ]] && DEPEND="${DEPEND} suhosin? ( $php[unicode] )"
+[[ -n $SUHOSIN_VERSION ]] && RDEPEND="${RDEPEND} suhosin? ( $php[unicode] )"
DEPEND="${DEPEND}
sys-devel/flex
@@ -236,17 +236,7 @@ DEPEND="${DEPEND}
>=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 )"
-
-[[ -n $SUHOSIN_VERSION ]] && PDEPEND="${PDEPEND} 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"
+PDEPEND="doc? ( app-doc/php-docs )"
SLOT="$(get_version_component_range 1-2)"
S="${WORKDIR}/${PHP_P}"
@@ -316,7 +306,7 @@ eblit-run-maybe() {
# Usage: <function> [version]
# Runs a function defined in an eblit
eblit-run() {
- eblit-include --skip common "${*:2}"
+ eblit-include --skip common "v2"
eblit-include "$@"
eblit-run-maybe eblit-$1-pre
eblit-${PN}-$1
@@ -338,4 +328,62 @@ 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 ; }
+
+#Do not use eblit for this because it will not get sourced when installing from
+#binary package (bug #380845)
+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 /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 /etc/make.conf"
+ ewarn "Both versions of php.ini can be found in /usr/share/doc/${PF}"
+
+ # check for not yet migrated old style config dirs
+ ls "${ROOT}"/etc/php/*-php5 &>/dev/null
+ if [[ $? -eq 0 ]]; then
+ ewarn "Make sure to migrate your config files, starting with php-5.3.4 and php-5.2.16 config"
+ ewarn "files are now kept at ${ROOT}etc/php/{apache2,cli,cgi,fpm}-php5.x"
+ fi
+ 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
+
+ if ( [[ -z SUHOSIN_VERSION ]] && use suhosin && version_is_at_least 5.3.6_rc1 ) ; then
+ ewarn "The suhosin USE flag now only installs the suhosin patch!"
+ ewarn "If you want the suhosin extension, make sure you install"
+ ewarn " dev-php/suhosin"
+ ewarn
+ fi
+}