mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-31 10:46:16 +00:00
- Implement/Add the sensor 'system/uptime' for/to ksysguardd. As intended
sideeffect, this fixes the plasma systemmonitor applets as most of them were using this sensor internally for management of the sensor list due to a limitation of ksysguardd. As this sensor didn't exist on FreeBSD, they showed nada. - Add a patch from upstream to fix the network part of the plasma systemmonitor [1] - Bump PORTREVISION Obtained from: KDE SVN (rev. 1001470) [1] 7.x testing by: decept on #kde-freebsd (Freenode)
This commit is contained in:
parent
99d8707b85
commit
8a1ab9b960
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=240038
@ -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>|'\
|
||||
|
@ -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)
|
||||
|
@ -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
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
58
x11/kde4-workspace/files/uptime.c
Normal file
58
x11/kde4-workspace/files/uptime.c
Normal file
@ -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");
|
||||
}
|
||||
|
||||
|
31
x11/kde4-workspace/files/uptime.h
Normal file
31
x11/kde4-workspace/files/uptime.h
Normal file
@ -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
|
@ -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>|'\
|
||||
|
@ -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)
|
||||
|
@ -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
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
58
x11/kdebase4-workspace/files/uptime.c
Normal file
58
x11/kdebase4-workspace/files/uptime.c
Normal file
@ -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");
|
||||
}
|
||||
|
||||
|
31
x11/kdebase4-workspace/files/uptime.h
Normal file
31
x11/kdebase4-workspace/files/uptime.h
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user