Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/electrum/
Date: Thu, 01 Aug 2019 18:21:53
Message-Id: 1564683695.185e923a309d12f75b6a1ba136004975d37ee664.mgorny@gentoo
1 commit: 185e923a309d12f75b6a1ba136004975d37ee664
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 1 17:12:43 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 1 18:21:35 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=185e923a
7
8 net-misc/electrum: Remove invalid L10N usage
9
10 L10N is not supposed to be used to drop gettext localizations. Word
11 lists are small enough not to be worth the added complexity.
12
13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
14
15 net-misc/electrum/electrum-3.3.6-r3.ebuild | 138 +++++++++++++++++++++++++++++
16 1 file changed, 138 insertions(+)
17
18 diff --git a/net-misc/electrum/electrum-3.3.6-r3.ebuild b/net-misc/electrum/electrum-3.3.6-r3.ebuild
19 new file mode 100644
20 index 00000000000..1cb1b8b2bba
21 --- /dev/null
22 +++ b/net-misc/electrum/electrum-3.3.6-r3.ebuild
23 @@ -0,0 +1,138 @@
24 +# Copyright 1999-2019 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI="7"
28 +
29 +PYTHON_COMPAT=( python3_{6,7} )
30 +PYTHON_REQ_USE="ncurses?"
31 +
32 +inherit desktop distutils-r1 xdg-utils
33 +
34 +MY_P="Electrum-${PV}"
35 +DESCRIPTION="User friendly Bitcoin client"
36 +HOMEPAGE="https://electrum.org/"
37 +SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz"
38 +
39 +LICENSE="MIT"
40 +SLOT="0"
41 +KEYWORDS="~amd64 ~x86"
42 +IUSE="audio_modem cli coldcard cosign digitalbitbox email greenaddress_it ncurses qrcode +qt5 safe_t sync revealer trustedcoin_com vkb"
43 +
44 +REQUIRED_USE="
45 + || ( cli ncurses qt5 )
46 + audio_modem? ( qt5 )
47 + cosign? ( qt5 )
48 + digitalbitbox? ( qt5 )
49 + email? ( qt5 )
50 + greenaddress_it? ( qt5 )
51 + qrcode? ( qt5 )
52 + sync? ( qt5 )
53 + trustedcoin_com? ( qt5 )
54 + vkb? ( qt5 )
55 +"
56 +
57 +RDEPEND="${PYTHON_DEPS}
58 + dev-python/aiohttp-socks[${PYTHON_USEDEP}]
59 + ~dev-python/aiorpcX-0.17.0[${PYTHON_USEDEP}]
60 + dev-python/dnspython[${PYTHON_USEDEP}]
61 + dev-python/ecdsa[${PYTHON_USEDEP}]
62 + dev-python/jsonrpclib[${PYTHON_USEDEP}]
63 + dev-python/pbkdf2[${PYTHON_USEDEP}]
64 + dev-python/pyaes[${PYTHON_USEDEP}]
65 + dev-python/PySocks[${PYTHON_USEDEP}]
66 + dev-python/qrcode[${PYTHON_USEDEP}]
67 + dev-python/requests[${PYTHON_USEDEP}]
68 + dev-python/setuptools[${PYTHON_USEDEP}]
69 + dev-python/six[${PYTHON_USEDEP}]
70 + dev-python/protobuf-python[${PYTHON_USEDEP}]
71 + qrcode? ( media-gfx/zbar[v4l] )
72 + qt5? (
73 + dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
74 + )
75 + ncurses? ( dev-lang/python )
76 +"
77 +
78 +S="${WORKDIR}/${MY_P}"
79 +
80 +DOCS="RELEASE-NOTES"
81 +
82 +src_prepare() {
83 + eapply "${FILESDIR}/3.1.2-no-user-root.patch"
84 + eapply "${FILESDIR}/3.2.3-pip-optional-pkgs.patch"
85 + eapply "${FILESDIR}/3.3.2-desktop.patch"
86 +
87 + # Prevent icon from being installed in the wrong location
88 + sed -i '/icons_dirname/d' setup.py || die
89 +
90 + # Remove unrequested GUI implementations:
91 + local gui setup_py_gui
92 + for gui in \
93 + $(usex cli '' stdio) \
94 + kivy \
95 + $(usex qt5 '' qt ) \
96 + $(usex ncurses '' text ) \
97 + ; do
98 + rm ${PN}/gui/"${gui}"* -r || die
99 + done
100 +
101 + # And install requested ones...
102 + for gui in \
103 + $(usex !qt5 qt '') \
104 + ; do
105 + sed -i -e "/electrum\.gui\.${gui}/d" setup.py || die
106 + done
107 +
108 + local bestgui
109 + if use qt5; then
110 + bestgui=qt
111 + elif use ncurses; then
112 + bestgui=text
113 + else
114 + bestgui=stdio
115 + fi
116 + sed -i 's/^\([[:space:]]*\)\(config_options\['\''cwd'\''\] = .*\)$/\1\2\n\1config_options.setdefault("gui", "'"${bestgui}"'")\n/' ${PN}/${PN} || die
117 +
118 + local plugin
119 + # trezor requires python trezorlib module
120 + # keepkey requires trezor
121 + for plugin in \
122 + $(usex audio_modem '' audio_modem ) \
123 + $(usex coldcard '' coldcard ) \
124 + $(usex cosign '' cosigner_pool ) \
125 + $(usex digitalbitbox '' digitalbitbox ) \
126 + $(usex email '' email_requests ) \
127 + $(usex greenaddress_it '' greenaddress_instant ) \
128 + hw_wallet \
129 + ledger \
130 + keepkey \
131 + $(usex safe_t '' safe_t ) \
132 + $(usex sync '' labels ) \
133 + $(usex revealer '' revealer ) \
134 + trezor \
135 + $(usex trustedcoin_com '' trustedcoin ) \
136 + $(usex vkb '' virtualkeyboard ) \
137 + ; do
138 + rm -r ${PN}/plugins/"${plugin}"* || die
139 + sed -i "/${plugin}/d" setup.py || die
140 + done
141 +
142 + eapply_user
143 +
144 + xdg_environment_reset
145 + distutils-r1_src_prepare
146 +}
147 +
148 +src_install() {
149 + doicon -s 128 electrum/gui/icons/${PN}.png
150 + distutils-r1_src_install
151 +}
152 +
153 +pkg_postinst() {
154 + xdg_icon_cache_update
155 + xdg_desktop_database_update
156 +}
157 +
158 +pkg_postrm() {
159 + xdg_icon_cache_update
160 + xdg_desktop_database_update
161 +}