diff options
author | joerg <joerg@pkgsrc.org> | 2006-05-09 12:48:12 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-05-09 12:48:12 +0000 |
commit | 3296ca0265888508ae79967464ff90d5cb310f3b (patch) | |
tree | 194e8c06b47aaad2045ff9e0be969344b4efc523 /misc/kdeutils3 | |
parent | 464d94199b122187ec671427cbc5fb95334f212d (diff) | |
download | pkgsrc-3296ca0265888508ae79967464ff90d5cb310f3b.tar.gz |
Fix build on DragonFly.
Diffstat (limited to 'misc/kdeutils3')
-rw-r--r-- | misc/kdeutils3/distinfo | 4 | ||||
-rw-r--r-- | misc/kdeutils3/patches/patch-af | 28 | ||||
-rw-r--r-- | misc/kdeutils3/patches/patch-ag | 109 |
3 files changed, 140 insertions, 1 deletions
diff --git a/misc/kdeutils3/distinfo b/misc/kdeutils3/distinfo index e3da9218b80..89872cadcc6 100644 --- a/misc/kdeutils3/distinfo +++ b/misc/kdeutils3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.40 2006/03/30 02:50:18 markd Exp $ +$NetBSD: distinfo,v 1.41 2006/05/09 12:48:12 joerg Exp $ SHA1 (kdeutils-3.5.2.tar.bz2) = b0612bdeadc2af4a05ff5bc223206a38bd2d2e44 RMD160 (kdeutils-3.5.2.tar.bz2) = f561b714f401056ce771dfa5d04b5436e9865627 @@ -8,6 +8,8 @@ SHA1 (patch-ab) = c85392afdb34c52d309940d7a485d4d2b7b6faaf SHA1 (patch-ac) = 9b31039b0e3cc05dc4fb288ee8f66ebf3e440f6e SHA1 (patch-ad) = 3504496bf4b0957e74ae999f16bc03ed3499371d SHA1 (patch-ae) = 7e46d3a6f2b148b7e85314ed998689fb59b98561 +SHA1 (patch-af) = b327fc5bdf735d38fd6e6771a9fcc301b3685e0b +SHA1 (patch-ag) = 1ffc79e4fe9ce4af5400e4608e1930011da0d640 SHA1 (patch-an) = e13957a9fa0d23aebbe149ecaca7b9dacde5c9fb SHA1 (patch-ao) = 0ffece64199b090608feb5457fbdfce576691999 SHA1 (patch-ap) = 7f8a89156f6d419ca708bf5e55a57d30e5f94756 diff --git a/misc/kdeutils3/patches/patch-af b/misc/kdeutils3/patches/patch-af new file mode 100644 index 00000000000..481bb275f99 --- /dev/null +++ b/misc/kdeutils3/patches/patch-af @@ -0,0 +1,28 @@ +$NetBSD: patch-af,v 1.8 2006/05/09 12:48:13 joerg Exp $ + +--- superkaramba/src/memsensor.h.orig 2006-05-09 10:22:30.000000000 +0000 ++++ superkaramba/src/memsensor.h +@@ -44,18 +44,17 @@ public: + private: + QString meminfo; + void readValues(); +-#if defined __FreeBSD__ || defined(Q_OS_NETBSD) ++#if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) + int pageshift; /* log base 2 of the pagesize */ + QString sensorResult; + int swapTotal; + int swapUsed; +-# if (defined(__FreeBSD__) && __FreeBSD_version < 500018) +- KShellProcess ksp; +- bool MaxSet; +- +-# elif defined __FreeBSD__ ++# if defined(Q_OS_FREEBSD) && defined(__FreeBSD_version) && __FreeBSD_version >= 500018 + kvm_t *kd; + kvm_swap swapinfo; ++# elif defined(Q_OS_FREEBSD) ++ KShellProcess ksp; ++ bool MaxSet; + # endif + #endif + diff --git a/misc/kdeutils3/patches/patch-ag b/misc/kdeutils3/patches/patch-ag new file mode 100644 index 00000000000..717cb4a7d89 --- /dev/null +++ b/misc/kdeutils3/patches/patch-ag @@ -0,0 +1,109 @@ +$NetBSD: patch-ag,v 1.3 2006/05/09 12:48:13 joerg Exp $ + +--- superkaramba/src/memsensor.cpp.orig 2006-05-09 10:25:07.000000000 +0000 ++++ superkaramba/src/memsensor.cpp +@@ -32,6 +32,8 @@ + #include <sys/swap.h> + #endif + ++#include <kprocio.h> ++ + #if defined Q_OS_FREEBSD || defined(Q_OS_NETBSD) + /* define pagetok in terms of pageshift */ + #define pagetok(size) ((size) << pageshift) +@@ -51,7 +53,9 @@ MemSensor::MemSensor(int msec) : Sensor( + + /* we only need the amount of log(2)1024 for our conversion */ + pageshift -= 10; +-# if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) ++# if defined(Q_OS_FREEBSD) && defined(__FreeBSD_version) && __FreeBSD_version >= 500018 ++ kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open"); ++# elif defined Q_OS_FREEBSD + connect(&ksp, SIGNAL(receivedStdout(KProcess *, char *, int )), + this,SLOT(receivedStdout(KProcess *, char *, int ))); + connect(&ksp, SIGNAL(processExited(KProcess *)), +@@ -62,8 +66,6 @@ MemSensor::MemSensor(int msec) : Sensor( + MaxSet = false; + + readValues(); +-# elif defined Q_OS_FREEBSD +- kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open"); + # endif + #else + readValues(); +@@ -180,9 +182,7 @@ int MemSensor::getCached() + int MemSensor::getSwapTotal() + { + #ifdef Q_OS_FREEBSD +-# if __FreeBSD_version < 500018 +- return(swapTotal); +-# else ++# if defined(__FreeBSD_version) && __FreeBSD_version >= 500018 + int n = -1; + int pagesize = getpagesize(); + int retavail = 0; +@@ -196,6 +196,8 @@ int MemSensor::getSwapTotal() + retavail = swapinfo.ksw_total * pagesize / 1024; + + return(retavail); ++#else ++ return(swapTotal); + # endif + #elif defined(Q_OS_NETBSD) + struct uvmexp_sysctl uvmexp; +@@ -222,9 +224,7 @@ int MemSensor::getSwapTotal() + int MemSensor::getSwapFree() + { + #ifdef Q_OS_FREEBSD +-# if __FreeBSD_version < 500018 +- return(swapTotal - swapUsed); +-# else ++# if defined(__FreeBSD_version) && __FreeBSD_version >= 500018 + int n = -1; + int pagesize = getpagesize(); + int retfree = 0; +@@ -237,6 +237,8 @@ int MemSensor::getSwapFree() + retfree = (swapinfo.ksw_total - swapinfo.ksw_used) * pagesize / 1024; + + return(retfree); ++# else ++ return(swapTotal - swapUsed); + # endif + #elif defined(Q_OS_NETBSD) + struct uvmexp_sysctl uvmexp; +@@ -267,7 +269,7 @@ int MemSensor::getSwapFree() + void MemSensor::readValues() + { + #if defined Q_OS_FREEBSD || defined(Q_OS_NETBSD) +-# if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) ++# if defined(Q_OS_FREEBSD) && !(defined(__FreeBSD_version) && __FreeBSD_version >= 500018) + ksp.clearArguments(); + ksp << "swapinfo"; + ksp.start( KProcess::NotifyOnExit,KProcIO::Stdout); +@@ -291,7 +293,7 @@ void MemSensor::update() + SensorParams *sp; + Meter *meter; + QObjectListIt it( *objList ); +-#if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) ++#if defined(Q_OS_FREEBSD) && !(defined(__FreeBSD_version) && __FreeBSD_version >= 500018) + bool set = false; + #endif + int totalMem = getMemTotal(); +@@ -303,7 +305,7 @@ void MemSensor::update() + while (it != 0) + { + sp = (SensorParams*)(*it); +-#if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) ++#if defined(Q_OS_FREEBSD) && !(defined(__FreeBSD_version) && __FreeBSD_version >= 500018) + if ( (!MaxSet) && (totalSwap > 0) ) { + setMaxValue(sp); + bool set = true; +@@ -331,7 +333,7 @@ void MemSensor::update() + meter->setValue(format); + ++it; + } +-#if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) ++#if defined(Q_OS_FREEBSD) && !(defined(__FreeBSD_version) && __FreeBSD_version >= 500018) + if (set) + MaxSet = true; + #endif |