diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
commit | ca9627e70852f6b2e835660df870fe3ab405882d (patch) | |
tree | 0a008b1d5b16fa0679a195ed7b5662c7891f591c /dev-lang/php/files/eblits/src_prepare-v3.eblit | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'dev-lang/php/files/eblits/src_prepare-v3.eblit')
-rw-r--r-- | dev-lang/php/files/eblits/src_prepare-v3.eblit | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/dev-lang/php/files/eblits/src_prepare-v3.eblit b/dev-lang/php/files/eblits/src_prepare-v3.eblit new file mode 100644 index 0000000..7e270f9 --- /dev/null +++ b/dev-lang/php/files/eblits/src_prepare-v3.eblit @@ -0,0 +1,73 @@ +# 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_prepare-v3.eblit,v 1.1 2011/03/13 09:48:06 olemarkus Exp $ + +eblit-php-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 + + # kolab support (support for imap annotations) + use kolab && epatch "${WORKDIR}/${PV}/opt/imap-kolab-annotations.patch" + + # Change PHP branding + sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1${PHP_EXTRA_BRANDING}-pl${PR/r/}-gentoo\2|g" \ + -i configure.in || die "Unable to change PHP branding" + + # Apply generic PHP patches + EPATCH_SOURCE="${WORKDIR}/${PV}/generic" EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + EPATCH_MULTI_MSG="Applying generic patches and fixes from upstream..." epatch + + # 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 + + # Suhosin support + if [[ -n $SUHOSIN_VERSION ]] ; then + if use suhosin ; then + epatch "${WORKDIR}/${SUHOSIN_PATCH}" + fi + else + ewarn "Please note that this version of PHP does not yet come with a suhosin patch" + fi + + #Add user patches #357637 + epatch_user + + # rebuild the whole autotools stuff as we are heavily patching it + # (suhosin, fastbuild, ...) + + # eaclocal doesn't accept --force, so we try to force re-generation + # this way + rm aclocal.m4 + + # work around divert() issues with newer autoconf, bug #281697 + if has_version '>=sys-devel/autoconf-2.64' ; then + sed -i -r \ + -e 's:^((m4_)?divert)[(]([0-9]*)[)]:\1(600\3):' \ + $(grep -l divert $(find . -name '*.m4') configure.in) || die + fi + eautoreconf --force -W no-cross +} + + |