commit:     1da1f7fe7ebc3a02ada674c2a65900ed076ae0a6
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  2 02:50:12 2020 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Mar  2 02:50:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1da1f7fe

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 <grknight <AT> gentoo.org>

 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 b5a5a227589..3fbf7551268 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 e2dc3f12050..186360d2ab6 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 97bb7fcbf21..4bc7906738b 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"

Reply via email to