net-misc/wicd: added v1.7.9999 wrt issue #12

This commit is contained in:
Wuodan0 2013-04-02 20:18:25 +00:00
parent 6fea9e6dad
commit acca91f409
6 changed files with 219 additions and 0 deletions

7
net-misc/wicd/Manifest Normal file
View file

@ -0,0 +1,7 @@
AUX wicd-1.7.9999_p874-undefined-LANG.patch 946 SHA256 747f5a0b87460148af67c37cb63c563dd0ec68b362a1853836515f4ccfed182e SHA512 c2d197d41a84975bb3caf44de9b05b741b6702c38079ecc917632f9eedcf2be71373416154013690620511f2e9e99fb0d88cee0b22292fe007795cde664e63e5 WHIRLPOOL 0b36b1d1cf4de2ec375f70e8bfbf7d453eb5104bd3aa1b0e4e2ade6b9e211f1d0759cdd7b78a356ce5ef2d8a4cf5017a2529e8f274b41408597d45315e171085
AUX wicd-disable-autostart.patch 165 SHA256 00fb46bb62289e8501bace58fe045f955d1957606931e8c0cb07e1fcb0ad83da SHA512 ee74dac0ff379dfa668eaf8d41c5bb39086f442d2705c88c2357e5f712dcba5de29a29a6002a3536f00925b8ab0ce1996a33847d74a94d38df121465c9ff7bee WHIRLPOOL caba44f3c538daedb65cb8f4c6a66f8120c2577c6a13288059f01457bf4ce5a4230927babc7192d71c9b71f436669257f0d9b39107a5a4730ff4f218bf50554a
AUX wicd-init-sve-start.patch 127 SHA256 53a987d6cee601668172c5866f794b0285b071ebd7baf9fa0c3a26243e538cd7 SHA512 9bb9186a915f82f891783f32f9891868bed9ad50dea1d69b8e1b5cc3feb993f86992dbd5c7d0ae63844a88e89905e0d8dc41bfcd44872982d87493ad23c296d0 WHIRLPOOL b565c93721e723411f511bab36235eac7d9013ab417dfb8ced53a727d8cffe314e226bf5a2d5bde93ec12dc3e54a59f8e2caa03abf42a7fa6857eb07adcb3171
DIST Icone-Wicd-Lucid.tar.gz 9015 SHA256 6e4e3483c6cff7398e6871dd3e4360e361e5c6e64007e8e1240fd1c259ac707e SHA512 0df0dbdf05b462264dca2dd9955454a82f688b0fbfa7c2ad70a424df57eb27b35561d37819fc88b5746cff8a54de5b7b43ec325d2f98a4a1a30e4d500e86d2f8 WHIRLPOOL 336f363092c9bac7523047b6052a856a699820147967820418c6ac1ca528c472d371c6c211c505c325b5eb001812042c01425b05e1dfdf2d4a528f96686c530a
DIST wicd-mac4lin-icons.tar.xz 53136 SHA256 4c48c769c71f962415e3bd3573557e9288351afb867347f9a6f652883ae31011 SHA512 98ed3f92ec361aa8651c64efdb5128b8f73068f1cf2423640dafc4b46889ae32c1d1f56f509ad609b2bf98f634f8ada4c501f2294e3a64affd1befd4400498a8 WHIRLPOOL 84c097432ebb6ca66c0fa48d4226c8da5f6342b6fdeeb9546c98952b8f6e52a1f87d0ba23c1b409f3008432e5c6346bf65949dad99070804b1dcc2c1055eb9ea
EBUILD wicd-1.7.9999_p874.ebuild 4641 SHA256 6a670b526ea146c7b75bfab595d05f5921aaf518c461de1831b93c0f03a78d5b SHA512 45d6c3b3003abd194e48acfc09b90e85f27658dc8189cabcd33e74973ecad504d3ee71302b2ec312c175dfb79223a3273ceb789e4d8787b3fc8376787ec50f8a WHIRLPOOL 0e6bcf7518f9c65f59e7936c5ad568df203050f7bc047ab8b1bb38945d341faafd17396ac6df583ec4f3e61b306b1b85899b234864e5281411aa01e9768378d3
MISC metadata.xml 1056 SHA256 b9546ab2e288f91607dd21595d9edd72c0f0d3c31675fb1e3957136493ade1be SHA512 abbe0fb3e339667a92a34251bbf63a8b4f0213cb99556bff91b3f7fa418fb9a2f49cbbe85d5dacd76effdd7655dc294b509c8fc0bbc6f53faf9d9797fd432472 WHIRLPOOL 1dcba5a56968e89fb302ea4d6f2298d3e1faf703a18bca347ed96d98c2bedef2b8116d30303d956f9d0a8c2c005687f02dad543f9bebca7cca1b19eac60dddcb

View file

@ -0,0 +1,24 @@
Fixes compilation errors when os.environ['LANG'] is undefiend
--- ./setup.py
+++ ./setup.py
@@ -621,7 +621,7 @@ class compile_translations(Command):
shutil.rmtree('translations/')
os.makedirs('translations')
- oldlang = os.environ['LANG']
+ oldlang = os.environ.get('LANG', None)
os.environ['LANG'] = 'C'
for pofile in sorted(glob('po/*.po')):
@@ -656,7 +656,10 @@ class compile_translations(Command):
os.makedirs('translations/' + lang + '/LC_MESSAGES/')
os.system('pybabel compile -D wicd -i %s -l %s -d translations/' % (pofile, lang))
- os.environ['LANG'] = oldlang
+ if oldlang is not None:
+ os.environ['LANG'] = oldlang
+ else:
+ del os.environ['LANG']
class uninstall(Command):
description = "remove Wicd using uninstall.sh and install.log"

View file

@ -0,0 +1,7 @@
--- ./other/wicd-tray.desktop
+++ ./other/wicd-tray.desktop
@@ -13,3 +13,4 @@
Version=1.0
X-GNOME-Autostart-enabled=true
X-KDE-autostart-after=panel
+Hidden=true

View file

@ -0,0 +1,9 @@
--- ./in/init=gentoo=wicd.in
+++ ./in/init=gentoo=wicd.in
@@ -35,5 +35,5 @@
restart() {
force_kill
- start
+ sve_start
}

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>tomka@gentoo.org</email>
<name>Thomas Kahle</name>
</maintainer>
<maintainer>
<email>c1pher@gentoo.org</email>
<name>Dane Smith</name>
</maintainer>
<use>
<flag name='ambiance'>Install icons from Ubuntu's ambiance theme</flag>
<flag name='gtk'>Installs a gtk UI. This is enabled by default because it is
intended behavior. Requires <pkg>dev-python/pygtk</pkg></flag>
<flag name='gtk-autostart'>Start the gtk UI in tray modus with startx. This
is enabled by default because it is intended behavior.</flag>
<flag name='ioctl'>Installs additional python libraries to use as a backend.
This will improve speed but is experimental.</flag>
<flag name='mac4lin'>Change default icons to mac4lin icon set</flag>
<flag name='ncurses'>Installs a ncurses UI</flag>
<flag name='pm-utils'>Installs the pm-utils hooks for suspend/resume and
requires <pkg>sys-power/pm-utils</pkg></flag>
</use>
</pkgmetadata>

View file

@ -0,0 +1,147 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
PYTHON_DEPEND="2"
PYTHON_USE_WITH="ncurses? xml"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython"
DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
inherit eutils distutils systemd bzr
if [[ "${PV}" == *9999* ]]; then
EBZR_REPO_URI="lp:${PN}"
EBZR_REVISION="874"
# "Nosmart" is much faster for initial branching.
EBZR_INITIAL_URI="nosmart+${EBZR_REPO_URI}"
EBZR_WORKDIR_CHECKOUT="t" #434746
inherit bzr
else
SRC_URI="http://launchpad.net/wicd/1.7/${PV}/+download/${P}.tar.gz"
fi
SRC_URI+="
mac4lin? ( http://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.xz )
ambiance? ( http://freetimesblog.altervista.org/blog/wp-content/uploads/downloads/2010/05/Icone-Wicd-Lucid.tar.gz )"
DESCRIPTION="A lightweight wired and wireless network manager for Linux"
HOMEPAGE="https://launchpad.net/wicd"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
IUSE="X ambiance +gtk +gtk-autostart ioctl libnotify mac4lin ncurses nls +pm-utils"
DEPEND="nls? ( dev-python/Babel )"
# Maybe virtual/dhcp would work, but there are enough problems with
# net-misc/dhcp that I want net-misc/dhcpcd to be guarenteed to be considered
# first if none are installed.
RDEPEND="
dev-python/dbus-python
X? ( gtk? ( dev-python/pygtk
|| (
x11-misc/ktsuss
x11-libs/gksu
kde-base/kdesu
)
)
)
|| (
net-misc/dhcpcd
net-misc/dhcp
net-misc/pump
)
net-wireless/wireless-tools
net-wireless/wpa_supplicant
|| (
sys-apps/net-tools
sys-apps/ethtool
)
!gtk? ( dev-python/pygobject:2 )
ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl )
libnotify? ( dev-python/notify-python )
ncurses? (
dev-python/urwid
dev-python/pygobject:2
)
pm-utils? ( >=sys-power/pm-utils-1.1.1 )
"
DOCS="CHANGES NEWS AUTHORS README"
src_prepare() {
# fix errors when LANG is undefined (pushed upstream as rev 875)
epatch "${FILESDIR}"/${P}-undefined-LANG.patch
# disable starting with startx
use gtk-autostart ||
epatch "${FILESDIR}/${PN}-disable-autostart.patch"
# pushed upstream as rev 876
epatch "${FILESDIR}"/${PN}-init-sve-start.patch
# get rid of opts variable to fix bug 381885 (rev 876)
sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
# Need to ensure that generated scripts use Python 2 at run time.
sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
-i setup.py || die "sed failed"
if use nls; then
# Asturian is faulty with PyBabel
# (https://bugs.launchpad.net/wicd/+bug/928589)
rm po/ast.po
else
# nuke translations
rm po/*.po
fi
python_copy_sources
}
src_configure() {
local myconf
use gtk || myconf="${myconf} --no-install-gtk"
use libnotify || myconf="${myconf} --no-use-notifications"
use ncurses || myconf="${myconf} --no-install-ncurses"
use pm-utils || myconf="${myconf} --no-install-pmutils"
configuration() {
$(PYTHON) ./setup.py configure --no-install-docs --resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose ${myconf}
}
python_execute_function -s configuration
}
src_install() {
distutils_src_install
keepdir /var/lib/wicd/configurations \
|| die "keepdir failed, critical for this app"
keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} \
|| die "keepdir failed, critical for this app"
keepdir /var/log/wicd \
|| die "keepdir failed, critical for this app"
use nls || rm -rf "${D}"/usr/share/locale
systemd_dounit "${S}/other/wicd.service"
if use mac4lin; then
rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
fi
if use ambiance; then
# Overwrite tray icons with ambiance icon
rm "${WORKDIR}/Icone Wicd Lucid"/signal*
cp "${WORKDIR}/Icone Wicd Lucid"/*.png "${D}"/usr/share/pixmaps/wicd/
fi
}
pkg_postinst() {
distutils_pkg_postinst
elog "You may need to restart the dbus service after upgrading wicd."
echo
elog "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:"
elog "- Remove all net.* initscripts (except for net.lo) from all runlevels"
elog "- Add these scripts to the RC_PLUG_SERVICES line in /etc/rc.conf"
elog "(For example, rc_hotplug=\"!net.eth* !net.wlan*\")"
# Maintainer's note: the consolekit use flag short circuits a dbus rule and
# allows the connection. Else, you need to be in the group.
if ! has_version sys-auth/consolekit; then
ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
fi
}