commit:     6d7133fe2a81ed73ad2cf4ff2f8f8ceb8441ff48
Author:     José P. R. N. Assis <espinafre <AT> gmail <DOT> com>
AuthorDate: Fri Feb  2 11:48:09 2024 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Tue Apr 16 16:29:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d7133fe

dev-python/qscintilla-python: add USE=qt6 #916232

Adding USE=qt6 to dev-python/qscintilla-python, based on previous work
by @t0b3 (gentoo#31252), keeping qt5 support, via multibuild.

Bug: https://bugs.gentoo.org/916232
Signed-off-by: José P. R. N. Assis <espinafre <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33493
Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>

 .../qscintilla-python-2.14.1-r1.ebuild             | 112 +++++++++++++++++++++
 x11-libs/qscintilla/qscintilla-2.14.1-r1.ebuild    |   8 +-
 2 files changed, 114 insertions(+), 6 deletions(-)

diff --git a/dev-python/qscintilla-python/qscintilla-python-2.14.1-r1.ebuild 
b/dev-python/qscintilla-python/qscintilla-python-2.14.1-r1.ebuild
new file mode 100644
index 000000000000..a3651231f003
--- /dev/null
+++ b/dev-python/qscintilla-python/qscintilla-python-2.14.1-r1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit multibuild python-r1 qmake-utils out-of-source-utils
+
+DESCRIPTION="Python bindings for QScintilla"
+HOMEPAGE="https://www.riverbankcomputing.com/software/qscintilla/ 
https://pypi.org/project/QScintilla/";
+
+MY_PN=QScintilla
+MY_P=${MY_PN}_src-${PV/_pre/.dev}
+SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz";
+S=${WORKDIR}/${MY_P}/Python
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="debug +qt5 qt6"
+
+REQUIRED_USE="|| ( qt5 qt6 ) ${PYTHON_REQUIRED_USE}"
+
+# no tests
+RESTRICT="test"
+
+DEPEND="${PYTHON_DEPS}
+       qt5? (
+               
>=dev-python/PyQt5-5.15.5[gui,printsupport,widgets,${PYTHON_USEDEP}]
+               dev-qt/qtcore:5
+               dev-qt/qtgui:5
+               dev-qt/qtprintsupport:5
+               dev-qt/qtwidgets:5
+       )
+       qt6? (
+               dev-python/PyQt6[gui,printsupport,widgets,${PYTHON_USEDEP}]
+               dev-qt/qtbase:6[cups,gui,widgets]
+       )
+       ~x11-libs/qscintilla-${PV}:=[qt5(+),qt6(+)]
+"
+RDEPEND="${DEPEND}
+       qt5? ( >=dev-python/PyQt5-sip-12.9:=[${PYTHON_USEDEP}] )
+       qt6? ( >=dev-python/PyQt6-sip-13.5:=[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+       >=dev-python/PyQt-builder-1.10[${PYTHON_USEDEP}]
+       >=dev-python/sip-6.2[${PYTHON_USEDEP}]
+       qt5? ( dev-qt/qtcore:5 )
+       qt6? ( dev-qt/qtbase:6 )
+"
+
+pkg_setup() {
+       MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) )
+}
+
+src_configure() {
+       my_src_configure() {
+               case ${MULTIBUILD_VARIANT} in
+                       qt5)
+                               configuration() {
+                                       local myconf=(
+                                               sip-build
+                                               --verbose
+                                               --build-dir="${BUILD_DIR}"
+                                               
--scripts-dir="$(python_get_scriptdir)"
+                                               
--qmake="$(qt5_get_bindir)"/qmake
+                                               --no-make
+                                               $(usev debug '--debug 
--qml-debug --tracing')
+                                       )
+                                       echo "${myconf[@]}"
+                                       "${myconf[@]}" || die
+
+                                       run_in_build_dir qmake5 -recursive 
${MY_PN}.pro
+                               }
+                               mv pyproject{-${MULTIBUILD_VARIANT},}.toml || 
die
+                               python_foreach_impl configuration
+                               ;;
+                       qt6)
+                               configuration() {
+                                       local myconf=(
+                                               sip-build
+                                               --verbose
+                                               --build-dir="${BUILD_DIR}"
+                                               
--scripts-dir="$(python_get_scriptdir)"
+                                               
--qmake="$(qt6_get_bindir)"/qmake
+                                               --no-make
+                                               $(usev debug '--debug 
--qml-debug --tracing')
+                                       )
+                                       echo "${myconf[@]}"
+                                       "${myconf[@]}" || die
+
+                                       run_in_build_dir qmake6 -recursive 
${MY_PN}.pro
+                               }
+                               mv pyproject{-${MULTIBUILD_VARIANT},}.toml || 
die
+                               python_foreach_impl configuration
+                               ;;
+               esac
+       }
+       multibuild_foreach_variant my_src_configure
+}
+
+src_compile() {
+       multibuild_foreach_variant python_foreach_impl run_in_build_dir default
+}
+
+src_install() {
+       installation() {
+               emake INSTALL_ROOT="${D}" install
+               python_optimize
+       }
+       multibuild_foreach_variant python_foreach_impl run_in_build_dir 
installation
+}

diff --git a/x11-libs/qscintilla/qscintilla-2.14.1-r1.ebuild 
b/x11-libs/qscintilla/qscintilla-2.14.1-r1.ebuild
index 43e36261230c..50efd464a50b 100644
--- a/x11-libs/qscintilla/qscintilla-2.14.1-r1.ebuild
+++ b/x11-libs/qscintilla/qscintilla-2.14.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -10,11 +10,7 @@ 
HOMEPAGE="https://www.riverbankcomputing.com/software/qscintilla/intro";
 
 MY_PN=QScintilla
 MY_P=${MY_PN}_src-${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
+SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz";
 S=${WORKDIR}/${MY_P}
 
 LICENSE="GPL-3"

Reply via email to