diff options
author | Michele Noberasco <s4t4n@gentoo.org> | 2005-05-11 07:45:03 +0000 |
---|---|---|
committer | Michele Noberasco <s4t4n@gentoo.org> | 2005-05-11 07:45:03 +0000 |
commit | eabfa6ee85785b5d87fb478202476ab498c89405 (patch) | |
tree | 6df4dfa78b87c3a774f2377e38cf62004cabbf2b /x11-plugins | |
parent | 056 marked stable on x86 (diff) | |
download | historical-eabfa6ee85785b5d87fb478202476ab498c89405.tar.gz historical-eabfa6ee85785b5d87fb478202476ab498c89405.tar.bz2 historical-eabfa6ee85785b5d87fb478202476ab498c89405.zip |
Revision bump, with improved kernel2.6 support patch. Closes bug #89130.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'x11-plugins')
-rw-r--r-- | x11-plugins/wmmon/ChangeLog | 11 | ||||
-rw-r--r-- | x11-plugins/wmmon/Manifest | 9 | ||||
-rw-r--r-- | x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r3 (renamed from x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r1) | 0 | ||||
-rw-r--r-- | x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26-v2.patch | 207 | ||||
-rw-r--r-- | x11-plugins/wmmon/wmmon-1.0_beta2-r3.ebuild (renamed from x11-plugins/wmmon/wmmon-1.0_beta2-r1.ebuild) | 15 |
5 files changed, 231 insertions, 11 deletions
diff --git a/x11-plugins/wmmon/ChangeLog b/x11-plugins/wmmon/ChangeLog index 52b2d7d51847..083087228037 100644 --- a/x11-plugins/wmmon/ChangeLog +++ b/x11-plugins/wmmon/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-plugins/wmmon # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmon/ChangeLog,v 1.15 2005/04/28 20:16:39 wormo Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmon/ChangeLog,v 1.16 2005/05/11 07:45:03 s4t4n Exp $ + +*wmmon-1.0_beta2-r3 (11 May 2005) + + 11 May 2005; Michele Noberasco <s4t4n@gentoo.org> + wmmon-1.0_beta2-r3.ebuild, files/wmmon-1.0_beta2-kernel26-v2.patch: + Replaced patch to make memory monitoring work with kernel 2.6 with + a new, improved, one, submitted by Ivan Heffner. Closes bug #89130. + wmmon-1.0_beta2-r1.ebuild: + Removed older ebuild. 28 Apr 2005; Stephanie Lockwood-Childs <wormo@gentoo.org> wmmon-1.0_beta2-r2.ebuild: diff --git a/x11-plugins/wmmon/Manifest b/x11-plugins/wmmon/Manifest index dfd6479de64b..e088a4467b3b 100644 --- a/x11-plugins/wmmon/Manifest +++ b/x11-plugins/wmmon/Manifest @@ -1,7 +1,8 @@ -MD5 61da5b5ee7bccfdffe27fb5aef336738 ChangeLog 2058 -MD5 62ba71d3b2fa785a4cbd5d47fdbd0eb6 metadata.xml 165 -MD5 4fe35a75e93852c496148b8c3123af70 wmmon-1.0_beta2-r1.ebuild 790 MD5 588040ddec444867ae5d4effaf38a84b wmmon-1.0_beta2-r2.ebuild 850 -MD5 98b814408937f2d47b59cfedac2640e1 files/digest-wmmon-1.0_beta2-r1 62 +MD5 0e8dba81119ab39b0ffad5a570553983 ChangeLog 2408 +MD5 62ba71d3b2fa785a4cbd5d47fdbd0eb6 metadata.xml 165 +MD5 e01560bd49910ab3d116be43ee49681c wmmon-1.0_beta2-r3.ebuild 856 +MD5 d434dabec24a1ef4e400c474adfb024c files/wmmon-1.0_beta2-kernel26-v2.patch 5675 MD5 98b814408937f2d47b59cfedac2640e1 files/digest-wmmon-1.0_beta2-r2 62 +MD5 98b814408937f2d47b59cfedac2640e1 files/digest-wmmon-1.0_beta2-r3 62 MD5 449f55da66d8174cae657ae52c58ebea files/wmmon-1.0_beta2-kernel26.patch 3333 diff --git a/x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r1 b/x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r3 index aa0d5acf08e0..aa0d5acf08e0 100644 --- a/x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r1 +++ b/x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r3 diff --git a/x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26-v2.patch b/x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26-v2.patch new file mode 100644 index 000000000000..38182bb2a907 --- /dev/null +++ b/x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26-v2.patch @@ -0,0 +1,207 @@ +*** wmmon.c Tue May 19 14:13:16 1998 +--- wmmon.c.patched Tue May 10 12:31:40 2005 +*************** +*** 101,107 **** + /********************/ + + char *ProgName; +! int stat_current = 0; /* now global */ + FILE *fp_meminfo; + FILE *fp_stat; + FILE *fp_loadavg; +--- 101,108 ---- + /********************/ + + char *ProgName; +! int stat_current = 0; /* now global */ +! int minus_buffers = 1; /* do we want to subtract buffers and cache from memory usage? */ + FILE *fp_meminfo; + FILE *fp_stat; + FILE *fp_loadavg; +*************** void main(int argc, char *argv[]) { +*** 146,151 **** +--- 147,155 ---- + case 's' : + stat_current = 2; + break; ++ case 'b' : ++ minus_buffers = 0; ++ break; + default: + usage(); + exit(0); +*************** void DrawActive(char *); +*** 188,194 **** + void update_stat_cpu(stat_dev *); + void update_stat_io(stat_dev *); + void update_stat_mem(stat_dev *st, stat_dev *st2); +- void update_stat_swp(stat_dev *); + + void wmmon_routine(int argc, char **argv) { + +--- 192,197 ---- +*************** void wmmon_routine(int argc, char **argv +*** 298,304 **** + + if(stat_current == 2) { + update_stat_mem(&stat_device[2], &stat_device[3]); +- // update_stat_swp(&stat_device[3]); + } + + if (stat_current < 2) { +--- 301,306 ---- +*************** void wmmon_routine(int argc, char **argv +*** 320,341 **** + copyXPMArea(0, 64, 32, 12, 28+64, 4); + copyXPMArea(0, 64, 32, 12, 28+64, 18); + +! j = stat_device[2].rt_idle; +! if (j != 0) { +! j = (stat_device[2].rt_stat * 100) / j; +! } +! j = j * 0.32; +! if (j > 32) j = 32; +! copyXPMArea(32, 64, j, 12, 28+64, 4); +! /*--------------------- ------------------*/ +! j = stat_device[3].rt_idle; +! if (j != 0) { +! j = (stat_device[3].rt_stat * 100) / j; + } +- j = j * 0.32; +- if (j > 32) j = 32; +- copyXPMArea(32, 64, j, 12, 28+64, 18); +- + /*----------- online tijd neerzetten! ----------*/ + + cnt_time = time(0) - ref_time + online_time; +--- 322,335 ---- + copyXPMArea(0, 64, 32, 12, 28+64, 4); + copyXPMArea(0, 64, 32, 12, 28+64, 18); + +! for (i = 2; i <= 3; i++) { +! j = stat_device[i].rt_stat != 0 +! ? 100 * ( stat_device[i].rt_stat - stat_device[i].rt_idle ) / stat_device[i].rt_stat +! : 0 ; +! j = j * 0.32; +! if (j > 32) j = 32; +! copyXPMArea(32, 64, j, 12, 28+64, 4+(14*(i-2)) ); + } + /*----------- online tijd neerzetten! ----------*/ + + cnt_time = time(0) - ref_time + online_time; +*************** void wmmon_routine(int argc, char **argv +*** 430,436 **** + } + case 1: + stat_current++; +- printf("current stat is :%d\n", stat_current); + if (stat_current == stat_online) + stat_current = 0; + +--- 424,429 ---- +*************** void update_stat_io(stat_dev *st) { +*** 499,541 **** + + void update_stat_mem(stat_dev *st, stat_dev *st2) { + +! char temp[128]; +! unsigned long free, shared, buffers, cached; + + freopen("/proc/meminfo", "r", fp_meminfo); + while (fgets(temp, 128, fp_meminfo)) { +! if (strstr(temp, "Mem:")) { +! sscanf(temp, "Mem: %ld %ld %ld %ld %ld %ld", +! &st->rt_idle, &st->rt_stat, +! &free, &shared, &buffers, &cached); +! st->rt_idle >>= 10; +! st->rt_stat -= buffers+cached; +! st->rt_stat >>= 10; +! // break; + } +! if (strstr(temp, "Swap:")) { +! sscanf(temp, "Swap: %ld %ld", &st2->rt_idle, &st2->rt_stat); +! st2->rt_idle >>= 10; +! st2->rt_stat >>= 10; +! break; + } +! } +! } +! +! void update_stat_swp(stat_dev *st) { +! +! char temp[128]; +! +! fseek(fp_meminfo, 0, SEEK_SET); +! while (fgets(temp, 128, fp_meminfo)) { +! if (strstr(temp, "Swap:")) { +! sscanf(temp, "Swap: %ld %ld", &st->rt_idle, &st->rt_stat); +! st->rt_idle >>= 10; +! st->rt_stat >>= 10; +! break; + } + } +- + } + + /*******************************************************************************\ +--- 492,523 ---- + + void update_stat_mem(stat_dev *st, stat_dev *st2) { + +! char temp[128], stat[20]; +! unsigned long amount; + + freopen("/proc/meminfo", "r", fp_meminfo); ++ st->rt_idle = 0; /* zero this out so we can +/- appropriately */ + while (fgets(temp, 128, fp_meminfo)) { +! sscanf(temp, "%s %ld", &stat, &amount); +! if (! strcmp(stat, "MemFree:") ) { +! st->rt_idle += (amount >> 10); + } +! else if (! strcmp(stat, "MemTotal:") ) { +! st->rt_stat = (amount >> 10); + } +! else if (! strcmp(stat, "Buffers:") && minus_buffers ) { +! st->rt_idle += (amount >> 10); +! } +! else if (! strcmp(stat, "Cached:") && minus_buffers ) { +! st->rt_idle += (amount >> 10); +! } +! else if (! strcmp(stat, "SwapFree:") ) { +! st2->rt_idle = (amount >> 10); +! } +! else if (! strcmp(stat, "SwapTotal:") ) { +! st2->rt_stat = (amount >> 10); + } + } + } + + /*******************************************************************************\ +*************** int checksysdevs(void) { +*** 599,605 **** + + strcpy(stat_device[0].name, "cpu0"); + strcpy(stat_device[1].name, "i/o"); +! strcpy(stat_device[2].name, "sys"); + + return 3; + } +--- 581,588 ---- + + strcpy(stat_device[0].name, "cpu0"); + strcpy(stat_device[1].name, "i/o"); +! strcpy(stat_device[2].name, "mem"); +! strcpy(stat_device[3].name, "swap"); + + return 3; + } +*************** void usage(void) { +*** 724,729 **** +--- 707,713 ---- + fprintf(stderr, "\t-v\tprint the version number\n"); + fprintf(stderr, "\t-i\tstartup in DiskIO mode\n"); + fprintf(stderr, "\t-s\tstartup in SysInfo mode\n"); ++ fprintf(stderr, "\t-b\tdo not subtract buffer and cache from memory usage\n"); + fprintf(stderr, "\n"); + } + diff --git a/x11-plugins/wmmon/wmmon-1.0_beta2-r1.ebuild b/x11-plugins/wmmon/wmmon-1.0_beta2-r3.ebuild index ea75d460adde..d57ded844d7c 100644 --- a/x11-plugins/wmmon/wmmon-1.0_beta2-r1.ebuild +++ b/x11-plugins/wmmon/wmmon-1.0_beta2-r3.ebuild @@ -1,12 +1,14 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmon/wmmon-1.0_beta2-r1.ebuild,v 1.14 2005/04/28 20:16:39 wormo Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmon/wmmon-1.0_beta2-r3.ebuild,v 1.1 2005/05/11 07:45:03 s4t4n Exp $ -S="${WORKDIR}/wmmon.app" +inherit eutils + +S="${WORKDIR}/${PN}.app" IUSE="" DESCRIPTION="Dockable system resources monitor applet for WindowMaker" WMMON_VERSION=1_0b2 -SRC_URI="http://rpig.dyndns.org/~anstinus/Linux/wmmon-${WMMON_VERSION}.tar.gz" +SRC_URI="http://rpig.dyndns.org/~anstinus/Linux/${PN}-${WMMON_VERSION}.tar.gz" HOMEPAGE="http://www.bensinclair.com/dockapp/" DEPEND="virtual/x11 @@ -14,15 +16,16 @@ DEPEND="virtual/x11 SLOT="0" LICENSE="GPL-2" -KEYWORDS="x86 sparc amd64" +KEYWORDS="~x86 ~sparc ~amd64 ~ppc" src_unpack() { - unpack ${A} ; cd ${S}/wmmon + unpack ${A} ; cd ${S}/${PN} + epatch ${FILESDIR}/${P}-kernel26-v2.patch sed -i -e "s|-O2|${CFLAGS}|" Makefile } src_compile() { - emake -C wmmon || die + emake -C ${PN} || die } src_install () { |