From 1da1f7fe7ebc3a02ada674c2a65900ed076ae0a6 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Sun, 1 Mar 2020 21:50:12 -0500 Subject: [PATCH] dev-lang/php: Fix installation of phar command Originally added in the wrong location as it requires the cli SAPI to be active Bug: https://bugs.gentoo.org/707876 Signed-off-by: Brian Evans --- dev-lang/php/php-7.2.28-r1.ebuild | 8 +++++--- dev-lang/php/php-7.3.15-r1.ebuild | 8 +++++--- dev-lang/php/php-7.4.3-r1.ebuild | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dev-lang/php/php-7.2.28-r1.ebuild b/dev-lang/php/php-7.2.28-r1.ebuild index b5a5a227589a..3fbf75512687 100644 --- a/dev-lang/php/php-7.2.28-r1.ebuild +++ b/dev-lang/php/php-7.2.28-r1.ebuild @@ -530,9 +530,6 @@ src_install() { emake INSTALL_ROOT="${D}" \ install-build install-headers install-programs - # Install the "phar" archive utility. - use phar && emake INSTALL_ROOT="${D}" install-pharcmd - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" # Create the directory where we'll put version-specific php scripts @@ -560,6 +557,11 @@ src_install() { case "$sapi" in cli) source="sapi/cli/php" + # Install the "phar" archive utility. + if use phar ; then + emake INSTALL_ROOT="${D}" install-pharcmd + dosym "${dest}/bin/phar" "/usr/bin/phar${SLOT}" + fi ;; cgi) source="sapi/cgi/php-cgi" diff --git a/dev-lang/php/php-7.3.15-r1.ebuild b/dev-lang/php/php-7.3.15-r1.ebuild index e2dc3f12050d..186360d2ab60 100644 --- a/dev-lang/php/php-7.3.15-r1.ebuild +++ b/dev-lang/php/php-7.3.15-r1.ebuild @@ -531,9 +531,6 @@ src_install() { emake INSTALL_ROOT="${D}" \ install-build install-headers install-programs - # Install the "phar" archive utility. - use phar && emake INSTALL_ROOT="${D}" install-pharcmd - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" # Create the directory where we'll put version-specific php scripts @@ -561,6 +558,11 @@ src_install() { case "$sapi" in cli) source="sapi/cli/php" + # Install the "phar" archive utility. + if use phar ; then + emake INSTALL_ROOT="${D}" install-pharcmd + dosym "${dest}/bin/phar" "/usr/bin/phar${SLOT}" + fi ;; cgi) source="sapi/cgi/php-cgi" diff --git a/dev-lang/php/php-7.4.3-r1.ebuild b/dev-lang/php/php-7.4.3-r1.ebuild index 97bb7fcbf217..4bc7906738bc 100644 --- a/dev-lang/php/php-7.4.3-r1.ebuild +++ b/dev-lang/php/php-7.4.3-r1.ebuild @@ -521,9 +521,6 @@ src_install() { emake INSTALL_ROOT="${D}" \ install-build install-headers install-programs - # Install the "phar" archive utility. - use phar && emake INSTALL_ROOT="${D}" install-pharcmd - local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" # Create the directory where we'll put version-specific php scripts @@ -551,6 +548,11 @@ src_install() { case "$sapi" in cli) source="sapi/cli/php" + # Install the "phar" archive utility. + if use phar ; then + emake INSTALL_ROOT="${D}" install-pharcmd + dosym "${dest}/bin/phar" "/usr/bin/phar${SLOT}" + fi ;; cgi) source="sapi/cgi/php-cgi" -- 2.26.2