dev-lang/php: Fix installation of phar command
authorBrian Evans <grknight@gentoo.org>
Mon, 2 Mar 2020 02:50:12 +0000 (21:50 -0500)
committerBrian Evans <grknight@gentoo.org>
Mon, 2 Mar 2020 02:50:12 +0000 (21:50 -0500)
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@gentoo.org>
dev-lang/php/php-7.2.28-r1.ebuild
dev-lang/php/php-7.3.15-r1.ebuild
dev-lang/php/php-7.4.3-r1.ebuild

index b5a5a227589a67966f5bff1ceba6ecec74ffedad..3fbf7551268748b80f52e0cc6454630465a9a20b 100644 (file)
@@ -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"
index e2dc3f12050d796a04ff01f423c6027228b9c058..186360d2ab6053bb4a58cb7de7002b63cbd60837 100644 (file)
@@ -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"
index 97bb7fcbf217fc20a024bf92561cb4727f6d3b3b..4bc7906738bca3cf5249aa4ae93f3618457aeff0 100644 (file)
@@ -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"