summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Roman <davidroman96@gmail.com>2024-10-02 19:47:30 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2024-10-02 20:09:15 +0200
commit9baac046e97c5b86902e9582a63e9e289fff13fe (patch)
treee8c390af7dc0ba8c5fa69b4712ff20f83f919159 /dev-vcs/git-cola
parentmedia-libs/vulkan-loader: Reassign to vulkan@ (diff)
downloadgentoo-9baac046e97c5b86902e9582a63e9e289fff13fe.tar.gz
gentoo-9baac046e97c5b86902e9582a63e9e289fff13fe.tar.bz2
gentoo-9baac046e97c5b86902e9582a63e9e289fff13fe.zip
dev-vcs/git-cola: use pyqt6, remove pyqt5 and pyside support
Signed-off-by: David Roman <droman@ifae.es> Closes: https://github.com/gentoo/gentoo/pull/38853 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-vcs/git-cola')
-rw-r--r--dev-vcs/git-cola/git-cola-4.8.2-r1.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/dev-vcs/git-cola/git-cola-4.8.2-r1.ebuild b/dev-vcs/git-cola/git-cola-4.8.2-r1.ebuild
new file mode 100644
index 000000000000..c4cf267205ec
--- /dev/null
+++ b/dev-vcs/git-cola/git-cola-4.8.2-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+DISTUTILS_SINGLE_IMPL=true
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1 readme.gentoo-r1 virtualx xdg
+
+DESCRIPTION="The highly caffeinated git GUI"
+HOMEPAGE="https://git-cola.github.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/polib[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/QtPy[pyqt6,gui,network,${PYTHON_USEDEP}]
+ dev-python/send2trash[${PYTHON_USEDEP}]
+ ')
+ dev-vcs/git
+"
+BDEPEND="
+ sys-devel/gettext
+ $(python_gen_cond_dep "
+ dev-python/setuptools-scm[\${PYTHON_USEDEP}]
+ test? (
+ dev-python/pytest[\${PYTHON_USEDEP}]
+ dev-python/QtPy[pyqt6,gui,network,\${PYTHON_USEDEP}]
+ )
+ ")
+"
+
+distutils_enable_sphinx docs \
+ 'dev-python/rst-linker'
+distutils_enable_tests pytest
+
+src_prepare() {
+ sed -i "s|doc/git-cola =|doc/${PF} =|" setup.cfg || die
+ # remove bundled qtpy and polib
+ rm -Rf qtpy cola/polib.py || die
+ distutils-r1_src_prepare
+}
+
+src_test() {
+ virtx distutils-r1_src_test
+}
+
+python_test() {
+ cd "${T}" || die
+ GIT_CONFIG_NOSYSTEM=true LC_ALL="C.utf8" \
+ epytest "${S}"/test
+}
+
+src_compile() {
+ SETUPTOOLS_SCM_PRETEND_VERSION=${PV} distutils-r1_src_compile
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ # patch the binaries to use desired qtpy backend
+ sed -i "s|import sys|import sys\nimport os\nos.environ['QT_API'] = 'pyqt6'\n|" "${D}"/usr/bin/* || die
+
+ readme.gentoo_create_doc
+}