summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/files/eblits/src_install.patch')
-rw-r--r--dev-lang/php/files/eblits/src_install.patch138
1 files changed, 138 insertions, 0 deletions
diff --git a/dev-lang/php/files/eblits/src_install.patch b/dev-lang/php/files/eblits/src_install.patch
new file mode 100644
index 0000000..400de12
--- /dev/null
+++ b/dev-lang/php/files/eblits/src_install.patch
@@ -0,0 +1,138 @@
+--- src_install-v3.eblit 2012-05-05 11:20:31.000000000 +0900
++++ /gentoo/usr/portage/dev-lang/php/files/eblits/src_install-v3.eblit 2012-05-05 12:29:49.927983645 +0900
+@@ -1,4 +1,4 @@
+-# Copyright 1999-2011 Gentoo Foundation
++# 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-v3.eblit,v 1.5 2011/11/08 18:14:08 olemarkus Exp $
+
+@@ -16,7 +16,7 @@ eblit-php-src_install() {
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+- dodir "${PHP_DESTDIR}/bin"
++ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi"
+@@ -24,7 +24,7 @@ eblit-php-src_install() {
+ install-build install-headers install-programs \
+ || die "emake install failed"
+
+- local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)"
++ 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}
+@@ -41,7 +41,7 @@ eblit-php-src_install() {
+ # 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"
++ 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
+@@ -57,14 +57,14 @@ eblit-php-src_install() {
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+- source="libs/libphp${PHP_MV}.so"
++ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+- if [[ "${source: -3}" == ".so" ]]; then
++ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}" || die "Unable to install ${sapi} sapi"
+ else
+ dobin "${source}" || die "Unable to install ${sapi} sapi"
+@@ -84,16 +84,17 @@ eblit-php-src_install() {
+ done
+
+ # Install env.d files
+- newenvd "${FILESDIR}/20php5-envd" \
++ newenvd "${FILESDIR}/20php${PHP_MV}-envd" \
+ "20php${SLOT}"
++ eprefixify "${ED}/etc/env.d/20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i \
+- "${D}/etc/env.d/20php${SLOT}"
++ "${ED}/etc/env.d/20php${SLOT}"
+ sed -e "s|php5|php${SLOT}|g" -i \
+- "${D}/etc/env.d/20php${SLOT}"
++ "${ED}/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"
++ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
+ }
+
+ php_install_ini() {
+@@ -106,47 +107,44 @@ php_install_ini() {
+ cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
+
+ # default to /tmp for save_path, bug #282768
+- sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}"
++ 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 = ".:/usr/share/php'${PHP_MV}':/usr/share/php"|' -i "${phpinisrc}"
+-
+- dodir "${PHP_INI_DIR}"
+- insinto "${PHP_INI_DIR}"
++ 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}"
++ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+- dodir "${PHP_EXT_INI_DIR}"
+- dodir "${PHP_EXT_INI_DIR_ACTIVE}"
++ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
++ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ # 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"
++ insinto "${APACHE_MODULES_CONFDIR#${EPREFIX}}"
++ newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
++ "70_mod_php${PHP_MV}.conf"
+ 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
++ [[ -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}
++ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf
+ dodir "/etc/init.d"
+ insinto "/etc/init.d"
+ newinitd "${FILESDIR}/php-fpm-r${PHP_FPM_INIT_VER}.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"
++ # dosym "${PHP_DESTDIR#${EPREFIX}}/bin/php-fpm" "/usr/bin/php-fpm"
+ fi
+
+- # Install PHP ini files into /usr/share/php
++ # 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