From ca9627e70852f6b2e835660df870fe3ab405882d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 1 Sep 2019 00:00:32 +0200 Subject: Initial import --- dev-lang/php/files/eblits/src_compile-v1.eblit | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 dev-lang/php/files/eblits/src_compile-v1.eblit (limited to 'dev-lang/php/files/eblits/src_compile-v1.eblit') diff --git a/dev-lang/php/files/eblits/src_compile-v1.eblit b/dev-lang/php/files/eblits/src_compile-v1.eblit new file mode 100644 index 0000000..cb0d56c --- /dev/null +++ b/dev-lang/php/files/eblits/src_compile-v1.eblit @@ -0,0 +1,60 @@ +# 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_compile-v1.eblit,v 1.6 2010/08/14 19:37:31 mabi Exp $ + +eblit-php-src_compile() { + # snmp seems to run during src_compile, too (bug #324739) + addpredict /usr/share/snmp/mibs/.index + + SAPI_DIR="${WORKDIR}/sapis" + + for sapi in ${SAPIS} ; do + use "${sapi}" || continue + + php_sapi_build "${sapi}" + php_sapi_copy "${sapi}" + done +} + +php_sapi_build() { + mkdir -p "${SAPI_DIR}/$1" + + cd "${WORKDIR}/sapis-build/$1" + emake || die "emake failed" +} + +php_sapi_copy() { + local sapi="$1" + local source="" + + 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" + ;; + + apache2) + # apache2 is a special case; the necessary files + # (yes, multiple) are copied by make install, not + # by the ebuild; that's the reason, why apache2 has + # to be the last sapi + emake INSTALL_ROOT="${SAPI_DIR}/${sapi}/" install-sapi + ;; + + *) + die "unhandled sapi in php_sapi_copy" + ;; + esac + + if [[ "${source}" ]] ; then + cp "$source" "${SAPI_DIR}/$sapi" || die "Unable to copy ${sapi} SAPI" + fi +} -- cgit v1.2.3