aboutsummaryrefslogtreecommitdiff
path: root/deskutils/gdesklets/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-11-15 01:18:41 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-11-15 01:18:41 +0000
commite65cbff2eb8301378c2f9427d4006b8f3732e5e8 (patch)
tree14d2acac3d33405a4d787fee56bb1e395a4a1e98 /deskutils/gdesklets/files
parentcee1bf46729611f971e55f28f36ea23cefa1bfa5 (diff)
downloadports-e65cbff2eb8301378c2f9427d4006b8f3732e5e8.tar.gz
ports-e65cbff2eb8301378c2f9427d4006b8f3732e5e8.zip
Notes
Diffstat (limited to 'deskutils/gdesklets/files')
-rw-r--r--deskutils/gdesklets/files/patch-data::Makefile.in27
-rw-r--r--deskutils/gdesklets/files/patch-display::TargetLabel.py17
-rw-r--r--deskutils/gdesklets/files/patch-libdesklets::Disk.py67
-rw-r--r--deskutils/gdesklets/files/patch-libdesklets::Network.py11
-rw-r--r--deskutils/gdesklets/files/patch-libdesklets::system::Makefile.in11
-rw-r--r--deskutils/gdesklets/files/patch-libdesklets_Disk.py22
-rw-r--r--deskutils/gdesklets/files/patch-utils-utils.c19
7 files changed, 68 insertions, 106 deletions
diff --git a/deskutils/gdesklets/files/patch-data::Makefile.in b/deskutils/gdesklets/files/patch-data::Makefile.in
index 4631224af96d..06dc56bff218 100644
--- a/deskutils/gdesklets/files/patch-data::Makefile.in
+++ b/deskutils/gdesklets/files/patch-data::Makefile.in
@@ -1,12 +1,17 @@
---- data/Makefile.in.orig Mon Feb 23 09:58:01 2004
-+++ data/Makefile.in Mon Feb 23 09:59:27 2004
-@@ -213,7 +213,8 @@
- @USERINST_TRUE@mimedir = ~/.gnome/mime-info
- mime_in_files = gdesklets.keys.in
- mime_DATA = $(mime_in_files:.keys.in=.keys) gdesklets.mime
--@USERINST_FALSE@mimeicondir = $(datadir)/icons/gnome/48x48/mimetypes
-+@USERINST_FALSE@mimeicondir = $(prefix)/share/icons/gnome/48x48/mimetypes
-+
+--- data/Makefile.in.orig Mon Nov 15 01:17:16 2004
++++ data/Makefile.in Mon Nov 15 01:18:12 2004
+@@ -165,12 +165,12 @@
+ desktop_in_files = gdesklets.desktop.in
+ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
- @USERINST_TRUE@mimeicondir = ~/.icons/gnome/48x48/mimetypes
- mimeicon_DATA = x-gdesklets-display.png
+-sharedmimedir = $(datadir)/mime
++sharedmimedir = $(prefix)/share/mime
+ sharedmimepackagedir = $(sharedmimedir)/packages
+ sharedmimepackage_in_files = gdesklets.xml.in
+ sharedmimepackage_DATA = $(sharedmimepackage_in_files:.xml.in=.xml)
+
+-mimeicondir = $(datadir)/icons/gnome/48x48/mimetypes
++mimeicondir = $(prefix)/share/icons/gnome/48x48/mimetypes
+ mimeicon_DATA = gnome-mime-application-x-gdesklets-display.png
+
+ pixmapdir = $(PIXMAPDIR)
diff --git a/deskutils/gdesklets/files/patch-display::TargetLabel.py b/deskutils/gdesklets/files/patch-display::TargetLabel.py
deleted file mode 100644
index 9c355009b2cc..000000000000
--- a/deskutils/gdesklets/files/patch-display::TargetLabel.py
+++ /dev/null
@@ -1,17 +0,0 @@
---- display/TargetLabel.py.orig Mon Feb 23 09:55:46 2004
-+++ display/TargetLabel.py Mon Feb 23 09:56:50 2004
-@@ -103,7 +103,14 @@
-
- # determine the locale
- import commands
-+import string
- fail, CHARMAP = commands.getstatusoutput("locale charmap")
-+if (fail or not CHARMAP):
-+ fail, CHARMAP = commands.getstatusoutput("echo $MM_CHARSET")
-+ if (fail or not CHARMAP):
-+ fail, CHARMAP = commands.getstatusoutput("echo $LANG")
-+ CHARMAP = CHARMAP[string.find(CHARMAP, ".")+1:len(CHARMAP)]
-+
- if (fail or not CHARMAP):
- print "Could not detect character encoding."
- CHARMAP = "ASCII"
diff --git a/deskutils/gdesklets/files/patch-libdesklets::Disk.py b/deskutils/gdesklets/files/patch-libdesklets::Disk.py
deleted file mode 100644
index 077f487b6178..000000000000
--- a/deskutils/gdesklets/files/patch-libdesklets::Disk.py
+++ /dev/null
@@ -1,67 +0,0 @@
---- libdesklets/Disk.py.orig Fri Feb 20 14:29:07 2004
-+++ libdesklets/Disk.py Fri Apr 30 15:50:42 2004
-@@ -1,6 +1,7 @@
- import glibtop
- import polling
--
-+import os
-+import statvfs
-
- class Disk:
-
-@@ -21,14 +22,19 @@
- #
- def __poll_partitions(self):
-
-- data = glibtop.get_mountlist(0)
-+ fd = os.popen("mount -p")
-+ data = fd.readlines()
-+ fd.close()
-+
- partitions = []
-- for size, device, mpoint, fstype in data:
-- if (fstype in ("ext2", "ext3", "msdos", "vfat", "ntfs", "hpfs"
-- "jfs", "reiserfs", "xfs", "qnx4", "adfs", "ffs",
-- "hfs", "befs", "bfs", "efs", "iso9660", "minix",
-- "sysv", "coda", "nfs", "udf", "ufs", "xiafs")):
-- partitions.append((device, mpoint))
-+ for lines in data:
-+ fields = lines.strip().replace("\t", " ").split()
-+ if (fields[2] in ("ext2", "ext3", "msdos", "vfat", "ntfs", "hpfs"
-+ "jfs", "reiserfs", "xfs", "qnx4", "adfs", "ffs",
-+ "hfs", "befs", "bfs", "efs", "iso9660", "minix",
-+ "sysv", "coda", "nfs", "udf", "ufs", "xiafs")):
-+ partitions.append((fields[0], fields[1]))
-+
-
- return partitions
-
-@@ -43,15 +49,19 @@
- #:/function
- #
- def __poll_size(self, partition):
--
-- blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition)
-- free = float(bfree * 512)
-- total = float(blocks * 512)
-- used = total - free
--
-- return (total, used)#, free)
--
--
-+
-+ try:
-+ statvfs_data = os.statvfs(partition)
-+ free = float(statvfs_data[statvfs.F_BFREE] * statvfs_data[statvfs.F_FRSIZE])
-+ total = float(statvfs_data[statvfs.F_BLOCKS] * statvfs_data[statvfs.F_FRSIZE])
-+ except:
-+ blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition)
-+ free = float(bfree * 512)
-+ total = float(blocks * 512)
-+
-+ used = total - free
-+
-+ return (total, used)#, free)
-
- #
- #:function get_fs | partition | Returns the filesystem for the given
diff --git a/deskutils/gdesklets/files/patch-libdesklets::Network.py b/deskutils/gdesklets/files/patch-libdesklets::Network.py
deleted file mode 100644
index 1fd0d059ee8d..000000000000
--- a/deskutils/gdesklets/files/patch-libdesklets::Network.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- libdesklets/Network.py.orig Mon Feb 23 11:01:31 2004
-+++ libdesklets/Network.py Mon Feb 23 11:01:55 2004
-@@ -142,7 +142,7 @@
-
- if ("FreeBSD" == platform or "NetBSD" == platform):
- fd = os.popen("ifconfig -a | grep mtu", "r")
-- data = fs.readlines()
-+ data = fd.readlines()
- fd.close()
-
- for lines in data:
diff --git a/deskutils/gdesklets/files/patch-libdesklets::system::Makefile.in b/deskutils/gdesklets/files/patch-libdesklets::system::Makefile.in
new file mode 100644
index 000000000000..4643bf0cfd58
--- /dev/null
+++ b/deskutils/gdesklets/files/patch-libdesklets::system::Makefile.in
@@ -0,0 +1,11 @@
+--- libdesklets/system/Makefile.in.orig Mon Jul 12 12:55:59 2004
++++ libdesklets/system/Makefile.in Mon Jul 12 12:56:12 2004
+@@ -775,7 +775,7 @@
+ $(CC) -o $@ $(GLIBTOP_CFLAGS) $(GLIBTOP_LIBS) $^
+
+ glibtop_wrap.c glibtop.py: glibtop.i glibtop.c
+- swig -python glibtop.i
++# swig -python glibtop.i
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/deskutils/gdesklets/files/patch-libdesklets_Disk.py b/deskutils/gdesklets/files/patch-libdesklets_Disk.py
new file mode 100644
index 000000000000..28eaf2395efd
--- /dev/null
+++ b/deskutils/gdesklets/files/patch-libdesklets_Disk.py
@@ -0,0 +1,22 @@
+--- libdesklets/Disk.py.orig Mon Aug 16 12:43:05 2004
++++ libdesklets/Disk.py Mon Aug 16 12:43:10 2004
+@@ -43,13 +43,14 @@
+ #:/function
+ #
+ def __poll_size(self, partition):
+-
+- blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition)[:5]
+- free = float(bfree * 512)
+- total = float(blocks * 512)
++ # code stolen from libgtop.py::fsusage()
++ buf = glibtop.get_fsusage(partition)
++ bsize = buf[glibtop.FSUSAGE_BLOCK_SIZE]
++ free = float(buf[glibtop.FSUSAGE_BFREE] * bsize)
++ total = float(buf[glibtop.FSUSAGE_BLOCKS] * bsize)
+ used = total - free
+
+- return (total, used)#, free)
++ return (total, used)
+
+
+
diff --git a/deskutils/gdesklets/files/patch-utils-utils.c b/deskutils/gdesklets/files/patch-utils-utils.c
new file mode 100644
index 000000000000..5cddda29d36f
--- /dev/null
+++ b/deskutils/gdesklets/files/patch-utils-utils.c
@@ -0,0 +1,19 @@
+--- utils/utils.c.orig Wed Oct 20 16:46:10 2004
++++ utils/utils.c Mon Nov 15 01:02:06 2004
+@@ -12,14 +12,14 @@
+
+ if(G_UNLIKELY(PyGObject_Type == NULL))
+ {
+- PyObject *module, *modict;
++ PyObject *module, *modict, *moddict;
+
+ module = PyImport_ImportModule("gobject");
+
+ if(!module)
+ goto err_gobject;
+
+- PyObject *moddict = PyModule_GetDict(module);
++ moddict = PyModule_GetDict(module);
+
+ PyGObject_Type = (PyTypeObject *) PyDict_GetItemString(moddict, "GObject");
+