blob: d54bfcb0ae857627794d537fa04d25e1e3e037ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PLOCALES="ca cs es fr hr hu id ja ko pl pt_BR ru sv zh_CN zh_TW"
inherit eutils gnome2-utils l10n python-single-r1 xdg-utils
DESCRIPTION="A GTK image viewer specifically designed to handle comic books"
HOMEPAGE="http://comix.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
IUSE="rar"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="${PYTHON_DEPS}
dev-python/pillow[${PYTHON_USEDEP}]
>=dev-python/pygtk-2.12[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}
rar? ( || ( app-arch/unrar app-arch/rar ) )"
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
l10n_find_plocales_changes messages "" "/LC_MESSAGES/comix.po"
epatch "${FILESDIR}/${P}-pillow.patch" #471522, https://sourceforge.net/p/comix/patches/50/
# do not install .pyc into /usr/share
local pythondir="$(python_get_sitedir)/comix"
pythondir="${pythondir#${EPREFIX}/usr/}"
sed -i -e "s:share/comix/src:${pythondir}:g" install.py || die
python_fix_shebang mime/comicthumb src/comix.py
}
src_install() {
dodir /usr
"${PYTHON}" install.py install --no-mime --dir "${D}"usr || die
insinto /usr/share/mime/packages
doins mime/comix.xml
insinto /etc/gconf/schemas
doins mime/comicbook.schemas
dobin mime/comicthumb
dodoc ChangeLog README
remove_locale() {
rm -r "${ED}/usr/share/locale/"$1 || die
}
l10n_for_each_disabled_locale_do remove_locale
}
pkg_preinst() {
gnome2_gconf_savelist
gnome2_icon_savelist
}
pkg_postinst() {
gnome2_gconf_install
xdg_desktop_database_update
xdg_mimeinfo_database_update
gnome2_icon_cache_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
gnome2_icon_cache_update
}
|