mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-04 11:23:46 +00:00
* Fix threading and SysInfo functionality on FreeBSD [1]
* Fix plist PR: 59389 Submitted by: maintainer Obtained from: Franz Klammer <klammer@webonaut.com> [1]
This commit is contained in:
parent
6336d82f25
commit
909f4ceccd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=94209
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= gdesklets
|
PORTNAME= gdesklets
|
||||||
PORTVERSION= 0.24.1
|
PORTVERSION= 0.24.1
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= deskutils gnome
|
CATEGORIES= deskutils gnome
|
||||||
MASTER_SITES= http://www.pycage.de/download/${PORTNAME}/
|
MASTER_SITES= http://www.pycage.de/download/${PORTNAME}/
|
||||||
DISTNAME= gDesklets-${PORTVERSION}
|
DISTNAME= gDesklets-${PORTVERSION}
|
||||||
|
50
deskutils/gdesklets/files/patch-libdesklets::Disk.py
Normal file
50
deskutils/gdesklets/files/patch-libdesklets::Disk.py
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Many thanks to Alexander Leidinger <netchild@FreeBSD.org> and
|
||||||
|
# Franz Klammer <klammer@webonaut.com> for help and create
|
||||||
|
# those patches.
|
||||||
|
#
|
||||||
|
# Note that, this is for now. One of us still need to fix the
|
||||||
|
# libgtop to correct read the partition so this patch can be
|
||||||
|
# remove.
|
||||||
|
|
||||||
|
--- libdesklets/Disk.py.orig Mon Nov 17 13:59:20 2003
|
||||||
|
+++ libdesklets/Disk.py Mon Nov 17 14:05:34 2003
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
import glibtop
|
||||||
|
import polling
|
||||||
|
-
|
||||||
|
+import os
|
||||||
|
|
||||||
|
class Disk:
|
||||||
|
|
||||||
|
@@ -13,18 +13,22 @@
|
||||||
|
|
||||||
|
def __poll_partitions(self):
|
||||||
|
|
||||||
|
- data = glibtop.get_mountlist(0)
|
||||||
|
- 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))
|
||||||
|
+ fd = os.popen("mount -p")
|
||||||
|
+ data = fd.readlines()
|
||||||
|
+ fd.close()
|
||||||
|
+
|
||||||
|
+ partitions = []
|
||||||
|
+ 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]))
|
||||||
|
#end for
|
||||||
|
|
||||||
|
return partitions
|
||||||
|
-
|
||||||
|
+
|
||||||
|
|
||||||
|
|
||||||
|
def __poll_size(self, partition):
|
15
deskutils/gdesklets/files/patch-libdesklets::Memory.py
Normal file
15
deskutils/gdesklets/files/patch-libdesklets::Memory.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Many thanks to Alexander Leidinger <netchild@FreeBSD.org> and
|
||||||
|
# Franz Klammer <klammer@webonaut.com> for help and create
|
||||||
|
# those patches.
|
||||||
|
|
||||||
|
--- libdesklets/Memory.py.orig Sun Nov 16 17:02:45 2003
|
||||||
|
+++ libdesklets/Memory.py Sun Nov 16 17:03:19 2003
|
||||||
|
@@ -49,7 +49,7 @@
|
||||||
|
|
||||||
|
# Swap
|
||||||
|
elif (mode == 1):
|
||||||
|
- total, used, free = glibtop.get_mem()[:3]
|
||||||
|
+ total, used, free = glibtop.get_swap()[:3]
|
||||||
|
#for l in lines:
|
||||||
|
# if (l.startswith("SwapTotal:")):
|
||||||
|
# value = l.split()
|
@ -1,8 +1,9 @@
|
|||||||
# Many thanks to Alexander Leidinger <netchild@FreeBSD.org> for
|
# Many thanks to Alexander Leidinger <netchild@FreeBSD.org> and
|
||||||
# help and create those patches.
|
# Franz Klammer <klammer@webonaut.com> for help and create
|
||||||
|
# those patches.
|
||||||
|
|
||||||
--- libdesklets/Network.py.orig Sun Nov 9 00:52:39 2003
|
--- libdesklets/Network.py.orig Sun Nov 16 15:15:30 2003
|
||||||
+++ libdesklets/Network.py Sun Nov 9 00:53:05 2003
|
+++ libdesklets/Network.py Sun Nov 16 15:18:22 2003
|
||||||
@@ -1,8 +1,8 @@
|
@@ -1,8 +1,8 @@
|
||||||
import polling
|
import polling
|
||||||
import glibtop
|
import glibtop
|
||||||
@ -43,9 +44,9 @@
|
|||||||
- devices.append(device)
|
- devices.append(device)
|
||||||
+ if ("FreeBSD" == platform):
|
+ if ("FreeBSD" == platform):
|
||||||
+ for lines in data:
|
+ for lines in data:
|
||||||
+ fields = lines.strip().strip(":")
|
+ fields = lines.strip().split(":")
|
||||||
+
|
+
|
||||||
+ if (fields[0] == "lo"):
|
+ if (fields[0][:2] == "lo"):
|
||||||
+ continue
|
+ continue
|
||||||
+ else:
|
+ else:
|
||||||
+ device = fields[0]
|
+ device = fields[0]
|
||||||
|
14
deskutils/gdesklets/files/patch-sensor::Sensor.py
Normal file
14
deskutils/gdesklets/files/patch-sensor::Sensor.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Yay! Many thanks to Franz Klammer <klammer@webonaut.com>,
|
||||||
|
# the theads is now work. That make a lot of desklets work now.
|
||||||
|
|
||||||
|
--- sensor/Sensor.py.orig Mon Nov 17 16:46:57 2003
|
||||||
|
+++ sensor/Sensor.py Mon Nov 17 16:48:43 2003
|
||||||
|
@@ -134,6 +134,8 @@
|
||||||
|
#
|
||||||
|
def _add_thread(self, threadfunction, *args):
|
||||||
|
|
||||||
|
+ gtk.threads_init()
|
||||||
|
+
|
||||||
|
# the thread should not start before setup is complete, therefore
|
||||||
|
# we are using the GTK idle handler
|
||||||
|
def run_thread(threadfunction, args):
|
@ -1,8 +1,6 @@
|
|||||||
bin/gdesklets
|
bin/gdesklets
|
||||||
bin/gdesklets-display-thumbnailer
|
bin/gdesklets-display-thumbnailer
|
||||||
etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/%gconf.xml
|
|
||||||
etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/application@x-gdesklets-display/%gconf.xml
|
etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/application@x-gdesklets-display/%gconf.xml
|
||||||
etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/%gconf.xml
|
|
||||||
etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/application@x-gdesklets-display/%gconf.xml
|
etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/application@x-gdesklets-display/%gconf.xml
|
||||||
etc/gconf/schemas/gdesklets-display-thumbnail.schemas
|
etc/gconf/schemas/gdesklets-display-thumbnail.schemas
|
||||||
libdata/pkgconfig/gdesklets-core.pc
|
libdata/pkgconfig/gdesklets-core.pc
|
||||||
@ -152,6 +150,4 @@ share/icons/gnome/48x48/mimetypes/x-gdesklets-display.png
|
|||||||
@dirrm share/gnome/gdesklets/Displays
|
@dirrm share/gnome/gdesklets/Displays
|
||||||
@dirrm share/gnome/gdesklets
|
@dirrm share/gnome/gdesklets
|
||||||
@dirrm etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/application@x-gdesklets-display
|
@dirrm etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/application@x-gdesklets-display
|
||||||
@dirrm etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers
|
|
||||||
@dirrm etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/application@x-gdesklets-display
|
@dirrm etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/application@x-gdesklets-display
|
||||||
@dirrm etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user