commit:     7c60889581ac7f2f788a7050882ad3fdbd9838a9
Author:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  2 23:20:32 2019 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 00:54:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c608895

dev-python/PyQt5: proper fix for the parallel install failure

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>

 dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild |  9 +++++----
 dev-python/PyQt5/PyQt5-5.12.1.ebuild    | 19 +++++++++++--------
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild 
b/dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild
index d0f6fd5829f..62e0077bd41 100644
--- a/dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild
+++ b/dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild
@@ -9,11 +9,12 @@ inherit multibuild python-r1 qmake-utils
 DESCRIPTION="Python bindings for the Qt framework"
 HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro";
 
-MY_P=${PN}_gpl-${PV/_pre/.dev}
+MY_PN=PyQt5
+MY_P=${MY_PN}_gpl-${PV/_pre/.dev}
 if [[ ${PV} == *_pre* ]]; then
-       SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz";
+       SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz";
 else
-       SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
+       
SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz";
 fi
 
 LICENSE="GPL-3"
@@ -158,7 +159,7 @@ src_configure() {
                echo "${myconf[@]}"
                "${myconf[@]}" || die
 
-               eqmake5 -recursive ${PN}.pro
+               eqmake5 -recursive ${MY_PN}.pro
        }
        python_foreach_impl run_in_build_dir configuration
 }

diff --git a/dev-python/PyQt5/PyQt5-5.12.1.ebuild 
b/dev-python/PyQt5/PyQt5-5.12.1.ebuild
index 7098afbaeb7..37381dcdb82 100644
--- a/dev-python/PyQt5/PyQt5-5.12.1.ebuild
+++ b/dev-python/PyQt5/PyQt5-5.12.1.ebuild
@@ -9,11 +9,12 @@ inherit multibuild python-r1 qmake-utils
 DESCRIPTION="Python bindings for the Qt framework"
 HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro";
 
-MY_P=${PN}_gpl-${PV/_pre/.dev}
+MY_PN=PyQt5
+MY_P=${MY_PN}_gpl-${PV/_pre/.dev}
 if [[ ${PV} == *_pre* ]]; then
        SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz";
 else
-       
SRC_URI="https://www.riverbankcomputing.com/static/Downloads/PyQt5/${MY_P}.tar.gz";
+       
SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz";
 fi
 
 LICENSE="GPL-3"
@@ -117,7 +118,6 @@ src_configure() {
                        --confirm-license
                        --qmake="$(qt5_get_bindir)"/qmake
                        --bindir="${EPREFIX}/usr/bin"
-                       --sip-incdir="$(python_get_includedir)"
                        --qsci-api
                        --enable=QtCore
                        --enable=QtXml
@@ -153,7 +153,11 @@ src_configure() {
                echo "${myconf[@]}"
                "${myconf[@]}" || die
 
-               eqmake5 -recursive ${PN}.pro
+               # Fix parallel install failure
+               sed -i -e '/INSTALLS += distinfo/i distinfo.depends = 
install_subtargets' ${MY_PN}.pro || die
+
+               # Run eqmake to respect toolchain and build flags
+               eqmake5 -recursive ${MY_PN}.pro
        }
        python_foreach_impl run_in_build_dir configuration
 }
@@ -164,9 +168,8 @@ src_compile() {
 
 src_install() {
        installation() {
-               local tmp_root=${D}/${PN}_tmp_root
-               # parallel install fails because mk_distinfo.py runs too early
-               emake -j1 INSTALL_ROOT="${tmp_root}" install
+               local tmp_root=${D}/${MY_PN}_tmp_root
+               emake INSTALL_ROOT="${tmp_root}" install
 
                local bin_dir=${tmp_root}${EPREFIX}/usr/bin
                local exe
@@ -175,7 +178,7 @@ src_install() {
                        rm "${bin_dir}/${exe}" || die
                done
 
-               local uic_dir=${tmp_root}$(python_get_sitedir)/${PN}/uic
+               local uic_dir=${tmp_root}$(python_get_sitedir)/${MY_PN}/uic
                if python_is_python3; then
                        rm -r "${uic_dir}"/port_v2 || die
                else

Reply via email to