dev-python/qscintilla-python: proper fix for the parallel install failure
authorDavide Pesavento <pesa@gentoo.org>
Wed, 3 Apr 2019 00:04:53 +0000 (02:04 +0200)
committerDavide Pesavento <pesa@gentoo.org>
Wed, 3 Apr 2019 01:00:03 +0000 (03:00 +0200)
Also switch to an out-of-source build

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Davide Pesavento <pesa@gentoo.org>
dev-python/qscintilla-python/qscintilla-python-2.11.1.ebuild

index dfe6ef7c314a370fe8ba6956a0ae2dd0eac0cbdf..4c02bf5f03f6816218b364588092c77e23abad4b 100644 (file)
@@ -6,11 +6,16 @@ EAPI=7
 PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
 inherit python-r1 qmake-utils
 
-MY_P=QScintilla_gpl-${PV/_pre/.dev}
-
 DESCRIPTION="Python bindings for QScintilla"
 HOMEPAGE="https://www.riverbankcomputing.com/software/qscintilla/intro"
-SRC_URI="https://www.riverbankcomputing.com/static/Downloads/QScintilla/${MY_P}.tar.gz"
+
+MY_PN=QScintilla
+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/${MY_PN}/${PV}/${MY_P}.tar.gz"
+fi
 
 LICENSE="GPL-3"
 SLOT="0"
@@ -33,27 +38,24 @@ RDEPEND="${DEPEND}"
 
 S=${WORKDIR}/${MY_P}/Python
 
-src_prepare() {
-       default
-       python_copy_sources
-}
-
 src_configure() {
        configuration() {
                local myconf=(
                        "${PYTHON}"
-                       configure.py
+                       "${S}"/configure.py
                        --pyqt=PyQt5
                        --qmake="$(qt5_get_bindir)"/qmake
-                       --sip-incdir="$(python_get_includedir)"
                        $(usex debug '--debug --trace' '')
                        --verbose
                )
                echo "${myconf[@]}"
                "${myconf[@]}" || die
 
-               # Run eqmake to respect toolchain, build flags, and prevent stripping
-               eqmake5 -recursive
+               # 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
 }
@@ -64,8 +66,7 @@ src_compile() {
 
 src_install() {
        installation() {
-               # parallel install fails because mk_distinfo.py runs too early
-               emake -j1 INSTALL_ROOT="${D}" install
+               emake INSTALL_ROOT="${D}" install
                python_optimize
        }
        python_foreach_impl run_in_build_dir installation