From bc62040f8ab602ce6e7a8fdc2a182930167345ea Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sun, 1 Mar 2015 13:42:11 +0000 Subject: Fix bug #510688 and #509028 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) --- net-misc/electrum/ChangeLog | 8 +- net-misc/electrum/electrum-1.9.8-r1.ebuild | 128 +++++++++++++++++++++++++++ net-misc/electrum/files/1.9.8-gtk3-fix.patch | 11 +++ net-misc/electrum/metadata.xml | 8 ++ 4 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 net-misc/electrum/electrum-1.9.8-r1.ebuild create mode 100644 net-misc/electrum/files/1.9.8-gtk3-fix.patch (limited to 'net-misc/electrum') diff --git a/net-misc/electrum/ChangeLog b/net-misc/electrum/ChangeLog index 0b00a5897ceb..429ca8b05594 100644 --- a/net-misc/electrum/ChangeLog +++ b/net-misc/electrum/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/electrum # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/electrum/ChangeLog,v 1.25 2015/02/14 11:57:17 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/electrum/ChangeLog,v 1.26 2015/03/01 13:42:11 blueness Exp $ + +*electrum-1.9.8-r1 (01 Mar 2015) + + 01 Mar 2015; Anthony G. Basile + +electrum-1.9.8-r1.ebuild, +files/1.9.8-gtk3-fix.patch, metadata.xml: + Fix bug #510688 and #509028 14 Feb 2015; Michał Górny electrum-1.9.7.ebuild, electrum-1.9.8.ebuild: diff --git a/net-misc/electrum/electrum-1.9.8-r1.ebuild b/net-misc/electrum/electrum-1.9.8-r1.ebuild new file mode 100644 index 000000000000..629f50f5803f --- /dev/null +++ b/net-misc/electrum/electrum-1.9.8-r1.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/electrum/electrum-1.9.8-r1.ebuild,v 1.1 2015/03/01 13:42:11 blueness Exp $ + +EAPI="5" + +PYTHON_COMPAT=( python{2_6,2_7} ) +PYTHON_REQ_USE="ncurses=" + +inherit eutils distutils-r1 gnome2-utils + +MY_P=Electrum-${PV} +DESCRIPTION="User friendly Bitcoin client" +HOMEPAGE="http://electrum.org/" +SRC_URI="http://download.electrum.org/download/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +LINGUAS="ar_SA cs_CZ de_DE eo_UY es_ES fr_FR hu_HU + id_ID it_IT ja_JP ky_KG lv_LV nl_NL + pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI + ta_IN th_TH vi_VN zh_CN" + +IUSE="aliases cli coinbase_com +fiat gtk3 ncurses pos qrcode +qt4 sync vkb" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +REQUIRED_USE=" + || ( cli gtk3 ncurses qt4 ) + aliases? ( qt4 ) + coinbase_com? ( qt4 ) + fiat? ( qt4 ) + pos? ( qt4 ) + qrcode? ( qt4 ) + sync? ( qt4 ) + vkb? ( qt4 ) +" + +RDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/ecdsa-0.9[${PYTHON_USEDEP}] + dev-python/slowaes[${PYTHON_USEDEP}] + gtk3? ( + dev-python/pygobject:3[${PYTHON_USEDEP}] + x11-libs/gtk+:3[introspection] + ) + qrcode? ( media-gfx/zbar[python,v4l,${PYTHON_USEDEP}] ) + qt4? ( + coinbase_com? ( dev-python/PyQt4[${PYTHON_USEDEP},webkit] ) + dev-python/PyQt4[${PYTHON_USEDEP}] + ) + ncurses? ( dev-lang/python ) +" + +S="${WORKDIR}/${MY_P}" + +DOCS="RELEASE-NOTES" + +src_prepare() { + # Prevent .desktop, icon, and translations from being installed in the wrong locations + epatch "${FILESDIR}"/setup.py-1.9.7.patch + + epatch "${FILESDIR}"/electrum.desktop-1.9.7.patch + validate_desktop_entries + + # Bugfix + epatch "${FILESDIR}/${PV}-gtk3-fix.patch" + + # Remove unrequested localization files: + for lang in ${LINGUAS}; do + if use linguas_${lang}; then + test -f "locale/${lang}/LC_MESSAGES/${PN}.mo" || die + else + rm -r "locale/${lang}" || die + fi + done + + # Remove unrequested GUI implementations: + local gui + for gui in \ + $(usex cli '' stdio) \ + $(usex gtk3 '' gtk ) \ + $(usex qt4 '' qt ) \ + $(usex ncurses '' text ) \ + ; do + sed -i "/'electrum_gui\.${gui}/d" setup.py || die + done + + if ! use qt4; then + local bestgui=$(usex gtk3 gtk $(usex ncurses text stdio)) + sed -i "s/\(config.get('gui', \?\)'classic'/\1'${bestgui}'/" electrum || die + fi + + local plugin + for plugin in \ + $(usex aliases '' aliases ) \ + $(usex coinbase_com '' coinbase_buyback) \ + $(usex fiat '' exchange_rate ) \ + $(usex sync '' labels ) \ + $(usex pos '' pointofsale ) \ + $(usex qrcode '' qrscanner ) \ + $(usex vkb '' virtualkeyboard ) \ + ; do + sed -i "/'electrum_plugins\.${plugin}/d" setup.py || die + done + + distutils-r1_src_prepare +} + +src_install() { + doicon -s 128 icons/${PN}.png + distutils-r1_src_install +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/net-misc/electrum/files/1.9.8-gtk3-fix.patch b/net-misc/electrum/files/1.9.8-gtk3-fix.patch new file mode 100644 index 000000000000..c101d2f61c25 --- /dev/null +++ b/net-misc/electrum/files/1.9.8-gtk3-fix.patch @@ -0,0 +1,11 @@ +--- Electrum-1.9.8/gui/gtk.py 2014-03-11 14:12:31.000000000 +0000 ++++ Electrum-1.9.8/gui/gtk.py 2015-03-01 08:01:02.851740805 +0000 +@@ -87,7 +87,7 @@ + # ask if the user wants to create a new wallet, or recover from a seed. + # if he wants to recover, and nothing is found, do not create wallet + dialog = Gtk.Dialog("electrum", parent=None, +- flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.NO_SEPARATOR, ++ flags=Gtk.DialogFlags.MODAL | getattr(Gtk.DialogFlags, 'NO_SEPARATOR', 0), + buttons= ("create", 0, "restore",1, "cancel",2) ) + + label = Gtk.Label("Wallet file not found.\nDo you want to create a new wallet,\n or to restore an existing one?" ) diff --git a/net-misc/electrum/metadata.xml b/net-misc/electrum/metadata.xml index 9a0abf718e35..5de1fa13ba21 100644 --- a/net-misc/electrum/metadata.xml +++ b/net-misc/electrum/metadata.xml @@ -19,6 +19,14 @@ Emery Hemingway + Enable plugin for looking up aliases + Enables the CLI interface + Enable plugin to use Coinbase.com's buyback program + Enable plugin for looking up fiat values of bitcoin + Enable support for gtk+3 + Enable plugin for point-of-sale operation Enable QR code scanning with media-gfx/zbar/ + Enable plugin to sync wallet metadata across multiple Electrum clients + Enable plugin for virtual keyboard -- cgit v1.2.3-65-gdbad