summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/files/eblits/src_install-v3.eblit')
-rw-r--r--dev-lang/php/files/eblits/src_install-v3.eblit62
1 files changed, 25 insertions, 37 deletions
diff --git a/dev-lang/php/files/eblits/src_install-v3.eblit b/dev-lang/php/files/eblits/src_install-v3.eblit
index 4c3ba24..6ac274f 100644
--- a/dev-lang/php/files/eblits/src_install-v3.eblit
+++ b/dev-lang/php/files/eblits/src_install-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_install-v3.eblit,v 1.5 2011/11/08 18:14:08 olemarkus Exp $
+# $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
@@ -26,6 +26,9 @@ eblit-php-src_install() {
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}
@@ -36,39 +39,20 @@ eblit-php-src_install() {
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}/apache2/"
- newins ".libs/libphp5.so" "libphp${PHP_MV}.so"
- keepdir "/usr/$(get_libdir)/apache2/modules"
- else
- # needed each time, php_install_ini would reset it
- into "${PHP_DESTDIR}"
- 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}.so"
- ;;
- *)
- die "unhandled sapi in src_install"
- ;;
- esac
-
- if [[ "${source: -3}" == ".so" ]]; then
- dolib.so "${source}" || die "Unable to install ${sapi} 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
- dobin "${source}" || die "Unable to install ${sapi} sapi"
+ dolib.so "${file}" || die "Unable to install ${sapi} sapi"
fi
+ else
+ dobin "${file}" || die "Unable to install ${sapi} sapi"
fi
php_install_ini "${sapi}"
@@ -76,7 +60,7 @@ eblit-php-src_install() {
# 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"
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
else
sapi_list="${sapi_list:+${sapi_list} }${sapi}"
fi
@@ -105,6 +89,12 @@ php_install_ini() {
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}"
@@ -132,14 +122,12 @@ php_install_ini() {
fi
if [[ "${sapi}" == "fpm" ]] ; then
- [[ -z ${PHP_FPM_INIT_VER} ]] && PHP_FPM_INIT_VER=3
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0
einfo "Installing FPM CGI config file php-fpm.conf"
insinto ${PHP_INI_DIR}
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+ doins "${FILESDIR}/php-fpm.conf"
dodir "/etc/init.d"
insinto "/etc/init.d"
- newinitd "${FILESDIR}/php-fpm-r${PHP_FPM_INIT_VER}.init" "php-fpm"
+ 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)