Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/anarchy:master commit in: net-misc/wicd/files/, net-misc/wicd/
Date: Mon, 31 Oct 2011 17:12:30
Message-Id: e497b74c1ac94d1fef773a6d9aa29e7b08863f24.anarchy@gentoo
1 commit: e497b74c1ac94d1fef773a6d9aa29e7b08863f24
2 Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 31 17:12:00 2011 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 31 17:12:00 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/anarchy.git;a=commit;h=e497b74c
7
8 modified icon package now avaliable via mac4lin useflag
9
10 ---
11 net-misc/wicd/Manifest | 9 ++
12 net-misc/wicd/files/add-wpa-psk-hex-template.patch | 29 +++++
13 net-misc/wicd/files/fix-ad-hoc-networking.patch | 11 ++
14 net-misc/wicd/files/wicd-1.7.1_beta2-init.patch | 11 ++
15 .../wicd/files/wicd-1.7.1_beta2-urwid-1.0.patch | 20 +++
16 net-misc/wicd/files/wicd-init-sve-start.patch | 10 ++
17 net-misc/wicd/metadata.xml | 22 ++++
18 net-misc/wicd/wicd-1.7.1_beta2-r7.ebuild | 122 ++++++++++++++++++++
19 8 files changed, 234 insertions(+), 0 deletions(-)
20
21 diff --git a/net-misc/wicd/Manifest b/net-misc/wicd/Manifest
22 new file mode 100644
23 index 0000000..0fd80db
24 --- /dev/null
25 +++ b/net-misc/wicd/Manifest
26 @@ -0,0 +1,9 @@
27 +AUX add-wpa-psk-hex-template.patch 980 RMD160 9071bc60a01d2637df92309e183c11286c790f49 SHA1 febafc67f6501af227964e7a8af8d45ab0b6a0e4 SHA256 d5e45971adb2cd8649c81ce3a4edfb4bda954981767ff8a95374b062b460fca7
28 +AUX fix-ad-hoc-networking.patch 729 RMD160 4e2a7b36eade357aa7fcd83b8d37e4ec9052212e SHA1 60b69e24e06f10e6d8dce99c6f89c33db79d644a SHA256 1e476d6fe340bc652c747e544b8795f5f01d5c899986fe179ba370a167a441f4
29 +AUX wicd-1.7.1_beta2-init.patch 409 RMD160 58abdf5debc49517977dd5b691c6fe24cd8303c6 SHA1 4c24f4bb924035e109e905789a7669d6e7b0e7ed SHA256 473146793cc9cf8b2b780c1ce13f27138662f9942b53e5a7e293634196fbebcf
30 +AUX wicd-1.7.1_beta2-urwid-1.0.patch 895 RMD160 13aec910e261d4f5574a9aebc365570b03089fe5 SHA1 db2b6a4811a9413ca4d8137bd387fdfdee4e718a SHA256 2988afdd35f7d9d0d374ce523a9c4ed193e25e70fd6eb2e9a05ec8b520e952ff
31 +AUX wicd-init-sve-start.patch 317 RMD160 e08a391b31c6d48e67ad51bcd8fb08457bbc0ebc SHA1 149775d7ef4deffc4e66f73fa47276ca194c92cb SHA256 20d7ada99465da5b50d03e5ef117226910bc20288278f6f788be3fbff05716db
32 +DIST wicd-1.7.1b2.tar.bz2 509990 RMD160 587e922271d017eb67499f64c2502b02def44f9d SHA1 2e3d2346f1607f7f63bb00bf7fef41bc5a419726 SHA256 810d51b3eec10be39b399f8baa0b2ef36ed7bb14606f9e0844bea11b8532ea8d
33 +DIST wicd-mac4lin-icons.tar.bz2 125113 RMD160 b6c88fd0f9ac8bd4694efeb23eab0df582636376 SHA1 3ece6bfdd58bfee5de107d0d6ef5dc474e3c4e53 SHA256 73ece7db5bb080659ae4c18d6078ec3fffd0eae5abf22a71e595b69a0e11f13c
34 +EBUILD wicd-1.7.1_beta2-r7.ebuild 3978 RMD160 cf58f1d3291a5b5bf4ba5bdbd968249839c97d03 SHA1 5e0d30be9b4d2aec6a86d4da0a1786e1dafc8c1e SHA256 8fdc54446d2c3fca64f375d68a411a7e5c16076536915a349cc7bb9843a2ff32
35 +MISC metadata.xml 859 RMD160 1809a78002a3e58a0b5283a03de02d129a1e57f9 SHA1 6e366622688eda2ea1bbf75f6358a2b25e550459 SHA256 674f4e5d3063fa47f953341f0cb39d4abe65538510c5b29a0255896903fd1653
36
37 diff --git a/net-misc/wicd/files/add-wpa-psk-hex-template.patch b/net-misc/wicd/files/add-wpa-psk-hex-template.patch
38 new file mode 100644
39 index 0000000..21daaf3
40 --- /dev/null
41 +++ b/net-misc/wicd/files/add-wpa-psk-hex-template.patch
42 @@ -0,0 +1,29 @@
43 +diff -U 3 -dHrN wicd-1.7.1b2/encryption/templates/active wicd-1.7.1b2.new/encryption/templates/active
44 +--- wicd-1.7.1b2/encryption/templates/active 2010-10-29 16:36:55.000000000 +0100
45 ++++ wicd-1.7.1b2.new/encryption/templates/active 2011-09-13 19:58:54.000000000 +0100
46 +@@ -1,5 +1,6 @@
47 + wpa
48 + wpa-psk
49 ++wpa-psk-hex
50 + wep-hex
51 + wep-passphrase
52 + wep-shared
53 +diff -U 3 -dHrN wicd-1.7.1b2/encryption/templates/wpa-psk-hex wicd-1.7.1b2.new/encryption/templates/wpa-psk-hex
54 +--- wicd-1.7.1b2/encryption/templates/wpa-psk-hex 1970-01-01 01:00:00.000000000 +0100
55 ++++ wicd-1.7.1b2.new/encryption/templates/wpa-psk-hex 2011-09-13 19:59:11.000000000 +0100
56 +@@ -0,0 +1,15 @@
57 ++name = WPA 1/2 (Preshared Hex Key)
58 ++author = Thomas Kahle
59 ++version = 1
60 ++require apsk *Preshared_Key
61 ++-----
62 ++ctrl_interface=/var/run/wpa_supplicant
63 ++network={
64 ++ ssid="$_ESSID"
65 ++ scan_ssid=$_SCAN
66 ++ proto=WPA RSN
67 ++ key_mgmt=WPA-PSK
68 ++ pairwise=CCMP TKIP
69 ++ group=CCMP TKIP
70 ++ psk=$_APSK
71 ++}
72
73 diff --git a/net-misc/wicd/files/fix-ad-hoc-networking.patch b/net-misc/wicd/files/fix-ad-hoc-networking.patch
74 new file mode 100644
75 index 0000000..344e51a
76 --- /dev/null
77 +++ b/net-misc/wicd/files/fix-ad-hoc-networking.patch
78 @@ -0,0 +1,11 @@
79 +--- wicd-1.7.0/wicd/wnettools.py 2010-01-15 12:49:11.000000000 +0800
80 ++++ wicd-1.7.0.patched/wicd/wnettools.py 2010-12-12 03:50:31.000000000 +0800
81 +@@ -59,7 +59,7 @@ wpa2_pattern = re.compile('(WPA2)', _re_
82 +
83 + #iwconfig-only regular expressions.
84 + ip_pattern = re.compile(r'inet [Aa]d?dr[^.]*:([^.]*\.[^.]*\.[^.]*\.[0-9]*)', re.S)
85 +-bssid_pattern = re.compile('.*Access Point: (([0-9A-Z]{2}:){5}[0-9A-Z]{2})', _re_mode)
86 ++bssid_pattern = re.compile('.*[(Access Point)|(Cell)]: (([0-9A-Z]{2}:){5}[0-9A-Z]{2})', _re_mode)
87 + bitrate_pattern = re.compile('.*Bit Rate[=:](.*?/s)', _re_mode)
88 + opmode_pattern = re.compile('.*Mode:(.*?) ', _re_mode)
89 + authmethods_pattern = re.compile('.*Authentication capabilities :\n(.*?)Current', _re_mode)
90
91 diff --git a/net-misc/wicd/files/wicd-1.7.1_beta2-init.patch b/net-misc/wicd/files/wicd-1.7.1_beta2-init.patch
92 new file mode 100644
93 index 0000000..6a736f9
94 --- /dev/null
95 +++ b/net-misc/wicd/files/wicd-1.7.1_beta2-init.patch
96 @@ -0,0 +1,11 @@
97 +--- in/init=gentoo=wicd.in 2010-10-29 11:36:55.000000000 -0400
98 ++++ in/init=gentoo=wicd.in.new 2011-03-28 09:40:27.245339002 -0400
99 +@@ -15,7 +15,7 @@
100 + start() {
101 + ebegin "Starting wicd daemon"
102 + # fix Gentoo bug 296197
103 +- sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf
104 ++ [ -f /etc/wicd/wired-settings.conf ] && sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf
105 + "${WICD_DAEMON}" >/dev/null 2>&1
106 + eend $?
107 + }
108
109 diff --git a/net-misc/wicd/files/wicd-1.7.1_beta2-urwid-1.0.patch b/net-misc/wicd/files/wicd-1.7.1_beta2-urwid-1.0.patch
110 new file mode 100644
111 index 0000000..b1b5abc
112 --- /dev/null
113 +++ b/net-misc/wicd/files/wicd-1.7.1_beta2-urwid-1.0.patch
114 @@ -0,0 +1,20 @@
115 +--- /usr/share/wicd/curses/wicd-curses.py.old 2011-10-01 14:54:47.478406517 +0400
116 ++++ /usr/share/wicd/curses/wicd-curses.py 2011-10-01 14:49:50.781273004 +0400
117 +@@ -241,7 +241,7 @@
118 + # Don't stop because someone let go of the mouse on the frame
119 + mouse_release = False
120 + for k in keys:
121 +- if urwid.is_mouse_event(k) and k[0] == "mouse release":
122 ++ if urwid.util.is_mouse_event(k) and k[0] == "mouse release":
123 + mouse_release = True
124 + break
125 + if mouse_release :
126 +@@ -882,7 +882,7 @@
127 + data[4], False)
128 +
129 + for k in keys:
130 +- if urwid.is_mouse_event(k):
131 ++ if urwid.util.is_mouse_event(k):
132 + event, button, col, row = k
133 + self.frame.mouse_event( self.size,
134 + event, button, col, row,
135
136 diff --git a/net-misc/wicd/files/wicd-init-sve-start.patch b/net-misc/wicd/files/wicd-init-sve-start.patch
137 new file mode 100644
138 index 0000000..c631492
139 --- /dev/null
140 +++ b/net-misc/wicd/files/wicd-init-sve-start.patch
141 @@ -0,0 +1,10 @@
142 +diff -U 3 -dHrN wicd-1.7.1b2.old/in/init=gentoo=wicd.in wicd-1.7.1b2/in/init=gentoo=wicd.in
143 +--- wicd-1.7.1b2.old/in/init=gentoo=wicd.in 2011-05-07 20:52:13.000000000 +0200
144 ++++ wicd-1.7.1b2/in/init=gentoo=wicd.in 2011-05-07 20:52:43.000000000 +0200
145 +@@ -35,5 +35,5 @@
146 +
147 + restart() {
148 + force_kill
149 +- start
150 ++ sve_start
151 + }
152
153 diff --git a/net-misc/wicd/metadata.xml b/net-misc/wicd/metadata.xml
154 new file mode 100644
155 index 0000000..71524bb
156 --- /dev/null
157 +++ b/net-misc/wicd/metadata.xml
158 @@ -0,0 +1,22 @@
159 +<?xml version="1.0" encoding="UTF-8"?>
160 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
161 +<pkgmetadata>
162 +<maintainer>
163 + <email>tomka@g.o</email>
164 + <name>Thomas Kahle</name>
165 +</maintainer>
166 +<maintainer>
167 + <email>c1pher@g.o</email>
168 + <name>Dane Smith</name>
169 +</maintainer>
170 +<use>
171 + <flag name='gtk'>Installs a gtk UI. This is enabled by default because it is
172 + intended behavior. Requires <pkg>dev-python/pygtk</pkg></flag>
173 + <flag name='ioctl'>Installs additional python libraries to use as a backend.
174 + This will improve speed but is experimental.</flag>
175 + <flag name='ncurses'>Installs a ncurses UI</flag>
176 + <flag name='pm-utils'>Installs the pm-utils hooks for suspend/resume and
177 + requires <pkg>sys-power/pm-utils</pkg></flag>
178 + <flag name='mac4lin'>Install icons that match mac4lin icons for system tray"</flag>
179 +</use>
180 +</pkgmetadata>
181
182 diff --git a/net-misc/wicd/wicd-1.7.1_beta2-r7.ebuild b/net-misc/wicd/wicd-1.7.1_beta2-r7.ebuild
183 new file mode 100644
184 index 0000000..8ec1d25
185 --- /dev/null
186 +++ b/net-misc/wicd/wicd-1.7.1_beta2-r7.ebuild
187 @@ -0,0 +1,122 @@
188 +# Copyright 1999-2011 Gentoo Foundation
189 +# Distributed under the terms of the GNU General Public License v2
190 +# $Header: /var/cvsroot/gentoo-x86/net-misc/wicd/wicd-1.7.1_beta2-r7.ebuild,v 1.3 2011/10/27 21:04:41 tomka Exp $
191 +
192 +EAPI=3
193 +
194 +PYTHON_DEPEND="2"
195 +PYTHON_USE_WITH="ncurses? xml"
196 +SUPPORT_PYTHON_ABIS="1"
197 +RESTRICT_PYTHON_ABIS="3.* *-jython"
198 +DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
199 +
200 +inherit eutils distutils
201 +
202 +MY_P=${P/_beta/b}
203 +S="${WORKDIR}/${MY_P}"
204 +
205 +DESCRIPTION="A lightweight wired and wireless network manager for Linux"
206 +HOMEPAGE="http://wicd.sourceforge.net/"
207 +SRC_URI="http://downloads.wicd.net/src/testing/1.7.x/${MY_P}.tar.bz2
208 + mac4lin? ( http://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.bz2 ) "
209 +
210 +LICENSE="GPL-2"
211 +SLOT="0"
212 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
213 +IUSE="X +gtk ioctl libnotify mac4lin ncurses nls +pm-utils"
214 +
215 +DEPEND=""
216 +# Maybe virtual/dhcp would work, but there are enough problems with
217 +# net-misc/dhcp that I want net-misc/dhcpcd to be guarenteed to be considered
218 +# first if none are installed.
219 +RDEPEND="
220 + dev-python/dbus-python
221 + X? ( gtk? ( dev-python/pygtk
222 + || (
223 + x11-libs/gksu
224 + kde-base/kdesu
225 + )
226 + )
227 + )
228 + || (
229 + net-misc/dhcpcd
230 + net-misc/dhcp
231 + net-misc/pump
232 + )
233 + net-wireless/wireless-tools
234 + net-wireless/wpa_supplicant
235 + || (
236 + sys-apps/net-tools
237 + sys-apps/ethtool
238 + )
239 + !gtk? ( dev-python/pygobject:2 )
240 + ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl )
241 + libnotify? ( dev-python/notify-python )
242 + ncurses? (
243 + >=dev-python/urwid-1.0.0
244 + dev-python/pygobject:2
245 + )
246 + pm-utils? ( >=sys-power/pm-utils-1.1.1 )
247 + "
248 +DOCS="CHANGES NEWS AUTHORS README"
249 +
250 +src_prepare() {
251 + epatch "${FILESDIR}"/${P}-init.patch
252 + # Fix urwid calls
253 + epatch "${FILESDIR}/${P}"-urwid-1.0.patch
254 + epatch "${FILESDIR}"/${PN}-init-sve-start.patch
255 + # Fix ad-hoc networking (bug 351337)
256 + epatch "${FILESDIR}"/fix-ad-hoc-networking.patch
257 + # Add a template for hex psk's and wpa (Bug 306423)
258 + epatch "${FILESDIR}"/add-wpa-psk-hex-template.patch
259 + # get rid of opts variable to fix bug 381885
260 + sed -i "/opts/d" "in/init=gentoo=wicd.in"
261 + # Need to ensure that generated scripts use Python 2 at run time.
262 + sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
263 + -i setup.py || die "sed failed"
264 + python_copy_sources
265 +}
266 +
267 +src_configure() {
268 + local myconf
269 + use gtk || myconf="${myconf} --no-install-gtk"
270 + use libnotify || myconf="${myconf} --no-use-notifications"
271 + use ncurses || myconf="${myconf} --no-install-ncurses"
272 + use pm-utils || myconf="${myconf} --no-install-pmutils"
273 + configuration() {
274 + $(PYTHON) ./setup.py configure --no-install-docs --resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose ${myconf}
275 + }
276 + python_execute_function -s configuration
277 +}
278 +
279 +src_install() {
280 + distutils_src_install
281 + keepdir /var/lib/wicd/configurations \
282 + || die "keepdir failed, critical for this app"
283 + keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} \
284 + || die "keepdir failed, critical for this app"
285 + keepdir /var/log/wicd \
286 + || die "keepdir failed, critical for this app"
287 + use nls || rm -rf "${D}"/usr/share/locale
288 + if use mac4lin; then
289 + rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
290 + mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
291 + fi
292 +}
293 +
294 +pkg_postinst() {
295 + distutils_pkg_postinst
296 +
297 + elog "You may need to restart the dbus service after upgrading wicd."
298 + echo
299 + elog "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:"
300 + elog "- Remove all net.* initscripts (except for net.lo) from all runlevels"
301 + elog "- Add these scripts to the RC_PLUG_SERVICES line in /etc/rc.conf"
302 + elog "(For example, rc_hotplug=\"!net.eth* !net.wlan*\")"
303 + # Maintainer's note: the consolekit use flag short circuits a dbus rule and
304 + # allows the connection. Else, you need to be in the group.
305 + if ! has_version sys-auth/pambase[consolekit]; then
306 + ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
307 + ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
308 + fi
309 +}