summaryrefslogtreecommitdiffstats
path: root/dev-lang/php/files/eblits/src_compile-v1.eblit
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /dev-lang/php/files/eblits/src_compile-v1.eblit
downloaddarklin4-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_compile-v1.eblit')
-rw-r--r--dev-lang/php/files/eblits/src_compile-v1.eblit60
1 files changed, 60 insertions, 0 deletions
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
+}