summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Markus With <olemarkus@gentoo.org>2011-06-30 07:30:11 +0000
committerOle Markus With <olemarkus@gentoo.org>2011-06-30 07:30:11 +0000
commit0d474ec40259d79ebc55d735e3cdb1af6bde9ebc (patch)
tree1a458f2864a5fde118bbad5dfaf27171296002a7 /dev-lang
parentFix website and description. Bug #373147. Thanks to Ben Sagal <bensagal@gmail... (diff)
downloadgentoo-2-0d474ec40259d79ebc55d735e3cdb1af6bde9ebc.tar.gz
gentoo-2-0d474ec40259d79ebc55d735e3cdb1af6bde9ebc.tar.bz2
gentoo-2-0d474ec40259d79ebc55d735e3cdb1af6bde9ebc.zip
Removed support for sqlite and sharedext in php 5.4. Also removed reference to birdstep
(Portage version: 2.1.10.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/php/files/eblits/src_configure-v3.eblit10
-rw-r--r--dev-lang/php/files/eblits/src_install-v3.eblit148
-rw-r--r--dev-lang/php/php-5.4.0_alpha1.ebuild10
3 files changed, 153 insertions, 15 deletions
diff --git a/dev-lang/php/files/eblits/src_configure-v3.eblit b/dev-lang/php/files/eblits/src_configure-v3.eblit
index e212e2ffac10..401a24a60bbd 100644
--- a/dev-lang/php/files/eblits/src_configure-v3.eblit
+++ b/dev-lang/php/files/eblits/src_configure-v3.eblit
@@ -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/files/eblits/src_configure-v3.eblit,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit,v 1.2 2011/06/30 07:30:11 olemarkus Exp $
eblit-php-src_configure() {
PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
@@ -183,14 +183,6 @@ eblit-php-src_configure() {
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
diff --git a/dev-lang/php/files/eblits/src_install-v3.eblit b/dev-lang/php/files/eblits/src_install-v3.eblit
new file mode 100644
index 000000000000..6ac274ff69c5
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_install-v3.eblit
@@ -0,0 +1,148 @@
+# Copyright 1999-2011 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-v3.eblit,v 1.1 2011/06/30 07:30:11 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)"
+
+ # 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/*\/}"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ 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 allow_url_open=Off, bug 332763
+ sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i "${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}"
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE}"
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "apache2" ]] ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ 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"
+ insinto ${PHP_INI_DIR}
+ doins "${FILESDIR}/php-fpm.conf"
+ dodir "/etc/init.d"
+ insinto "/etc/init.d"
+ newinitd "${FILESDIR}/php-fpm-r3.init" "php-fpm"
+ #dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm"
+
+ # Remove bogus /etc/php-fpm.conf.default (bug 359906)
+ [[ -f "${D}/etc/php-fpm.conf.default" ]] && rm "${D}/etc/php-fpm.conf.default"
+ fi
+
+ # Install PHP ini files into /usr/share/php
+ if [[ ${SLOT} == '5.2' ]]; then
+ newdoc php.ini-dist php.ini-development
+ newdoc php.ini-recommended php.ini-production
+ fi
+
+ if [[ ${SLOT} == '5.3' ]]; then
+ dodoc php.ini-development
+ dodoc php.ini-production
+ fi
+
+}
diff --git a/dev-lang/php/php-5.4.0_alpha1.ebuild b/dev-lang/php/php-5.4.0_alpha1.ebuild
index ffd85c48dbec..0f7e318ff440 100644
--- a/dev-lang/php/php-5.4.0_alpha1.ebuild
+++ b/dev-lang/php/php-5.4.0_alpha1.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/php-5.4.0_alpha1.ebuild,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.4.0_alpha1.ebuild,v 1.2 2011/06/30 07:30:11 olemarkus Exp $
EAPI=4
@@ -103,8 +103,8 @@ IUSE="${IUSE} bcmath berkdb bzip2 calendar cdb cjk
intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit mhash
mssql mysql mysqlnd mysqli nls
oci8-instant-client odbc pcntl pdo +phar pic +posix postgres qdbm
- readline recode +session sharedext sharedmem
- +simplexml snmp soap sockets spell sqlite sqlite3 ssl
+ readline recode +session sharedmem
+ +simplexml snmp soap sockets spell sqlite3 ssl
sybase-ct sysvipc tidy +tokenizer truetype unicode wddx
xml xmlreader xmlwriter xmlrpc xpm xsl zip zlib"
@@ -116,7 +116,6 @@ DEPEND="!dev-lang/php:5
>=dev-libs/libpcre-8.12[unicode]
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? (
@@ -162,7 +161,6 @@ DEPEND="!dev-lang/php:5
snmp? ( >=net-analyzer/net-snmp-5.2 )
soap? ( >=dev-libs/libxml2-2.6.8 )
spell? ( >=app-text/aspell-0.50 )
- sqlite? ( =dev-db/sqlite-2* pdo? ( >=dev-db/sqlite-3.7.6.3 ) )
sqlite3? ( >=dev-db/sqlite-3.7.6.3 )
ssl? ( >=dev-libs/openssl-0.9.7 )
sybase-ct? ( dev-db/freetds )
@@ -325,6 +323,6 @@ eblit-pkg pkg_setup v2
src_prepare() { eblit-run src_prepare v4 ; }
src_configure() { eblit-run src_configure v3 ; }
src_compile() { eblit-run src_compile v1 ; }
-src_install() { eblit-run src_install v2 ; }
+src_install() { eblit-run src_install v3 ; }
src_test() { eblit-run src_test v1 ; }
pkg_postinst() { eblit-run pkg_postinst v2 ; }