summaryrefslogtreecommitdiff
path: root/x11/kde4-workspace/files
diff options
context:
space:
mode:
authorAlberto Villa <avilla@FreeBSD.org>2011-03-25 10:33:51 +0000
committerAlberto Villa <avilla@FreeBSD.org>2011-03-25 10:33:51 +0000
commitc1f3de0f55e58790d19f686e510418e212aee85c (patch)
tree9c83366b7e53439af8a08cb4d55853e9209564e1 /x11/kde4-workspace/files
parent- Update to 0.99.0. (diff)
The FreeBSD KDE Team is pleased to announce KDE SC 4.6.1 and KDE PIM
4.4.10. The official 4.6.1 release notes can be found at: http://www.kde.org/announcements/announce-4.6.1.php We'd like to say thanks to all helpers and submitters. Tested by: exp-run via miwi
Notes
Notes: svn path=/head/; revision=271650
Diffstat (limited to 'x11/kde4-workspace/files')
-rw-r--r--x11/kde4-workspace/files/kdm.in11
-rw-r--r--x11/kde4-workspace/files/kdm4.in39
-rw-r--r--x11/kde4-workspace/files/patch-CMakeLists.txt11
-rw-r--r--x11/kde4-workspace/files/patch-khotkeys__libkhotkeysprivate__CMakeLists.txt9
-rw-r--r--x11/kde4-workspace/files/patch-kinfocenter__Modules__base__info_fbsd.cpp57
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-gui-SystemLoad.sgrd11
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-gui-ksgrd-SensorManager.cc10
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt12
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CPU.c77
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CPU.h22
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h18
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard__gui__SensorDisplayLib__ListView.cc55
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard__gui__SensorDisplayLib__ListView.h56
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard__gui__SystemLoad2.sgrd12
-rw-r--r--x11/kde4-workspace/files/patch-ksysguard__gui__ksgrd__SensorManager.cc92
-rw-r--r--x11/kde4-workspace/files/patch-kwin__CMakeLists.txt11
-rw-r--r--x11/kde4-workspace/files/patch-plasma__generic__scriptengines__CMakeLists.txt8
-rw-r--r--x11/kde4-workspace/files/patch-startkde.cmake12
-rw-r--r--x11/kde4-workspace/files/uptime.c58
-rw-r--r--x11/kde4-workspace/files/uptime.h31
20 files changed, 287 insertions, 325 deletions
diff --git a/x11/kde4-workspace/files/kdm.in b/x11/kde4-workspace/files/kdm.in
index 06181ce3bbeb..69162f32924d 100644
--- a/x11/kde4-workspace/files/kdm.in
+++ b/x11/kde4-workspace/files/kdm.in
@@ -2,19 +2,18 @@
#
# $FreeBSD$
-# some defs
+# Some definitions.
GENKDMCONF=%%PREFIX%%/bin/genkdmconf
KDMCONFDIR=%%PREFIX%%/share/config/kdm
-#Configure kdm if needed
+# Configure KDM if needed.
if [ ! -r ${KDMCONFDIR}/kdmrc ]; then
- echo "Generating KDM configuration";
+ echo "Generating KDM configuration.";
${GENKDMCONF} --no-old --in ${KDMCONFDIR};
else
- echo "Updating KDM configuration";
+ echo "Updating KDM configuration.";
${GENKDMCONF} --in ${KDMCONFDIR};
-
fi
-#run kdm
+# Run KDM.
exec "%%PREFIX%%/bin/kdm-bin" "$@"
diff --git a/x11/kde4-workspace/files/kdm4.in b/x11/kde4-workspace/files/kdm4.in
index c7d71dc4767f..483aacc1d4c2 100644
--- a/x11/kde4-workspace/files/kdm4.in
+++ b/x11/kde4-workspace/files/kdm4.in
@@ -3,7 +3,7 @@
# PROVIDE: kdm4
# REQUIRE: LOGIN cleanvar moused syscons dbus hald
#
-# Add the following to /etc/rc.conf to start kdm at boot time:
+# Add the following to /etc/rc.conf to start KDM at boot time:
#
# kdm4_enable="YES"
#
@@ -12,8 +12,6 @@
kdm4_enable=${kdm4_enable-"NO"}
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/kde4/bin:/usr/local/kde4/sbin
-
GENKDMCONF=%%PREFIX%%/bin/genkdmconf
KDMCONFDIR=%%PREFIX%%/share/config/kdm
@@ -21,33 +19,40 @@ name=kdm4
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/kdm-bin"
pidfile="/var/run/kdm.pid"
-procname="%%PREFIX%%/bin/kdm-bin"
start_cmd="kdm_start"
kdm_start()
{
- if ! checkyesno kdm4_enable ; then
- return 0
+ if ! checkyesno kdm4_enable; then
+ return 0
fi
echo "Starting ${name}."
- #Configure kdm if needed
+ # Configure KDM if needed.
if [ ! -r ${KDMCONFDIR}/kdmrc ]; then
- echo "Generating KDM configuration";
- ${GENKDMCONF} --no-old --in ${KDMCONFDIR};
+ echo "Generating KDM configuration."
+ ${GENKDMCONF} --no-old --in ${KDMCONFDIR}
else
- echo "Updating KDM configuration";
- ${GENKDMCONF} --in ${KDMCONFDIR};
+ echo "Updating KDM configuration."
+ ${GENKDMCONF} --in ${KDMCONFDIR}
fi
( iter=0
- while ! ps -axoargs | grep "^/usr/libexec/getty " | grep -qv grep >/dev/null 2>&1; do
- if [ ${iter} -eq 60 ]; then
- break
- fi
- sleep 10
- iter=$(expr ${iter} + 1)
+ while ! pgrep -fq "^/usr/libexec/getty " > /dev/null 2>&1; do
+ if [ ${iter} -ge 600 ]; then
+ return 1
+ fi
+ sleep 1
+ iter=$(expr ${iter} + 1)
done
+ if checkyesno hald_enable; then
+ iter=0
+ while [ ${iter} -lt 60 ] &&
+ ! %%LOCALBASE%%/bin/lshal > /dev/null 2>&1; do
+ sleep 1
+ iter=$(expr ${iter} + 1)
+ done
+ fi
${command} ${kdm4_flags} ) &
}
diff --git a/x11/kde4-workspace/files/patch-CMakeLists.txt b/x11/kde4-workspace/files/patch-CMakeLists.txt
index 69647cafd4f2..6fea1f815c21 100644
--- a/x11/kde4-workspace/files/patch-CMakeLists.txt
+++ b/x11/kde4-workspace/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
--- ./CMakeLists.txt.orig 2010-07-29 01:04:56.000000000 +0400
+++ ./CMakeLists.txt 2010-08-03 14:45:37.785806201 +0400
-@@ -79,7 +79,7 @@
+@@ -84,7 +84,7 @@
configure_file(config-unix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-unix.h )
configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h )
if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
@@ -9,7 +9,7 @@
endif(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
configure_file(startkde.cmake ${CMAKE_CURRENT_BINARY_DIR}/startkde @ONLY)
endif(NOT WIN32)
-@@ -231,7 +231,7 @@
+@@ -223,13 +223,13 @@
macro_write_basic_cmake_version_file(${CMAKE_CURRENT_BINARY_DIR}/KDE4WorkspaceConfigVersion.cmake
${KDE4WORKSPACE_VERSION_MAJOR} ${KDE4WORKSPACE_VERSION_MINOR} ${KDE4WORKSPACE_VERSION_PATCH})
@@ -18,3 +18,10 @@
# places where find_package() looks for FooConfig.cmake files:
# CMake >= 2.6.0 looks in lib/Foo*/cmake/, CMake >= 2.6.3 also looks in
# lib/cmake/Foo*/, which packagers prefer. So they can set the KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR
+ # option to have kdepimlibs install its Config file there. Alex
+ if(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
+- set(_KDE4WorkspaceConfig_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/KDE4Workspace-${KDE4WORKSPACE_VERSION} )
++ set(_KDE4WorkspaceConfig_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/KDE4Workspace )
+ endif(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KDE4WorkspaceConfig.cmake
diff --git a/x11/kde4-workspace/files/patch-khotkeys__libkhotkeysprivate__CMakeLists.txt b/x11/kde4-workspace/files/patch-khotkeys__libkhotkeysprivate__CMakeLists.txt
new file mode 100644
index 000000000000..72261776035d
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-khotkeys__libkhotkeysprivate__CMakeLists.txt
@@ -0,0 +1,9 @@
+--- ./khotkeys/libkhotkeysprivate/CMakeLists.txt.orig 2010-12-02 10:16:38.017500408 +1000
++++ ./khotkeys/libkhotkeysprivate/CMakeLists.txt 2010-12-02 10:16:45.839492868 +1000
+@@ -75,5 +75,5 @@
+ target_link_libraries(khotkeysprivate ${X11_XTest_LIB})
+ endif(X11_XTest_FOUND)
+ set_target_properties(khotkeysprivate PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+-install(TARGETS khotkeysprivate ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
++install(TARGETS khotkeysprivate ${INSTALL_TARGETS_DEFAULT_ARGS})
+
diff --git a/x11/kde4-workspace/files/patch-kinfocenter__Modules__base__info_fbsd.cpp b/x11/kde4-workspace/files/patch-kinfocenter__Modules__base__info_fbsd.cpp
deleted file mode 100644
index c6bd05dfd898..000000000000
--- a/x11/kde4-workspace/files/patch-kinfocenter__Modules__base__info_fbsd.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
---- ./kinfocenter/Modules/base/info_fbsd.cpp.orig 2009-04-15 14:25:24.000000000 +0400
-+++ ./kinfocenter/Modules/base/info_fbsd.cpp 2009-09-22 21:33:38.000000000 +0400
-@@ -211,28 +211,17 @@
- FILE *pipe;
- QFile *pcicontrol;
- QString s, cmd;
-+ QTextStream *t;
- QTreeWidgetItem *olditem= NULL;
-
- pcicontrol = new QFile("/usr/sbin/pciconf");
-
- if (!pcicontrol->exists()) {
-+ QStringList list;
-+ list << i18n("Could not find any programs with which to query your system's PCI information");
-+ new QTreeWidgetItem(tree, list);
- delete pcicontrol;
-- pcicontrol = new QFile("/usr/X11R6/bin/scanpci");
-- if (!pcicontrol->exists()) {
-- delete pcicontrol;
-- pcicontrol = new QFile("/usr/X11R6/bin/pcitweak");
-- if (!pcicontrol->exists()) {
-- QStringList list;
-- list << i18n("Could not find any programs with which to query your system's PCI information");
-- new QTreeWidgetItem(tree, list);
-- delete pcicontrol;
-- return true;
-- } else {
-- cmd = "/usr/X11R6/bin/pcitweak -l 2>&1";
-- }
-- } else {
-- cmd = "/usr/X11R6/bin/scanpci";
-- }
-+ return true;
- } else {
- cmd = "/usr/sbin/pciconf -l -v 2>&1";
- }
-@@ -247,8 +236,19 @@
- /* This prints out a list of all the pci devies, perhaps eventually we could
- parse it as opposed to schlepping it into a listbox */
-
-+ t = new QTextStream(pipe, QIODevice::ReadOnly);
-+
-+ while (true) {
-+ s = t->readLine();
-+ if (s.isEmpty() )
-+ break;
-+ QStringList list;
-+ list << s;
-+ new QTreeWidgetItem(tree, list);
-+ }
-+
-+ delete t;
- pclose(pipe);
-- GetInfo_ReadfromPipe(tree, cmd.toLatin1(), true);
- }
-
- if (!tree->topLevelItemCount()) {
diff --git a/x11/kde4-workspace/files/patch-ksysguard-gui-SystemLoad.sgrd b/x11/kde4-workspace/files/patch-ksysguard-gui-SystemLoad.sgrd
deleted file mode 100644
index 1b7b451570db..000000000000
--- a/x11/kde4-workspace/files/patch-ksysguard-gui-SystemLoad.sgrd
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./ksysguard/gui/SystemLoad2.sgrd.orig 2009-06-09 18:07:55.000000000 +0200
-+++ ./ksysguard/gui/SystemLoad2.sgrd 2009-07-03 09:35:29.000000000 +0200
-@@ -3,7 +3,7 @@
- <WorkSheet title="System Load" interval="0.5" locked="1" rows="3" columns="1" >
- <host port="-1" command="ksysguardd" shell="" name="localhost" />
- <display title="CPU History" svgBackground="widgets/plot-background" autoRange="0" class="FancyPlotter" column="0" row="0" version="1">
-- <beam sensorType="float" hostName="localhost" regexpSensorName="cpu/cpu.*/TotalLoad" color="0xffff8000,0xffe20800" />
-+ <beam sensorType="float" hostName="localhost" regexpSensorName="cpu/.*/TotalLoad" color="0xffff8000,0xffe20800" />
- </display>
- <display title="Memory and Swap History" svgBackground="widgets/plot-background" autoRange="0" class="FancyPlotter" column="0" row="1" version="1" >
- <beam summationName="Memory" sensorName="mem/physical/application" sensorType="integer" hostName="localhost" color="0xffc000c0" />
diff --git a/x11/kde4-workspace/files/patch-ksysguard-gui-ksgrd-SensorManager.cc b/x11/kde4-workspace/files/patch-ksysguard-gui-ksgrd-SensorManager.cc
deleted file mode 100644
index 951988f978b5..000000000000
--- a/x11/kde4-workspace/files/patch-ksysguard-gui-ksgrd-SensorManager.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./ksysguard/gui/ksgrd/SensorManager.cc.orgi 2009-01-22 23:54:35.000000000 +0100
-+++ ./ksysguard/gui/ksgrd/SensorManager.cc 2009-01-22 23:54:52.000000000 +0100
-@@ -61,6 +61,7 @@
- mDict.insert( QLatin1String( "nice" ), i18n( "Nice Load" ) );
- mDict.insert( QLatin1String( "user" ), i18n( "User Load" ) );
- mDict.insert( QLatin1String( "sys" ), i18nc( "@item sensor description", "System Load" ) );
-+ mDict.insert( QLatin1String( "intr" ), i18n( "Interrupt Load" ) );
- mDict.insert( QLatin1String( "wait" ), i18n( "Waiting" ) );
- mDict.insert( QLatin1String( "TotalLoad" ), i18n( "Total Load" ) );
- mDict.insert( QLatin1String( "mem" ), i18n( "Memory" ) );
diff --git a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt
deleted file mode 100644
index 7fda482f5530..000000000000
--- a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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-FreeBSD-CPU.c b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CPU.c
deleted file mode 100644
index e2aa9fc7591d..000000000000
--- a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CPU.c
+++ /dev/null
@@ -1,77 +0,0 @@
---- ./ksysguard/ksysguardd/FreeBSD/CPU.c.orig 2008-01-05 00:55:46.000000000 +0100
-+++ ./ksysguard/ksysguardd/FreeBSD/CPU.c 2009-02-03 20:54:08.000000000 +0100
-@@ -49,11 +49,12 @@
- struct kinfo_cputime *);
- static struct kinfo_cputime cp_time, cp_old;
-
--#define CPUSTATES 4
-+#define CPUSTATES 5
- #define CP_USER 0
- #define CP_NICE 1
- #define CP_SYS 2
--#define CP_IDLE 3
-+#define CP_INTR 3
-+#define CP_IDLE 4
-
- #else
- long percentages(int cnt, int *out, long *new, long *old, long *diffs);
-@@ -74,6 +75,8 @@
- registerMonitor("cpu/system/user", "integer", printCPUUser, printCPUUserInfo, sm);
- registerMonitor("cpu/system/nice", "integer", printCPUNice, printCPUNiceInfo, sm);
- registerMonitor("cpu/system/sys", "integer", printCPUSys, printCPUSysInfo, sm);
-+ registerMonitor("cpu/system/TotalLoad", "float", printCPUTotalLoad, printCPUTotalLoadInfo, sm);
-+ registerMonitor("cpu/system/intr", "integer", printCPUIntr, printCPUIntrInfo, sm);
- registerMonitor("cpu/system/idle", "integer", printCPUIdle, printCPUIdleInfo, sm);
-
- /* Monitor names changed from kde3 => kde4. Remain compatible with legacy requests when possible. */
-@@ -91,6 +94,8 @@
- removeMonitor("cpu/system/user");
- removeMonitor("cpu/system/nice");
- removeMonitor("cpu/system/sys");
-+ removeMonitor("cpu/system/TotalLoad");
-+ removeMonitor("cpu/system/intr");
- removeMonitor("cpu/system/idle");
-
- /* These were registered as legacy monitors */
-@@ -151,6 +156,31 @@
- }
-
- void
-+printCPUTotalLoad(const char* cmd)
-+{
-+ fprintf(CurrentClient, "%f\n", (cpu_states[CP_SYS] + cpu_states[CP_USER] +
-+ cpu_states[CP_NICE] + cpu_states[CP_INTR]) / 10.0);
-+}
-+
-+void
-+printCPUTotalLoadInfo(const char* cmd)
-+{
-+ fprintf(CurrentClient, "CPU Total Load\t0\t100\t%%\n");
-+}
-+
-+void
-+printCPUIntr(const char* cmd)
-+{
-+ fprintf(CurrentClient, "%d\n", cpu_states[CP_INTR]/10);
-+}
-+
-+void
-+printCPUIntrInfo(const char* cmd)
-+{
-+ fprintf(CurrentClient, "CPU Interrupt Load\t0\t100\t%%\n");
-+}
-+
-+void
- printCPUIdle(const char* cmd)
- {
- fprintf(CurrentClient, "%d\n", cpu_states[CP_IDLE]/10);
-@@ -216,7 +246,8 @@
-
- out[0] = ((diffs.cp_user * 1000LL + half_total) / total_change);
- out[1] = ((diffs.cp_nice * 1000LL + half_total) / total_change);
-- out[2] = (((diffs.cp_sys + diffs.cp_intr) * 1000LL + half_total) / total_change);
-+ out[2] = ((diffs.cp_sys * 1000LL + half_total) / total_change);
-+ out[3] = ((diffs.cp_intr * 1000LL + half_total) / total_change);
- out[4] = ((diffs.cp_idle * 1000LL + half_total) / total_change);
- }
- #else
diff --git a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CPU.h b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CPU.h
deleted file mode 100644
index 87896f1d25eb..000000000000
--- a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-FreeBSD-CPU.h
+++ /dev/null
@@ -1,22 +0,0 @@
---- ./ksysguard/ksysguardd/FreeBSD/CPU.h.orig 2008-01-05 00:55:46.000000000 +0100
-+++ ./ksysguard/ksysguardd/FreeBSD/CPU.h 2009-02-03 16:26:12.000000000 +0100
-@@ -35,6 +35,10 @@
- void printCPUNiceInfo(const char* cmd);
- void printCPUSys(const char* cmd);
- void printCPUSysInfo(const char* cmd);
-+void printCPUTotalLoad(const char* cmd);
-+void printCPUTotalLoadInfo(const char* cmd);
-+void printCPUIntr(const char* cmd);
-+void printCPUIntrInfo(const char* cmd);
- void printCPUIdle(const char* cmd);
- void printCPUIdleInfo(const char* cmd);
- void printCPUxUser(const char* cmd);
-@@ -43,6 +47,8 @@
- void printCPUxNiceInfo(const char* cmd);
- void printCPUxSys(const char* cmd);
- void printCPUxSysInfo(const char* cmd);
-+void printCPUxIntr(const char* cmd);
-+void printCPUxIntrInfo(const char* cmd);
- void printCPUxIdle(const char* cmd);
- void printCPUxIdleInfo(const char* cmd);
-
diff --git a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h b/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h
deleted file mode 100644
index ab5a13656157..000000000000
--- a/x11/kde4-workspace/files/patch-ksysguard-ksysguardd-modules.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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-ksysguard__gui__SensorDisplayLib__ListView.cc b/x11/kde4-workspace/files/patch-ksysguard__gui__SensorDisplayLib__ListView.cc
new file mode 100644
index 000000000000..c2e8520d7182
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguard__gui__SensorDisplayLib__ListView.cc
@@ -0,0 +1,55 @@
+--- ksysguard~/gui/SensorDisplayLib/ListView.cc 2009-12-14 12:43:42.000000000 +0200
++++ ksysguard/gui/SensorDisplayLib/ListView.cc 2011-02-18 12:49:41.000000000 +0200
+@@ -108,6 +108,8 @@
+ return Time;
+ else if ( type == "M" )
+ return DiskStat;
++ else if ( type == "KB" || type == "KByte" )
++ return KByte;
+ else
+ return Text;
+ }
+@@ -115,6 +117,8 @@
+ void
+ ListView::answerReceived(int id, const QList<QByteArray>& answer)
+ {
++ unsigned long kbytes;
++ float sbytes;
+ /* We received something, so the sensor is probably ok. */
+ sensorError(id, false);
+
+@@ -139,7 +143,12 @@
+ }
+
+ for(uint i =0 ; i < colTypes.count(); i++) {
+- mColumnTypes.append(convertColumnType(colTypes[i]));
++ ColumnType type = convertColumnType(colTypes[i]);
++ mColumnTypes.append(type);
++ if (type == Text || type == DiskStat)
++ mModel.addColumnAlignment(Qt::AlignLeft);
++ else
++ mModel.addColumnAlignment(Qt::AlignRight);
+ }
+
+ mModel.setHorizontalHeaderLabels(translatedHeaders);
+@@ -166,6 +175,20 @@
+ case Time:
+ item->setData(QTime::fromString(records[j]), Qt::DisplayRole);
+ break;
++ case KByte:
++ kbytes = records[j].toInt();
++ if(kbytes >= 1024*1024*1024*0.7) { //If it's over 0.7TiB, then set the scale to terabytes
++ sbytes = kbytes / float(1024*1024*1024);
++ item->setText(i18nc("units", "%1 TiB", KGlobal::locale()->formatNumber(sbytes, sbytes < 9.9 ? 1 : 0)));
++ } else if(kbytes >= 1024*1024*0.7) { //If it's over 0.7GiB, then set the scale to gigabytes
++ sbytes = kbytes / float(1024*1024);
++ item->setText(i18nc("units", "%1 GiB", KGlobal::locale()->formatNumber(sbytes, sbytes < 9.9 ? 1 : 0)));
++ } else if(kbytes > 1024) {
++ sbytes = kbytes / float(1024);
++ item->setText(i18nc("units", "%1 MiB", KGlobal::locale()->formatNumber(sbytes, sbytes < 9.9 ? 1 : 0)));
++ } else
++ item->setText(i18nc("units", "%1 KiB", kbytes));
++ break;
+ case DiskStat:
+ case Text:
+ default:
diff --git a/x11/kde4-workspace/files/patch-ksysguard__gui__SensorDisplayLib__ListView.h b/x11/kde4-workspace/files/patch-ksysguard__gui__SensorDisplayLib__ListView.h
new file mode 100644
index 000000000000..b416634067e3
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguard__gui__SensorDisplayLib__ListView.h
@@ -0,0 +1,56 @@
+--- ksysguard~/gui/SensorDisplayLib/ListView.h 2011-02-18 12:44:19.000000000 +0200
++++ ksysguard/gui/SensorDisplayLib/ListView.h 2011-02-18 12:47:59.000000000 +0200
+@@ -29,6 +29,41 @@
+ class ListViewSettings;
+ class QTreeView;
+
++class ListViewModel : public QStandardItemModel {
++public:
++ ListViewModel(QObject * parent = 0 ) : QStandardItemModel(parent)
++ {
++ }
++
++ ListViewModel(int rows, int columns, QObject * parent = 0) : QStandardItemModel(rows, columns, parent)
++ {
++ }
++
++ void addColumnAlignment( Qt::AlignmentFlag align )
++ {
++ mAlignment.append(align);
++ }
++
++ void clear()
++ {
++ QStandardItemModel::clear();
++ mAlignment.clear();
++ }
++
++ QVariant data(const QModelIndex &index, int role) const
++ {
++ int column = index.column();
++
++ if ( role == Qt::TextAlignmentRole && column >= 0 && column < mAlignment.size() )
++ return mAlignment[column];
++ else
++ return QStandardItemModel::data(index, role);
++ }
++
++private:
++ QList<Qt::AlignmentFlag> mAlignment;
++};
++
+ class ListView : public KSGRD::SensorDisplay
+ {
+ Q_OBJECT
+@@ -61,9 +96,9 @@
+
+ private:
+
+- typedef enum { Text, Int, Float, Time, DiskStat } ColumnType;
++ typedef enum { Text, Int, Float, Time, DiskStat, KByte } ColumnType;
+
+- QStandardItemModel mModel;
++ ListViewModel mModel;
+ QTreeView *mView;
+ ListViewSettings* lvs;
+ QByteArray mHeaderSettings;
diff --git a/x11/kde4-workspace/files/patch-ksysguard__gui__SystemLoad2.sgrd b/x11/kde4-workspace/files/patch-ksysguard__gui__SystemLoad2.sgrd
new file mode 100644
index 000000000000..c3c6b96bae0a
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguard__gui__SystemLoad2.sgrd
@@ -0,0 +1,12 @@
+--- ksysguard~/gui/SystemLoad2.sgrd 2009-08-28 18:01:43.000000000 +0200
++++ ksysguard/gui/SystemLoad2.sgrd 2011-01-03 19:18:24.000000000 +0200
+@@ -10,7 +10,7 @@
+ <beam summationName="Swap" sensorName="mem/swap/used" sensorType="integer" hostName="localhost" color="0xff00c000" />
+ </display>
+ <display title="Network History" svgBackground="widgets/plot-background" autoRange="1" class="FancyPlotter" column="0" row="2" version="1" min="0" max="20" manualRange="1">
+- <beam sensorType="float" hostName="localhost" summationName="Receiving" regexpSensorName="network/interfaces/(?!lo).*/receiver/data" color="0xB3A52D" />
+- <beam sensorType="float" hostName="localhost" summationName="Sending" regexpSensorName="network/interfaces/(?!lo).*/transmitter/data" color="0x844798" />
++ <beam sensorType="float" hostName="localhost" summationName="Receiving" regexpSensorName="network/interfaces/(?!lo|bridge|usbus).*/receiver/data" color="0xB3A52D" />
++ <beam sensorType="float" hostName="localhost" summationName="Sending" regexpSensorName="network/interfaces/(?!lo|bridge|usbus).*/transmitter/data" color="0x844798" />
+ </display>
+ </WorkSheet>
diff --git a/x11/kde4-workspace/files/patch-ksysguard__gui__ksgrd__SensorManager.cc b/x11/kde4-workspace/files/patch-ksysguard__gui__ksgrd__SensorManager.cc
new file mode 100644
index 000000000000..20c9adcc41d9
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguard__gui__ksgrd__SensorManager.cc
@@ -0,0 +1,92 @@
+--- ksysguard~/gui/ksgrd/SensorManager.cc 2009-10-15 18:33:36.000000000 +0200
++++ ksysguard/gui/ksgrd/SensorManager.cc 2011-02-19 23:22:35.000000000 +0200
+@@ -66,6 +66,7 @@
+ mDict.insert( QLatin1String( "user" ), i18n( "User Load" ) );
+ mDict.insert( QLatin1String( "sys" ), i18nc( "@item sensor description", "System Load" ) );
+ mDict.insert( QLatin1String( "wait" ), i18n( "Waiting" ) );
++ mDict.insert( QLatin1String( "intr" ), i18n( "Interrupt Load" ) );
+ mDict.insert( QLatin1String( "TotalLoad" ), i18n( "Total Load" ) );
+ mDict.insert( QLatin1String( "mem" ), i18n( "Memory" ) );
+ mDict.insert( QLatin1String( "physical" ), i18n( "Physical Memory" ) );
+@@ -82,6 +83,7 @@
+ mDict.insert( QLatin1String( "filepages" ), i18n( "File Pages" ) );
+ mDict.insert( QLatin1String( "pscount" ), i18n( "Process Count" ) );
+ mDict.insert( QLatin1String( "ps" ), i18n( "Process Controller" ) );
++ mDict.insert( QLatin1String( "lastpid" ), i18n( "Last Process ID" ) );
+ mDict.insert( QLatin1String( "disk" ), i18n( "Disk Throughput" ) );
+ mDict.insert( QLatin1String( "load" ), i18nc( "CPU Load", "Load" ) );
+ mDict.insert( QLatin1String( "totalio" ), i18n( "Total Accesses" ) );
+@@ -95,6 +97,8 @@
+ mDict.insert( QLatin1String( "pageIn" ), i18n( "Pages In" ) );
+ mDict.insert( QLatin1String( "pageOut" ), i18n( "Pages Out" ) );
+ mDict.insert( QLatin1String( "context" ), i18n( "Context Switches" ) );
++ mDict.insert( QLatin1String( "trap" ), i18n( "Traps" ) );
++ mDict.insert( QLatin1String( "syscall" ), i18n( "System Calls" ) );
+ mDict.insert( QLatin1String( "network" ), i18n( "Network" ) );
+ mDict.insert( QLatin1String( "interfaces" ), i18n( "Interfaces" ) );
+ mDict.insert( QLatin1String( "receiver" ), i18n( "Receiver" ) );
+@@ -129,22 +133,30 @@
+ mDict.insert( QLatin1String( "acpi" ), i18n( "ACPI" ) );
+ mDict.insert( QLatin1String( "thermal_zone" ), i18n( "Thermal Zone" ) );
+ mDict.insert( QLatin1String( "temperature" ), i18n( "Temperature" ) );
++ mDict.insert( QLatin1String( "AverageTemperature" ), i18n( "Average CPU Temperature" ) );
+ mDict.insert( QLatin1String( "fan" ), i18n( "Fan" ) );
+ mDict.insert( QLatin1String( "state" ), i18n( "State" ) );
+ mDict.insert( QLatin1String( "battery" ), i18n( "Battery" ) );
++ mDict.insert( QLatin1String( "batterycapacity" ), i18n( "Battery Capacity" ) );
+ mDict.insert( QLatin1String( "batterycharge" ), i18n( "Battery Charge" ) );
+ mDict.insert( QLatin1String( "batteryusage" ), i18n( "Battery Usage" ) );
++ mDict.insert( QLatin1String( "batteryvoltage" ), i18n( "Battery Voltage" ) );
++ mDict.insert( QLatin1String( "batteryrate" ), i18n( "Battery Discharge Rate" ) );
+ mDict.insert( QLatin1String( "remainingtime" ), i18n( "Remaining Time" ) );
+ mDict.insert( QLatin1String( "interrupts" ), i18n( "Interrupts" ) );
+ mDict.insert( QLatin1String( "loadavg1" ), i18n( "Load Average (1 min)" ) );
+ mDict.insert( QLatin1String( "loadavg5" ), i18n( "Load Average (5 min)" ) );
+ mDict.insert( QLatin1String( "loadavg15" ), i18n( "Load Average (15 min)" ) );
+ mDict.insert( QLatin1String( "clock" ), i18n( "Clock Frequency" ) );
++ mDict.insert( QLatin1String( "AverageClock" ), i18n( "Average Clock Frequency" ) );
+ mDict.insert( QLatin1String( "lmsensors" ), i18n( "Hardware Sensors" ) );
+ mDict.insert( QLatin1String( "partitions" ), i18n( "Partition Usage" ) );
+ mDict.insert( QLatin1String( "usedspace" ), i18n( "Used Space" ) );
+ mDict.insert( QLatin1String( "freespace" ), i18n( "Free Space" ) );
+ mDict.insert( QLatin1String( "filllevel" ), i18n( "Fill Level" ) );
++ mDict.insert( QLatin1String( "usedinode" ), i18n( "Used Inodes" ) );
++ mDict.insert( QLatin1String( "freeinode" ), i18n( "Free Inodes" ) );
++ mDict.insert( QLatin1String( "inodelevel" ), i18n( "Inode Level" ) );
+ mDict.insert( QLatin1String( "system" ), i18n( "System" ) );
+ mDict.insert( QLatin1String( "uptime" ), i18n( "Uptime" ) );
+ mDict.insert( QLatin1String( "SoftRaid" ), i18n( "Linux Soft Raid (md)" ) );
+@@ -167,16 +179,21 @@
+ }
+
+ for ( int i = 1; i < 6; i++) {
++ mDict.insert( QLatin1String( "batt" ) + QString::number( i ), i18n( "Battery %1", i ) );
+ mDict.insert( QLatin1String( "fan" ) + QString::number( i ), i18n( "Fan %1", i ) );
+ mDict.insert( QLatin1String( "temp" ) + QString::number( i ), i18n( "Temperature %1", i ) );
+ }
+
+ mDict.insert( QLatin1String( "int00" ), i18n( "Total" ) );
++ mDict.insert( QLatin1String( "softint" ), i18n( "Software Interrupts" ) );
++ mDict.insert( QLatin1String( "hardint" ), i18n( "Hardware Interrupts" ) );
+
+ QString num;
+ for ( int i = 1; i < 25; i++ ) {
+ num.sprintf( "%.2d", i );
+ mDict.insert( QLatin1String( "int" ) + num, ki18n( "Int %1" ).subs( i - 1, 3 ).toString() );
++ num.sprintf( "%.3d", i + 255);
++ mDict.insert( QLatin1String( "int" ) + num, ki18n( "Int %1" ).subs( i + 255, 4 ).toString() );
+ }
+
+ // TODO: translated descriptions not yet implemented.
+@@ -186,6 +203,11 @@
+ mUnits.insert( QLatin1String( "min" ), i18nc( "the unit minutes", "min" ) );
+ mUnits.insert( QLatin1String( "MHz" ), i18nc( "the frequency unit", "MHz" ) );
+ mUnits.insert( QLatin1String( "%" ), i18nc( "a percentage", "%" ) );
++ mUnits.insert( QLatin1String( "mA" ), i18nc( "the unit milliamperes", "mA" ) );
++ mUnits.insert( QLatin1String( "mAh" ), i18nc( "the unit milliampere hours", "mAh" ) );
++ mUnits.insert( QLatin1String( "mW" ), i18nc( "the unit milliwatts", "mW" ) );
++ mUnits.insert( QLatin1String( "mWh" ), i18nc( "the unit milliwatt hours", "mWh" ) );
++ mUnits.insert( QLatin1String( "mV" ), i18nc( "the unit millivolts", "mV" ) );
+
+ mTypes.clear();
+ mTypes.insert( QLatin1String( "integer" ), i18n( "Integer Value" ) );
diff --git a/x11/kde4-workspace/files/patch-kwin__CMakeLists.txt b/x11/kde4-workspace/files/patch-kwin__CMakeLists.txt
new file mode 100644
index 000000000000..6bf9d34088c0
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-kwin__CMakeLists.txt
@@ -0,0 +1,11 @@
+--- ./kwin/CMakeLists.txt.orig 2010-12-02 10:14:06.151501238 +1000
++++ ./kwin/CMakeLists.txt 2010-12-02 10:14:30.909493105 +1000
+@@ -189,7 +189,7 @@
+ kde4_add_library(kwinnvidiahack SHARED ${kwinnvidiahack_LIB_SRCS})
+
+ set_target_properties(kwinnvidiahack PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
+-install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
++install(TARGETS kwinnvidiahack ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+ ########### install files ###############
+
diff --git a/x11/kde4-workspace/files/patch-plasma__generic__scriptengines__CMakeLists.txt b/x11/kde4-workspace/files/patch-plasma__generic__scriptengines__CMakeLists.txt
index da0dbd883481..70cbed35b559 100644
--- a/x11/kde4-workspace/files/patch-plasma__generic__scriptengines__CMakeLists.txt
+++ b/x11/kde4-workspace/files/patch-plasma__generic__scriptengines__CMakeLists.txt
@@ -1,14 +1,14 @@
--- ./plasma/generic/scriptengines/CMakeLists.txt.orig 2009-09-16 15:41:05.000000000 +0400
+++ ./plasma/generic/scriptengines/CMakeLists.txt 2010-06-26 19:18:34.136233668 +0400
@@ -1,11 +1,9 @@
--add_subdirectory(ruby)
+-macro_optional_add_subdirectory(ruby)
if(QT_QTWEBKIT_FOUND)
- add_subdirectory(webkit)
+ macro_optional_add_subdirectory(webkit)
endif(QT_QTWEBKIT_FOUND)
- if (PythonSupport_FOUND)
+ if (PythonSupport_FOUND AND NOT WIN32)
- macro_optional_add_subdirectory(python)
- endif (PythonSupport_FOUND)
+ endif (PythonSupport_FOUND AND NOT WIN32)
if(GOOGLEGADGETS_FOUND)
diff --git a/x11/kde4-workspace/files/patch-startkde.cmake b/x11/kde4-workspace/files/patch-startkde.cmake
new file mode 100644
index 000000000000..38cfee602f9f
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-startkde.cmake
@@ -0,0 +1,12 @@
+--- startkde.cmake.orig 2009-10-07 08:37:24.000000000 +1100
++++ startkde.cmake 2009-12-28 10:02:07.133352180 +1000
+@@ -337,7 +337,8 @@
+ fi
+ # D-Bus autolaunch is broken
+ if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+- eval `dbus-launch --sh-syntax --exit-with-session`
++ uuid="`dbus-uuidgen --get`"
++ eval `dbus-launch --sh-syntax --exit-with-session --autolaunch $uuid`
+ fi
+ if qdbus >/dev/null 2>/dev/null; then
+ : # ok
diff --git a/x11/kde4-workspace/files/uptime.c b/x11/kde4-workspace/files/uptime.c
deleted file mode 100644
index 4cc921066323..000000000000
--- a/x11/kde4-workspace/files/uptime.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- 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
deleted file mode 100644
index 336e5db031f2..000000000000
--- a/x11/kde4-workspace/files/uptime.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- 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