sys-apps/gawk: stable 5.0.1 for ppc64, bug #725374
[gentoo.git] / sys-apps / bleachbit / bleachbit-4.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7,8} )
7 PYTHON_REQ_USE="sqlite(+)"
8
9 inherit desktop distutils-r1 virtualx
10
11 DESCRIPTION="Clean junk to free disk space and to maintain privacy"
12 HOMEPAGE="https://www.bleachbit.org"
13 SRC_URI="https://download.bleachbit.org/${P}.tar.bz2"
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="amd64 x86"
18
19 RDEPEND="
20         dev-python/chardet[$PYTHON_USEDEP]
21         dev-python/pygobject:3[$PYTHON_USEDEP]
22 "
23 BDEPEND="
24         sys-devel/gettext
25         test? ( dev-python/mock[${PYTHON_USEDEP}] )
26 "
27
28 distutils_enable_tests unittest
29
30 # tests fail under FEATURES=usersandbox
31 RESTRICT="test"
32
33 python_prepare_all() {
34         if use test; then
35                 # avoid tests requiring internet access
36                 rm tests/Test{Chaff,Update}.py || die
37
38                 # fails due to non-existent $HOME/.profile
39                 rm tests/TestInit.py || die
40
41                 # fails on upstream Travis CI as well as on Gentoo
42                 sed -e "s/test_get_proc_swaps(self)/_&/" \
43                         -i tests/TestMemory.py || die
44         fi
45
46         distutils-r1_python_prepare_all
47 }
48
49 python_compile_all() {
50         emake -C po local
51 }
52
53 python_test() {
54         virtx emake tests
55 }
56
57 python_install() {
58         distutils-r1_python_install
59         python_newscript ${PN}.py ${PN}
60 }
61
62 python_install_all() {
63         distutils-r1_python_install_all
64         emake -C po DESTDIR="${D}" install
65
66         insinto /usr/share/bleachbit/cleaners
67         doins cleaners/*.xml
68
69         insinto /usr/share/bleachbit
70         doins data/app-menu.ui
71
72         doicon ${PN}.png
73         domenu org.${PN}.BleachBit.desktop
74 }