commit: bbd39788128eeb5fe16a41f55c7da8ce5c0808e2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org> AuthorDate: Sun Dec 10 21:05:33 2017 +0000 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> CommitDate: Sun Dec 10 22:02:01 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbd39788
app-eselect/eselect-php: do not use get_libdir in php-fpm-launcher Closes: https://bugs.gentoo.org/640460 Package-Manager: Portage-2.3.17, Repoman-2.3.6 ...eselect-php-9999.ebuild => eselect-php-0.9.4-r3.ebuild} | 14 +++++--------- app-eselect/eselect-php/eselect-php-9999.ebuild | 3 ++- app-eselect/eselect-php/files/php-fpm-launcher-r3 | 11 +++++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild similarity index 82% copy from app-eselect/eselect-php/eselect-php-9999.ebuild copy to app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild index f695558d423..9d383514ec4 100644 --- a/app-eselect/eselect-php/eselect-php-9999.ebuild +++ b/app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild @@ -3,15 +3,15 @@ EAPI=6 -inherit systemd git-r3 autotools +inherit systemd DESCRIPTION="PHP eselect module" HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/" -EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/eselect-php.git" +SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" IUSE="fpm apache2" # The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir. @@ -19,11 +19,6 @@ RDEPEND="app-admin/eselect apache2? ( www-servers/apache[apache2_modules_dir] ) fpm? ( sys-apps/gentoo-functions )" -src_prepare() { - eapply_user - eautoreconf -} - src_configure(){ # We expect localstatedir to be "var"ish, not "var/lib"ish, because # that's what PHP upstream expects. See for example the FPM @@ -49,8 +44,9 @@ src_install() { if use fpm ; then systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf" + sed -e "s,@libdir@,$(get_libdir),g" "${FILESDIR}/php-fpm-launcher-r3" > "${T}"/php-fpm-launcher || die exeinto /usr/libexec - newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher + doexe "${T}"/php-fpm-launcher fi } diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-9999.ebuild index f695558d423..a8aa5bb8f4a 100644 --- a/app-eselect/eselect-php/eselect-php-9999.ebuild +++ b/app-eselect/eselect-php/eselect-php-9999.ebuild @@ -49,8 +49,9 @@ src_install() { if use fpm ; then systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf" + sed -e "s,@libdir@,$(get_libdir),g" "${FILESDIR}/php-fpm-launcher-r3" > "${T}"/php-fpm-launcher || die exeinto /usr/libexec - newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher + doexe "${T}"/php-fpm-launcher fi } diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r3 b/app-eselect/eselect-php/files/php-fpm-launcher-r3 new file mode 100644 index 00000000000..a2b6eabc4da --- /dev/null +++ b/app-eselect/eselect-php/files/php-fpm-launcher-r3 @@ -0,0 +1,11 @@ +#!/bin/sh + +# If there are no arguments, then "shift" will fail (bug 626496). +if [ $# -eq 0 ]; then + PHP_SLOT=$(eselect php show fpm) +else + PHP_SLOT=$1 + shift +fi + +exec "/usr/@libdir@/${PHP_SLOT}/bin/php-fpm" "${@}"
