[arch-commits] Commit in gdesklets/trunk (PKGBUILD no-import-overide.patch)

Allan McRae allan at archlinux.org
Sat Dec 6 17:24:53 UTC 2008


    Date: Saturday, December 6, 2008 @ 12:24:53
  Author: allan
Revision: 20771

upgpkg: gdesklets 0.36.1-1
    update and attempt to fix FS#12217

Added:
  gdesklets/trunk/no-import-overide.patch
Modified:
  gdesklets/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   22 +++++++++++++---------
 no-import-overide.patch |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-12-06 17:00:37 UTC (rev 20770)
+++ PKGBUILD	2008-12-06 17:24:53 UTC (rev 20771)
@@ -3,7 +3,7 @@
 # Mantainer: Roman Kyrylych <roman at archlinux.org>
 
 pkgname=gdesklets
-pkgver=0.36.0
+pkgver=0.36.1
 pkgrel=1
 pkgdesc="gDesklets provides an advanced architecture for desktop applets."
 arch=('i686' 'x86_64')
@@ -13,20 +13,24 @@
          'gnome-python>=2.18.0' 'gconf>=2.18.0.1-4' 'desktop-file-utils')
 makedepends=('perlxml' 'swig')
 install=gdesklets.install
-source=(http://gdesklets.de/files/gdesklets-0.36.tar.bz2)
-md5sums=('766727f18f904968b622e7696fc9199b')
+source=(http://gdesklets.zencomputer.ca/gDesklets/gDesklets-$pkgver.tar.bz2
+        no-import-overide.patch)
+md5sums=('425625a63280c15d084d92317720d8d5'
+         '9190f9c8406e3c5ad5c0ab2bd95b71ff')
 options=('!libtool')
 
 build() {
-  cd $startdir/src/gdesklets-0.36
+  cd $srcdir/gDesklets-$pkgver
+  patch -Np1 -i $srcdir/no-import-overide.patch
+  
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
   make || return 1
 
   make UPDATE_MIME_DATABASE=/bin/true UPDATE_DESKTOP_DATABASE=/bin/true \
-    GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${startdir}/pkg install
+    GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=$pkgdir install
 
-  mkdir -p ${startdir}/pkg/usr/share/gconf/schemas
-  gconf-merge-schema ${startdir}/pkg/usr/share/gconf/schemas/${pkgname}.schemas \
-    ${startdir}/pkg/etc/gconf/schemas/*.schemas
-  rm -f ${startdir}/pkg/etc/gconf/schemas/*.schemas
+  mkdir -p $pkgdir/usr/share/gconf/schemas
+  gconf-merge-schema $pkgdir/usr/share/gconf/schemas/$pkgname.schemas \
+    $pkgdir/etc/gconf/schemas/*.schemas
+  rm -f $pkgdir/etc/gconf/schemas/*.schemas
 }

Added: no-import-overide.patch
===================================================================
--- no-import-overide.patch	                        (rev 0)
+++ no-import-overide.patch	2008-12-06 17:24:53 UTC (rev 20771)
@@ -0,0 +1,38 @@
+diff -Naur gDesklets-0.36.1-old/utils/ErrorFormatter.py gDesklets-0.36.1/utils/ErrorFormatter.py
+--- gDesklets-0.36.1-old/utils/ErrorFormatter.py	2008-03-20 09:00:59.000000000 +1000
++++ gDesklets-0.36.1/utils/ErrorFormatter.py	2008-12-07 03:08:41.000000000 +1000
+@@ -112,20 +112,20 @@
+ # available. Therefore, we have to extend the import handler in order to always
+ # give us an absolute path.
+ #
+-_old_imp = __import__
+-def _new_imp(name, globs = {}, locls = {}, fromlist = []):
+-
+-    module = _old_imp(name, globs, locls, fromlist)
+-    # builtin modules have no "__file__" attribute, so we have to check for it
+-    if (module):
+-        if (hasattr(module, "__file__")):
+-            module.__file__ = os.path.abspath(module.__file__)
+-        return module
+-    else:
+-        return ""
+-
+-import __builtin__
+-__builtin__.__import__ = _new_imp
++#_old_imp = __import__
++#def _new_imp(name, globs = {}, locls = {}, fromlist = []):
++#
++#    module = _old_imp(name, globs, locls, fromlist)
++#    # builtin modules have no "__file__" attribute, so we have to check for it
++#    if (module):
++#        if (hasattr(module, "__file__")):
++#            module.__file__ = os.path.abspath(module.__file__)
++#        return module
++#    else:
++#        return ""
++#
++#import __builtin__
++#__builtin__.__import__ = _new_imp
+ 
+ 
+ 




More information about the arch-commits mailing list