diff options
author | David Roman <droman@ifae.es> | 2024-09-10 14:47:39 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-10-01 20:31:02 +0200 |
commit | 053db8aca7cc3f7d16a79269301ee1fbbc4abc8e (patch) | |
tree | f46021a154253577ba5ae7f13c906f8b7c1f3317 /dev-vcs | |
parent | dev-vcs/git-cola: drop 4.1.0, 4.2.1-r1, 4.4.1 (diff) | |
download | gentoo-053db8aca7cc3f7d16a79269301ee1fbbc4abc8e.tar.gz gentoo-053db8aca7cc3f7d16a79269301ee1fbbc4abc8e.tar.bz2 gentoo-053db8aca7cc3f7d16a79269301ee1fbbc4abc8e.zip |
dev-vcs/git-cola: add 4.8.2
Closes: https://bugs.gentoo.org/926353
Signed-off-by: David Roman <droman@ifae.es>
Closes: https://github.com/gentoo/gentoo/pull/38550
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-vcs')
-rw-r--r-- | dev-vcs/git-cola/Manifest | 1 | ||||
-rw-r--r-- | dev-vcs/git-cola/git-cola-4.8.2.ebuild | 88 | ||||
-rw-r--r-- | dev-vcs/git-cola/metadata.xml | 6 |
3 files changed, 95 insertions, 0 deletions
diff --git a/dev-vcs/git-cola/Manifest b/dev-vcs/git-cola/Manifest index 1008de4d8dbb..5e5aabe85934 100644 --- a/dev-vcs/git-cola/Manifest +++ b/dev-vcs/git-cola/Manifest @@ -1 +1,2 @@ DIST git-cola-4.5.0.tar.gz 1233372 BLAKE2B da9bbe2d1e49b5ebc49ae6ddecf72a73b4b262de2de6c5a9ef77d9946a338bb393154e91e8431dc11fc08f72e3fcfd19d424d68c2b846d05c0a87393f8cc33ac SHA512 99a17bf0398dc3049417b6af6f3fc3bc20682186859879c6fc3d2b8f9a8b3599612c555b40f76dd226323cefab0dec0b4424a566dc74637449743f675cb56817 +DIST git-cola-4.8.2.tar.gz 1251173 BLAKE2B 758b34e271883c5493e9a219e7f9970c1ca2e0cdb97bbab50828ea53ae2bae223692a06c353d0b017af2e82b3855708ebd2937d9656b373b8d45ab457ac50b7b SHA512 0b924837e8e5dcaa9687ffdff779bd3ed9f629713826f6c537d6470fdaed84bab3cec793aa9f1cf0e7bce3c4dae60c838822005efa93236b5964c8be74ef33cc diff --git a/dev-vcs/git-cola/git-cola-4.8.2.ebuild b/dev-vcs/git-cola/git-cola-4.8.2.ebuild new file mode 100644 index 000000000000..b584bdddea8c --- /dev/null +++ b/dev-vcs/git-cola/git-cola-4.8.2.ebuild @@ -0,0 +1,88 @@ +# 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" +IUSE="+pyqt5 pyqt6 pyside2 pyside6" + +REQUIRED_USE=" + || ( pyqt5 pyqt6 pyside2 pyside6 ) +" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/polib[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + pyqt5? ( dev-python/QtPy[pyqt5,gui,network,${PYTHON_USEDEP}] ) + pyqt6? ( dev-python/QtPy[pyqt6,gui,network,${PYTHON_USEDEP}] ) + pyside2? ( dev-python/QtPy[pyside2,gui,network,${PYTHON_USEDEP}] ) + pyside6? ( dev-python/QtPy[pyside6,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? ( + ${VIRTUALX_DEPEND} + dev-python/pytest[\${PYTHON_USEDEP}] + pyqt5? ( dev-python/QtPy[\${PYTHON_USEDEP},pyqt5,gui,network] ) + pyqt6? ( dev-python/QtPy[\${PYTHON_USEDEP},pyqt6,gui,network] ) + pyside2? ( dev-python/QtPy[\${PYTHON_USEDEP},pyside2,gui,network] ) + pyside6? ( dev-python/QtPy[\${PYTHON_USEDEP},pyside6,gui,network] ) + ) + ") +" + +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 "${S}"/qtpy "${S}"/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 + local qt_api=$(use pyqt5 && echo "pyqt5" || ( + use pyqt6 && echo "pyqt6" || ( + use pyside2 && echo "pyside2" || echo "pyside6" + ))) + sed -i "s|import sys|import sys\nimport os\nos.environ['QT_API'] = '${qt_api}'\n|" "${D}"/usr/bin/* || die + + readme.gentoo_create_doc +} diff --git a/dev-vcs/git-cola/metadata.xml b/dev-vcs/git-cola/metadata.xml index b01ac73fc379..f723b2794ff6 100644 --- a/dev-vcs/git-cola/metadata.xml +++ b/dev-vcs/git-cola/metadata.xml @@ -16,4 +16,10 @@ <upstream> <remote-id type="github">git-cola/git-cola</remote-id> </upstream> + <use> + <flag name="pyqt5">Use <pkg>dev-python/PyQt5</pkg> as Qt backend</flag> + <flag name="pyqt6">Use <pkg>dev-python/PyQt6</pkg> as Qt backend</flag> + <flag name="pyside2">Use <pkg>dev-python/pyside2</pkg> as Qt backend</flag> + <flag name="pyside6">Use <pkg>dev-python/pyside6</pkg> as Qt backend</flag> + </use> </pkgmetadata> |