--- a/patches/gdesklets-01-Solaris-support.diff Thu Nov 22 05:40:11 2007 +0000
+++ b/patches/gdesklets-01-Solaris-support.diff Thu Nov 22 07:11:07 2007 +0000
@@ -1,7 +1,7 @@
-diff -Nrup gDesklets-old/configure.in gDesklets-0.35.4/configure.in
---- gDesklets-old/configure.in 2006-10-26 00:37:33.000000000 +0800
-+++ gDesklets-0.35.4/configure.in 2007-02-20 13:48:43.781220000 +0800
-@@ -135,6 +135,7 @@ libdesklets/system/Linux/Makefile
+diff -Nrup gDesklets-0.36beta/configure.in gDesklets-0.36/configure.in
+--- gDesklets-0.36beta/configure.in 2007-10-04 19:22:08.000000000 +0800
++++ gDesklets-0.36/configure.in 2007-10-08 13:13:10.232393000 +0800
+@@ -125,6 +125,7 @@ libdesklets/system/Linux/Makefile
libdesklets/system/Makefile
libdesklets/system/NetBSD/Makefile
libdesklets/system/OpenBSD/Makefile
@@ -9,44 +9,23 @@
main/Makefile
plugin/Makefile
po/Makefile.in
-diff -Nrup gDesklets-old/libdesklets/system/ArchFactory.py gDesklets-0.35.4/libdesklets/system/ArchFactory.py
---- gDesklets-old/libdesklets/system/ArchFactory.py 2006-09-27 23:20:22.000000000 +0800
-+++ gDesklets-0.35.4/libdesklets/system/ArchFactory.py 2007-02-20 13:49:43.616382000 +0800
-@@ -46,6 +46,17 @@ def __detect_arch():
-
- return NetBSD.Generic()
-
-+ elif (uname[0] == 'SunOS'):
-+
-+ import Solaris
-+ r = os.popen('/usr/bin/uname -p').read()
-+ if (r[:-1] in ('i386')):
-+ return Solaris.X86()
-+
-+ if (r[:-1] in ('sparc')):
-+ return Solaris.Sparc()
-+
-+ return Solaris.Generic()
-
- log("OS/Architecture not found!")
-
-diff -Nrup gDesklets-old/libdesklets/system/Makefile.am gDesklets-0.35.4/libdesklets/system/Makefile.am
---- gDesklets-old/libdesklets/system/Makefile.am 2005-08-01 05:29:36.000000000 +0800
-+++ gDesklets-0.35.4/libdesklets/system/Makefile.am 2007-02-20 13:52:29.891075000 +0800
+diff -Nrup gDesklets-0.36beta/libdesklets/system/Makefile.am gDesklets-0.36/libdesklets/system/Makefile.am
+--- gDesklets-0.36beta/libdesklets/system/Makefile.am 2007-10-04 19:22:11.000000000 +0800
++++ gDesklets-0.36/libdesklets/system/Makefile.am 2007-10-08 13:12:22.576595000 +0800
@@ -20,7 +20,8 @@ SUBDIRS = \
Linux \
FreeBSD \
NetBSD \
- OpenBSD
+ OpenBSD \
-+ Solaris
++ Solaris
gtop_la_LDFLAGS = -module -avoid-version -as-needed
-diff -Nrup gDesklets-old/libdesklets/system/Solaris/Generic.py gDesklets-0.35.4/libdesklets/system/Solaris/Generic.py
---- gDesklets-old/libdesklets/system/Solaris/Generic.py 1970-01-01 08:00:00.000000000 +0800
-+++ gDesklets-0.35.4/libdesklets/system/Solaris/Generic.py 2007-02-20 13:52:53.605404000 +0800
-@@ -0,0 +1,62 @@
+diff -Nrup gDesklets-0.36beta/libdesklets/system/Solaris/Generic.py gDesklets-0.36/libdesklets/system/Solaris/Generic.py
+--- gDesklets-0.36beta/libdesklets/system/Solaris/Generic.py 1970-01-01 08:00:00.000000000 +0800
++++ gDesklets-0.36/libdesklets/system/Solaris/Generic.py 2007-10-08 13:14:07.732202000 +0800
+@@ -0,0 +1,54 @@
+from libdesklets.system.Arch import Arch
+
+import re
@@ -60,10 +39,10 @@
+ Arch.__init__(self)
+
+ self.__bogomips = re.compile('^bogomips\s+:\s+(\d+\.\d+)$', re.M)
-+ self.__net_devices = re.compile('^\s*(\w+):.*mtu', re.M).findall( os.popen('/usr/sbin/ifconfig -a').read())
++ self.__net_devices = re.compile('^\s*(\w+):.*mtu', re.M).findall(os.popen('/usr/sbin/ifconfig -a').read())
+
+
-+
++
+ def net_devices(self):
+ """
+ @return : all available network devices
@@ -90,28 +69,20 @@
+ @rtype : int
+ """
+
-+ # man utmp
-+ # don't know if
-+ # sizeof(struct utmp) == 384
-+ # sizeof(short) == 2
-+ # on every Linux arch
-+ # http://gnomesupport.org/forums/viewtopic.php?p=33686
-+ # X86, X86_64 : ok
-+
+ count = 0
+ data = open('/var/adm/utmpx', 'rb').read()
+
+ for i in range(0, len(data), 384):
-+
+ ut_type = struct.unpack('h', data[i:i+2])[0]
+
+ if (ut_type == 7):
+ count += 1
+
+ return count
-diff -Nrup gDesklets-old/libdesklets/system/Solaris/Makefile.am gDesklets-0.35.4/libdesklets/system/Solaris/Makefile.am
---- gDesklets-old/libdesklets/system/Solaris/Makefile.am 1970-01-01 08:00:00.000000000 +0800
-+++ gDesklets-0.35.4/libdesklets/system/Solaris/Makefile.am 2007-02-20 13:52:53.605590000 +0800
++
+diff -Nrup gDesklets-0.36beta/libdesklets/system/Solaris/Makefile.am gDesklets-0.36/libdesklets/system/Solaris/Makefile.am
+--- gDesklets-0.36beta/libdesklets/system/Solaris/Makefile.am 1970-01-01 08:00:00.000000000 +0800
++++ gDesklets-0.36/libdesklets/system/Solaris/Makefile.am 2007-10-08 13:14:07.732326000 +0800
@@ -0,0 +1,11 @@
+installdir = ${coredir}/libdesklets/system/Solaris
+
@@ -124,10 +95,10 @@
+EXTRA_DIST = $(install_DATA)
+install_PYTHON = $(install_DATA)
+CLEANFILES = *.pyc
-diff -Nrup gDesklets-old/libdesklets/system/Solaris/Sparc.py gDesklets-0.35.4/libdesklets/system/Solaris/Sparc.py
---- gDesklets-old/libdesklets/system/Solaris/Sparc.py 1970-01-01 08:00:00.000000000 +0800
-+++ gDesklets-0.35.4/libdesklets/system/Solaris/Sparc.py 2007-02-20 13:52:53.605774000 +0800
-@@ -0,0 +1,67 @@
+diff -Nrup gDesklets-0.36beta/libdesklets/system/Solaris/Sparc.py gDesklets-0.36/libdesklets/system/Solaris/Sparc.py
+--- gDesklets-0.36beta/libdesklets/system/Solaris/Sparc.py 1970-01-01 08:00:00.000000000 +0800
++++ gDesklets-0.36/libdesklets/system/Solaris/Sparc.py 2007-10-08 13:14:07.732468000 +0800
+@@ -0,0 +1,68 @@
+from Generic import Generic
+
+import os
@@ -144,7 +115,7 @@
+ r = re.compile('brand\s+(.+)$', re.M)
+ m = r.findall( self._read_cpuinfo() )
+ return m[0]
-+
++
+ def _get_cache():
+ r = re.compile('^\s+ecache-size:+\s+(.+)$',re.M)
+ m = r.findall(os.popen('/usr/sbin/prtconf -vp').read())
@@ -155,7 +126,7 @@
+ r = re.compile('clock_MHz\s+(\d+)$', re.M)
+ m = r.findall(self._read_cpuinfo())
+ return float(int(m[0]))
-+
++
+ # CPU model and cache size never changes
+ self.__model_name = _get_model()
+ self.__cache_size = _get_cache()
@@ -163,6 +134,7 @@
+ # the cpu speed might change (laptops have mobile CPUs)
+ self.__speed = _read_cpu_speed()
+
++
+ def _read_cpuinfo(self):
+ """
+ @return : content of cpu_info
@@ -178,7 +150,7 @@
+
+ return self.__speed
+
-+
++
+ def cpu_cache(self):
+ """
+ @return : 2nd level cache of installed processor
@@ -195,10 +167,10 @@
+ """
+
+ return self.__model_name
-diff -Nrup gDesklets-old/libdesklets/system/Solaris/X86.py gDesklets-0.35.4/libdesklets/system/Solaris/X86.py
---- gDesklets-old/libdesklets/system/Solaris/X86.py 1970-01-01 08:00:00.000000000 +0800
-+++ gDesklets-0.35.4/libdesklets/system/Solaris/X86.py 2007-02-20 13:52:53.605948000 +0800
-@@ -0,0 +1,96 @@
+diff -Nrup gDesklets-0.36beta/libdesklets/system/Solaris/X86.py gDesklets-0.36/libdesklets/system/Solaris/X86.py
+--- gDesklets-0.36beta/libdesklets/system/Solaris/X86.py 1970-01-01 08:00:00.000000000 +0800
++++ gDesklets-0.36/libdesklets/system/Solaris/X86.py 2007-10-08 13:14:07.732611000 +0800
+@@ -0,0 +1,86 @@
+from Generic import Generic
+
+import re
@@ -214,7 +186,6 @@
+
+ Generic.__init__(self)
+
-+
+ def _get_model():
+ r = re.compile('^.*brand-string.*\n\s+value=(.+)$', re.M)
+ m = r.findall( self._read_cpuinfo() )
@@ -225,13 +196,12 @@
+ m = r.findall( self._read_cpuinfo())
+ m_int = int(m[0],16)
+ return int(round(m_int/1000))
-+
++
+ def _read_cpu_speed():
-+
+ r = re.compile('^.*cpu-mhz.*\n\s+value=(.+)$', re.M)
+ m = r.findall(self._read_cpuinfo())
+ return float(int(m[0],16))
-+
++
+ # CPU model and cache size never changes
+ self.__model_name = _get_model()
+ self.__cache_size = _get_cache()
@@ -246,7 +216,8 @@
+ @rtype : str
+ """
+ return os.popen('/usr/sbin/prtconf -v').read()
-+
++
++
+ def cpu_cache(self):
+ """
+ @return : 2nd level cache of installed processor
@@ -256,7 +227,6 @@
+ return self.__cache_size
+
+
-+
+ def cpu_model(self):
+ """
+ @return : model/type of installed processor
@@ -266,7 +236,6 @@
+ return self.__model_name
+
+
-+
+ def cpu_speed(self):
+ """
+ @return : current clock of installed processor
@@ -275,40 +244,23 @@
+ return self.__speed
+
+
-+
+ def users(self):
+
-+ # man utmp
-+ # don't know if
-+ # sizeof(struct utmp) == 384
-+ # sizeof(short) == 2
-+ # on every Linux arch
-+ # http://gnomesupport.org/forums/viewtopic.php?p=33686
-+ # X86, X86_64 : ok
-+
+ count = 0
+ data = open('/var/adm/utmpx', 'rb').read()
+
+ for i in range(0, len(data), 384):
+ ut_type = struct.unpack('h', data[i:i+2])[0]
-+ if (ut_type == 7): count += 1
++
++ if (ut_type == 7):
++ count += 1
+
+ return count
+
-diff -Nrup gDesklets-old/libdesklets/system/Solaris/__init__.py gDesklets-0.35.4/libdesklets/system/Solaris/__init__.py
---- gDesklets-old/libdesklets/system/Solaris/__init__.py 1970-01-01 08:00:00.000000000 +0800
-+++ gDesklets-0.35.4/libdesklets/system/Solaris/__init__.py 2007-02-20 13:52:53.606115000 +0800
+diff -Nrup gDesklets-0.36beta/libdesklets/system/Solaris/__init__.py gDesklets-0.36/libdesklets/system/Solaris/__init__.py
+--- gDesklets-0.36beta/libdesklets/system/Solaris/__init__.py 1970-01-01 08:00:00.000000000 +0800
++++ gDesklets-0.36/libdesklets/system/Solaris/__init__.py 2007-10-08 13:14:07.732742000 +0800
@@ -0,0 +1,3 @@
+from X86 import X86
+from Sparc import Sparc
+from Generic import Generic
-diff -Nrup gDesklets-old/shell/plugins/Shell/__init__.py gDesklets-0.35.4/shell/plugins/Shell/__init__.py
---- gDesklets-old/shell/plugins/Shell/__init__.py 2005-03-23 10:07:29.000000000 +0800
-+++ gDesklets-0.35.4/shell/plugins/Shell/__init__.py 2007-02-20 13:53:32.454034000 +0800
-@@ -150,5 +150,5 @@ try:
- except:
- pass
-
--gtk.threads_init()
-+gtk.gdk.threads_init()
-
--- a/patches/gdesklets-02-rel-symlinks.diff Thu Nov 22 05:40:11 2007 +0000
+++ b/patches/gdesklets-02-rel-symlinks.diff Thu Nov 22 07:11:07 2007 +0000
@@ -1,22 +1,9 @@
---- gDesklets-0.35.3/data/Makefile.am.orig 2007-02-06 16:20:10.444613000 +0000
-+++ gDesklets-0.35.3/data/Makefile.am 2007-02-06 17:22:30.722874000 +0000
-@@ -44,8 +44,8 @@
- chmod 0755 $(DESTDIR)$(fakepixmapdir); \
- fi
-
-- $(LN_S) -f $(pixmapdir)/gdesklets.png \
-- $(DESTDIR)$(fakepixmapdir)/gdesklets.png;
-+ cd $(DESTDIR)/$(fakepixmapdir); \
-+ $(LN_S) -f ../../../share/pixmaps/gdesklets.png gdesklets.png;
-
- if test -n "$(UPDATE_MIME_DATABASE)"; then \
- $(UPDATE_MIME_DATABASE) "$(DESTDIR)${sharedmimedir}"; \
---- gDesklets-0.35.3/Makefile.am.orig 2007-02-06 17:31:29.542404000 +0000
-+++ gDesklets-0.35.3/Makefile.am 2007-02-06 17:32:30.051075000 +0000
-@@ -56,4 +56,5 @@
- fi
+--- gDesklets-0.36beta/Makefile.am.orig 2007-11-23 14:08:36.221478000 +0800
++++ gDesklets-0.36beta/Makefile.am 2007-11-23 14:08:47.107967000 +0800
+@@ -54,5 +54,5 @@
$(INSTALL_SCRIPT) gdesklets $(DESTDIR)${coredir}/gdesklets; \
-- $(LN_S) -f ${coredir}/gdesklets $(DESTDIR)$(bindir)/gdesklets;
-+ cd $(DESTDIR)$(bindir); \
+ cd $(DESTDIR)$(bindir); \
+- $(LN_S) -f ../../lib/gdesklets gdesklets;
+ $(LN_S) -f ../lib/gdesklets/gdesklets;
+
--- a/patches/gdesklets-08-session-manager-support.diff Thu Nov 22 05:40:11 2007 +0000
+++ b/patches/gdesklets-08-session-manager-support.diff Thu Nov 22 07:11:07 2007 +0000
@@ -1,17 +1,18 @@
---- gDesklets-0.35.4/main/client.py.old 2007-07-11 17:16:41.427456000 +0800
-+++ gDesklets-0.35.4/main/client.py 2007-07-11 16:35:59.164881000 +0800
-@@ -264,7 +264,7 @@
+--- gDesklets-0.36beta/main/client.py.orig 2007-11-22 11:30:36.753844000 +0800
++++ gDesklets-0.36beta/main/client.py 2007-11-22 11:31:18.018363000 +0800
+@@ -264,7 +264,8 @@
else:
daemon_path = os.path.join(HOME, "gdesklets-daemon")
- args = " ".join([ a for a in sys.argv if a.startswith("--") ])
-+ args = " ".join([ a for a in sys.argv if a.endswith("translucent") | a.endswith("no-tray-icon") | a.endswith("debug")])
++ args = " ".join([ a for a in sys.argv if a.endswith("translucent") | a.
++endswith("no-tray-icon") | a.endswith("debug")])
os.system("%s %s &" % (daemon_path, args))
pos = 0
---- gDesklets-0.35.4/gdesklets.old 2007-07-11 17:16:19.763533000 +0800
-+++ gDesklets-0.35.4/gdesklets 2007-07-11 16:32:09.751490000 +0800
-@@ -223,13 +223,19 @@
+--- gDesklets-0.36beta/gdesklets.orig 2007-11-22 11:31:29.794530000 +0800
++++ gDesklets-0.36beta/gdesklets 2007-11-22 11:33:41.090780000 +0800
+@@ -218,13 +218,19 @@
try:
index = self.__args.index("--sm-config-prefix")
@@ -33,25 +34,27 @@
except Exception:
pass
---- gDesklets-0.35.4/gdesklets-daemon.old 2007-07-11 17:16:09.732933000 +0800
-+++ gDesklets-0.35.4/gdesklets-daemon 2007-07-11 17:18:02.536083000 +0800
-@@ -5,8 +5,10 @@
- import main
- import os
+--- gDesklets-0.36beta/gdesklets-daemon.orig 2007-11-22 11:33:49.980607000 +0800
++++ gDesklets-0.36beta/gdesklets-daemon 2007-11-22 11:35:20.644388000 +0800
+@@ -16,10 +16,12 @@
+ import pygtk
import sys
+ import utils
+import gnome
+import gnome.ui
+
+
-
-+VERSION="0.35.4"
- # set up i18n
- from utils import i18n
- __builtin__._ = i18n.Translator("gdesklets")
-@@ -116,6 +118,7 @@
- gtk.gdk.threads_enter()
- except AttributeError:
- gtk.threads_enter()
++VERSION="0.36"
+ # setup GTK
+ try:
+ pygtk.require("2.0")
+@@ -105,6 +107,7 @@
+
+ # enter gtk's mainloop
+ gtk.gdk.threads_enter()
+ gnome.init('gdesklets',VERSION)
gtk.main()
- try:
- gtk.gdk.threads_leave()
+ gtk.gdk.threads_leave()
+