app-eselect/eselect-python: s390 stable wrt bug #709778
[gentoo.git] / app-eselect / eselect-php / eselect-php-0.9.5.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit systemd
7
8 DESCRIPTION="PHP eselect module"
9 HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/"
10 SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
15 IUSE="fpm apache2"
16
17 # The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir.
18 RDEPEND="app-admin/eselect
19         apache2? ( www-servers/apache[apache2_modules_dir] )"
20
21 src_configure(){
22         # We expect localstatedir to be "var"ish, not "var/lib"ish, because
23         # that's what PHP upstream expects. See for example the FPM
24         # configuration where they put logs in @localstatedir@/log.
25         #
26         # The libdir is passed explicitly in case the /usr/lib symlink
27         # is not present (bug 624528).
28         econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
29                   --localstatedir="${EPREFIX}/var" \
30                   --with-piddir="${EPREFIX}/run" \
31                   $(use_enable apache2) \
32                   $(use_enable fpm)
33 }
34
35 src_install() {
36         default
37
38         if use fpm ; then
39                 systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf"
40                 sed -e "s,@libdir@,$(get_libdir),g" "${FILESDIR}/php-fpm-launcher-r3" > "${T}"/php-fpm-launcher || die
41                 exeinto /usr/libexec
42                 doexe "${T}"/php-fpm-launcher
43         fi
44 }