1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="2.5 3.*"
10 inherit eutils distutils gnome2-utils
13 DESCRIPTION="User friendly Bitcoin client"
14 HOMEPAGE="http://electrum-desktop.com/"
15 SRC_URI="http://electrum-desktop.com/files/${MY_P}.tar.gz"
19 KEYWORDS="~amd64 ~x86"
21 REQUIRED_USE="|| ( gtk qt4 )"
23 LANGS="en cs de fr nl ru sl vi zh"
30 RDEPEND="dev-python/ecdsa
32 gtk? ( dev-python/pygtk:2 )
33 qt4? ( dev-python/PyQt4 )"
40 # Prevent icon from being installed in the wrong location:
41 sed -i '/electrum\.png/ d' setup.py || die
42 sed -i "s:^Icon=.*:Icon=${PN}:" "${PN}.desktop" || die
45 mv locale/cn locale/zh || die # Chinese
47 # Remove unrequested localization files:
49 for lang in ${LANGS#en}; do
50 if use linguas_$lang; then
51 test -f "locale/$lang/LC_MESSAGES/${PN}.mo" || die
53 rm -r "locale/$lang" || die
57 # Remove unrequested GUI implementations:
62 rm lib/gui_qt.py lib/gui_lite.py || die
63 sed -i 's/default="lite"/default="gtk"/' electrum || die
70 doicon -s 64 ${PN}.png
79 gnome2_icon_cache_update
80 distutils_pkg_postinst
84 gnome2_icon_cache_update