Gentoo Archives: gentoo-commits

From: Kristian Fiskerstrand <k_f@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/deluge/files/, net-p2p/deluge/
Date: Mon, 16 Oct 2017 20:38:45
Message-Id: 1508186205.9180e836c5fbd22c5aecde178597faa0bcaaf30e.k_f@gentoo
1 commit: 9180e836c5fbd22c5aecde178597faa0bcaaf30e
2 Author: PPed72 <paolo.pedroni <AT> iol <DOT> it>
3 AuthorDate: Wed Aug 30 14:38:06 2017 +0000
4 Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 16 20:36:45 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9180e836
7
8 net-p2p/deluge: fix to preferences ui
9
10 Bug: https://bugs.gentoo.org/623650
11
12 net-p2p/deluge/deluge-1.3.15-r1.ebuild | 144 +++++++++++++++++++++
13 .../deluge-1.3.15-r1-fix-preferences-ui.patch | 32 +++++
14 2 files changed, 176 insertions(+)
15
16 diff --git a/net-p2p/deluge/deluge-1.3.15-r1.ebuild b/net-p2p/deluge/deluge-1.3.15-r1.ebuild
17 new file mode 100644
18 index 00000000000..e76bbab1485
19 --- /dev/null
20 +++ b/net-p2p/deluge/deluge-1.3.15-r1.ebuild
21 @@ -0,0 +1,144 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI="6"
26 +
27 +PYTHON_COMPAT=( python2_7 )
28 +DISTUTILS_SINGLE_IMPL=1
29 +PLOCALES="af ar ast be bg bn bs ca cs cy da de el en_AU en_CA en_GB eo es et eu fa fi fo fr fy ga gl he hi hr hu id is it iu ja ka kk km kn ko ku ky la lb lt lv mk ml ms nap nb nds nl nn oc pl pms pt pt_BR ro ru si sk sl sr sv ta te th tl tlh tr uk ur vi zh_CN zh_HK zh_TW"
30 +inherit distutils-r1 eutils systemd user l10n
31 +
32 +DESCRIPTION="BitTorrent client with a client/server model"
33 +HOMEPAGE="http://deluge-torrent.org/"
34 +
35 +if [[ ${PV} == 9999 ]]; then
36 + inherit git-r3
37 + EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
38 + http://git.deluge-torrent.org/${PN}"
39 + SRC_URI=""
40 + KEYWORDS="~amd64 ~x86"
41 +else
42 + SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
43 + KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
44 +fi
45 +
46 +LICENSE="GPL-2"
47 +SLOT="0"
48 +IUSE="console geoip gtk libnotify sound webinterface"
49 +REQUIRED_USE="
50 + ${PYTHON_REQUIRED_USE}
51 + sound? ( gtk )
52 + libnotify? ( gtk )
53 +"
54 +PATCHES=(
55 + "${FILESDIR}/${PN}-1.3.5-disable_libtorrent_internal_copy.patch"
56 + "${FILESDIR}/${PN}-1.3.15-r1-fix-preferences-ui.patch"
57 +)
58 +
59 +CDEPEND="<net-libs/libtorrent-rasterbar-1.1[python,${PYTHON_USEDEP}]"
60 +DEPEND="${CDEPEND}
61 + dev-python/setuptools[${PYTHON_USEDEP}]
62 + dev-util/intltool"
63 +RDEPEND="${CDEPEND}
64 + dev-python/chardet[${PYTHON_USEDEP}]
65 + dev-python/pyopenssl[${PYTHON_USEDEP}]
66 + dev-python/pyxdg[${PYTHON_USEDEP}]
67 + dev-python/setproctitle[${PYTHON_USEDEP}]
68 + || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
69 + (
70 + >=dev-python/twisted-core-13.0[${PYTHON_USEDEP}]
71 + >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
72 + )
73 + )
74 + geoip? ( dev-libs/geoip )
75 + gtk? (
76 + sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
77 + dev-python/pygobject:2[${PYTHON_USEDEP}]
78 + >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
79 + gnome-base/librsvg
80 + libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
81 + )
82 + webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
83 +
84 +python_prepare_all() {
85 + local args=(
86 + -e "/Compiling po file/a \\\tuptoDate = False"
87 + )
88 + sed -i "${args[@]}" -- 'setup.py' || die
89 + args=(
90 + -e 's|"new_release_check": True|"new_release_check": False|'
91 + -e 's|"check_new_releases": True|"check_new_releases": False|'
92 + -e 's|"show_new_releases": True|"show_new_releases": False|'
93 + )
94 + sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
95 +
96 + local loc_dir="${S}/deluge/i18n"
97 + l10n_find_plocales_changes "${loc_dir}" "" ".po"
98 + rm_loc() {
99 + rm -vf "${loc_dir}/${1}.po" || die
100 + }
101 + l10n_for_each_disabled_locale_do rm_loc
102 +
103 + distutils-r1_python_prepare_all
104 +}
105 +
106 +esetup.py() {
107 + # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
108 + # Override this call from the distutils-r1 eclass.
109 + # This does not respect the distutils-r1 API. DONOT copy this example.
110 + set -- "${PYTHON}" setup.py "$@"
111 + echo "$@"
112 + "$@" || die
113 +}
114 +
115 +python_install_all() {
116 + distutils-r1_python_install_all
117 + if ! use console ; then
118 + rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
119 + rm -f "${D}/usr/bin/deluge-console" || die
120 + rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
121 + fi
122 + if ! use gtk ; then
123 + rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
124 + rm -rf "${D}/usr/share/icons/" || die
125 + rm -f "${D}/usr/bin/deluge-gtk" || die
126 + rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
127 + rm -f "${D}/usr/share/applications/deluge.desktop" || die
128 + fi
129 + if use webinterface; then
130 + newinitd "${FILESDIR}/deluge-web.init" deluge-web
131 + newconfd "${FILESDIR}/deluge-web.conf" deluge-web
132 + systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
133 + systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
134 + else
135 + rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
136 + rm -f "${D}/usr/bin/deluge-web" || die
137 + rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
138 + fi
139 + newinitd "${FILESDIR}"/deluged.init-2 deluged
140 + newconfd "${FILESDIR}"/deluged.conf-2 deluged
141 + systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
142 + systemd_install_serviced "${FILESDIR}"/deluged.service.conf
143 +}
144 +
145 +pkg_postinst() {
146 + enewgroup ${PN}
147 + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
148 + elog
149 + elog "If, after upgrading, deluge doesn't work, please remove the"
150 + elog "'~/.config/deluge' directory and try again, but make a backup"
151 + elog "first!"
152 + elog
153 + elog "To start the daemon either run 'deluged' as user"
154 + elog "or modify /etc/conf.d/deluged and run"
155 + elog "/etc/init.d/deluged start as root"
156 + elog "You can still use deluge the old way"
157 + elog
158 + elog "Systemd unit files for deluged and deluge-web no longer source"
159 + elog "/etc/conf.d/deluge* files. Environment variable customization now"
160 + elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
161 + elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
162 + elog
163 + elog "For more information look at http://dev.deluge-torrent.org/wiki/Faq"
164 + elog
165 +}
166
167 diff --git a/net-p2p/deluge/files/deluge-1.3.15-r1-fix-preferences-ui.patch b/net-p2p/deluge/files/deluge-1.3.15-r1-fix-preferences-ui.patch
168 new file mode 100644
169 index 00000000000..a63e5de10de
170 --- /dev/null
171 +++ b/net-p2p/deluge/files/deluge-1.3.15-r1-fix-preferences-ui.patch
172 @@ -0,0 +1,32 @@
173 +From 38d7b7cdfde3c50d6263602ffb03af92fcbfa52e Mon Sep 17 00:00:00 2001
174 +From: Calum Lind <calumlind+deluge@×××××.com>
175 +Date: Sat, 13 May 2017 00:05:48 +0100
176 +Subject: [GTKUI] Fix keyerror showing prefs
177 +
178 + * Fix the single_proxy ui to True as unlikely any users using <=0.15
179 + and need to have different proxy type settings.
180 +---
181 + deluge/ui/gtkui/preferences.py | 7 ++-----
182 + 1 file changed, 2 insertions(+), 5 deletions(-)
183 +
184 +diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py
185 +index 645ad26..efcd93d 100644
186 +--- a/deluge/ui/gtkui/preferences.py
187 ++++ b/deluge/ui/gtkui/preferences.py
188 +@@ -318,11 +318,8 @@ class Preferences(component.Component):
189 + }
190 + # Add proxy stuff
191 +
192 +- # Display workaround for single proxy in libtorrent >v0.16
193 +- try:
194 +- lt_single_proxy = component.get("PreferencesManager").LT_SINGLE_PROXY
195 +- except AttributeError:
196 +- lt_single_proxy = False
197 ++ # Display workaround for single proxy in libtorrent >= v0.16
198 ++ lt_single_proxy = True
199 +
200 + for t in ("peer", "web_seed", "tracker", "dht"):
201 + if lt_single_proxy and not t == "peer":
202 +--
203 +cgit v1.1
204 +