diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2005-12-09 14:03:41 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2005-12-09 14:03:41 +0000 |
commit | 255de6b4efef4fa181f7d6c18a2d0ce737ad05c2 (patch) | |
tree | 74a267e8ab92957429b44e4c3e4d12a0bde28a32 /kde-base/kdeutils | |
parent | Add patch to make superkaramba calculate memory correctly on FreeBSD. (diff) | |
download | gentoo-2-255de6b4efef4fa181f7d6c18a2d0ce737ad05c2.tar.gz gentoo-2-255de6b4efef4fa181f7d6c18a2d0ce737ad05c2.tar.bz2 gentoo-2-255de6b4efef4fa181f7d6c18a2d0ce737ad05c2.zip |
Add patch to make superkaramba calculate memory correctly on FreeBSD.
(Portage version: 2.0.53)
Diffstat (limited to 'kde-base/kdeutils')
-rw-r--r-- | kde-base/kdeutils/ChangeLog | 6 | ||||
-rw-r--r-- | kde-base/kdeutils/files/superkaramba-3.5.0-fbsd.patch | 158 | ||||
-rw-r--r-- | kde-base/kdeutils/kdeutils-3.5.0.ebuild | 5 |
3 files changed, 167 insertions, 2 deletions
diff --git a/kde-base/kdeutils/ChangeLog b/kde-base/kdeutils/ChangeLog index 5df2c8808032..fb69ae3d5feb 100644 --- a/kde-base/kdeutils/ChangeLog +++ b/kde-base/kdeutils/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for kde-base/kdeutils # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeutils/ChangeLog,v 1.142 2005/12/06 05:58:22 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeutils/ChangeLog,v 1.143 2005/12/09 14:03:41 flameeyes Exp $ + + 09 Dec 2005; Diego Pettenò <flameeyes@gentoo.org> + +files/superkaramba-3.5.0-fbsd.patch, kdeutils-3.5.0.ebuild: + Add patch to make superkaramba calculate memory correctly on FreeBSD. 06 Dec 2005; Joseph Jezak <josejx@gentoo.org> kdeutils-3.4.3-r1.ebuild: Marked ppc stable for bug #112842. diff --git a/kde-base/kdeutils/files/superkaramba-3.5.0-fbsd.patch b/kde-base/kdeutils/files/superkaramba-3.5.0-fbsd.patch new file mode 100644 index 000000000000..4528b7fa6fe7 --- /dev/null +++ b/kde-base/kdeutils/files/superkaramba-3.5.0-fbsd.patch @@ -0,0 +1,158 @@ +Index: superkaramba/src/memsensor.cpp +=================================================================== +--- superkaramba/src/memsensor.cpp (revision 487000) ++++ superkaramba/src/memsensor.cpp (revision 487001) +@@ -14,7 +14,7 @@ + #include <qstring.h> + #include <qregexp.h> + +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + #include <sys/time.h> + #include <sys/param.h> + #include <sys/sysctl.h> +@@ -32,14 +32,14 @@ + #include <sys/swap.h> + #endif + +-#if defined __FreeBSD__ || defined(Q_OS_NETBSD) ++#if defined Q_OS_FREEBSD || defined(Q_OS_NETBSD) + /* define pagetok in terms of pageshift */ + #define pagetok(size) ((size) << pageshift) + #endif + + MemSensor::MemSensor(int msec) : Sensor(msec) + { +-#if defined __FreeBSD__ || defined(Q_OS_NETBSD) ++#if defined Q_OS_FREEBSD || defined(Q_OS_NETBSD) + /* get the page size with "getpagesize" and calculate pageshift from it */ + int pagesize = getpagesize(); + pageshift = 0; +@@ -51,7 +51,7 @@ + + /* we only need the amount of log(2)1024 for our conversion */ + pageshift -= 10; +-# if (defined(__FreeBSD__) && __FreeBSD_version < 500018) ++# if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) + connect(&ksp, SIGNAL(receivedStdout(KProcess *, char *, int )), + this,SLOT(receivedStdout(KProcess *, char *, int ))); + connect(&ksp, SIGNAL(processExited(KProcess *)), +@@ -62,7 +62,7 @@ + MaxSet = false; + + readValues(); +-# elif defined __FreeBSD__ ++# elif defined Q_OS_FREEBSD + kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open"); + # endif + #else +@@ -73,7 +73,7 @@ + MemSensor::~MemSensor() + {} + +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + void MemSensor::receivedStdout(KProcess *, char *buffer, int len ) + { + buffer[len] = 0; +@@ -87,7 +87,7 @@ + + void MemSensor::processExited(KProcess *) + { +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + QStringList stringList = QStringList::split('\n',sensorResult); + sensorResult = ""; + QStringList itemsList = QStringList::split(' ', stringList[1]); +@@ -99,7 +99,7 @@ + + int MemSensor::getMemTotal() + { +-#if defined __FreeBSD || defined(Q_OS_NETBSD) ++#if defined Q_OS_FREEBSD || defined(Q_OS_NETBSD) + static int mem = 0; + size_t size = sizeof(mem); + +@@ -114,7 +114,7 @@ + + int MemSensor::getMemFree() + { +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + static int mem = 0; + size_t size = sizeof(mem); + +@@ -138,7 +138,7 @@ + + int MemSensor::getBuffers() + { +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + static int mem = 0; + size_t size = sizeof(mem); + +@@ -159,7 +159,7 @@ + + int MemSensor::getCached() + { +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + static int mem = 0; + size_t size = sizeof(mem); + +@@ -179,7 +179,7 @@ + + int MemSensor::getSwapTotal() + { +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + # if __FreeBSD_version < 500018 + return(swapTotal); + # else +@@ -221,7 +221,7 @@ + + int MemSensor::getSwapFree() + { +-#ifdef __FreeBSD__ ++#ifdef Q_OS_FREEBSD + # if __FreeBSD_version < 500018 + return(swapTotal - swapUsed); + # else +@@ -266,8 +266,8 @@ + + void MemSensor::readValues() + { +-#if defined __FreeBSD__ || defined(Q_OS_NETBSD) +-# if (defined(__FreeBSD__) && __FreeBSD_version < 500018) ++#if defined Q_OS_FREEBSD || defined(Q_OS_NETBSD) ++# if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) + ksp.clearArguments(); + ksp << "swapinfo"; + ksp.start( KProcess::NotifyOnExit,KProcIO::Stdout); +@@ -291,7 +291,7 @@ + SensorParams *sp; + Meter *meter; + QObjectListIt it( *objList ); +-#if (defined(__FreeBSD__) && __FreeBSD_version < 500018) ++#if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) + bool set = false; + #endif + int totalMem = getMemTotal(); +@@ -303,7 +303,7 @@ + while (it != 0) + { + sp = (SensorParams*)(*it); +-#if (defined(__FreeBSD__) && __FreeBSD_version < 500018) ++#if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) + if ( (!MaxSet) && (totalSwap > 0) ) { + setMaxValue(sp); + bool set = true; +@@ -331,7 +331,7 @@ + meter->setValue(format); + ++it; + } +-#if (defined(__FreeBSD__) && __FreeBSD_version < 500018) ++#if (defined(Q_OS_FREEBSD) && __FreeBSD_version < 500018) + if (set) + MaxSet = true; + #endif diff --git a/kde-base/kdeutils/kdeutils-3.5.0.ebuild b/kde-base/kdeutils/kdeutils-3.5.0.ebuild index 88ba59dfe783..74aa74ec5dc8 100644 --- a/kde-base/kdeutils/kdeutils-3.5.0.ebuild +++ b/kde-base/kdeutils/kdeutils-3.5.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeutils/kdeutils-3.5.0.ebuild,v 1.1 2005/11/22 22:14:05 danarmak Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdeutils/kdeutils-3.5.0.ebuild,v 1.2 2005/12/09 14:03:41 flameeyes Exp $ inherit kde-dist eutils @@ -25,6 +25,9 @@ src_unpack() { # Fix output of klaptopdaemon (kde bug 103437). epatch "${FILESDIR}/kdeutils-3.4.3-klaptopdaemon.patch" + + # Fix memory calculations for FreeBSD systems + epatch "${FILESDIR}/superkaramba-3.5.0-fbsd.patch" } src_compile() { |