dev-python/PyQt5: proper fix for the parallel install failure
authorDavide Pesavento <pesa@gentoo.org>
Tue, 2 Apr 2019 23:20:32 +0000 (01:20 +0200)
committerDavide Pesavento <pesa@gentoo.org>
Wed, 3 Apr 2019 00:54:45 +0000 (02:54 +0200)
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Davide Pesavento <pesa@gentoo.org>
dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild
dev-python/PyQt5/PyQt5-5.12.1.ebuild

index d0f6fd5829f8e8fc7d9065d64d4b72bcb2327d08..62e0077bd41de6ef534df685ba7bfef215bfabfd 100644 (file)
@@ -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
 }
index 7098afbaeb712901ea439157a643fc16262cbdfd..37381dcdb825c4735c0e5bf5a9c0375e4a7b03d7 100644 (file)
@@ -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