dev-python/qscintilla-python: support building against Qt5/PyQt5

Gentoo-Bug: 541604

Package-Manager: Portage-2.3.3, Repoman-2.3.1
This commit is contained in:
Davide Pesavento
2017-01-21 23:07:04 +01:00
parent ef9deaf166
commit 94c379bcbe
19 changed files with 113 additions and 28 deletions

View File

@@ -53,7 +53,7 @@ src_configure() {
"${myconf[@]}" || die
# Run eqmake4 to respect toolchain, build flags, and prevent stripping
eqmake4
eqmake4 -recursive
}
python_foreach_impl run_in_build_dir configuration
}

View File

@@ -0,0 +1,85 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5} )
inherit python-r1 qmake-utils
MY_P=QScintilla_gpl-${PV}
DESCRIPTION="Python bindings for Qscintilla"
HOMEPAGE="http://www.riverbankcomputing.com/software/qscintilla/intro"
SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc64 ~sparc ~x86"
IUSE="debug +qt4 qt5"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
^^ ( qt4 qt5 )
"
DEPEND="
${PYTHON_DEPS}
>=dev-python/sip-4.19:=[${PYTHON_USEDEP}]
~x11-libs/qscintilla-${PV}:=[qt4(-)?,qt5(+)?]
qt4? (
>=dev-python/PyQt4-4.11.3[X,${PYTHON_USEDEP}]
dev-qt/qtcore:4
dev-qt/qtgui:4
)
qt5? (
dev-python/PyQt5[gui,printsupport,widgets,${PYTHON_USEDEP}]
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtprintsupport:5
dev-qt/qtwidgets:5
)
"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_P}/Python
src_prepare() {
default
python_copy_sources
}
src_configure() {
local my_qt_ver=$(usex qt5 5 4)
configuration() {
local myconf=(
"${PYTHON}"
configure.py
--qmake="$(qt${my_qt_ver}_get_bindir)"/qmake
--destdir="$(python_get_sitedir)"/PyQt${my_qt_ver}
--sip-incdir="$(python_get_includedir)"
--pyqt=PyQt${my_qt_ver}
$(usex debug '--debug --trace' '')
--verbose
)
echo "${myconf[@]}"
"${myconf[@]}" || die
# Run eqmake to respect toolchain, build flags, and prevent stripping
eqmake${my_qt_ver} -recursive
}
python_foreach_impl run_in_build_dir configuration
}
src_compile() {
python_foreach_impl run_in_build_dir default
}
src_install() {
installation() {
emake INSTALL_ROOT="${D}" install
python_optimize
}
python_foreach_impl run_in_build_dir installation
}

View File

@@ -53,7 +53,7 @@ src_configure() {
"${myconf[@]}" || die
# Run eqmake4 to respect toolchain, build flags, and prevent stripping
eqmake4
eqmake4 -recursive
}
python_foreach_impl run_in_build_dir configuration
}

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -23,7 +23,7 @@ DEPEND="
${PYTHON_DEPS}
>=dev-python/sip-4.14.3[${PYTHON_USEDEP}]
>=dev-python/PyQt4-4.10[${PYTHON_USEDEP},X,help,sql,svg,webkit]
>=dev-python/qscintilla-python-2.8[${PYTHON_USEDEP}]
>=dev-python/qscintilla-python-2.8[qt4(+),${PYTHON_USEDEP}]
"
RDEPEND="${DEPEND}
>=dev-python/chardet-2.3.0[${PYTHON_USEDEP}]

View File

@@ -23,7 +23,7 @@ DEPEND="
${PYTHON_DEPS}
>=dev-python/sip-4.14.3[${PYTHON_USEDEP}]
>=dev-python/PyQt4-4.10[${PYTHON_USEDEP},X,help,sql,svg,webkit]
>=dev-python/qscintilla-python-2.8[${PYTHON_USEDEP}]
>=dev-python/qscintilla-python-2.8[qt4(+),${PYTHON_USEDEP}]
"
RDEPEND="${DEPEND}
>=dev-python/chardet-2.3.0[${PYTHON_USEDEP}]

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -26,7 +26,7 @@ RDEPEND="dev-vcs/mercurial[${PYTHON_USEDEP}]
qt4? (
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/PyQt4[X,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
)"
DEPEND="${RDEPEND}
doc? (

View File

@@ -31,7 +31,7 @@ RDEPEND="${HG_DEPEND}
dev-python/iniparse[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/PyQt4[svg,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]"
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.0.3 )"

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -31,7 +31,7 @@ RDEPEND="${HG_DEPEND}
dev-python/iniparse[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/PyQt4[svg,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]"
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.0.3 )"

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -31,7 +31,7 @@ RDEPEND="${HG_DEPEND}
dev-python/iniparse[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/PyQt4[svg,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]"
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.0.3 )"

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -31,7 +31,7 @@ RDEPEND="${HG_DEPEND}
dev-python/iniparse[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/PyQt4[svg,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]"
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.0.3 )"

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -31,7 +31,7 @@ RDEPEND="${HG_DEPEND}
dev-python/iniparse[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/PyQt4[svg,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]"
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
doc? ( >=dev-python/sphinx-1.0.3 )"

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -27,7 +27,7 @@ RDEPEND="
gnome? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )
X? (
dev-python/PyQt4[X,help,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
)"
DEPEND="
X? (

View File

@@ -27,7 +27,7 @@ RDEPEND="
gnome? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )
X? (
dev-python/PyQt4[X,help,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
)"
DEPEND="
X? (

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -26,7 +26,7 @@ RDEPEND="
gnome? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )
X? (
dev-python/PyQt4[X,help,${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
)"
DEPEND="
X? (

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -51,7 +51,7 @@ RDEPEND="
python? (
dev-python/PyQt4[X,sql,svg,webkit,${PYTHON_USEDEP}]
dev-python/sip[${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/httplib2[${PYTHON_USEDEP}]
dev-python/jinja[${PYTHON_USEDEP}]

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -52,7 +52,7 @@ RDEPEND="
python? (
dev-python/PyQt4[X,sql,svg,webkit,${PYTHON_USEDEP}]
dev-python/sip[${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/httplib2[${PYTHON_USEDEP}]
dev-python/jinja[${PYTHON_USEDEP}]

View File

@@ -52,7 +52,7 @@ RDEPEND="
python? (
dev-python/PyQt4[X,sql,svg,webkit,${PYTHON_USEDEP}]
<dev-python/sip-4.19:=[${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/httplib2[${PYTHON_USEDEP}]
dev-python/jinja[${PYTHON_USEDEP}]

View File

@@ -53,7 +53,7 @@ RDEPEND="
python? (
dev-python/PyQt4[X,sql,svg,webkit,${PYTHON_USEDEP}]
<dev-python/sip-4.19:=[${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/httplib2[${PYTHON_USEDEP}]
dev-python/jinja[${PYTHON_USEDEP}]

View File

@@ -61,7 +61,7 @@ COMMON_DEPEND="
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/qscintilla-python[${PYTHON_USEDEP}]
dev-python/qscintilla-python[qt4(+),${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
<dev-python/sip-4.19:=[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]