summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Noberasco <s4t4n@gentoo.org>2004-08-28 21:29:27 +0000
committerMichele Noberasco <s4t4n@gentoo.org>2004-08-28 21:29:27 +0000
commit9d95aa3992c62796c801756faa27dd293f1bdd60 (patch)
treec1e628b81f99125c0cc710fd62b86e6787a34556 /x11-plugins
parentVersion bump. (Manifest recommit) (diff)
downloadgentoo-2-9d95aa3992c62796c801756faa27dd293f1bdd60.tar.gz
gentoo-2-9d95aa3992c62796c801756faa27dd293f1bdd60.tar.bz2
gentoo-2-9d95aa3992c62796c801756faa27dd293f1bdd60.zip
Revision bump for x11-plugins/wmmemfree-0.7, adding proper 2.6 kernel support...
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/wmmemfree/ChangeLog7
-rw-r--r--x11-plugins/wmmemfree/Manifest3
-rw-r--r--x11-plugins/wmmemfree/files/digest-wmmemfree-0.7-r11
-rw-r--r--x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch83
-rw-r--r--x11-plugins/wmmemfree/wmmemfree-0.7-r1.ebuild37
5 files changed, 130 insertions, 1 deletions
diff --git a/x11-plugins/wmmemfree/ChangeLog b/x11-plugins/wmmemfree/ChangeLog
index d0b60b9afd2f..63ba976ee1bb 100644
--- a/x11-plugins/wmmemfree/ChangeLog
+++ b/x11-plugins/wmmemfree/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for x11-plugins/wmmemfree
# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmemfree/ChangeLog,v 1.2 2004/07/04 11:32:05 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmemfree/ChangeLog,v 1.3 2004/08/28 21:29:27 s4t4n Exp $
+
+*wmmemfree-0.7-1 (28 Aug 2004)
+
+ 28 Aug 2004; Michele Noberasco <s4t4n@gentoo.org> wmmemfree-0.7-1.ebuild:
+ New revision with 2.6 kernel support...
04 Jul 2004; David Holm <dholm@gentoo.org> wmmemfree-0.7.ebuild:
Added to ~ppc.
diff --git a/x11-plugins/wmmemfree/Manifest b/x11-plugins/wmmemfree/Manifest
index cf2642791bd6..89a391c90979 100644
--- a/x11-plugins/wmmemfree/Manifest
+++ b/x11-plugins/wmmemfree/Manifest
@@ -1,4 +1,7 @@
+MD5 f77935319ad409d59793b51fe6ed11da wmmemfree-0.7-r1.ebuild 710
MD5 b11286e26de7cd1fbd33a0b5c5767a79 ChangeLog 422
MD5 62ba71d3b2fa785a4cbd5d47fdbd0eb6 metadata.xml 165
MD5 81df8ba4d99520b220dbd6031dfd9778 wmmemfree-0.7.ebuild 676
MD5 549f2f0157314bd869f2a99bf0cb24f6 files/digest-wmmemfree-0.7 65
+MD5 549f2f0157314bd869f2a99bf0cb24f6 files/digest-wmmemfree-0.7-r1 65
+MD5 c06730f486985901cfe649e2236115dd files/wmmemfree-0.7-add-kernel-26-support.patch 2480
diff --git a/x11-plugins/wmmemfree/files/digest-wmmemfree-0.7-r1 b/x11-plugins/wmmemfree/files/digest-wmmemfree-0.7-r1
new file mode 100644
index 000000000000..2a9b61458dd8
--- /dev/null
+++ b/x11-plugins/wmmemfree/files/digest-wmmemfree-0.7-r1
@@ -0,0 +1 @@
+MD5 6b478209d907dd2955828e71319af757 wmmemfree-0.7.tar.bz2 14287
diff --git a/x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch b/x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch
new file mode 100644
index 000000000000..c4545d0654c6
--- /dev/null
+++ b/x11-plugins/wmmemfree/files/wmmemfree-0.7-add-kernel-26-support.patch
@@ -0,0 +1,83 @@
+diff -Naur wmmemfree-0.7/mem_linux.c wmmemfree-0.7.new/mem_linux.c
+--- wmmemfree-0.7/mem_linux.c 2003-03-17 14:23:05.000000000 +0100
++++ wmmemfree-0.7/mem_linux.c 2004-08-28 23:18:56.783772744 +0200
+@@ -20,24 +20,48 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
++
++long int mem_total, mem_used, mem_free, mem_buffers, mem_cached;
++long int swp_total, swp_used, swp_free;
+
+-long long int mem_total, mem_used, mem_free, mem_shared, mem_buffers, mem_cached;
+-long long int swp_total, swp_used, swp_free;
+
+ void mem_getfree()
+ {
+- FILE *file;
++ FILE *memfp;
++
++ static char buf[1024];
++ static char *p_mem_tot=NULL, *p_mem_free, *p_mem_buffers, *p_mem_cache;
++ static char *p_swap_total, *p_swap_free;
++
++ memfp = fopen("/proc/meminfo", "r");
++ if (!memfp)
++ {
++ perror("/proc/meminfo");
++ exit(1);
++ }
++
++ fread_unlocked (buf, 1024, 1, memfp);
++ fclose(memfp);
++
++ if (!p_mem_tot)
++ {
++ p_mem_tot = strstr(buf, "MemTotal:" ) + 13;
++ p_mem_free = strstr(buf, "MemFree:" ) + 13;
++ p_mem_buffers = strstr(buf, "Buffers:" ) + 13;
++ p_mem_cache = strstr(buf, "Cached:" ) + 13;
++ p_swap_total = strstr(buf, "SwapTotal:") + 13;
++ p_swap_free = strstr(buf, "SwapFree:" ) + 13;
++ }
++
++ sscanf(p_mem_tot, "%ld", &mem_total );
++ sscanf(p_mem_free, "%ld", &mem_free );
++ sscanf(p_mem_buffers, "%ld", &mem_buffers);
++ sscanf(p_mem_cache, "%ld", &mem_cached );
++ sscanf(p_swap_total, "%ld", &swp_total );
++ sscanf(p_swap_free, "%ld", &swp_free );
++
++ mem_used = mem_total - mem_free;
++ swp_used = swp_total - swp_free;
+
+- file = fopen("/proc/meminfo", "r");
+- if(!file)
+- {
+- perror("/proc/meminfo");
+- exit(1);
+- }
+- while(fgetc(file)!='\n'){}
+- fscanf(file, "%*s %Ld %Ld %Ld %Ld %Ld %Ld",
+- &mem_total, &mem_used, &mem_free, &mem_shared, &mem_buffers, &mem_cached);
+- fscanf(file, "%*s %Ld %Ld %Ld",
+- &swp_total, &swp_used, &swp_free);
+- fclose(file);
+ }
+diff -Naur wmmemfree-0.7/mem_linux.h wmmemfree-0.7.new/mem_linux.h
+--- wmmemfree-0.7/mem_linux.h 2003-03-22 19:51:35.000000000 +0100
++++ wmmemfree-0.7/mem_linux.h 2004-08-28 23:12:19.066235000 +0200
+@@ -21,9 +21,9 @@
+ #ifndef __MEM_LINUX_H__
+ #define __MEM_LINUX_H__
+
+-extern long long int mem_total, mem_used;
+-extern long long int mem_shared, mem_buffers, mem_cached;
+-extern long long int swp_total, swp_used;
++extern long int mem_total, mem_used;
++extern long int mem_buffers, mem_cached;
++extern long int swp_total, swp_used;
+
+ void mem_getfree();
+
diff --git a/x11-plugins/wmmemfree/wmmemfree-0.7-r1.ebuild b/x11-plugins/wmmemfree/wmmemfree-0.7-r1.ebuild
new file mode 100644
index 000000000000..bf06fa52b66a
--- /dev/null
+++ b/x11-plugins/wmmemfree/wmmemfree-0.7-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmemfree/wmmemfree-0.7-r1.ebuild,v 1.1 2004/08/28 21:29:27 s4t4n Exp $
+
+inherit eutils
+
+IUSE=""
+DESCRIPTION="A blue WMaker DockApp to see memory usage."
+HOMEPAGE="http://misuceldestept.go.ro/wmmemfree/"
+SRC_URI="ftp://ftp.ibiblio.org/pub/linux/X11/xutils/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+
+DEPEND="virtual/x11"
+
+src_unpack()
+{
+ unpack ${A}
+ cd ${S}
+
+ # Patch to support both 2.4 and 2.6 kernels
+ epatch ${FILESDIR}/${P}-add-kernel-26-support.patch
+}
+
+src_compile()
+{
+ FLAGS=${CFLAGS} make -e || die "Compilation failed"
+}
+
+src_install()
+{
+ dobin wmmemfree
+ doman wmmemfree.1
+ dodoc ChangeLog TODO WMS COPYING INSTALL README THANKS
+}