aboutsummaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2001-12-04 03:47:18 +0000
committerWill Andrews <will@FreeBSD.org>2001-12-04 03:47:18 +0000
commit1d206a3483e848f4589962473bdf169313ea740f (patch)
tree269caee3e56d61cd6318b44d85c3ff64b32d57b6 /x11
parentfb2c030e15fb4b426c06fee701c06b7f44c272ab (diff)
downloadports-1d206a3483e848f4589962473bdf169313ea740f.tar.gz
ports-1d206a3483e848f4589962473bdf169313ea740f.zip
Notes
Diffstat (limited to 'x11')
-rw-r--r--x11/kde2/Makefile2
-rw-r--r--x11/kde3/Makefile2
-rw-r--r--x11/kde4-baseapps/Makefile24
-rw-r--r--x11/kde4-baseapps/distinfo2
-rw-r--r--x11/kde4-baseapps/files/patch-apm.c101
-rw-r--r--x11/kde4-baseapps/files/patch-apm.h37
-rw-r--r--x11/kde4-baseapps/files/patch-conf.c136
-rw-r--r--x11/kde4-baseapps/files/patch-conf.h37
-rw-r--r--x11/kde4-baseapps/files/patch-diskstat.c260
-rw-r--r--x11/kde4-baseapps/files/patch-diskstat.h44
-rw-r--r--x11/kde4-baseapps/files/patch-ksysguardd.c15
-rw-r--r--x11/kde4-baseapps/files/patch-ksysguardd.h37
-rw-r--r--x11/kde4-baseapps/files/patch-loadavg.c100
-rw-r--r--x11/kde4-baseapps/files/patch-loadavg.h39
-rw-r--r--x11/kde4-baseapps/files/patch-logfile.c184
-rw-r--r--x11/kde4-baseapps/files/patch-logfile.h40
-rw-r--r--x11/kde4-baseapps/files/patch-netdev.c322
-rw-r--r--x11/kde4-baseapps/files/patch-netdev.h39
-rw-r--r--x11/kde4-baseapps/pkg-plist38
-rw-r--r--x11/kde4-runtime/Makefile24
-rw-r--r--x11/kde4-runtime/distinfo2
-rw-r--r--x11/kde4-runtime/files/patch-apm.c101
-rw-r--r--x11/kde4-runtime/files/patch-apm.h37
-rw-r--r--x11/kde4-runtime/files/patch-conf.c136
-rw-r--r--x11/kde4-runtime/files/patch-conf.h37
-rw-r--r--x11/kde4-runtime/files/patch-diskstat.c260
-rw-r--r--x11/kde4-runtime/files/patch-diskstat.h44
-rw-r--r--x11/kde4-runtime/files/patch-ksysguardd.c15
-rw-r--r--x11/kde4-runtime/files/patch-ksysguardd.h37
-rw-r--r--x11/kde4-runtime/files/patch-loadavg.c100
-rw-r--r--x11/kde4-runtime/files/patch-loadavg.h39
-rw-r--r--x11/kde4-runtime/files/patch-logfile.c184
-rw-r--r--x11/kde4-runtime/files/patch-logfile.h40
-rw-r--r--x11/kde4-runtime/files/patch-netdev.c322
-rw-r--r--x11/kde4-runtime/files/patch-netdev.h39
-rw-r--r--x11/kde4-runtime/pkg-plist38
-rw-r--r--x11/kde4-workspace/Makefile24
-rw-r--r--x11/kde4-workspace/distinfo2
-rw-r--r--x11/kde4-workspace/files/patch-apm.c101
-rw-r--r--x11/kde4-workspace/files/patch-apm.h37
-rw-r--r--x11/kde4-workspace/files/patch-conf.c136
-rw-r--r--x11/kde4-workspace/files/patch-conf.h37
-rw-r--r--x11/kde4-workspace/files/patch-diskstat.c260
-rw-r--r--x11/kde4-workspace/files/patch-diskstat.h44
-rw-r--r--x11/kde4-workspace/files/patch-ksysguardd.c15
-rw-r--r--x11/kde4-workspace/files/patch-ksysguardd.h37
-rw-r--r--x11/kde4-workspace/files/patch-loadavg.c100
-rw-r--r--x11/kde4-workspace/files/patch-loadavg.h39
-rw-r--r--x11/kde4-workspace/files/patch-logfile.c184
-rw-r--r--x11/kde4-workspace/files/patch-logfile.h40
-rw-r--r--x11/kde4-workspace/files/patch-netdev.c322
-rw-r--r--x11/kde4-workspace/files/patch-netdev.h39
-rw-r--r--x11/kde4-workspace/pkg-plist38
-rw-r--r--x11/kde4/Makefile2
-rw-r--r--x11/kdebase2/Makefile24
-rw-r--r--x11/kdebase2/distinfo2
-rw-r--r--x11/kdebase2/files/patch-apm.c101
-rw-r--r--x11/kdebase2/files/patch-apm.h37
-rw-r--r--x11/kdebase2/files/patch-conf.c136
-rw-r--r--x11/kdebase2/files/patch-conf.h37
-rw-r--r--x11/kdebase2/files/patch-diskstat.c260
-rw-r--r--x11/kdebase2/files/patch-diskstat.h44
-rw-r--r--x11/kdebase2/files/patch-ksysguardd.c15
-rw-r--r--x11/kdebase2/files/patch-ksysguardd.h37
-rw-r--r--x11/kdebase2/files/patch-loadavg.c100
-rw-r--r--x11/kdebase2/files/patch-loadavg.h39
-rw-r--r--x11/kdebase2/files/patch-logfile.c184
-rw-r--r--x11/kdebase2/files/patch-logfile.h40
-rw-r--r--x11/kdebase2/files/patch-netdev.c322
-rw-r--r--x11/kdebase2/files/patch-netdev.h39
-rw-r--r--x11/kdebase2/pkg-plist38
-rw-r--r--x11/kdebase3/Makefile24
-rw-r--r--x11/kdebase3/distinfo2
-rw-r--r--x11/kdebase3/files/patch-apm.c101
-rw-r--r--x11/kdebase3/files/patch-apm.h37
-rw-r--r--x11/kdebase3/files/patch-conf.c136
-rw-r--r--x11/kdebase3/files/patch-conf.h37
-rw-r--r--x11/kdebase3/files/patch-diskstat.c260
-rw-r--r--x11/kdebase3/files/patch-diskstat.h44
-rw-r--r--x11/kdebase3/files/patch-ksysguardd.c15
-rw-r--r--x11/kdebase3/files/patch-ksysguardd.h37
-rw-r--r--x11/kdebase3/files/patch-loadavg.c100
-rw-r--r--x11/kdebase3/files/patch-loadavg.h39
-rw-r--r--x11/kdebase3/files/patch-logfile.c184
-rw-r--r--x11/kdebase3/files/patch-logfile.h40
-rw-r--r--x11/kdebase3/files/patch-netdev.c322
-rw-r--r--x11/kdebase3/files/patch-netdev.h39
-rw-r--r--x11/kdebase3/pkg-plist38
-rw-r--r--x11/kdebase4-runtime/Makefile24
-rw-r--r--x11/kdebase4-runtime/distinfo2
-rw-r--r--x11/kdebase4-runtime/files/patch-apm.c101
-rw-r--r--x11/kdebase4-runtime/files/patch-apm.h37
-rw-r--r--x11/kdebase4-runtime/files/patch-conf.c136
-rw-r--r--x11/kdebase4-runtime/files/patch-conf.h37
-rw-r--r--x11/kdebase4-runtime/files/patch-diskstat.c260
-rw-r--r--x11/kdebase4-runtime/files/patch-diskstat.h44
-rw-r--r--x11/kdebase4-runtime/files/patch-ksysguardd.c15
-rw-r--r--x11/kdebase4-runtime/files/patch-ksysguardd.h37
-rw-r--r--x11/kdebase4-runtime/files/patch-loadavg.c100
-rw-r--r--x11/kdebase4-runtime/files/patch-loadavg.h39
-rw-r--r--x11/kdebase4-runtime/files/patch-logfile.c184
-rw-r--r--x11/kdebase4-runtime/files/patch-logfile.h40
-rw-r--r--x11/kdebase4-runtime/files/patch-netdev.c322
-rw-r--r--x11/kdebase4-runtime/files/patch-netdev.h39
-rw-r--r--x11/kdebase4-runtime/pkg-plist38
-rw-r--r--x11/kdebase4-workspace/Makefile24
-rw-r--r--x11/kdebase4-workspace/distinfo2
-rw-r--r--x11/kdebase4-workspace/files/patch-apm.c101
-rw-r--r--x11/kdebase4-workspace/files/patch-apm.h37
-rw-r--r--x11/kdebase4-workspace/files/patch-conf.c136
-rw-r--r--x11/kdebase4-workspace/files/patch-conf.h37
-rw-r--r--x11/kdebase4-workspace/files/patch-diskstat.c260
-rw-r--r--x11/kdebase4-workspace/files/patch-diskstat.h44
-rw-r--r--x11/kdebase4-workspace/files/patch-ksysguardd.c15
-rw-r--r--x11/kdebase4-workspace/files/patch-ksysguardd.h37
-rw-r--r--x11/kdebase4-workspace/files/patch-loadavg.c100
-rw-r--r--x11/kdebase4-workspace/files/patch-loadavg.h39
-rw-r--r--x11/kdebase4-workspace/files/patch-logfile.c184
-rw-r--r--x11/kdebase4-workspace/files/patch-logfile.h40
-rw-r--r--x11/kdebase4-workspace/files/patch-netdev.c322
-rw-r--r--x11/kdebase4-workspace/files/patch-netdev.h39
-rw-r--r--x11/kdebase4-workspace/pkg-plist38
-rw-r--r--x11/kdebase4/Makefile24
-rw-r--r--x11/kdebase4/distinfo2
-rw-r--r--x11/kdebase4/files/patch-apm.c101
-rw-r--r--x11/kdebase4/files/patch-apm.h37
-rw-r--r--x11/kdebase4/files/patch-conf.c136
-rw-r--r--x11/kdebase4/files/patch-conf.h37
-rw-r--r--x11/kdebase4/files/patch-diskstat.c260
-rw-r--r--x11/kdebase4/files/patch-diskstat.h44
-rw-r--r--x11/kdebase4/files/patch-ksysguardd.c15
-rw-r--r--x11/kdebase4/files/patch-ksysguardd.h37
-rw-r--r--x11/kdebase4/files/patch-loadavg.c100
-rw-r--r--x11/kdebase4/files/patch-loadavg.h39
-rw-r--r--x11/kdebase4/files/patch-logfile.c184
-rw-r--r--x11/kdebase4/files/patch-logfile.h40
-rw-r--r--x11/kdebase4/files/patch-netdev.c322
-rw-r--r--x11/kdebase4/files/patch-netdev.h39
-rw-r--r--x11/kdebase4/pkg-plist38
-rw-r--r--x11/kdelibs2/Makefile31
-rw-r--r--x11/kdelibs2/distinfo2
-rw-r--r--x11/kdelibs2/files/patch-kdeprint::imagetops25
-rw-r--r--x11/kdelibs2/files/patch-kio::job.cpp11
-rw-r--r--x11/kdelibs2/pkg-plist69
-rw-r--r--x11/kdelibs3/Makefile31
-rw-r--r--x11/kdelibs3/distinfo2
-rw-r--r--x11/kdelibs3/files/patch-kdeprint::imagetops25
-rw-r--r--x11/kdelibs3/files/patch-kio::job.cpp11
-rw-r--r--x11/kdelibs3/pkg-plist69
-rw-r--r--x11/kdelibs4/Makefile31
-rw-r--r--x11/kdelibs4/distinfo2
-rw-r--r--x11/kdelibs4/files/patch-kdeprint::imagetops25
-rw-r--r--x11/kdelibs4/files/patch-kio::job.cpp11
-rw-r--r--x11/kdelibs4/pkg-plist69
154 files changed, 11684 insertions, 376 deletions
diff --git a/x11/kde2/Makefile b/x11/kde2/Makefile
index 162e065022fa..42b3d41907ac 100644
--- a/x11/kde2/Makefile
+++ b/x11/kde2/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= kde
-PORTVERSION= 2.2.1
+PORTVERSION= 2.2.2
CATEGORIES= x11 kde
MASTER_SITES= # empty
DISTFILES= # none
diff --git a/x11/kde3/Makefile b/x11/kde3/Makefile
index 162e065022fa..42b3d41907ac 100644
--- a/x11/kde3/Makefile
+++ b/x11/kde3/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= kde
-PORTVERSION= 2.2.1
+PORTVERSION= 2.2.2
CATEGORIES= x11 kde
MASTER_SITES= # empty
DISTFILES= # none
diff --git a/x11/kde4-baseapps/Makefile b/x11/kde4-baseapps/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kde4-baseapps/Makefile
+++ b/x11/kde4-baseapps/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kde4-baseapps/distinfo b/x11/kde4-baseapps/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kde4-baseapps/distinfo
+++ b/x11/kde4-baseapps/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kde4-baseapps/files/patch-apm.c b/x11/kde4-baseapps/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kde4-baseapps/files/patch-apm.h b/x11/kde4-baseapps/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kde4-baseapps/files/patch-conf.c b/x11/kde4-baseapps/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kde4-baseapps/files/patch-conf.h b/x11/kde4-baseapps/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kde4-baseapps/files/patch-diskstat.c b/x11/kde4-baseapps/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kde4-baseapps/files/patch-diskstat.h b/x11/kde4-baseapps/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kde4-baseapps/files/patch-ksysguardd.c b/x11/kde4-baseapps/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kde4-baseapps/files/patch-ksysguardd.h b/x11/kde4-baseapps/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kde4-baseapps/files/patch-loadavg.c b/x11/kde4-baseapps/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kde4-baseapps/files/patch-loadavg.h b/x11/kde4-baseapps/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kde4-baseapps/files/patch-logfile.c b/x11/kde4-baseapps/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kde4-baseapps/files/patch-logfile.h b/x11/kde4-baseapps/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kde4-baseapps/files/patch-netdev.c b/x11/kde4-baseapps/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kde4-baseapps/files/patch-netdev.h b/x11/kde4-baseapps/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kde4-baseapps/pkg-plist b/x11/kde4-baseapps/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kde4-baseapps/pkg-plist
+++ b/x11/kde4-baseapps/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kde4-runtime/Makefile b/x11/kde4-runtime/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kde4-runtime/Makefile
+++ b/x11/kde4-runtime/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kde4-runtime/distinfo b/x11/kde4-runtime/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kde4-runtime/distinfo
+++ b/x11/kde4-runtime/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kde4-runtime/files/patch-apm.c b/x11/kde4-runtime/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kde4-runtime/files/patch-apm.h b/x11/kde4-runtime/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kde4-runtime/files/patch-conf.c b/x11/kde4-runtime/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kde4-runtime/files/patch-conf.h b/x11/kde4-runtime/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kde4-runtime/files/patch-diskstat.c b/x11/kde4-runtime/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kde4-runtime/files/patch-diskstat.h b/x11/kde4-runtime/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kde4-runtime/files/patch-ksysguardd.c b/x11/kde4-runtime/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kde4-runtime/files/patch-ksysguardd.h b/x11/kde4-runtime/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kde4-runtime/files/patch-loadavg.c b/x11/kde4-runtime/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kde4-runtime/files/patch-loadavg.h b/x11/kde4-runtime/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kde4-runtime/files/patch-logfile.c b/x11/kde4-runtime/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kde4-runtime/files/patch-logfile.h b/x11/kde4-runtime/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kde4-runtime/files/patch-netdev.c b/x11/kde4-runtime/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kde4-runtime/files/patch-netdev.h b/x11/kde4-runtime/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kde4-runtime/pkg-plist b/x11/kde4-runtime/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kde4-runtime/pkg-plist
+++ b/x11/kde4-runtime/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kde4-workspace/Makefile b/x11/kde4-workspace/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kde4-workspace/Makefile
+++ b/x11/kde4-workspace/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kde4-workspace/distinfo b/x11/kde4-workspace/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kde4-workspace/distinfo
+++ b/x11/kde4-workspace/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kde4-workspace/files/patch-apm.c b/x11/kde4-workspace/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kde4-workspace/files/patch-apm.h b/x11/kde4-workspace/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kde4-workspace/files/patch-conf.c b/x11/kde4-workspace/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kde4-workspace/files/patch-conf.h b/x11/kde4-workspace/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kde4-workspace/files/patch-diskstat.c b/x11/kde4-workspace/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kde4-workspace/files/patch-diskstat.h b/x11/kde4-workspace/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kde4-workspace/files/patch-ksysguardd.c b/x11/kde4-workspace/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kde4-workspace/files/patch-ksysguardd.h b/x11/kde4-workspace/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kde4-workspace/files/patch-loadavg.c b/x11/kde4-workspace/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kde4-workspace/files/patch-loadavg.h b/x11/kde4-workspace/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kde4-workspace/files/patch-logfile.c b/x11/kde4-workspace/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kde4-workspace/files/patch-logfile.h b/x11/kde4-workspace/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kde4-workspace/files/patch-netdev.c b/x11/kde4-workspace/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kde4-workspace/files/patch-netdev.h b/x11/kde4-workspace/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kde4-workspace/pkg-plist b/x11/kde4-workspace/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kde4-workspace/pkg-plist
+++ b/x11/kde4-workspace/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kde4/Makefile b/x11/kde4/Makefile
index 162e065022fa..42b3d41907ac 100644
--- a/x11/kde4/Makefile
+++ b/x11/kde4/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= kde
-PORTVERSION= 2.2.1
+PORTVERSION= 2.2.2
CATEGORIES= x11 kde
MASTER_SITES= # empty
DISTFILES= # none
diff --git a/x11/kdebase2/Makefile b/x11/kdebase2/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kdebase2/Makefile
+++ b/x11/kdebase2/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kdebase2/distinfo b/x11/kdebase2/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kdebase2/distinfo
+++ b/x11/kdebase2/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kdebase2/files/patch-apm.c b/x11/kdebase2/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kdebase2/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kdebase2/files/patch-apm.h b/x11/kdebase2/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kdebase2/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kdebase2/files/patch-conf.c b/x11/kdebase2/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kdebase2/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kdebase2/files/patch-conf.h b/x11/kdebase2/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kdebase2/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kdebase2/files/patch-diskstat.c b/x11/kdebase2/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kdebase2/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kdebase2/files/patch-diskstat.h b/x11/kdebase2/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kdebase2/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase2/files/patch-ksysguardd.c b/x11/kdebase2/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kdebase2/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kdebase2/files/patch-ksysguardd.h b/x11/kdebase2/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kdebase2/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kdebase2/files/patch-loadavg.c b/x11/kdebase2/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kdebase2/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kdebase2/files/patch-loadavg.h b/x11/kdebase2/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kdebase2/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kdebase2/files/patch-logfile.c b/x11/kdebase2/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kdebase2/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kdebase2/files/patch-logfile.h b/x11/kdebase2/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kdebase2/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kdebase2/files/patch-netdev.c b/x11/kdebase2/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kdebase2/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kdebase2/files/patch-netdev.h b/x11/kdebase2/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kdebase2/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase2/pkg-plist b/x11/kdebase2/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kdebase2/pkg-plist
+++ b/x11/kdebase2/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kdebase3/Makefile b/x11/kdebase3/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kdebase3/Makefile
+++ b/x11/kdebase3/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kdebase3/distinfo b/x11/kdebase3/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kdebase3/distinfo
+++ b/x11/kdebase3/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kdebase3/files/patch-apm.c b/x11/kdebase3/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kdebase3/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kdebase3/files/patch-apm.h b/x11/kdebase3/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kdebase3/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kdebase3/files/patch-conf.c b/x11/kdebase3/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kdebase3/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kdebase3/files/patch-conf.h b/x11/kdebase3/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kdebase3/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kdebase3/files/patch-diskstat.c b/x11/kdebase3/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kdebase3/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kdebase3/files/patch-diskstat.h b/x11/kdebase3/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kdebase3/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase3/files/patch-ksysguardd.c b/x11/kdebase3/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kdebase3/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kdebase3/files/patch-ksysguardd.h b/x11/kdebase3/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kdebase3/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kdebase3/files/patch-loadavg.c b/x11/kdebase3/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kdebase3/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kdebase3/files/patch-loadavg.h b/x11/kdebase3/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kdebase3/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kdebase3/files/patch-logfile.c b/x11/kdebase3/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kdebase3/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kdebase3/files/patch-logfile.h b/x11/kdebase3/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kdebase3/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kdebase3/files/patch-netdev.c b/x11/kdebase3/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kdebase3/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kdebase3/files/patch-netdev.h b/x11/kdebase3/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kdebase3/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase3/pkg-plist b/x11/kdebase3/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kdebase3/pkg-plist
+++ b/x11/kdebase3/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kdebase4-runtime/Makefile b/x11/kdebase4-runtime/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kdebase4-runtime/Makefile
+++ b/x11/kdebase4-runtime/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kdebase4-runtime/distinfo b/x11/kdebase4-runtime/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kdebase4-runtime/distinfo
+++ b/x11/kdebase4-runtime/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kdebase4-runtime/files/patch-apm.c b/x11/kdebase4-runtime/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kdebase4-runtime/files/patch-apm.h b/x11/kdebase4-runtime/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kdebase4-runtime/files/patch-conf.c b/x11/kdebase4-runtime/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kdebase4-runtime/files/patch-conf.h b/x11/kdebase4-runtime/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kdebase4-runtime/files/patch-diskstat.c b/x11/kdebase4-runtime/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kdebase4-runtime/files/patch-diskstat.h b/x11/kdebase4-runtime/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4-runtime/files/patch-ksysguardd.c b/x11/kdebase4-runtime/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kdebase4-runtime/files/patch-ksysguardd.h b/x11/kdebase4-runtime/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kdebase4-runtime/files/patch-loadavg.c b/x11/kdebase4-runtime/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kdebase4-runtime/files/patch-loadavg.h b/x11/kdebase4-runtime/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kdebase4-runtime/files/patch-logfile.c b/x11/kdebase4-runtime/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kdebase4-runtime/files/patch-logfile.h b/x11/kdebase4-runtime/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4-runtime/files/patch-netdev.c b/x11/kdebase4-runtime/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kdebase4-runtime/files/patch-netdev.h b/x11/kdebase4-runtime/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4-runtime/pkg-plist b/x11/kdebase4-runtime/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kdebase4-runtime/pkg-plist
+++ b/x11/kdebase4-runtime/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kdebase4-workspace/Makefile b/x11/kdebase4-workspace/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kdebase4-workspace/Makefile
+++ b/x11/kdebase4-workspace/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kdebase4-workspace/distinfo b/x11/kdebase4-workspace/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kdebase4-workspace/distinfo
+++ b/x11/kdebase4-workspace/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kdebase4-workspace/files/patch-apm.c b/x11/kdebase4-workspace/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kdebase4-workspace/files/patch-apm.h b/x11/kdebase4-workspace/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kdebase4-workspace/files/patch-conf.c b/x11/kdebase4-workspace/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kdebase4-workspace/files/patch-conf.h b/x11/kdebase4-workspace/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kdebase4-workspace/files/patch-diskstat.c b/x11/kdebase4-workspace/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kdebase4-workspace/files/patch-diskstat.h b/x11/kdebase4-workspace/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4-workspace/files/patch-ksysguardd.c b/x11/kdebase4-workspace/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kdebase4-workspace/files/patch-ksysguardd.h b/x11/kdebase4-workspace/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kdebase4-workspace/files/patch-loadavg.c b/x11/kdebase4-workspace/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kdebase4-workspace/files/patch-loadavg.h b/x11/kdebase4-workspace/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kdebase4-workspace/files/patch-logfile.c b/x11/kdebase4-workspace/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kdebase4-workspace/files/patch-logfile.h b/x11/kdebase4-workspace/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4-workspace/files/patch-netdev.c b/x11/kdebase4-workspace/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kdebase4-workspace/files/patch-netdev.h b/x11/kdebase4-workspace/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4-workspace/pkg-plist b/x11/kdebase4-workspace/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kdebase4-workspace/pkg-plist
+++ b/x11/kdebase4-workspace/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kdebase4/Makefile b/x11/kdebase4/Makefile
index ee69d6cb95bb..f8e6c70e010f 100644
--- a/x11/kdebase4/Makefile
+++ b/x11/kdebase4/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= kdebase
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -15,6 +14,9 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= autoconf213:${PORTSDIR}/devel/autoconf213 \
+ automake14:${PORTSDIR}/devel/automake14 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= intl.1:${PORTSDIR}/devel/gettext
USE_KDELIBS_VER=2
@@ -27,8 +29,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= RUN_KAPPFINDER=no
CONFIGURE_ARGS+=--with-xdmdir=${X11BASE}/lib/X11/xdm \
--with-qt-dir=${X11BASE} \
- --without-ldap \
- --disable-closure
+ --without-ldap --disable-closure --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
USE_GMAKE= yes
.include <bsd.port.pre.mk>
@@ -56,6 +63,15 @@ post-extract:
@${ECHO} "exit 0" >> ${WRKSRC}/mkpamserv
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@version-info 3:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/libkonq/Makefile.in
${PERL} -pi -e "s@version-info 1:0:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/khelpcenter/Makefile.in
${PERL} -pi -e "s@version-info 1:1:0@version-info ${SOMAJOR}:${SOMINOR}@g" ${WRKSRC}/nsplugins/Makefile.in
diff --git a/x11/kdebase4/distinfo b/x11/kdebase4/distinfo
index f0d9e99b49aa..251c4afefe28 100644
--- a/x11/kdebase4/distinfo
+++ b/x11/kdebase4/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdebase-2.2.1.tar.bz2) = 14c7e9a73f5b60c6b4ed7c14acbfb69a
+MD5 (KDE/kdebase-2.2.2.tar.bz2) = 39635e42056ab2afb8e6f2ff761eea38
diff --git a/x11/kdebase4/files/patch-apm.c b/x11/kdebase4/files/patch-apm.c
new file mode 100644
index 000000000000..08925da1dee5
--- /dev/null
+++ b/x11/kdebase4/files/patch-apm.c
@@ -0,0 +1,101 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.c Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,98 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <machine/apm_bios.h>
++#include <stdio.h>
++
++#include "Command.h"
++#include "apm.h"
++#include "ksysguardd.h"
++
++static int ApmFD, BattFill, BattTime;
++
++#define APMDEV "/dev/apm"
++
++/*
++================================ public part =================================
++*/
++
++void
++initApm(void)
++{
++ if ((ApmFD = open(APMDEV, O_RDONLY)) < 0)
++ return;
++
++ if (updateApm() < 0)
++ return;
++
++ registerMonitor("apm/batterycharge", "integer", printApmBatFill,
++ printApmBatFillInfo);
++ registerMonitor("apm/remainingtime", "integer", printApmBatTime,
++ printApmBatTimeInfo);
++}
++
++void
++exitApm(void)
++{
++ removeMonitor("apm/batterycharge");
++ removeMonitor("apm/remainingtime");
++
++ close(ApmFD);
++}
++
++int
++updateApm(void)
++{
++ struct apm_info info;
++ int retval;
++
++ retval = ioctl(ApmFD, APMIO_GETINFO, &info);
++
++ BattFill = info.ai_batt_life;
++ BattTime = info.ai_batt_time;
++
++ return retval;
++}
++
++void
++printApmBatFill(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattFill);
++}
++
++void
++printApmBatFillInfo(const char* c)
++{
++ fprintf(CurrentClient, "Battery charge\t0\t100\t%%\n");
++}
++
++void
++printApmBatTime(const char* c)
++{
++ fprintf(CurrentClient, "%d\n", BattTime);
++}
++
++void
++printApmBatTimeInfo(const char* c)
++{
++ fprintf(CurrentClient, "Remaining battery time\t0\t0\tmin\n");
++}
diff --git a/x11/kdebase4/files/patch-apm.h b/x11/kdebase4/files/patch-apm.h
new file mode 100644
index 000000000000..73e509bdd61b
--- /dev/null
+++ b/x11/kdebase4/files/patch-apm.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/apm.h Mon Nov 19 17:06:33 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: apm.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _apm_h_
++#define _apm_h_
++
++void initApm(void);
++void exitApm(void);
++int updateApm(void);
++
++void printApmBatFill(const char*);
++void printApmBatFillInfo(const char*);
++void printApmBatTime(const char*);
++void printApmBatTimeInfo(const char*);
++
++#endif
diff --git a/x11/kdebase4/files/patch-conf.c b/x11/kdebase4/files/patch-conf.c
new file mode 100644
index 000000000000..a4de97379b10
--- /dev/null
+++ b/x11/kdebase4/files/patch-conf.c
@@ -0,0 +1,136 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.c Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,133 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.c,v 1.3 2001/11/05 23:24:19 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++
++CONTAINER LogFileList = 0;
++CONTAINER SensorList = 0;
++
++void parseConfigFile(const char *filename)
++{
++ FILE* config;
++ char line[2048];
++ char *begin, *token, *tmp, *confSensor;
++ ConfigLogFile *confLog;
++
++
++ if (LogFileList)
++ destr_ctnr(LogFileList, free);
++
++ if (SensorList)
++ destr_ctnr(SensorList, free);
++
++ LogFileList = new_ctnr(CT_DLL);
++ SensorList = new_ctnr(CT_DLL);
++
++ if ((config = fopen(filename, "r")) == NULL) {
++ log_error("can't open config file '%s'", filename);
++
++ /* if we can't open a config file we have to add the
++ available sensors manually
++ */
++
++ confSensor = strdup("ProcessList");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Memory");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("Stat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetDev");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("NetStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("CpuInfo");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LoadAvg");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("DiskStat");
++ push_ctnr(SensorList, confSensor);
++ confSensor = strdup("LogFile");
++ push_ctnr(SensorList, confSensor);
++
++ return;
++ }
++
++ while (fgets(line, sizeof(line), config) != NULL) {
++ if ((line[0] == '#') || (strlen(line) == 0)) {
++ continue;
++ }
++
++ if (strchr(line, '#'))
++ *(strchr(line, '#')) = '\0';
++
++ if (line[strlen(line) - 1] == '\n')
++ line[strlen(line) - 1] = '\0';
++
++ if (!strncmp(line, "LogFiles", 8)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ if ((confLog = (ConfigLogFile *)malloc(sizeof(ConfigLogFile))) == NULL) {
++ log_error("malloc() no free memory avail");
++ continue;
++ }
++ confLog->name = strdup(token);
++ tmp = strchr(confLog->name, ':');
++ *tmp = '\0';
++ confLog->path = tmp;
++ confLog->path++;
++
++ push_ctnr(LogFileList, confLog);
++ }
++ }
++ if (!strncmp(line, "Sensors", 7)) {
++ begin = strchr(line, '=');
++ begin++;
++
++ for (token = strtok(begin, ","); token; token = strtok(NULL, ",")) {
++ confSensor = strdup(token);
++ push_ctnr(SensorList, confSensor);
++ }
++ }
++ }
++
++ fclose(config);
++}
++
++int sensorAvailable(const char *sensor)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(SensorList); i++) {
++ char* name = get_ctnr(SensorList, i);
++ if (!strcmp(name, sensor))
++ return 1;
++ }
++
++ return 0;
++}
diff --git a/x11/kdebase4/files/patch-conf.h b/x11/kdebase4/files/patch-conf.h
new file mode 100644
index 000000000000..8aba2e520205
--- /dev/null
+++ b/x11/kdebase4/files/patch-conf.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/conf.h Mon Nov 19 17:06:50 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: conf.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _conf_h_
++#define _conf_h_
++
++typedef struct {
++ char *name;
++ char *path;
++} ConfigLogFile;
++
++void parseConfigFile(const char *filename);
++
++int sensorAvailable(const char* sensor);
++
++#endif
diff --git a/x11/kdebase4/files/patch-diskstat.c b/x11/kdebase4/files/patch-diskstat.c
new file mode 100644
index 000000000000..5535e580a673
--- /dev/null
+++ b/x11/kdebase4/files/patch-diskstat.c
@@ -0,0 +1,260 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.c Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,257 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/ucred.h>
++#include <sys/mount.h>
++#include <time.h>
++#include <unistd.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "diskstat.h"
++#include "ksysguardd.h"
++
++typedef struct {
++ char device[256];
++ char mntpnt[256];
++ long blocks;
++ long bfree;
++ long bused;
++ int bused_percent;
++} DiskInfo;
++
++static CONTAINER DiskStatList = 0;
++
++char *getMntPnt(const char *cmd)
++{
++ static char device[1024];
++ char *ptr;
++
++ memset(device, 0, sizeof(device));
++ sscanf(cmd, "partitions%1024s", device);
++
++ ptr = (char *)rindex(device, '/');
++ *ptr = '\0';
++
++ return (char *)device;
++}
++
++int numMntPnt(void)
++{
++ struct statfs *fs_info;
++ int i, n, counter = 0;
++
++ n = getmntinfo(&fs_info, MNT_WAIT);
++ for (i = 0; i < n; i++)
++ if (strcmp(fs_info[i].f_fstypename, "procfs") && strcmp(fs_info[i].f_fstypename, "swap") && strcmp(fs_info[i].f_fstypename, "devfs"))
++ counter++;
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initDiskStat(void)
++{
++ char monitor[1024];
++ int i;
++
++ DiskStatList = new_ctnr(CT_DLL);
++
++ updateDiskStat();
++
++ registerMonitor("partitions/list", "listview", printDiskStat, printDiskStatInfo);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatUsed, printDiskStatUsedInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatFree, printDiskStatFreeInfo);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ registerMonitor(monitor, "integer", printDiskStatPercent, printDiskStatPercentInfo);
++ }
++}
++
++void checkDiskStat(void)
++{
++ if (numMntPnt() != level_ctnr(DiskStatList)) {
++ /* a filesystem was mounted or unmounted
++ so we do a reset */
++ exitDiskStat();
++ initDiskStat();
++ }
++}
++
++void exitDiskStat(void)
++{
++ DiskInfo *disk_info;
++ char monitor[1024];
++ int i;
++
++ removeMonitor("partitions/list");
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ disk_info = remove_ctnr(DiskStatList, i--);
++
++ snprintf(monitor, sizeof(monitor), "partitions%s/usedspace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/freespace", disk_info->mntpnt);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "partitions%s/filllevel", disk_info->mntpnt);
++ removeMonitor(monitor);
++
++ free(disk_info);
++ }
++
++ if (DiskStatList)
++ destr_ctnr(DiskStatList, free);
++}
++
++int updateDiskStat(void)
++{
++ struct statfs *fs_info;
++ struct statfs fs;
++ float percent;
++ int i, mntcount;
++ DiskInfo *disk_info;
++
++ /* let's hope there is no difference between the DiskStatList and
++ the number of mounted filesystems */
++ for (i = 0; i < level_ctnr(DiskStatList); i++)
++ free(remove_ctnr(DiskStatList, i--));
++
++ mntcount = getmntinfo(&fs_info, MNT_WAIT);
++
++ for (i = 0; i < mntcount; i++) {
++ fs = fs_info[i];
++ if (strcmp(fs.f_fstypename, "procfs") && strcmp(fs.f_fstypename, "devfs") && strcmp(fs.f_fstypename, "devfs")) {
++ percent = (((float)fs.f_blocks - (float)fs.f_bfree)/(float)fs.f_blocks);
++ percent = percent * 100;
++ if ((disk_info = (DiskInfo *)malloc(sizeof(DiskInfo))) == NULL) {
++ continue;
++ }
++ memset(disk_info, 0, sizeof(DiskInfo));
++ strncpy(disk_info->device, fs.f_mntfromname, 255);
++ if (!strcmp(fs.f_mntonname, "/")) {
++ strncpy(disk_info->mntpnt, "/root", 6);
++ } else {
++ strncpy(disk_info->mntpnt, fs.f_mntonname, 255);
++ }
++ disk_info->blocks = fs.f_blocks;
++ disk_info->bfree = fs.f_bfree;
++ disk_info->bused = (fs.f_blocks - fs.f_bfree);
++ disk_info->bused_percent = (int)percent;
++
++ push_ctnr(DiskStatList, disk_info);
++ }
++ }
++
++ return 0;
++}
++
++void printDiskStat(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ fprintf(CurrentClient, "%s\t%ld\t%ld\t%ld\t%d\t%s\n",
++ disk_info->device,
++ disk_info->blocks,
++ disk_info->bused,
++ disk_info->bfree,
++ disk_info->bused_percent,
++ disk_info->mntpnt);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Device\tBlocks\tUsed\tAvailable\tUsed %%\tMountPoint\n");
++}
++
++void printDiskStatUsed(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bused);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatUsedInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatFree(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%ld\n", disk_info->bfree);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatFreeInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Free Blocks\t0\t-\tBlocks\n");
++}
++
++void printDiskStatPercent(const char* cmd)
++{
++ int i;
++ char *mntpnt = (char *)getMntPnt(cmd);
++
++ for (i = 0; i < level_ctnr(DiskStatList); i++) {
++ DiskInfo* disk_info = get_ctnr(DiskStatList, i);
++ if (!strcmp(mntpnt, disk_info->mntpnt)) {
++ fprintf(CurrentClient, "%d\n", disk_info->bused_percent);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printDiskStatPercentInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "Used Blocks\t0\t100\t%%\n");
++}
diff --git a/x11/kdebase4/files/patch-diskstat.h b/x11/kdebase4/files/patch-diskstat.h
new file mode 100644
index 000000000000..3b5bf11b89c7
--- /dev/null
+++ b/x11/kdebase4/files/patch-diskstat.h
@@ -0,0 +1,44 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/diskstat.h Mon Nov 19 17:07:01 2001
+@@ -0,0 +1,41 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: diskstat.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _diskstat_h_
++#define _diskstat_h_
++
++void initDiskStat(void);
++void exitDiskStat(void);
++
++int updateDiskStat(void);
++void checkDiskStat(void);
++
++void printDiskStat(const char* cmd);
++void printDiskStatInfo(const char* cmd);
++
++void printDiskStatUsed(const char* cmd);
++void printDiskStatUsedInfo(const char* cmd);
++void printDiskStatFree(const char* cmd);
++void printDiskStatFreeInfo(const char* cmd);
++void printDiskStatPercent(const char* cmd);
++void printDiskStatPercentInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4/files/patch-ksysguardd.c b/x11/kdebase4/files/patch-ksysguardd.c
new file mode 100644
index 000000000000..940aa4d327a5
--- /dev/null
+++ b/x11/kdebase4/files/patch-ksysguardd.c
@@ -0,0 +1,15 @@
+--- ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 02:01:46 1.5
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.c 2001/11/17 06:16:15 1.6
+@@ -17,9 +17,11 @@
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+- $Id: ksysguardd.c,v 1.2.6.1 2001/11/08 10:48:51 tokoe Exp $
++ $Id: ksysguardd.c,v 1.6 2001/11/17 06:16:15 waba Exp $
+ */
+
++#include <config.h>
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <netdb.h>
diff --git a/x11/kdebase4/files/patch-ksysguardd.h b/x11/kdebase4/files/patch-ksysguardd.h
new file mode 100644
index 000000000000..1545b83d39d7
--- /dev/null
+++ b/x11/kdebase4/files/patch-ksysguardd.h
@@ -0,0 +1,37 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/ksysguardd.h Mon Nov 19 17:07:38 2001
+@@ -0,0 +1,34 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 1999-2001 Chris Schlaeger <cs@kde.org>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: ksysguardd.h,v 1.2 2001/11/08 10:52:55 tokoe Exp $
++*/
++
++#ifndef _ksysguardd_h_
++#define _ksysguardd_h_
++
++#include <stdio.h>
++
++extern int QuitApp;
++extern int RunAsDaemon;
++extern FILE* CurrentClient;
++
++void updateModules(void);
++void checkModules(void);
++
++#endif
diff --git a/x11/kdebase4/files/patch-loadavg.c b/x11/kdebase4/files/patch-loadavg.c
new file mode 100644
index 000000000000..ced78fa5ad68
--- /dev/null
+++ b/x11/kdebase4/files/patch-loadavg.c
@@ -0,0 +1,100 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.c Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,97 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "loadavg.h"
++
++static double LoadAvg[3];
++
++/*
++================================ public part =================================
++*/
++
++void
++initLoadAvg(void)
++{
++ if (updateLoadAvg() < 0)
++ return;
++
++ registerMonitor("cpu/loadavg1", "float", printLoadAvg1,
++ printLoadAvg1Info);
++ registerMonitor("cpu/loadavg5", "float", printLoadAvg5,
++ printLoadAvg5Info);
++ registerMonitor("cpu/loadavg15", "float", printLoadAvg15,
++ printLoadAvg15Info);
++}
++
++void
++exitLoadAvg(void)
++{
++ removeMonitor("cpu/loadavg1");
++ removeMonitor("cpu/loadavg5");
++ removeMonitor("cpu/loadavg15");
++}
++
++int
++updateLoadAvg(void)
++{
++ return getloadavg(LoadAvg, 3);
++}
++
++void
++printLoadAvg1(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[0]);
++}
++
++void
++printLoadAvg1Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 1 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg5(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[1]);
++}
++
++void
++printLoadAvg5Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 5 min\t0\t0\t\n");
++}
++
++void
++printLoadAvg15(const char* c)
++{
++ fprintf(CurrentClient, "%f\n", LoadAvg[2]);
++}
++
++void
++printLoadAvg15Info(const char* c)
++{
++ fprintf(CurrentClient, "Load average 15 min\t0\t0\t\n");
++}
diff --git a/x11/kdebase4/files/patch-loadavg.h b/x11/kdebase4/files/patch-loadavg.h
new file mode 100644
index 000000000000..cdc680cbd492
--- /dev/null
+++ b/x11/kdebase4/files/patch-loadavg.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/loadavg.h Mon Nov 19 17:07:47 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: loadavg.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _loadavg_h_
++#define _loadavg_h_
++
++void initLoadAvg(void);
++void exitLoadAvg(void);
++int updateLoadAvg(void);
++
++void printLoadAvg1(const char*);
++void printLoadAvg1Info(const char*);
++void printLoadAvg5(const char*);
++void printLoadAvg5Info(const char*);
++void printLoadAvg15(const char*);
++void printLoadAvg15Info(const char*);
++
++#endif
diff --git a/x11/kdebase4/files/patch-logfile.c b/x11/kdebase4/files/patch-logfile.c
new file mode 100644
index 000000000000..5fd3def1ae6b
--- /dev/null
+++ b/x11/kdebase4/files/patch-logfile.c
@@ -0,0 +1,184 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.c Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,181 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++#include "Command.h"
++#include "ccont.h"
++#include "conf.h"
++#include "ksysguardd.h"
++#include "logfile.h"
++
++static CONTAINER LogFiles = 0;
++static unsigned long counter = 1;
++
++typedef struct {
++ char name[256];
++ FILE* fh;
++ unsigned long id;
++} LogFileEntry;
++
++extern CONTAINER LogFileList;
++
++/*
++================================ public part =================================
++*/
++
++void initLogFile(void)
++{
++ int i;
++ char monitor[1024];
++
++ registerCommand("logfile_register", registerLogFile);
++ registerCommand("logfile_unregister", unregisterLogFile);
++ registerCommand("logfile_registered", printRegistered);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++)
++ {
++ FILE* fp;
++ ConfigLogFile *entry = get_ctnr(LogFileList, i);
++ /* register the log file if we can actually read the file. */
++ if ((fp = fopen(entry->path, "r")) != NULL)
++ {
++ fclose(fp);
++ snprintf(monitor, 1024, "logfiles/%s", entry->name);
++ registerMonitor(monitor, "logfile", printLogFile,
++ printLogFileInfo);
++ }
++ }
++
++ LogFiles = new_ctnr(CT_DLL);
++}
++
++void exitLogFile(void)
++{
++ if (LogFiles)
++ destr_ctnr(LogFiles, free);
++}
++
++void printLogFile(const char* cmd)
++{
++ char line[1024];
++ unsigned long id;
++ int i;
++ char ch;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ while (fgets(line, sizeof(line), entry->fh) != NULL) {
++ fprintf(CurrentClient, "%s", line);
++ }
++ clearerr(entry->fh);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printLogFileInfo(const char* cmd)
++{
++ fprintf(CurrentClient, "LogFile\n");
++}
++
++void registerLogFile(const char* cmd)
++{
++ char name[256];
++ FILE* file;
++ LogFileEntry *entry;
++ int i;
++
++ memset(name, 0, sizeof(name));
++ sscanf(cmd, "%*s %256s", name);
++
++ for (i = 0; i < level_ctnr(LogFileList); i++) {
++ ConfigLogFile *conf = get_ctnr(LogFileList, i);
++ if (!strcmp(conf->name, name)) {
++ if ((file = fopen(conf->path, "r")) == NULL) {
++ print_error("fopen()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ fseek(file, 0, SEEK_END);
++
++ if ((entry = (LogFileEntry *)malloc(sizeof(LogFileEntry))) == NULL) {
++ print_error("malloc()");
++ fprintf(CurrentClient, "0\n");
++ return;
++ }
++
++ entry->fh = file;
++ strncpy(entry->name, conf->name, 256);
++ entry->id = counter;
++
++ push_ctnr(LogFiles, entry);
++
++ fprintf(CurrentClient, "%lu\n", counter);
++ counter++;
++
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "0\n");
++}
++
++void unregisterLogFile(const char* cmd)
++{
++ unsigned long id;
++ int i;
++
++ sscanf(cmd, "%*s %lu", &id);
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++
++ if (entry->id == id) {
++ fclose(entry->fh);
++ free(remove_ctnr(LogFiles, i));
++ fprintf(CurrentClient, "\n");
++ return;
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printRegistered(const char* cmd)
++{
++ int i;
++
++ for (i = 0; i < level_ctnr(LogFiles); i++) {
++ LogFileEntry *entry = get_ctnr(LogFiles, i);
++ fprintf(CurrentClient, "%s:%lu\n", entry->name, entry->id);
++ }
++
++ fprintf(CurrentClient, "\n");
++}
diff --git a/x11/kdebase4/files/patch-logfile.h b/x11/kdebase4/files/patch-logfile.h
new file mode 100644
index 000000000000..69b8d6ed1ca6
--- /dev/null
+++ b/x11/kdebase4/files/patch-logfile.h
@@ -0,0 +1,40 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/logfile.h Mon Nov 19 17:07:55 2001
+@@ -0,0 +1,37 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: logfile.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _logfile_h_
++#define _logfile_h_
++
++void initLogFile(void);
++void exitLogFile(void);
++
++void printLogFile(const char* cmd);
++void printLogFileInfo(const char* cmd);
++
++void registerLogFile(const char* cmd);
++void unregisterLogFile(const char* cmd);
++
++/* debug command */
++void printRegistered(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4/files/patch-netdev.c b/x11/kdebase4/files/patch-netdev.c
new file mode 100644
index 000000000000..2c0f473ebbcf
--- /dev/null
+++ b/x11/kdebase4/files/patch-netdev.c
@@ -0,0 +1,322 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.c Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,319 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.c,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <net/if.h>
++#include <net/if_mib.h>
++#include <stdio.h>
++#include <string.h>
++#include <sys/sysctl.h>
++#include <sys/time.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++
++#include "Command.h"
++#include "ksysguardd.h"
++#include "netdev.h"
++
++
++typedef struct {
++ char name[32];
++ u_long recBytes;
++ u_long recPacks;
++ u_long recErrs;
++ u_long recDrop;
++ u_long recMulticast;
++ u_long sentBytes;
++ u_long sentPacks;
++ u_long sentErrs;
++ u_long sentMulticast;
++ u_long sentColls;
++} NetDevInfo;
++
++#define MAXNETDEVS 64
++static NetDevInfo NetDevs[MAXNETDEVS];
++static int NetDevCnt = 0;
++
++char **parseCommand(const char *cmd)
++{
++ char tmp_cmd[1024];
++ char *begin;
++ static char sensor[100];
++ static char interface[100];
++ static char* retval[2];
++
++ strncpy(tmp_cmd, cmd, 1024);
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin++;
++ strcpy(sensor, begin);
++ retval[1] = sensor;
++
++ begin = rindex(tmp_cmd, '/');
++ *begin = '\0';
++ begin = rindex(tmp_cmd, '/');
++ begin++;
++ strcpy(interface, begin);
++ retval[0] = interface;
++
++ return retval;
++}
++
++int numActivIfaces(void)
++{
++ int counter = 0;
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP)
++ counter++;
++ }
++
++ return counter;
++}
++
++/* ------------------------------ public part --------------------------- */
++
++void initNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ updateNetDev();
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevRecBytes, printNetDevRecBytesInfo);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ registerMonitor(monitor, "integer", printNetDevSentBytes, printNetDevSentBytesInfo);
++ }
++}
++
++void exitNetDev(void)
++{
++ int i;
++ char monitor[1024];
++
++ for (i = 0; i < NetDevCnt; i++) {
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/drops", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/receiver/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/data", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/packets", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/errors", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/multicast", NetDevs[i].name);
++ removeMonitor(monitor);
++ snprintf(monitor, sizeof(monitor), "network/interfaces/%s/transmitter/collisions", NetDevs[i].name);
++ removeMonitor(monitor);
++ }
++}
++
++void updateNetDev(void)
++{
++ int name[6];
++ int num_iface, i;
++ size_t len;
++ struct ifmibdata ifmd;
++
++ len = sizeof(num_iface);
++ sysctlbyname("net.link.generic.system.ifcount", &num_iface, &len, NULL, 0);
++
++ NetDevCnt = 0;
++ for (i = 1; i < num_iface + 1; i++) {
++ name[0] = CTL_NET;
++ name[1] = PF_LINK;
++ name[2] = NETLINK_GENERIC;
++ name[3] = IFMIB_IFDATA;
++ name[4] = i;
++ name[5] = IFDATA_GENERAL;
++
++ len = sizeof(ifmd);
++ sysctl(name, 6, &ifmd, &len, NULL, 0);
++ if (ifmd.ifmd_flags & IFF_UP) {
++ strncpy(NetDevs[NetDevCnt].name, ifmd.ifmd_name, 32);
++ NetDevs[NetDevCnt].recBytes = ifmd.ifmd_data.ifi_ibytes - NetDevs[NetDevCnt].recBytes;
++ NetDevs[NetDevCnt].recPacks = ifmd.ifmd_data.ifi_ipackets - NetDevs[NetDevCnt].recPacks;
++ NetDevs[NetDevCnt].recErrs = ifmd.ifmd_data.ifi_ierrors - NetDevs[NetDevCnt].recErrs;
++ NetDevs[NetDevCnt].recDrop = ifmd.ifmd_data.ifi_iqdrops - NetDevs[NetDevCnt].recDrop;
++ NetDevs[NetDevCnt].recMulticast = ifmd.ifmd_data.ifi_imcasts - NetDevs[NetDevCnt].recMulticast;
++ NetDevs[NetDevCnt].sentBytes = ifmd.ifmd_data.ifi_obytes - NetDevs[NetDevCnt].sentBytes;
++ NetDevs[NetDevCnt].sentPacks = ifmd.ifmd_data.ifi_opackets - NetDevs[NetDevCnt].sentPacks;
++ NetDevs[NetDevCnt].sentErrs = ifmd.ifmd_data.ifi_oerrors - NetDevs[NetDevCnt].sentErrs;
++ NetDevs[NetDevCnt].sentMulticast = ifmd.ifmd_data.ifi_omcasts - NetDevs[NetDevCnt].sentMulticast;
++ NetDevs[NetDevCnt].sentColls = ifmd.ifmd_data.ifi_collisions - NetDevs[NetDevCnt].sentColls;
++ NetDevCnt++;
++ }
++ }
++}
++
++void checkNetDev(void)
++{
++ if (numActivIfaces() != NetDevCnt) {
++ /* interface has been added or removed
++ so we do a reset */
++ exitNetDev();
++ initNetDev();
++ }
++}
++
++void printNetDevRecBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recErrs);
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recDrop);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].recMulticast);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevRecBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Received Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Received Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Receiver Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "drops", 5))
++ fprintf(CurrentClient, "Receiver Drops\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Received Multicast Packets\t0\t0\t1/s\n");
++}
++
++void printNetDevSentBytes(const char *cmd)
++{
++ int i;
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[0] == NULL || retval[1] == NULL)
++ return;
++
++ for (i = 0; i < NetDevCnt; i++) {
++ if (!strcmp(NetDevs[i].name, retval[0])) {
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentBytes);
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentPacks);
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentErrs);
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentMulticast);
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "%lu", NetDevs[i].sentColls);
++ }
++ }
++
++ fprintf(CurrentClient, "\n");
++}
++
++void printNetDevSentBytesInfo(const char *cmd)
++{
++ char **retval;
++
++ retval = parseCommand(cmd);
++
++ if (retval[1] == NULL)
++ return;
++
++ if (!strncmp(retval[1], "data", 4))
++ fprintf(CurrentClient, "Sent Data\t0\t0\tkBytes/s\n");
++ if (!strncmp(retval[1], "packets", 7))
++ fprintf(CurrentClient, "Sent Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "errors", 6))
++ fprintf(CurrentClient, "Transmitter Errors\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "multicast", 9))
++ fprintf(CurrentClient, "Sent Multicast Packets\t0\t0\t1/s\n");
++ if (!strncmp(retval[1], "collisions", 10))
++ fprintf(CurrentClient, "Transmitter Collisions\t0\t0\t1/s\n");
++}
diff --git a/x11/kdebase4/files/patch-netdev.h b/x11/kdebase4/files/patch-netdev.h
new file mode 100644
index 000000000000..3c291f85dc9e
--- /dev/null
+++ b/x11/kdebase4/files/patch-netdev.h
@@ -0,0 +1,39 @@
+--- /dev/null Mon Nov 19 17:14:17 2001
++++ ksysguard/ksysguardd/FreeBSD/netdev.h Mon Nov 19 17:08:04 2001
+@@ -0,0 +1,36 @@
++/*
++ KSysGuard, the KDE System Guard
++
++ Copyright (c) 2001 Tobias Koenig <tokoe82@yahoo.de>
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of version 2 of the GNU General Public
++ License as published by the Free Software Foundation.
++
++ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ $Id: netdev.h,v 1.2 2001/09/18 14:03:53 tokoe Exp $
++*/
++
++#ifndef _netdev_h_
++#define _netdev_h_
++
++void initNetDev(void);
++void exitNetDev(void);
++
++void updateNetDev(void);
++void checkNetDev(void);
++
++void printNetDevRecBytes(const char* cmd);
++void printNetDevRecBytesInfo(const char* cmd);
++void printNetDevSentBytes(const char* cmd);
++void printNetDevSentBytesInfo(const char* cmd);
++
++#endif
diff --git a/x11/kdebase4/pkg-plist b/x11/kdebase4/pkg-plist
index 5466b74bfbc6..3b9d7855dd8d 100644
--- a/x11/kdebase4/pkg-plist
+++ b/x11/kdebase4/pkg-plist
@@ -229,7 +229,6 @@ lib/kde2/libkcm_kwinoptions.la
lib/kde2/libkcm_kwinoptions.so
lib/kde2/libkcm_launch.la
lib/kde2/libkcm_launch.so
-lib/kde2/libkcm_launch.so.0
lib/kde2/libkcm_locale.la
lib/kde2/libkcm_locale.so
lib/kde2/libkcm_midi.la
@@ -277,7 +276,6 @@ lib/kde2/libkonqsidebartree_dirtree.la
lib/kde2/libkonqsidebartree_dirtree.so
lib/kde2/libkonqsidebartree_history.la
lib/kde2/libkonqsidebartree_history.so
-lib/kde2/libkonqsidebartree_history.so.0
lib/kde2/libkonqsound.la
lib/kde2/libkonqsound.so
lib/kde2/libkonqtree.la
@@ -1146,9 +1144,6 @@ share/apps/konsole/konsole_part.rc
share/apps/konsole/linux.desktop
share/apps/konsole/linux.keytab
share/apps/konsole/mc.desktop
-share/apps/konsole/pics/brightness.png
-share/apps/konsole/pics/colourness.png
-share/apps/konsole/pics/contrast.png
share/apps/konsole/shell.desktop
share/apps/konsole/su.desktop
share/apps/konsole/sumc.desktop
@@ -1284,8 +1279,14 @@ share/config/imsmaprc
share/config/interferencerc
share/config/kdesktop_custom_menu1
share/config/kdesktop_custom_menu2
+share/config/kdm/Xaccess
+share/config/kdm/Xreset
+share/config/kdm/Xservers
+share/config/kdm/Xsession
+share/config/kdm/Xsetup
+share/config/kdm/Xstartup
+share/config/kdm/Xwilling
share/config/kdm/kdmrc
-share/config/kdm/README
share/config/klipperrc
share/config/konqsidebartng.rc
share/config/konsolerc
@@ -2158,6 +2159,8 @@ share/locale/l10n/hr/entry.desktop
share/locale/l10n/hr/flag.png
share/locale/l10n/hu/entry.desktop
share/locale/l10n/hu/flag.png
+share/locale/l10n/id/entry.desktop
+share/locale/l10n/id/flag.png
share/locale/l10n/ie/entry.desktop
share/locale/l10n/ie/flag.png
share/locale/l10n/il/entry.desktop
@@ -2426,18 +2429,12 @@ share/wallpapers/simple_wallpaper.jpg
share/wallpapers/sunday_brunch.jpg
share/wallpapers/vegetative_fog.jpg
@dirrm share/wallpapers
-@exec mkdir %D/share/templates/.source/emptydir
-@exec chmod 644 %D/share/templates/.source/emptydir
-@unexec rmdir %D/share/templates/.source/emptydir
+@dirrm share/templates/.source/emptydir
@dirrm share/templates/.source
@dirrm share/templates
@dirrm share/sounds
-@dirrm share/servicetypes
@dirrm share/services/useragentstrings
@dirrm share/services/searchproviders
-@dirrm share/services/kded
-@dirrm share/services
-@dirrm share/mimelnk/application
@dirrm share/locale/l10n/za
@dirrm share/locale/l10n/ve
@dirrm share/locale/l10n/vc
@@ -2479,6 +2476,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/is
@dirrm share/locale/l10n/il
@dirrm share/locale/l10n/ie
+@dirrm share/locale/l10n/id
@dirrm share/locale/l10n/hu
@dirrm share/locale/l10n/hr
@dirrm share/locale/l10n/hn
@@ -2512,22 +2510,13 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/locale/l10n/ag
@dirrm share/locale/l10n/C
@dirrm share/locale/l10n
-@dirrm share/locale/C
-@dirrm share/locale
@dirrm share/icons/locolor/32x32/apps
@dirrm share/icons/locolor/32x32
@dirrm share/icons/locolor/16x16/apps
@dirrm share/icons/locolor/16x16
@dirrm share/icons/locolor
-@dirrm share/icons/hicolor/48x48/filesystems
@dirrm share/icons/hicolor/48x48/apps
-@dirrm share/icons/hicolor/32x32/filesystems
@dirrm share/icons/hicolor/32x32/apps
-@dirrm share/icons/hicolor/32x32/actions
-@dirrm share/icons/hicolor/22x22/actions
-@dirrm share/icons/hicolor/16x16/filesystems
-@dirrm share/icons/hicolor/16x16/apps
-@dirrm share/icons/hicolor/16x16/actions
@dirrm share/fonts/override
@dirrm share/fonts
@dirrm share/doc/HTML/en/kwrite
@@ -2552,9 +2541,7 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/doc/HTML/en/kcontrol
@dirrm share/doc/HTML/en/kate
@dirrm share/doc/HTML/en/kaddressbook
-@dirrm share/doc/HTML/en
@dirrm share/config/kdm
-@dirrm share/config
@dirrm share/autostart
@dirrm share/apps/naughtyapplet/pics
@dirrm share/apps/naughtyapplet
@@ -2572,7 +2559,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kscreensaver
@dirrm share/apps/kpersonalizer/pics
@dirrm share/apps/kpersonalizer
-@dirrm share/apps/konsole/pics
@dirrm share/apps/konsole
@dirrm share/apps/konqueror/tiles
@dirrm share/apps/konqueror/profiles
@@ -2658,7 +2644,6 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/apps/kdcop
@dirrm share/apps/kcontrol/pics
@dirrm share/apps/kcontrol
-@dirrm share/apps/kconf_update
@dirrm share/apps/kcmusb
@dirrm share/apps/kcmlocale/pics
@dirrm share/apps/kcmlocale
@@ -2755,6 +2740,5 @@ share/wallpapers/vegetative_fog.jpg
@dirrm share/applnk/Applications
@dirrm share/applnk/.hidden
@dirrm share/applnk
-@dirrm lib/kde2
@dirrm include/kwin
@dirrm include/kate
diff --git a/x11/kdelibs2/Makefile b/x11/kdelibs2/Makefile
index 2fe7dd86c537..0db309ff14e8 100644
--- a/x11/kdelibs2/Makefile
+++ b/x11/kdelibs2/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= kdelibs
-PORTVERSION= 2.2.1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -14,12 +14,16 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= automake14:${PORTSDIR}/devel/automake14 \
+ autoconf213:${PORTSDIR}/devel/autoconf213 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \
audiofile.0:${PORTSDIR}/audio/libaudiofile \
fam.0:${PORTSDIR}/devel/fam \
- cups.2:${PORTSDIR}/print/cups \
xml2.5:${PORTSDIR}/textproc/libxml2 \
- pcre.0:${PORTSDIR}/devel/pcre
+ pcre.0:${PORTSDIR}/devel/pcre \
+ cups.2:${PORTSDIR}/print/cups-base \
+ xslt.1:${PORTSDIR}/textproc/libxslt
.if !exists(/usr/bin/bzip2)
LIB_DEPENDS+= bz2.1:${PORTSDIR}/archivers/bzip2
.endif
@@ -32,7 +36,13 @@ USE_BZIP2= yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--enable-cups --disable-ltdl-install \
- --disable-final
+ --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
.if ${MACHINE_ARCH} == "alpha"
CFLAGS= -O0 ${KDE_CFLAGS}
@@ -68,6 +78,15 @@ pre-extract:
.endif
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@-O2@-O0@g; s@\"-lfam@\"-L${LOCALBASE}/lib -lfam@g" ${WRKSRC}/configure
${PERL} -pi -e "s@kspell api@@g" ${WRKSRC}/doc/Makefile.in
(find ${WRKSRC} -name Makefile.in | xargs ${PERL} -pi.orig -e \
@@ -80,8 +99,8 @@ post-configure:
post-install:
${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${FILESDIR}/kdelibs.sh > ${PREFIX}/etc/rc.d/kdelibs.sh
${CHMOD} 755 ${PREFIX}/etc/rc.d/kdelibs.sh
-.for LIB in DCOP kab kdecore kdesu kdeui kfile kformula kio kjs \
- kparts kspell ksycoca kjava
+.for LIB in DCOP kab kdecore kdesu kdeui kfile kio kjs kparts kspell \
+ ksycoca kjava
@${LN} -sf ${PREFIX}/lib/lib${LIB}.so.${SOMAJOR} ${PREFIX}/lib/lib${LIB}.so
.endfor
.for LIB in artsc artsflow artsflow_idl kmid kmedia2_idl qtmcop soundserver_idl
diff --git a/x11/kdelibs2/distinfo b/x11/kdelibs2/distinfo
index 0fe3f4482c9a..ebfd9d6443b2 100644
--- a/x11/kdelibs2/distinfo
+++ b/x11/kdelibs2/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdelibs-2.2.1.tar.bz2) = 3aa73b3fe7095b3bab3081bece73f56f
+MD5 (KDE/kdelibs-2.2.2.tar.bz2) = 51ec17dce9c62b50a3c2e97e4511cdcf
diff --git a/x11/kdelibs2/files/patch-kdeprint::imagetops b/x11/kdelibs2/files/patch-kdeprint::imagetops
new file mode 100644
index 000000000000..518e0b981e59
--- /dev/null
+++ b/x11/kdelibs2/files/patch-kdeprint::imagetops
@@ -0,0 +1,25 @@
+--- kdeprint/filters/imagetops.orig Wed Nov 28 12:25:21 2001
++++ kdeprint/filters/imagetops Wed Nov 28 12:29:50 2001
+@@ -27,11 +27,17 @@
+ # check the file mime type, and set the command correspondingly
+ cmd=
+ magic=`file -bi $FILE`
+-if [[ $magic != image/* ]] ; then
+- echo "Not an image"
+- exit 1;
+-fi
+-case ${magic/image\//} in
++
++case $magic in
++ image/*)
++ ;;
++ *)
++ echo "Not an image"
++ exit 1;
++ ;;
++esac
++
++case ${magic##image\/} in
+ jpeg)
+ cmd="djpeg -pnm"
+ ;;
diff --git a/x11/kdelibs2/files/patch-kio::job.cpp b/x11/kdelibs2/files/patch-kio::job.cpp
new file mode 100644
index 000000000000..113a0eb1a13e
--- /dev/null
+++ b/x11/kdelibs2/files/patch-kio::job.cpp
@@ -0,0 +1,11 @@
+--- kio/job.cpp.20011019 Fri Oct 19 16:09:57 2001
++++ kio/job.cpp Tue Oct 30 21:49:15 2001
+@@ -2472,7 +2472,7 @@
+ // But for files coming from TAR, we want to preserve permissions -> we use default perms only if from remote
+ // The real fix would be KProtocolInfo::inputType(protocol) == T_FILESYSTEM, but we can't access ksycoca from here !
+ bool remoteSource = !(*it).uSource.isLocalFile() && ((*it).uSource.protocol() != "tar"); // HACK
+- mode_t permissions = ( remoteSource && (*it).uDest.isLocalFile() ) ? (mode_t)-1 : (*it).permissions;
++ int permissions = ( remoteSource && (*it).uDest.isLocalFile() ) ? -1 : (*it).permissions;
+ KIO::FileCopyJob * copyJob = KIO::file_copy( (*it).uSource, (*it).uDest, permissions, bOverwrite, false, false/*no GUI*/ );
+ copyJob->setSourceSize( (*it).size );
+ newjob = copyJob;
diff --git a/x11/kdelibs2/pkg-plist b/x11/kdelibs2/pkg-plist
index 990f3f257b84..db707e19d87e 100644
--- a/x11/kdelibs2/pkg-plist
+++ b/x11/kdelibs2/pkg-plist
@@ -1,4 +1,3 @@
-@exec %%LDCONFIG%% -m %D/lib/kde2
bin/artsc-config
bin/artscat
bin/artsd
@@ -156,6 +155,7 @@ include/kallocator.h
include/kalphapainter.h
include/kanimwidget.h
include/kapp.h
+include/kapplication.h
include/karrowbutton.h
include/kasyncio.h
include/kaudioplayer.h
@@ -407,6 +407,7 @@ include/ksslpkcs12.h
include/ksslsettings.h
include/ksslutils.h
include/ksslx509map.h
+include/kstandarddirs.h
include/kstartupinfo.h
include/kstaticdeleter.h
include/kstatusbar.h
@@ -433,6 +434,7 @@ include/ktoolbarbutton.h
include/ktoolbarradiogroup.h
include/ktrader.h
include/kuniqueapp.h
+include/kuniqueapplication.h
include/kunload.h
include/kurifilter.h
include/kurl.h
@@ -578,6 +580,8 @@ lib/libkab.so.4
lib/libkdecore.la
lib/libkdecore.so
lib/libkdecore.so.4
+lib/libkded_kssld.la
+lib/libkded_kssld.so
lib/libkdefakes.la
lib/libkdefakes.so
lib/libkdefakes.so.4
@@ -596,7 +600,6 @@ lib/libkdeui.so.4
lib/libkfile.la
lib/libkfile.so
lib/libkfile.so.4
-lib/libkformula.so
lib/libkhtml.la
lib/libkhtml.so
lib/libkhtml.so.4
@@ -1009,20 +1012,6 @@ share/apps/ksgmltools2/customization/nl/entities/update-doc.docbook
share/apps/ksgmltools2/customization/nl/lang.entities
share/apps/ksgmltools2/customization/nl/strings.entities
share/apps/ksgmltools2/customization/nl/user.entities
-share/apps/ksgmltools2/customization/no/catalog
-share/apps/ksgmltools2/customization/no/entities/fdl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/gpl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/lgpl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/report-bugs.docbook
-share/apps/ksgmltools2/customization/no/entities/underArtisticLicense.docbook
-share/apps/ksgmltools2/customization/no/entities/underBSDLicense.docbook
-share/apps/ksgmltools2/customization/no/entities/underFDL.docbook
-share/apps/ksgmltools2/customization/no/entities/underGPL.docbook
-share/apps/ksgmltools2/customization/no/entities/underX11License.docbook
-share/apps/ksgmltools2/customization/no/entities/update-doc.docbook
-share/apps/ksgmltools2/customization/no/lang.entities
-share/apps/ksgmltools2/customization/no/strings.entities
-share/apps/ksgmltools2/customization/no/user.entities
share/apps/ksgmltools2/customization/no-NY/catalog
share/apps/ksgmltools2/customization/no-NY/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/no-NY/entities/gpl-notice.docbook
@@ -1037,6 +1026,20 @@ share/apps/ksgmltools2/customization/no-NY/entities/update-doc.docbook
share/apps/ksgmltools2/customization/no-NY/lang.entities
share/apps/ksgmltools2/customization/no-NY/strings.entities
share/apps/ksgmltools2/customization/no-NY/user.entities
+share/apps/ksgmltools2/customization/no/catalog
+share/apps/ksgmltools2/customization/no/entities/fdl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/gpl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/lgpl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/report-bugs.docbook
+share/apps/ksgmltools2/customization/no/entities/underArtisticLicense.docbook
+share/apps/ksgmltools2/customization/no/entities/underBSDLicense.docbook
+share/apps/ksgmltools2/customization/no/entities/underFDL.docbook
+share/apps/ksgmltools2/customization/no/entities/underGPL.docbook
+share/apps/ksgmltools2/customization/no/entities/underX11License.docbook
+share/apps/ksgmltools2/customization/no/entities/update-doc.docbook
+share/apps/ksgmltools2/customization/no/lang.entities
+share/apps/ksgmltools2/customization/no/strings.entities
+share/apps/ksgmltools2/customization/no/user.entities
share/apps/ksgmltools2/customization/pl/catalog
share/apps/ksgmltools2/customization/pl/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/pl/entities/gpl-notice.docbook
@@ -1051,20 +1054,6 @@ share/apps/ksgmltools2/customization/pl/entities/update-doc.docbook
share/apps/ksgmltools2/customization/pl/lang.entities
share/apps/ksgmltools2/customization/pl/strings.entities
share/apps/ksgmltools2/customization/pl/user.entities
-share/apps/ksgmltools2/customization/pt/catalog
-share/apps/ksgmltools2/customization/pt/entities/fdl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/gpl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/lgpl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/report-bugs.docbook
-share/apps/ksgmltools2/customization/pt/entities/underArtisticLicense.docbook
-share/apps/ksgmltools2/customization/pt/entities/underBSDLicense.docbook
-share/apps/ksgmltools2/customization/pt/entities/underFDL.docbook
-share/apps/ksgmltools2/customization/pt/entities/underGPL.docbook
-share/apps/ksgmltools2/customization/pt/entities/underX11License.docbook
-share/apps/ksgmltools2/customization/pt/entities/update-doc.docbook
-share/apps/ksgmltools2/customization/pt/lang.entities
-share/apps/ksgmltools2/customization/pt/strings.entities
-share/apps/ksgmltools2/customization/pt/user.entities
share/apps/ksgmltools2/customization/pt-BR/catalog
share/apps/ksgmltools2/customization/pt-BR/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/pt-BR/entities/gpl-notice.docbook
@@ -1079,6 +1068,20 @@ share/apps/ksgmltools2/customization/pt-BR/entities/update-doc.docbook
share/apps/ksgmltools2/customization/pt-BR/lang.entities
share/apps/ksgmltools2/customization/pt-BR/strings.entities
share/apps/ksgmltools2/customization/pt-BR/user.entities
+share/apps/ksgmltools2/customization/pt/catalog
+share/apps/ksgmltools2/customization/pt/entities/fdl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/gpl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/lgpl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/report-bugs.docbook
+share/apps/ksgmltools2/customization/pt/entities/underArtisticLicense.docbook
+share/apps/ksgmltools2/customization/pt/entities/underBSDLicense.docbook
+share/apps/ksgmltools2/customization/pt/entities/underFDL.docbook
+share/apps/ksgmltools2/customization/pt/entities/underGPL.docbook
+share/apps/ksgmltools2/customization/pt/entities/underX11License.docbook
+share/apps/ksgmltools2/customization/pt/entities/update-doc.docbook
+share/apps/ksgmltools2/customization/pt/lang.entities
+share/apps/ksgmltools2/customization/pt/strings.entities
+share/apps/ksgmltools2/customization/pt/user.entities
share/apps/ksgmltools2/customization/ro/catalog
share/apps/ksgmltools2/customization/ro/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/ro/entities/gpl-notice.docbook
@@ -1295,6 +1298,7 @@ share/apps/ksgmltools2/docbook/xsl/common/subtitles.xsl
share/apps/ksgmltools2/docbook/xsl/common/sv.xml
share/apps/ksgmltools2/docbook/xsl/common/titles.xsl
share/apps/ksgmltools2/docbook/xsl/common/tr.xml
+share/apps/ksgmltools2/docbook/xsl/common/xh.xml
share/apps/ksgmltools2/docbook/xsl/common/zh_cn.xml
share/apps/ksgmltools2/docbook/xsl/common/zh_tw.xml
share/apps/ksgmltools2/docbook/xsl/html/ChangeLog
@@ -2585,6 +2589,7 @@ share/services/kaclplugin.desktop
share/services/kbzip2filter.desktop
share/services/kcookiejar.desktop
share/services/kded/kdeprintd.desktop
+share/services/kded/kssld.desktop
share/services/kgzipfilter.desktop
share/services/khtml.desktop
share/services/khtmlimage.desktop
@@ -2687,15 +2692,15 @@ share/servicetypes/kurifilterplugin.desktop
@dirrm share/apps/ksgmltools2/customization/ru
@dirrm share/apps/ksgmltools2/customization/ro/entities
@dirrm share/apps/ksgmltools2/customization/ro
+@dirrm share/apps/ksgmltools2/customization/pt/entities
@dirrm share/apps/ksgmltools2/customization/pt-BR/entities
@dirrm share/apps/ksgmltools2/customization/pt-BR
-@dirrm share/apps/ksgmltools2/customization/pt/entities
@dirrm share/apps/ksgmltools2/customization/pt
@dirrm share/apps/ksgmltools2/customization/pl/entities
@dirrm share/apps/ksgmltools2/customization/pl
+@dirrm share/apps/ksgmltools2/customization/no/entities
@dirrm share/apps/ksgmltools2/customization/no-NY/entities
@dirrm share/apps/ksgmltools2/customization/no-NY
-@dirrm share/apps/ksgmltools2/customization/no/entities
@dirrm share/apps/ksgmltools2/customization/no
@dirrm share/apps/ksgmltools2/customization/nl/entities
@dirrm share/apps/ksgmltools2/customization/nl
diff --git a/x11/kdelibs3/Makefile b/x11/kdelibs3/Makefile
index 2fe7dd86c537..0db309ff14e8 100644
--- a/x11/kdelibs3/Makefile
+++ b/x11/kdelibs3/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= kdelibs
-PORTVERSION= 2.2.1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -14,12 +14,16 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= automake14:${PORTSDIR}/devel/automake14 \
+ autoconf213:${PORTSDIR}/devel/autoconf213 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \
audiofile.0:${PORTSDIR}/audio/libaudiofile \
fam.0:${PORTSDIR}/devel/fam \
- cups.2:${PORTSDIR}/print/cups \
xml2.5:${PORTSDIR}/textproc/libxml2 \
- pcre.0:${PORTSDIR}/devel/pcre
+ pcre.0:${PORTSDIR}/devel/pcre \
+ cups.2:${PORTSDIR}/print/cups-base \
+ xslt.1:${PORTSDIR}/textproc/libxslt
.if !exists(/usr/bin/bzip2)
LIB_DEPENDS+= bz2.1:${PORTSDIR}/archivers/bzip2
.endif
@@ -32,7 +36,13 @@ USE_BZIP2= yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--enable-cups --disable-ltdl-install \
- --disable-final
+ --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
.if ${MACHINE_ARCH} == "alpha"
CFLAGS= -O0 ${KDE_CFLAGS}
@@ -68,6 +78,15 @@ pre-extract:
.endif
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@-O2@-O0@g; s@\"-lfam@\"-L${LOCALBASE}/lib -lfam@g" ${WRKSRC}/configure
${PERL} -pi -e "s@kspell api@@g" ${WRKSRC}/doc/Makefile.in
(find ${WRKSRC} -name Makefile.in | xargs ${PERL} -pi.orig -e \
@@ -80,8 +99,8 @@ post-configure:
post-install:
${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${FILESDIR}/kdelibs.sh > ${PREFIX}/etc/rc.d/kdelibs.sh
${CHMOD} 755 ${PREFIX}/etc/rc.d/kdelibs.sh
-.for LIB in DCOP kab kdecore kdesu kdeui kfile kformula kio kjs \
- kparts kspell ksycoca kjava
+.for LIB in DCOP kab kdecore kdesu kdeui kfile kio kjs kparts kspell \
+ ksycoca kjava
@${LN} -sf ${PREFIX}/lib/lib${LIB}.so.${SOMAJOR} ${PREFIX}/lib/lib${LIB}.so
.endfor
.for LIB in artsc artsflow artsflow_idl kmid kmedia2_idl qtmcop soundserver_idl
diff --git a/x11/kdelibs3/distinfo b/x11/kdelibs3/distinfo
index 0fe3f4482c9a..ebfd9d6443b2 100644
--- a/x11/kdelibs3/distinfo
+++ b/x11/kdelibs3/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdelibs-2.2.1.tar.bz2) = 3aa73b3fe7095b3bab3081bece73f56f
+MD5 (KDE/kdelibs-2.2.2.tar.bz2) = 51ec17dce9c62b50a3c2e97e4511cdcf
diff --git a/x11/kdelibs3/files/patch-kdeprint::imagetops b/x11/kdelibs3/files/patch-kdeprint::imagetops
new file mode 100644
index 000000000000..518e0b981e59
--- /dev/null
+++ b/x11/kdelibs3/files/patch-kdeprint::imagetops
@@ -0,0 +1,25 @@
+--- kdeprint/filters/imagetops.orig Wed Nov 28 12:25:21 2001
++++ kdeprint/filters/imagetops Wed Nov 28 12:29:50 2001
+@@ -27,11 +27,17 @@
+ # check the file mime type, and set the command correspondingly
+ cmd=
+ magic=`file -bi $FILE`
+-if [[ $magic != image/* ]] ; then
+- echo "Not an image"
+- exit 1;
+-fi
+-case ${magic/image\//} in
++
++case $magic in
++ image/*)
++ ;;
++ *)
++ echo "Not an image"
++ exit 1;
++ ;;
++esac
++
++case ${magic##image\/} in
+ jpeg)
+ cmd="djpeg -pnm"
+ ;;
diff --git a/x11/kdelibs3/files/patch-kio::job.cpp b/x11/kdelibs3/files/patch-kio::job.cpp
new file mode 100644
index 000000000000..113a0eb1a13e
--- /dev/null
+++ b/x11/kdelibs3/files/patch-kio::job.cpp
@@ -0,0 +1,11 @@
+--- kio/job.cpp.20011019 Fri Oct 19 16:09:57 2001
++++ kio/job.cpp Tue Oct 30 21:49:15 2001
+@@ -2472,7 +2472,7 @@
+ // But for files coming from TAR, we want to preserve permissions -> we use default perms only if from remote
+ // The real fix would be KProtocolInfo::inputType(protocol) == T_FILESYSTEM, but we can't access ksycoca from here !
+ bool remoteSource = !(*it).uSource.isLocalFile() && ((*it).uSource.protocol() != "tar"); // HACK
+- mode_t permissions = ( remoteSource && (*it).uDest.isLocalFile() ) ? (mode_t)-1 : (*it).permissions;
++ int permissions = ( remoteSource && (*it).uDest.isLocalFile() ) ? -1 : (*it).permissions;
+ KIO::FileCopyJob * copyJob = KIO::file_copy( (*it).uSource, (*it).uDest, permissions, bOverwrite, false, false/*no GUI*/ );
+ copyJob->setSourceSize( (*it).size );
+ newjob = copyJob;
diff --git a/x11/kdelibs3/pkg-plist b/x11/kdelibs3/pkg-plist
index 990f3f257b84..db707e19d87e 100644
--- a/x11/kdelibs3/pkg-plist
+++ b/x11/kdelibs3/pkg-plist
@@ -1,4 +1,3 @@
-@exec %%LDCONFIG%% -m %D/lib/kde2
bin/artsc-config
bin/artscat
bin/artsd
@@ -156,6 +155,7 @@ include/kallocator.h
include/kalphapainter.h
include/kanimwidget.h
include/kapp.h
+include/kapplication.h
include/karrowbutton.h
include/kasyncio.h
include/kaudioplayer.h
@@ -407,6 +407,7 @@ include/ksslpkcs12.h
include/ksslsettings.h
include/ksslutils.h
include/ksslx509map.h
+include/kstandarddirs.h
include/kstartupinfo.h
include/kstaticdeleter.h
include/kstatusbar.h
@@ -433,6 +434,7 @@ include/ktoolbarbutton.h
include/ktoolbarradiogroup.h
include/ktrader.h
include/kuniqueapp.h
+include/kuniqueapplication.h
include/kunload.h
include/kurifilter.h
include/kurl.h
@@ -578,6 +580,8 @@ lib/libkab.so.4
lib/libkdecore.la
lib/libkdecore.so
lib/libkdecore.so.4
+lib/libkded_kssld.la
+lib/libkded_kssld.so
lib/libkdefakes.la
lib/libkdefakes.so
lib/libkdefakes.so.4
@@ -596,7 +600,6 @@ lib/libkdeui.so.4
lib/libkfile.la
lib/libkfile.so
lib/libkfile.so.4
-lib/libkformula.so
lib/libkhtml.la
lib/libkhtml.so
lib/libkhtml.so.4
@@ -1009,20 +1012,6 @@ share/apps/ksgmltools2/customization/nl/entities/update-doc.docbook
share/apps/ksgmltools2/customization/nl/lang.entities
share/apps/ksgmltools2/customization/nl/strings.entities
share/apps/ksgmltools2/customization/nl/user.entities
-share/apps/ksgmltools2/customization/no/catalog
-share/apps/ksgmltools2/customization/no/entities/fdl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/gpl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/lgpl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/report-bugs.docbook
-share/apps/ksgmltools2/customization/no/entities/underArtisticLicense.docbook
-share/apps/ksgmltools2/customization/no/entities/underBSDLicense.docbook
-share/apps/ksgmltools2/customization/no/entities/underFDL.docbook
-share/apps/ksgmltools2/customization/no/entities/underGPL.docbook
-share/apps/ksgmltools2/customization/no/entities/underX11License.docbook
-share/apps/ksgmltools2/customization/no/entities/update-doc.docbook
-share/apps/ksgmltools2/customization/no/lang.entities
-share/apps/ksgmltools2/customization/no/strings.entities
-share/apps/ksgmltools2/customization/no/user.entities
share/apps/ksgmltools2/customization/no-NY/catalog
share/apps/ksgmltools2/customization/no-NY/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/no-NY/entities/gpl-notice.docbook
@@ -1037,6 +1026,20 @@ share/apps/ksgmltools2/customization/no-NY/entities/update-doc.docbook
share/apps/ksgmltools2/customization/no-NY/lang.entities
share/apps/ksgmltools2/customization/no-NY/strings.entities
share/apps/ksgmltools2/customization/no-NY/user.entities
+share/apps/ksgmltools2/customization/no/catalog
+share/apps/ksgmltools2/customization/no/entities/fdl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/gpl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/lgpl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/report-bugs.docbook
+share/apps/ksgmltools2/customization/no/entities/underArtisticLicense.docbook
+share/apps/ksgmltools2/customization/no/entities/underBSDLicense.docbook
+share/apps/ksgmltools2/customization/no/entities/underFDL.docbook
+share/apps/ksgmltools2/customization/no/entities/underGPL.docbook
+share/apps/ksgmltools2/customization/no/entities/underX11License.docbook
+share/apps/ksgmltools2/customization/no/entities/update-doc.docbook
+share/apps/ksgmltools2/customization/no/lang.entities
+share/apps/ksgmltools2/customization/no/strings.entities
+share/apps/ksgmltools2/customization/no/user.entities
share/apps/ksgmltools2/customization/pl/catalog
share/apps/ksgmltools2/customization/pl/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/pl/entities/gpl-notice.docbook
@@ -1051,20 +1054,6 @@ share/apps/ksgmltools2/customization/pl/entities/update-doc.docbook
share/apps/ksgmltools2/customization/pl/lang.entities
share/apps/ksgmltools2/customization/pl/strings.entities
share/apps/ksgmltools2/customization/pl/user.entities
-share/apps/ksgmltools2/customization/pt/catalog
-share/apps/ksgmltools2/customization/pt/entities/fdl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/gpl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/lgpl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/report-bugs.docbook
-share/apps/ksgmltools2/customization/pt/entities/underArtisticLicense.docbook
-share/apps/ksgmltools2/customization/pt/entities/underBSDLicense.docbook
-share/apps/ksgmltools2/customization/pt/entities/underFDL.docbook
-share/apps/ksgmltools2/customization/pt/entities/underGPL.docbook
-share/apps/ksgmltools2/customization/pt/entities/underX11License.docbook
-share/apps/ksgmltools2/customization/pt/entities/update-doc.docbook
-share/apps/ksgmltools2/customization/pt/lang.entities
-share/apps/ksgmltools2/customization/pt/strings.entities
-share/apps/ksgmltools2/customization/pt/user.entities
share/apps/ksgmltools2/customization/pt-BR/catalog
share/apps/ksgmltools2/customization/pt-BR/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/pt-BR/entities/gpl-notice.docbook
@@ -1079,6 +1068,20 @@ share/apps/ksgmltools2/customization/pt-BR/entities/update-doc.docbook
share/apps/ksgmltools2/customization/pt-BR/lang.entities
share/apps/ksgmltools2/customization/pt-BR/strings.entities
share/apps/ksgmltools2/customization/pt-BR/user.entities
+share/apps/ksgmltools2/customization/pt/catalog
+share/apps/ksgmltools2/customization/pt/entities/fdl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/gpl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/lgpl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/report-bugs.docbook
+share/apps/ksgmltools2/customization/pt/entities/underArtisticLicense.docbook
+share/apps/ksgmltools2/customization/pt/entities/underBSDLicense.docbook
+share/apps/ksgmltools2/customization/pt/entities/underFDL.docbook
+share/apps/ksgmltools2/customization/pt/entities/underGPL.docbook
+share/apps/ksgmltools2/customization/pt/entities/underX11License.docbook
+share/apps/ksgmltools2/customization/pt/entities/update-doc.docbook
+share/apps/ksgmltools2/customization/pt/lang.entities
+share/apps/ksgmltools2/customization/pt/strings.entities
+share/apps/ksgmltools2/customization/pt/user.entities
share/apps/ksgmltools2/customization/ro/catalog
share/apps/ksgmltools2/customization/ro/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/ro/entities/gpl-notice.docbook
@@ -1295,6 +1298,7 @@ share/apps/ksgmltools2/docbook/xsl/common/subtitles.xsl
share/apps/ksgmltools2/docbook/xsl/common/sv.xml
share/apps/ksgmltools2/docbook/xsl/common/titles.xsl
share/apps/ksgmltools2/docbook/xsl/common/tr.xml
+share/apps/ksgmltools2/docbook/xsl/common/xh.xml
share/apps/ksgmltools2/docbook/xsl/common/zh_cn.xml
share/apps/ksgmltools2/docbook/xsl/common/zh_tw.xml
share/apps/ksgmltools2/docbook/xsl/html/ChangeLog
@@ -2585,6 +2589,7 @@ share/services/kaclplugin.desktop
share/services/kbzip2filter.desktop
share/services/kcookiejar.desktop
share/services/kded/kdeprintd.desktop
+share/services/kded/kssld.desktop
share/services/kgzipfilter.desktop
share/services/khtml.desktop
share/services/khtmlimage.desktop
@@ -2687,15 +2692,15 @@ share/servicetypes/kurifilterplugin.desktop
@dirrm share/apps/ksgmltools2/customization/ru
@dirrm share/apps/ksgmltools2/customization/ro/entities
@dirrm share/apps/ksgmltools2/customization/ro
+@dirrm share/apps/ksgmltools2/customization/pt/entities
@dirrm share/apps/ksgmltools2/customization/pt-BR/entities
@dirrm share/apps/ksgmltools2/customization/pt-BR
-@dirrm share/apps/ksgmltools2/customization/pt/entities
@dirrm share/apps/ksgmltools2/customization/pt
@dirrm share/apps/ksgmltools2/customization/pl/entities
@dirrm share/apps/ksgmltools2/customization/pl
+@dirrm share/apps/ksgmltools2/customization/no/entities
@dirrm share/apps/ksgmltools2/customization/no-NY/entities
@dirrm share/apps/ksgmltools2/customization/no-NY
-@dirrm share/apps/ksgmltools2/customization/no/entities
@dirrm share/apps/ksgmltools2/customization/no
@dirrm share/apps/ksgmltools2/customization/nl/entities
@dirrm share/apps/ksgmltools2/customization/nl
diff --git a/x11/kdelibs4/Makefile b/x11/kdelibs4/Makefile
index 2fe7dd86c537..0db309ff14e8 100644
--- a/x11/kdelibs4/Makefile
+++ b/x11/kdelibs4/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= kdelibs
-PORTVERSION= 2.2.1
+PORTVERSION= 2.2.2
CATEGORIES?= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
@@ -14,12 +14,16 @@ DIST_SUBDIR= KDE
MAINTAINER?= kde@FreeBSD.org
+BUILD_DEPENDS= automake14:${PORTSDIR}/devel/automake14 \
+ autoconf213:${PORTSDIR}/devel/autoconf213 \
+ objprelink:${PORTSDIR}/devel/objprelink
LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \
audiofile.0:${PORTSDIR}/audio/libaudiofile \
fam.0:${PORTSDIR}/devel/fam \
- cups.2:${PORTSDIR}/print/cups \
xml2.5:${PORTSDIR}/textproc/libxml2 \
- pcre.0:${PORTSDIR}/devel/pcre
+ pcre.0:${PORTSDIR}/devel/pcre \
+ cups.2:${PORTSDIR}/print/cups-base \
+ xslt.1:${PORTSDIR}/textproc/libxslt
.if !exists(/usr/bin/bzip2)
LIB_DEPENDS+= bz2.1:${PORTSDIR}/archivers/bzip2
.endif
@@ -32,7 +36,13 @@ USE_BZIP2= yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--enable-cups --disable-ltdl-install \
- --disable-final
+ --enable-objprelink
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_FINAL)
+CONFIGURE_ARGS+=--enable-final
+.endif
+.if defined(PARALLEL_PACKAGE_BUILD) || defined(WANT_KDE_NDEBUG)
+CONFIGURE_ARGS+=--disable-debug
+.endif
.if ${MACHINE_ARCH} == "alpha"
CFLAGS= -O0 ${KDE_CFLAGS}
@@ -68,6 +78,15 @@ pre-extract:
.endif
pre-configure:
+ ${MKDIR} ${WRKSRC}/auto-bin
+.for AC in autoconf autoheader
+ ${LN} -sf ${LOCALBASE}/bin/${AC}213 ${WRKSRC}/auto-bin/${AC}
+.endfor
+.for AM in automake aclocal
+ ${LN} -sf ${LOCALBASE}/bin/${AM}14 ${WRKSRC}/auto-bin/${AM}
+.endfor
+ cd ${WRKSRC} && env PATH=$$PATH:${WRKSRC}/auto-bin \
+ ${GMAKE} -f Makefile.cvs
${PERL} -pi -e "s@-O2@-O0@g; s@\"-lfam@\"-L${LOCALBASE}/lib -lfam@g" ${WRKSRC}/configure
${PERL} -pi -e "s@kspell api@@g" ${WRKSRC}/doc/Makefile.in
(find ${WRKSRC} -name Makefile.in | xargs ${PERL} -pi.orig -e \
@@ -80,8 +99,8 @@ post-configure:
post-install:
${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${FILESDIR}/kdelibs.sh > ${PREFIX}/etc/rc.d/kdelibs.sh
${CHMOD} 755 ${PREFIX}/etc/rc.d/kdelibs.sh
-.for LIB in DCOP kab kdecore kdesu kdeui kfile kformula kio kjs \
- kparts kspell ksycoca kjava
+.for LIB in DCOP kab kdecore kdesu kdeui kfile kio kjs kparts kspell \
+ ksycoca kjava
@${LN} -sf ${PREFIX}/lib/lib${LIB}.so.${SOMAJOR} ${PREFIX}/lib/lib${LIB}.so
.endfor
.for LIB in artsc artsflow artsflow_idl kmid kmedia2_idl qtmcop soundserver_idl
diff --git a/x11/kdelibs4/distinfo b/x11/kdelibs4/distinfo
index 0fe3f4482c9a..ebfd9d6443b2 100644
--- a/x11/kdelibs4/distinfo
+++ b/x11/kdelibs4/distinfo
@@ -1 +1 @@
-MD5 (KDE/kdelibs-2.2.1.tar.bz2) = 3aa73b3fe7095b3bab3081bece73f56f
+MD5 (KDE/kdelibs-2.2.2.tar.bz2) = 51ec17dce9c62b50a3c2e97e4511cdcf
diff --git a/x11/kdelibs4/files/patch-kdeprint::imagetops b/x11/kdelibs4/files/patch-kdeprint::imagetops
new file mode 100644
index 000000000000..518e0b981e59
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kdeprint::imagetops
@@ -0,0 +1,25 @@
+--- kdeprint/filters/imagetops.orig Wed Nov 28 12:25:21 2001
++++ kdeprint/filters/imagetops Wed Nov 28 12:29:50 2001
+@@ -27,11 +27,17 @@
+ # check the file mime type, and set the command correspondingly
+ cmd=
+ magic=`file -bi $FILE`
+-if [[ $magic != image/* ]] ; then
+- echo "Not an image"
+- exit 1;
+-fi
+-case ${magic/image\//} in
++
++case $magic in
++ image/*)
++ ;;
++ *)
++ echo "Not an image"
++ exit 1;
++ ;;
++esac
++
++case ${magic##image\/} in
+ jpeg)
+ cmd="djpeg -pnm"
+ ;;
diff --git a/x11/kdelibs4/files/patch-kio::job.cpp b/x11/kdelibs4/files/patch-kio::job.cpp
new file mode 100644
index 000000000000..113a0eb1a13e
--- /dev/null
+++ b/x11/kdelibs4/files/patch-kio::job.cpp
@@ -0,0 +1,11 @@
+--- kio/job.cpp.20011019 Fri Oct 19 16:09:57 2001
++++ kio/job.cpp Tue Oct 30 21:49:15 2001
+@@ -2472,7 +2472,7 @@
+ // But for files coming from TAR, we want to preserve permissions -> we use default perms only if from remote
+ // The real fix would be KProtocolInfo::inputType(protocol) == T_FILESYSTEM, but we can't access ksycoca from here !
+ bool remoteSource = !(*it).uSource.isLocalFile() && ((*it).uSource.protocol() != "tar"); // HACK
+- mode_t permissions = ( remoteSource && (*it).uDest.isLocalFile() ) ? (mode_t)-1 : (*it).permissions;
++ int permissions = ( remoteSource && (*it).uDest.isLocalFile() ) ? -1 : (*it).permissions;
+ KIO::FileCopyJob * copyJob = KIO::file_copy( (*it).uSource, (*it).uDest, permissions, bOverwrite, false, false/*no GUI*/ );
+ copyJob->setSourceSize( (*it).size );
+ newjob = copyJob;
diff --git a/x11/kdelibs4/pkg-plist b/x11/kdelibs4/pkg-plist
index 990f3f257b84..db707e19d87e 100644
--- a/x11/kdelibs4/pkg-plist
+++ b/x11/kdelibs4/pkg-plist
@@ -1,4 +1,3 @@
-@exec %%LDCONFIG%% -m %D/lib/kde2
bin/artsc-config
bin/artscat
bin/artsd
@@ -156,6 +155,7 @@ include/kallocator.h
include/kalphapainter.h
include/kanimwidget.h
include/kapp.h
+include/kapplication.h
include/karrowbutton.h
include/kasyncio.h
include/kaudioplayer.h
@@ -407,6 +407,7 @@ include/ksslpkcs12.h
include/ksslsettings.h
include/ksslutils.h
include/ksslx509map.h
+include/kstandarddirs.h
include/kstartupinfo.h
include/kstaticdeleter.h
include/kstatusbar.h
@@ -433,6 +434,7 @@ include/ktoolbarbutton.h
include/ktoolbarradiogroup.h
include/ktrader.h
include/kuniqueapp.h
+include/kuniqueapplication.h
include/kunload.h
include/kurifilter.h
include/kurl.h
@@ -578,6 +580,8 @@ lib/libkab.so.4
lib/libkdecore.la
lib/libkdecore.so
lib/libkdecore.so.4
+lib/libkded_kssld.la
+lib/libkded_kssld.so
lib/libkdefakes.la
lib/libkdefakes.so
lib/libkdefakes.so.4
@@ -596,7 +600,6 @@ lib/libkdeui.so.4
lib/libkfile.la
lib/libkfile.so
lib/libkfile.so.4
-lib/libkformula.so
lib/libkhtml.la
lib/libkhtml.so
lib/libkhtml.so.4
@@ -1009,20 +1012,6 @@ share/apps/ksgmltools2/customization/nl/entities/update-doc.docbook
share/apps/ksgmltools2/customization/nl/lang.entities
share/apps/ksgmltools2/customization/nl/strings.entities
share/apps/ksgmltools2/customization/nl/user.entities
-share/apps/ksgmltools2/customization/no/catalog
-share/apps/ksgmltools2/customization/no/entities/fdl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/gpl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/lgpl-notice.docbook
-share/apps/ksgmltools2/customization/no/entities/report-bugs.docbook
-share/apps/ksgmltools2/customization/no/entities/underArtisticLicense.docbook
-share/apps/ksgmltools2/customization/no/entities/underBSDLicense.docbook
-share/apps/ksgmltools2/customization/no/entities/underFDL.docbook
-share/apps/ksgmltools2/customization/no/entities/underGPL.docbook
-share/apps/ksgmltools2/customization/no/entities/underX11License.docbook
-share/apps/ksgmltools2/customization/no/entities/update-doc.docbook
-share/apps/ksgmltools2/customization/no/lang.entities
-share/apps/ksgmltools2/customization/no/strings.entities
-share/apps/ksgmltools2/customization/no/user.entities
share/apps/ksgmltools2/customization/no-NY/catalog
share/apps/ksgmltools2/customization/no-NY/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/no-NY/entities/gpl-notice.docbook
@@ -1037,6 +1026,20 @@ share/apps/ksgmltools2/customization/no-NY/entities/update-doc.docbook
share/apps/ksgmltools2/customization/no-NY/lang.entities
share/apps/ksgmltools2/customization/no-NY/strings.entities
share/apps/ksgmltools2/customization/no-NY/user.entities
+share/apps/ksgmltools2/customization/no/catalog
+share/apps/ksgmltools2/customization/no/entities/fdl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/gpl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/lgpl-notice.docbook
+share/apps/ksgmltools2/customization/no/entities/report-bugs.docbook
+share/apps/ksgmltools2/customization/no/entities/underArtisticLicense.docbook
+share/apps/ksgmltools2/customization/no/entities/underBSDLicense.docbook
+share/apps/ksgmltools2/customization/no/entities/underFDL.docbook
+share/apps/ksgmltools2/customization/no/entities/underGPL.docbook
+share/apps/ksgmltools2/customization/no/entities/underX11License.docbook
+share/apps/ksgmltools2/customization/no/entities/update-doc.docbook
+share/apps/ksgmltools2/customization/no/lang.entities
+share/apps/ksgmltools2/customization/no/strings.entities
+share/apps/ksgmltools2/customization/no/user.entities
share/apps/ksgmltools2/customization/pl/catalog
share/apps/ksgmltools2/customization/pl/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/pl/entities/gpl-notice.docbook
@@ -1051,20 +1054,6 @@ share/apps/ksgmltools2/customization/pl/entities/update-doc.docbook
share/apps/ksgmltools2/customization/pl/lang.entities
share/apps/ksgmltools2/customization/pl/strings.entities
share/apps/ksgmltools2/customization/pl/user.entities
-share/apps/ksgmltools2/customization/pt/catalog
-share/apps/ksgmltools2/customization/pt/entities/fdl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/gpl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/lgpl-notice.docbook
-share/apps/ksgmltools2/customization/pt/entities/report-bugs.docbook
-share/apps/ksgmltools2/customization/pt/entities/underArtisticLicense.docbook
-share/apps/ksgmltools2/customization/pt/entities/underBSDLicense.docbook
-share/apps/ksgmltools2/customization/pt/entities/underFDL.docbook
-share/apps/ksgmltools2/customization/pt/entities/underGPL.docbook
-share/apps/ksgmltools2/customization/pt/entities/underX11License.docbook
-share/apps/ksgmltools2/customization/pt/entities/update-doc.docbook
-share/apps/ksgmltools2/customization/pt/lang.entities
-share/apps/ksgmltools2/customization/pt/strings.entities
-share/apps/ksgmltools2/customization/pt/user.entities
share/apps/ksgmltools2/customization/pt-BR/catalog
share/apps/ksgmltools2/customization/pt-BR/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/pt-BR/entities/gpl-notice.docbook
@@ -1079,6 +1068,20 @@ share/apps/ksgmltools2/customization/pt-BR/entities/update-doc.docbook
share/apps/ksgmltools2/customization/pt-BR/lang.entities
share/apps/ksgmltools2/customization/pt-BR/strings.entities
share/apps/ksgmltools2/customization/pt-BR/user.entities
+share/apps/ksgmltools2/customization/pt/catalog
+share/apps/ksgmltools2/customization/pt/entities/fdl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/gpl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/lgpl-notice.docbook
+share/apps/ksgmltools2/customization/pt/entities/report-bugs.docbook
+share/apps/ksgmltools2/customization/pt/entities/underArtisticLicense.docbook
+share/apps/ksgmltools2/customization/pt/entities/underBSDLicense.docbook
+share/apps/ksgmltools2/customization/pt/entities/underFDL.docbook
+share/apps/ksgmltools2/customization/pt/entities/underGPL.docbook
+share/apps/ksgmltools2/customization/pt/entities/underX11License.docbook
+share/apps/ksgmltools2/customization/pt/entities/update-doc.docbook
+share/apps/ksgmltools2/customization/pt/lang.entities
+share/apps/ksgmltools2/customization/pt/strings.entities
+share/apps/ksgmltools2/customization/pt/user.entities
share/apps/ksgmltools2/customization/ro/catalog
share/apps/ksgmltools2/customization/ro/entities/fdl-notice.docbook
share/apps/ksgmltools2/customization/ro/entities/gpl-notice.docbook
@@ -1295,6 +1298,7 @@ share/apps/ksgmltools2/docbook/xsl/common/subtitles.xsl
share/apps/ksgmltools2/docbook/xsl/common/sv.xml
share/apps/ksgmltools2/docbook/xsl/common/titles.xsl
share/apps/ksgmltools2/docbook/xsl/common/tr.xml
+share/apps/ksgmltools2/docbook/xsl/common/xh.xml
share/apps/ksgmltools2/docbook/xsl/common/zh_cn.xml
share/apps/ksgmltools2/docbook/xsl/common/zh_tw.xml
share/apps/ksgmltools2/docbook/xsl/html/ChangeLog
@@ -2585,6 +2589,7 @@ share/services/kaclplugin.desktop
share/services/kbzip2filter.desktop
share/services/kcookiejar.desktop
share/services/kded/kdeprintd.desktop
+share/services/kded/kssld.desktop
share/services/kgzipfilter.desktop
share/services/khtml.desktop
share/services/khtmlimage.desktop
@@ -2687,15 +2692,15 @@ share/servicetypes/kurifilterplugin.desktop
@dirrm share/apps/ksgmltools2/customization/ru
@dirrm share/apps/ksgmltools2/customization/ro/entities
@dirrm share/apps/ksgmltools2/customization/ro
+@dirrm share/apps/ksgmltools2/customization/pt/entities
@dirrm share/apps/ksgmltools2/customization/pt-BR/entities
@dirrm share/apps/ksgmltools2/customization/pt-BR
-@dirrm share/apps/ksgmltools2/customization/pt/entities
@dirrm share/apps/ksgmltools2/customization/pt
@dirrm share/apps/ksgmltools2/customization/pl/entities
@dirrm share/apps/ksgmltools2/customization/pl
+@dirrm share/apps/ksgmltools2/customization/no/entities
@dirrm share/apps/ksgmltools2/customization/no-NY/entities
@dirrm share/apps/ksgmltools2/customization/no-NY
-@dirrm share/apps/ksgmltools2/customization/no/entities
@dirrm share/apps/ksgmltools2/customization/no
@dirrm share/apps/ksgmltools2/customization/nl/entities
@dirrm share/apps/ksgmltools2/customization/nl