forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This new minor version removes setup.cfg which previously was used to install desktop and icon files. Because of that, now desktop eclass is used instead. Adds two optefatures (notify2 and send2trash) Closes: gentoo#39559 Signed-off-by: David Roman <[email protected]> Signed-off-by: Yixun Lan <[email protected]>
- Loading branch information
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
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 | ||
DIST git-cola-4.9.0.tar.gz 1261512 BLAKE2B 51994539e79d1f3db5876b64c10bf84fd2ac7f90cab05227c23831b0f0a6771cead11bf3bcb76863eb0e6e26c245a735143306d55f1773a697036652d7a1084e SHA512 8abb30c8263170c185dc66061b8271dfb73a0173a29337ef704cc0d206a218bfb5ede528966ea55c64fc68121162973f9345ff112b7f8d7093f602a7774b72e0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# 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 desktop distutils-r1 optfeature 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-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() { | ||
# 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 | ||
|
||
domenu share/applications/*.desktop | ||
doicon -s scalable cola/icons/git-cola.svg | ||
|
||
# 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 | ||
} | ||
|
||
pkg_postinst() { | ||
xdg_pkg_postinst | ||
|
||
optfeature "enable desktop notifications" dev-python/notify2 | ||
optfeature "enables Send to Trash feature" dev-python/send2trash | ||
} |