446
|
1 # Copyright 1999-2017 Gentoo Foundation
|
|
2 # Distributed under the terms of the GNU General Public License v2
|
|
3
|
|
4 EAPI=5
|
|
5
|
|
6 PYTHON_COMPAT=( python2_7 )
|
|
7 PYTHON_REQ_USE="sqlite"
|
|
8 DISTUTILS_SINGLE_IMPL=1
|
|
9
|
|
10 inherit distutils-r1 gnome2-utils fdo-mime virtualx
|
|
11
|
|
12 DESCRIPTION="A desktop wiki"
|
|
13 HOMEPAGE="http://zim-wiki.org/"
|
|
14 SRC_URI="http://zim-wiki.org/downloads/${P}.tar.gz"
|
|
15
|
|
16 LICENSE="BSD GPL-2+"
|
|
17 SLOT="0"
|
|
18 KEYWORDS="~amd64 ~x86"
|
|
19 IUSE="test"
|
|
20
|
|
21 RDEPEND="dev-python/pygtk[${PYTHON_USEDEP}]
|
|
22 dev-python/pygobject:2[${PYTHON_USEDEP}]"
|
|
23 DEPEND="${RDEPEND}
|
|
24 x11-misc/xdg-utils
|
|
25 test? (
|
|
26 dev-vcs/bzr
|
|
27 dev-vcs/git
|
|
28 dev-vcs/mercurial )"
|
|
29
|
|
30 PATCHES=(
|
|
31 "${FILESDIR}"/${PN}-0.60-remove-ubuntu-theme.patch
|
|
32 )
|
|
33
|
|
34 python_prepare() {
|
|
35 sed -i -e "s/'USER'/'LOGNAME'/g" zim/__init__.py zim/fs.py || die
|
|
36
|
|
37 if [[ ${LINGUAS} ]]; then
|
|
38 local lingua
|
|
39 for lingua in translations/*.po; do
|
|
40 lingua=${lingua/.po}
|
|
41 lingua=${lingua/translations\/}
|
|
42 has ${lingua} ${LINGUAS} || \
|
|
43 { rm translations/${lingua}.po || die; }
|
|
44 done
|
|
45 fi
|
|
46
|
|
47 distutils-r1_python_prepare
|
|
48 }
|
|
49
|
|
50 python_test() {
|
|
51 VIRTUALX_COMMAND="${PYTHON}" virtualmake test.py
|
|
52 }
|
|
53
|
|
54 python_install() {
|
|
55 distutils-r1_python_install --skip-xdg-cmd
|
|
56 }
|
|
57
|
|
58 pkg_preinst() {
|
|
59 gnome2_icon_savelist
|
|
60 }
|
|
61
|
|
62 pkg_postinst() {
|
|
63 fdo-mime_desktop_database_update
|
|
64 gnome2_icon_cache_update
|
|
65 if ! has_version ${CATEGORY}/${PN}; then
|
|
66 einfo "Please emerge these packages for additional functionality"
|
|
67 einfo " dev-lang/R"
|
|
68 einfo " dev-python/gtkspell-python"
|
|
69 einfo " dev-vcs/bzr"
|
|
70 einfo " gnome-extra/zeitgeist"
|
|
71 einfo " media-gfx/graphviz"
|
|
72 einfo " media-gfx/imagemagick"
|
|
73 einfo " media-gfx/scrot"
|
|
74 einfo " media-sound/lilypond"
|
|
75 einfo " sci-visualization/gnuplot"
|
|
76 einfo " virtual/latex-base app-text/dvipng"
|
|
77 fi
|
|
78 }
|
|
79
|
|
80 pkg_postrm() {
|
|
81 fdo-mime_desktop_database_update
|
|
82 gnome2_icon_cache_update
|
|
83 }
|