mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +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
|
||||
PORTVERSION= 0.24.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= deskutils gnome
|
||||
MASTER_SITES= http://www.pycage.de/download/${PORTNAME}/
|
||||
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
|
||||
# help and create those patches.
|
||||
# Many thanks to Alexander Leidinger <netchild@FreeBSD.org> and
|
||||
# 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 Sun Nov 9 00:53:05 2003
|
||||
--- libdesklets/Network.py.orig Sun Nov 16 15:15:30 2003
|
||||
+++ libdesklets/Network.py Sun Nov 16 15:18:22 2003
|
||||
@@ -1,8 +1,8 @@
|
||||
import polling
|
||||
import glibtop
|
||||
@ -43,9 +44,9 @@
|
||||
- devices.append(device)
|
||||
+ if ("FreeBSD" == platform):
|
||||
+ for lines in data:
|
||||
+ fields = lines.strip().strip(":")
|
||||
+ fields = lines.strip().split(":")
|
||||
+
|
||||
+ if (fields[0] == "lo"):
|
||||
+ if (fields[0][:2] == "lo"):
|
||||
+ continue
|
||||
+ else:
|
||||
+ 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-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/schemas/desktop/gnome/thumbnailers/%gconf.xml
|
||||
etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/application@x-gdesklets-display/%gconf.xml
|
||||
etc/gconf/schemas/gdesklets-display-thumbnail.schemas
|
||||
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
|
||||
@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
|
||||
|
Loading…
Reference in New Issue
Block a user