aboutsummaryrefslogtreecommitdiff
path: root/x11/kde4-workspace
diff options
context:
space:
mode:
authorMarkus Brueffer <markus@FreeBSD.org>2009-08-21 15:07:14 +0000
committerMarkus Brueffer <markus@FreeBSD.org>2009-08-21 15:07:14 +0000
commit8a1ab9b9609e0f5c176f810d5ac5217dd80b118d (patch)
tree6d90c0dbf6172775bdd33f223c6b9b2ecee94650 /x11/kde4-workspace
parent99d8707b8584c617206c7f1a961e3103cee7e4fc (diff)
downloadports-8a1ab9b9609e0f5c176f810d5ac5217dd80b118d.tar.gz
ports-8a1ab9b9609e0f5c176f810d5ac5217dd80b118d.zip
Notes
Diffstat (limited to 'x11/kde4-workspace')
-rw-r--r--x11/kde4-workspace/Makefile2
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt12
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h18
-rw-r--r--x11/kde4-workspace/files/patch-plasma-applets-system-monitor-net.cpp21
-rw-r--r--x11/kde4-workspace/files/uptime.c58
-rw-r--r--x11/kde4-workspace/files/uptime.h31
6 files changed, 142 insertions, 0 deletions
diff --git a/x11/kde4-workspace/Makefile b/x11/kde4-workspace/Makefile
index 337edf9ce630..3218cd5fcba2 100644
--- a/x11/kde4-workspace/Makefile
+++ b/x11/kde4-workspace/Makefile
@@ -8,6 +8,7 @@
PORTNAME= kdebase-workspace
PORTVERSION= ${KDE4_VERSION}
+PORTREVISION= 1
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= ${KDE4_BRANCH}/${PORTVERSION}/src
@@ -73,6 +74,7 @@ post-patch:
${PATCH_WRKSRC}/kcontrol/kfontinst/kio/KioFonts.cpp \
${PATCH_WRKSRC}/kcontrol/kxkb/x11helper.cpp \
${PATCH_WRKSRC}/kdm/kfrontend/genkdmconf.c
+ ${CP} ${FILESDIR}/uptime.* ${WRKSRC}/ksysguard/ksysguardd/FreeBSD/
pre-configure:
${REINPLACE_CMD} -e 's|<qhash.h>|<QHash>|'\
diff --git a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt
new file mode 100644
index 000000000000..7fda482f5530
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- ksysguard/ksysguardd/FreeBSD/CMakeLists.txt.orig 2009-08-20 20:01:27.000000000 +0200
++++ ksysguard/ksysguardd/FreeBSD/CMakeLists.txt 2009-08-20 20:01:45.000000000 +0200
+@@ -8,7 +8,8 @@
+ logfile.c
+ Memory.c
+ netdev.c
+- ProcessList.c)
++ ProcessList.c
++ uptime.c)
+
+ TARGET_LINK_LIBRARIES(libksysguardd kvm)
+
diff --git a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h
new file mode 100644
index 000000000000..ab5a13656157
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h
@@ -0,0 +1,18 @@
+--- ksysguard/ksysguardd/modules.h.orig 2009-08-20 20:02:06.000000000 +0200
++++ ksysguard/ksysguardd/modules.h 2009-08-20 21:53:11.000000000 +0200
+@@ -59,6 +59,7 @@
+ #include "Memory.h"
+ #include "netdev.h"
+ #include "ProcessList.h"
++#include "uptime.h"
+ #endif /* OSTYPE_FreeBSD */
+
+ #ifdef OSTYPE_Irix
+@@ -144,6 +145,7 @@
+ { "Memory", initMemory, exitMemory, updateMemory, NULLVVFUNC, 0, NULLTIME },
+ { "NetDev", initNetDev, exitNetDev, updateNetDev, checkNetDev, 0, NULLTIME },
+ { "ProcessList", initProcessList, exitProcessList, updateProcessList, NULLVVFUNC, 0, NULLTIME },
++ { "Uptime", initUptime, exitUptime, NULLIVFUNC, NULLVVFUNC, 0, NULLTIME },
+ #endif /* OSTYPE_FreeBSD */
+
+ #ifdef OSTYPE_Irix
diff --git a/x11/kde4-workspace/files/patch-plasma-applets-system-monitor-net.cpp b/x11/kde4-workspace/files/patch-plasma-applets-system-monitor-net.cpp
new file mode 100644
index 000000000000..4d448a436d35
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-plasma-applets-system-monitor-net.cpp
@@ -0,0 +1,21 @@
+--- plasma/applets/system-monitor/net.cpp.orig 2009-08-21 01:22:09.000000000 +0200
++++ plasma/applets/system-monitor/net.cpp 2009-08-21 01:28:00.000000000 +0200
+@@ -26,7 +26,7 @@
+
+ SM::Net::Net(QObject *parent, const QVariantList &args)
+ : SM::Applet(parent, args)
+- , m_rx("network/interfaces/(\\w+)/transmitter/data")
++ , m_rx("^network/interfaces/(\\w+)/transmitter/data$")
+ {
+ setHasConfigurationInterface(true);
+ resize(234 + 20 + 23, 135 + 20 + 25);
+@@ -58,7 +58,8 @@
+ connect(engine(), SIGNAL(sourceRemoved(const QString&)),
+ this, SLOT(sourceRemoved(const QString&)));
+ if (!engine()->sources().isEmpty()) {
+- sourcesAdded();
++ foreach (const QString& source, engine()->sources())
++ sourceAdded(source);
+ }
+ }
+
diff --git a/x11/kde4-workspace/files/uptime.c b/x11/kde4-workspace/files/uptime.c
new file mode 100644
index 000000000000..4cc921066323
--- /dev/null
+++ b/x11/kde4-workspace/files/uptime.c
@@ -0,0 +1,58 @@
+/*
+ KSysGuard, the KDE System Guard
+
+ Copyright (c) 2009 Markus Brueffer <markus@brueffer.de>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#include <time.h>
+
+#include "Command.h"
+#include "ksysguardd.h"
+#include "uptime.h"
+
+void
+initUptime(struct SensorModul* sm)
+{
+ registerMonitor("system/uptime", "float", printUptime, printUptimeInfo, sm);
+}
+
+void
+exitUptime(void)
+{
+ removeMonitor("system/uptime");
+}
+
+void
+printUptime(const char* c)
+{
+ struct timespec tp;
+ float uptime = 0;
+
+ if (clock_gettime(CLOCK_MONOTONIC, &tp) != -1)
+ uptime = tp.tv_sec + tp.tv_nsec/1000000000.0;
+
+ output("%f\n", uptime);
+}
+
+void
+printUptimeInfo(const char* c)
+{
+ output("System uptime\t0\t0\ts\n");
+}
+
+
diff --git a/x11/kde4-workspace/files/uptime.h b/x11/kde4-workspace/files/uptime.h
new file mode 100644
index 000000000000..336e5db031f2
--- /dev/null
+++ b/x11/kde4-workspace/files/uptime.h
@@ -0,0 +1,31 @@
+/*
+ KSysGuard, the KDE System Guard
+
+ Copyright (c) 2009 Markus Brueffer <markus@brueffer.de>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef _uptime_h_
+#define _uptime_h_
+
+void initUptime(struct SensorModul* sm);
+void exitUptime(void);
+
+void printUptime(const char*);
+void printUptimeInfo(const char*);
+
+#endif