1 |
commit: 400c96c55bd2bdcdc7501923258765a449768060 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 9 12:07:55 2016 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 9 12:11:24 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=400c96c5 |
7 |
|
8 |
net-misc/wicd: gksu is dead for ages and vulnerable, drop optional dep |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
net-misc/wicd/wicd-1.7.4-r2.ebuild | 151 +++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 151 insertions(+) |
14 |
|
15 |
diff --git a/net-misc/wicd/wicd-1.7.4-r2.ebuild b/net-misc/wicd/wicd-1.7.4-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000..70e442f |
18 |
--- /dev/null |
19 |
+++ b/net-misc/wicd/wicd-1.7.4-r2.ebuild |
20 |
@@ -0,0 +1,151 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python2_7 ) |
28 |
+PYTHON_REQ_USE="ncurses?,xml" |
29 |
+ |
30 |
+inherit eutils distutils-r1 linux-info readme.gentoo-r1 systemd |
31 |
+ |
32 |
+DESCRIPTION="A lightweight wired and wireless network manager for Linux" |
33 |
+HOMEPAGE="https://launchpad.net/wicd" |
34 |
+SRC_URI="https://launchpad.net/wicd/1.7/${PV}/+download/${P}.tar.gz |
35 |
+ mac4lin? ( https://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.xz ) |
36 |
+ ambiance? ( http://freetimesblog.altervista.org/blog/wp-content/uploads/downloads/2010/05/Icone-Wicd-Lucid.tar.gz )" |
37 |
+ |
38 |
+LICENSE="GPL-2" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" |
41 |
+IUSE="doc X ambiance +gtk ioctl libnotify mac4lin ncurses nls +pm-utils gnome-shell" |
42 |
+ |
43 |
+DEPEND="nls? ( dev-python/Babel[${PYTHON_USEDEP}] )" |
44 |
+RDEPEND="${PYTHON_DEPS} |
45 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
46 |
+ X? ( |
47 |
+ gtk? ( dev-python/pygtk[${PYTHON_USEDEP}] ) |
48 |
+ || ( |
49 |
+ x11-misc/ktsuss |
50 |
+ kde-apps/kdesu |
51 |
+ ) |
52 |
+ ) |
53 |
+ || ( |
54 |
+ net-misc/dhcpcd |
55 |
+ net-misc/dhcp |
56 |
+ net-misc/pump |
57 |
+ ) |
58 |
+ net-wireless/wireless-tools |
59 |
+ net-wireless/wpa_supplicant |
60 |
+ || ( |
61 |
+ sys-apps/net-tools |
62 |
+ sys-apps/ethtool |
63 |
+ ) |
64 |
+ !gtk? ( dev-python/pygobject:2[${PYTHON_USEDEP}] ) |
65 |
+ ioctl? ( dev-python/python-iwscan[${PYTHON_USEDEP}] |
66 |
+ dev-python/python-wpactrl[${PYTHON_USEDEP}] ) |
67 |
+ libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] ) |
68 |
+ ncurses? ( |
69 |
+ dev-python/urwid[${PYTHON_USEDEP}] |
70 |
+ dev-python/pygobject:2[${PYTHON_USEDEP}] |
71 |
+ ) |
72 |
+ pm-utils? ( sys-power/pm-utils ) |
73 |
+ gnome-shell? ( gnome-base/gnome-shell ) |
74 |
+ net-wireless/rfkill |
75 |
+ " |
76 |
+PATCHES=( |
77 |
+ "${FILESDIR}"/${PN}-init-sve-start.patch |
78 |
+ # The Categories entry in the .desktop files is outdated |
79 |
+ "${FILESDIR}"/${PN}-1.7.2.4-fix-desktop-categories.patch |
80 |
+ # Upstream bug https://bugs.launchpad.net/wicd/+bug/1412413 |
81 |
+ # Creates files -> give -p |
82 |
+ "${FILESDIR}"/${PN}-1.7.3-add-missing-gnome-shell-extension.patch |
83 |
+ # If LANG is undefined, build can fail (bug 537202) |
84 |
+ "${FILESDIR}"/${PN}-1.7.3-undefined-LANG.patch |
85 |
+ # Fix urwid compat again |
86 |
+ "${FILESDIR}"/${PN}-1.7.3-urwid-1.3.0.patch |
87 |
+ # Another compatibility patch from launchpad bug 1075399 |
88 |
+ "${FILESDIR}"/${PN}-1.7.3-bitrate-property.patch |
89 |
+) |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ CONFIG_CHECK="~CFG80211_WEXT" |
93 |
+ local WARNING_CFG80211_WEXT="Wireless extensions have not been \ |
94 |
+ configured in your kernel. Wicd will not work unless CFG80211_WEXT is set." |
95 |
+ check_extra_config |
96 |
+ |
97 |
+ default |
98 |
+ |
99 |
+ # get rid of opts variable to fix bug 381885 |
100 |
+ sed -i "/opts/d" "in/init=gentoo=wicd.in" || die |
101 |
+ # Need to ensure that generated scripts use Python 2 at run time. |
102 |
+ sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \ |
103 |
+ -i setup.py || die "sed failed" |
104 |
+ # Fix misc helper scripts: |
105 |
+ sed -e "s:/usr/bin/env python:/usr/bin/env python2:" \ |
106 |
+ -i wicd/suspend.py wicd/autoconnect.py wicd/monitor.py || die |
107 |
+ # fix shebang for openrc init script (bug #573846) |
108 |
+ sed 's@/sbin/runscript@/sbin/openrc-run@' \ |
109 |
+ -i in/init=gentoo=wicd.in || die |
110 |
+ if use nls; then |
111 |
+ # Asturian is faulty with PyBabel |
112 |
+ # (https://bugs.launchpad.net/wicd/+bug/928589) |
113 |
+ rm po/ast.po |
114 |
+ # zh_CN fails with newer PyBabel (Aug 2013) |
115 |
+ rm po/zh_CN.po |
116 |
+ else |
117 |
+ # nuke translations |
118 |
+ rm po/*.po |
119 |
+ fi |
120 |
+ |
121 |
+ DOC_CONTENTS="To start wicd at boot with openRC, add |
122 |
+ /etc/init.d/wicd to a runlevel and: (1) Remove all net.* |
123 |
+ initscripts (except for net.lo) from all runlevels (2) Add these |
124 |
+ scripts to the RC_PLUG_SERVICES line in /etc/rc.conf (For |
125 |
+ example, rc_hotplug=\"!net.eth* !net.wlan*\")" |
126 |
+} |
127 |
+ |
128 |
+src_configure() { |
129 |
+ local myconf |
130 |
+ use gtk || myconf="${myconf} --no-install-gtk" |
131 |
+ use libnotify || myconf="${myconf} --no-use-notifications" |
132 |
+ use ncurses || myconf="${myconf} --no-install-ncurses" |
133 |
+ use pm-utils || myconf="${myconf} --no-install-pmutils" |
134 |
+ use gnome-shell || myconf="${myconf} --no-install-gnome-shell-extensions" |
135 |
+ python_setup |
136 |
+ "${EPYTHON}" ./setup.py configure --no-install-docs \ |
137 |
+ --resume=/usr/share/wicd/scripts/ \ |
138 |
+ --suspend=/usr/share/wicd/scripts/ \ |
139 |
+ --verbose ${myconf} |
140 |
+} |
141 |
+ |
142 |
+src_install() { |
143 |
+ distutils-r1_src_install |
144 |
+ keepdir /var/lib/wicd/configurations |
145 |
+ keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} |
146 |
+ keepdir /var/log/wicd |
147 |
+ use nls || rm -rf "${D}"/usr/share/locale |
148 |
+ systemd_dounit "${S}/other/wicd.service" |
149 |
+ |
150 |
+ if use mac4lin; then |
151 |
+ rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons" |
152 |
+ mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/ |
153 |
+ fi |
154 |
+ if use ambiance; then |
155 |
+ # Overwrite tray icons with ambiance icon |
156 |
+ rm "${WORKDIR}/Icone Wicd Lucid"/signal* |
157 |
+ cp "${WORKDIR}/Icone Wicd Lucid"/*.png "${D}"/usr/share/pixmaps/wicd/ |
158 |
+ fi |
159 |
+ readme.gentoo_create_doc |
160 |
+} |
161 |
+ |
162 |
+pkg_postinst() { |
163 |
+ # Maintainer's note: the consolekit use flag short circuits a dbus rule and |
164 |
+ # allows the connection. Else, you need to be in the group. |
165 |
+ if ! has_version sys-auth/consolekit; then |
166 |
+ ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If" |
167 |
+ ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf" |
168 |
+ fi |
169 |
+ |
170 |
+ readme.gentoo_print_elog |
171 |
+} |