wok rev 14649

Up wicd (1.7.2.4)
author Richard Dunbar <mojo@slitaz.org>
date Tue Jun 04 00:13:54 2013 +0000 (2013-06-04)
parents 75489cc57b2d
children 5e2886317a11
files wicd/receipt wicd/stuff/831_830.patch wicd/stuff/835_834.patch wicd/stuff/dbus_string_fix.patch
line diff
     1.1 --- a/wicd/receipt	Mon Jun 03 20:00:49 2013 +0000
     1.2 +++ b/wicd/receipt	Tue Jun 04 00:13:54 2013 +0000
     1.3 @@ -1,24 +1,30 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="wicd"
     1.7 -VERSION="1.7.0"
     1.8 +VERSION="1.7.2.4"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Network connection manager"
    1.11  MAINTAINER="jozee@slitaz.org"
    1.12  DEPENDS="python dbus-python ethtool wpa_supplicant pygtk"
    1.13 -BUILD_DEPENDS="python-dev dbus-python-dev python"
    1.14 +BUILD_DEPENDS="python-distribute python-babel python-dev dbus-python-dev"
    1.15  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.16 -WEB_SITE="http://heanet.dl.sourceforge.net/sourceforge/wicd/"
    1.17 -WGET_URL="$WEB_SITE/$TARBALL"
    1.18 +WEB_SITE="http://wicd.sourceforge.net/"
    1.19 +WGET_URL="https://launchpad.net/wicd/${VERSION:0:3}/$VERSION/+download/$TARBALL"
    1.20  TAGS="wireless ethernet"
    1.21  
    1.22  # Rules to configure and make the package.
    1.23  compile_rules()
    1.24  {
    1.25      cd $src
    1.26 +    # Fix problem with new urwid FS#33378 LP#1075399
    1.27 +    patch -Np0 -i $stuff/831_830.patch
    1.28 +    patch -Np0 -i $stuff/835_834.patch
    1.29 +    patch -Np0 -i $stuff/dbus_string_fix.patch
    1.30      python setup.py configure
    1.31 -    python setup.py install --root=$PWD/_pkg
    1.32 -   
    1.33 +    #HACK for https://bugs.launchpad.net/wicd/+bug/928589
    1.34 +    mkdir -p translations/ast/LC_MESSAGES
    1.35 +    msgfmt po/ast.po -o translations/ast/LC_MESSAGES/wicd.mo
    1.36 +    python setup.py install --root=$DESTDIR
    1.37  }
    1.38  
    1.39  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.40 @@ -27,19 +33,19 @@
    1.41      mkdir -p $fs/usr
    1.42      mkdir -p $fs/etc
    1.43      mkdir -p $fs/var
    1.44 -    cp -a $_pkg/usr/* $fs/usr
    1.45 -    cp -a $_pkg/etc/* $fs/etc
    1.46 -    cp -a $_pkg/var/* $fs/var
    1.47 +    cp -a $install/usr/* $fs/usr
    1.48 +    cp -a $install/etc/* $fs/etc
    1.49 +    cp -a $install/var/* $fs/var
    1.50      rm -f -r $fs/usr/share/doc
    1.51      rm -f -r $fs/usr/share/man
    1.52      rm -f -r $fs/usr/share/icons/hicolor/*
    1.53      rm -f -r $fs/usr/share/locale
    1.54 -    cp -a $_pkg/usr/share/icons/hicolor/scalable $fs/usr/share/icons/hicolor
    1.55 -    cp -a $_pkg/usr/share/icons/hicolor/32x32 $fs/usr/share/icons/hicolor
    1.56 +    cp -a $install/usr/share/icons/hicolor/scalable $fs/usr/share/icons/hicolor
    1.57 +    cp -a $install/usr/share/icons/hicolor/32x32 $fs/usr/share/icons/hicolor
    1.58      mkdir -p $fs/etc/init.d
    1.59 -    cp -a stuff/wicd $fs/etc/init.d
    1.60 +    cp -a $stuff/wicd $fs/etc/init.d
    1.61  	# dhclient as fake udhcpc wrapper
    1.62 -  	cp -a stuff/dhclient $fs/usr/bin 
    1.63 +  	cp -a $stuff/dhclient $fs/usr/bin 
    1.64  	# set permissions
    1.65  	chmod +x $fs/usr/bin/dhclient
    1.66  	
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/wicd/stuff/831_830.patch	Tue Jun 04 00:13:54 2013 +0000
     2.3 @@ -0,0 +1,66 @@
     2.4 +=== modified file 'curses/curses_misc.py'
     2.5 +--- curses/curses_misc.py	2012-05-06 15:16:15 +0000
     2.6 ++++ curses/curses_misc.py	2012-11-15 09:26:21 +0000
     2.7 +@@ -349,7 +349,10 @@
     2.8 +         # We need this to pick our keypresses
     2.9 +         self.use_enter = use_enter
    2.10 + 
    2.11 +-        self.focus = focus
    2.12 ++        if urwid.VERSION < (1, 1, 0):
    2.13 ++            self.focus = focus
    2.14 ++        else:
    2.15 ++            self.focus_position = focus
    2.16 + 
    2.17 +         self.callback = callback
    2.18 +         self.user_args = user_args
    2.19 +@@ -362,7 +365,11 @@
    2.20 +         self.list = list
    2.21 + 
    2.22 +     def set_focus(self,index):
    2.23 +-        self.focus = index
    2.24 ++        if urwid.VERSION < (1, 1, 0):
    2.25 ++            self.focus = index
    2.26 ++        else:
    2.27 ++            self.focus_position = index
    2.28 ++
    2.29 +         # API changed between urwid 0.9.8.4 and 0.9.9
    2.30 +         try:
    2.31 +             self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW))
    2.32 +@@ -376,16 +383,21 @@
    2.33 +     def build_combobox(self,parent,ui,row):
    2.34 +         str,trash =  self.label.get_text()
    2.35 + 
    2.36 +-        self.cbox = DynWrap(SelText([self.list[self.focus]+self.DOWN_ARROW]),
    2.37 ++        if urwid.VERSION < (1, 1, 0):
    2.38 ++            index = self.focus
    2.39 ++        else:
    2.40 ++            index = self.focus_position
    2.41 ++
    2.42 ++        self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
    2.43 +                 attrs=self.attrs,focus_attr=self.focus_attr)
    2.44 +         if str != '':
    2.45 +             w = urwid.Columns([('fixed',len(str),self.label),self.cbox],
    2.46 +                     dividechars=1)
    2.47 +-            self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
    2.48 ++            self.overlay = self.ComboSpace(self.list,parent,ui,index,
    2.49 +                     pos=(len(str)+1,row))
    2.50 +         else:
    2.51 +             w = urwid.Columns([self.cbox])
    2.52 +-            self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
    2.53 ++            self.overlay = self.ComboSpace(self.list,parent,ui,index,
    2.54 +                     pos=(0,row))
    2.55 + 
    2.56 +         self._w = w
    2.57 +@@ -419,7 +431,10 @@
    2.58 +         if self.overlay:
    2.59 +             return self.overlay._listbox.get_focus()
    2.60 +         else:
    2.61 +-            return None,self.focus
    2.62 ++            if urwid.VERSION < (1, 1, 0):
    2.63 ++                return None, self.focus
    2.64 ++            else:
    2.65 ++                return None, self.focus_position
    2.66 + 
    2.67 +     def get_sensitive(self):
    2.68 +         return self.cbox.get_sensitive()
    2.69 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/wicd/stuff/835_834.patch	Tue Jun 04 00:13:54 2013 +0000
     3.3 @@ -0,0 +1,43 @@
     3.4 +=== modified file 'curses/curses_misc.py'
     3.5 +--- curses/curses_misc.py	2012-11-15 09:26:21 +0000
     3.6 ++++ curses/curses_misc.py	2012-11-16 09:22:47 +0000
     3.7 +@@ -352,7 +352,7 @@
     3.8 +         if urwid.VERSION < (1, 1, 0):
     3.9 +             self.focus = focus
    3.10 +         else:
    3.11 +-            self.focus_position = focus
    3.12 ++            self._w.focus_position = focus
    3.13 + 
    3.14 +         self.callback = callback
    3.15 +         self.user_args = user_args
    3.16 +@@ -368,7 +368,10 @@
    3.17 +         if urwid.VERSION < (1, 1, 0):
    3.18 +             self.focus = index
    3.19 +         else:
    3.20 +-            self.focus_position = index
    3.21 ++            try:
    3.22 ++                self._w.focus_position = index
    3.23 ++            except IndexError:
    3.24 ++                pass
    3.25 + 
    3.26 +         # API changed between urwid 0.9.8.4 and 0.9.9
    3.27 +         try:
    3.28 +@@ -386,7 +389,7 @@
    3.29 +         if urwid.VERSION < (1, 1, 0):
    3.30 +             index = self.focus
    3.31 +         else:
    3.32 +-            index = self.focus_position
    3.33 ++            index = self._w.focus_position
    3.34 + 
    3.35 +         self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
    3.36 +                 attrs=self.attrs,focus_attr=self.focus_attr)
    3.37 +@@ -434,7 +437,7 @@
    3.38 +             if urwid.VERSION < (1, 1, 0):
    3.39 +                 return None, self.focus
    3.40 +             else:
    3.41 +-                return None, self.focus_position
    3.42 ++                return None, self._w.focus_position
    3.43 + 
    3.44 +     def get_sensitive(self):
    3.45 +         return self.cbox.get_sensitive()
    3.46 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/wicd/stuff/dbus_string_fix.patch	Tue Jun 04 00:13:54 2013 +0000
     4.3 @@ -0,0 +1,15 @@
     4.4 +=== modified file 'wicd/misc.py'
     4.5 +--- wicd/misc.py	2012-04-30 19:20:47 +0000
     4.6 ++++ wicd/misc.py	2012-05-03 16:01:49 +0000
     4.7 +@@ -430,7 +430,10 @@
     4.8 +     """ Sanitize property names to be used in config-files. """
     4.9 +     allowed = string.ascii_letters + '_' + string.digits
    4.10 +     table = string.maketrans(allowed, ' ' * len(allowed))
    4.11 +-    return s.translate(None, table)
    4.12 ++
    4.13 ++    # s is a dbus.String -- since we don't allow unicode property keys,
    4.14 ++    # make it simple.
    4.15 ++    return str(s).translate(None, table)
    4.16 +
    4.17 + def sanitize_escaped(s):
    4.18 +     """ Sanitize double-escaped unicode strings. """