Fix dockapp neeeding a restart after a long time, patch by Mikael Magnusson <mikachu...
authorBernard Cafarelli <voyageur@gentoo.org>
Tue, 29 Jun 2010 09:53:56 +0000 (09:53 +0000)
committerBernard Cafarelli <voyageur@gentoo.org>
Tue, 29 Jun 2010 09:53:56 +0000 (09:53 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

x11-plugins/wmhdplop/ChangeLog
x11-plugins/wmhdplop/Manifest
x11-plugins/wmhdplop/files/wmhdplop-0.9.9-64bit.patch [new file with mode: 0644]
x11-plugins/wmhdplop/wmhdplop-0.9.9-r1.ebuild [new file with mode: 0644]

index f5434ce29070169464835cb84cc08411e1bf7595..8910a0eacfe1f67e34090d16651b84d23994a57b 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for x11-plugins/wmhdplop
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmhdplop/ChangeLog,v 1.16 2009/08/16 08:47:55 betelgeuse Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmhdplop/ChangeLog,v 1.17 2010/06/29 09:53:56 voyageur Exp $
+
+*wmhdplop-0.9.9-r1 (29 Jun 2010)
+
+  29 Jun 2010; Bernard Cafarelli <voyageur@gentoo.org>
+  +wmhdplop-0.9.9-r1.ebuild, +files/wmhdplop-0.9.9-64bit.patch:
+  Fix dockapp neeeding a restart after a long time, patch by Mikael
+  Magnusson <mikachu@gmail.com> in bug #325615
 
   16 Aug 2009; Petteri Räty <betelgeuse@gentoo.org> wmhdplop-0.9.9.ebuild:
   Migrate to EAPI 2 in order to get rid of built_with_use for bug #261562.
index 81264afb02762472336b47ece4394b5308cea033..d8aad7fadbe31a41570f928fa55401f87d517adf 100644 (file)
@@ -1,14 +1,6 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
+AUX wmhdplop-0.9.9-64bit.patch 3955 RMD160 90a12dc01ee21d67e19e857663edb69cd8961dff SHA1 d8c9eed0d9f9ed334db65a7f40826cbbae4a7509 SHA256 d9f4b259e06785728ee1e83740a5601f0c31faae10fdc71724565022fd008a35
 DIST wmhdplop-0.9.9.tar.gz 232684 RMD160 c983a8261087b4c6289a3b8104d4d3532f71e241 SHA1 234384d8628912634fd45e71851ba9f4ed1548a1 SHA256 68f27918a8da4af2389544441eeee3a6fda3a875cd55603a3e04abedc1726553
+EBUILD wmhdplop-0.9.9-r1.ebuild 1104 RMD160 8e094e1d7b84d513ceb8feb1a56ca9050f2bcb45 SHA1 475308e0eba03edbec5f39df11c8cd7a218c886d SHA256 3cff4afde20eb18fcc7865f8769f2e166c937f8f64a0ce78bc73149b9f269f6c
 EBUILD wmhdplop-0.9.9.ebuild 1063 RMD160 bdc83e51a916263993909d54b350b5000d1f3323 SHA1 092e913860ba32547366cc8975a50c58dc7c8783 SHA256 03d532dae2e4b3b29767c220becf64c1925b0ea1f5051df6b740f8c79277e0f6
-MISC ChangeLog 2442 RMD160 da3162c751b0ba6de20fe0259f4c576caaeaf6b0 SHA1 b6e570f7cc1a603eb4476a31e212fa63e1c954fa SHA256 296c92e91d01ab7fa69159037f9d47e654b033d6e353281247f11a4a6abef154
+MISC ChangeLog 2709 RMD160 99b75144a9180c608cd4c9c6eec6d5a0aa2e2978 SHA1 7c0ea8fecc3435a13cfea4969d9d07271af7ef0b SHA256 9cc820ba50fc1999c6c822bd48973f7978d70909053336296924ca365c7accbf
 MISC metadata.xml 264 RMD160 e15fe8b6bb7c533a82bdbf902ed3b20e8c001271 SHA1 1ac3c9520c0329026e81ab7f3e00ff95d584b877 SHA256 68f042d61abeb44f3a69ed9be88e43ec37aa60cca1afbb174491a73a32c2aea8
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
-
-iEYEARECAAYFAkqHx7UACgkQcxLzpIGCsLSQmgCbBdHmE0XC6pJrC614tzzP9r4N
-Tv0AoJfIXrCvAdVIn6ZEnNKTGApdNUxy
-=OESk
------END PGP SIGNATURE-----
diff --git a/x11-plugins/wmhdplop/files/wmhdplop-0.9.9-64bit.patch b/x11-plugins/wmhdplop/files/wmhdplop-0.9.9-64bit.patch
new file mode 100644 (file)
index 0000000..13650e9
--- /dev/null
@@ -0,0 +1,94 @@
+diff -pudr wmhdplop-0.9.9/devnames.h wmhdplop-0.9.9-fixed/devnames.h
+--- wmhdplop-0.9.9/devnames.h  2004-04-07 01:14:01.000000000 +0200
++++ wmhdplop-0.9.9-fixed/devnames.h    2010-06-25 21:56:10.662190796 +0200
+@@ -9,7 +9,7 @@ typedef struct DiskList {
+   unsigned major, minor;
+   int hd_id, part_id; /* part_id = 0 for disks */
+   int enable_hddtemp;
+-  int nr, nw, touched_r, touched_w;
++  long nr, nw, touched_r, touched_w;
+   struct DiskList *next;
+ } DiskList;
+ 
+diff -pudr wmhdplop-0.9.9/procstat.c wmhdplop-0.9.9-fixed/procstat.c
+--- wmhdplop-0.9.9/procstat.c  2007-04-20 11:12:16.000000000 +0200
++++ wmhdplop-0.9.9-fixed/procstat.c    2010-06-25 21:55:37.086191145 +0200
+@@ -8,7 +8,7 @@
+ static ProcStats ps;
+ int use_proc_diskstats;
+ 
+-void pstat_init(struct pstat *pst, int nslice, float update_interval) {
++void pstat_init(struct pstat *pst, long nslice, float update_interval) {
+   pst->nslice = nslice;
+   ALLOC_VEC(pst->slices, nslice);
+   pst->cur_slice = 0;
+@@ -17,7 +17,7 @@ void pstat_init(struct pstat *pst, int n
+ }
+ 
+ float pstat_current(struct pstat *pst) {
+-  int idx = pst->cur_slice ? pst->cur_slice-1 : pst->nslice-1;
++  long idx = pst->cur_slice ? pst->cur_slice-1 : pst->nslice-1;
+   return pst->slices[idx]/pst->update_interval;
+ }
+ 
+@@ -101,13 +101,13 @@ void update_stats() {
+             if (!Prefs.debug_disk_rd) {
+               pstat_add(&ps.disk_read, nr);
+             } else {
+-              static int cntr = 0; cntr+=(rand()%30) == 0 ? Prefs.debug_disk_rd : 0;
++              static long cntr = 0; cntr+=(rand()%30) == 0 ? Prefs.debug_disk_rd : 0;
+               pstat_add(&ps.disk_read, nr + cntr);
+             }
+             if (!Prefs.debug_disk_wr) {
+               pstat_add(&ps.disk_write, nw);
+             } else {
+-              static int cntw = 0; cntw+=(rand()%30) == 0 ? Prefs.debug_disk_wr : 0;
++              static long cntw = 0; cntw+=(rand()%30) == 0 ? Prefs.debug_disk_wr : 0;
+               pstat_add(&ps.disk_write, nw + cntw);
+             }
+             readok = 2;
+@@ -121,7 +121,7 @@ void update_stats() {
+               pstat_add(&ps.swap_in, nr);
+               pstat_add(&ps.swap_out, nw);
+             } else {
+-              static int cnt = 0; cnt+=Prefs.debug_swapio;
++              static long cnt = 0; cnt+=Prefs.debug_swapio;
+               pstat_add(&ps.swap_in, nr + cnt);
+               pstat_add(&ps.swap_out, nw + cnt);
+             }
+@@ -144,10 +144,10 @@ void init_stats(float update_interval) {
+   char s[512];
+   FILE *f;
+ 
+-  pstat_init(&ps.swap_in, (int)(0.5/update_interval)+1, update_interval);
+-  pstat_init(&ps.swap_out, (int)(0.5/update_interval)+1, update_interval);
+-  pstat_init(&ps.disk_read, (int)(0.5/update_interval)+1, update_interval);
+-  pstat_init(&ps.disk_write, (int)(0.5/update_interval)+1, update_interval);
++  pstat_init(&ps.swap_in, (long)(0.5/update_interval)+1, update_interval);
++  pstat_init(&ps.swap_out, (long)(0.5/update_interval)+1, update_interval);
++  pstat_init(&ps.disk_read, (long)(0.5/update_interval)+1, update_interval);
++  pstat_init(&ps.disk_write, (long)(0.5/update_interval)+1, update_interval);
+   f = fopen("/proc/swaps","r");
+   //if (!f) { perror("/proc/swaps"); exit(1); }
+   if (f) {
+diff -pudr wmhdplop-0.9.9/procstat.h wmhdplop-0.9.9-fixed/procstat.h
+--- wmhdplop-0.9.9/procstat.h  2004-03-14 12:07:15.000000000 +0100
++++ wmhdplop-0.9.9-fixed/procstat.h    2010-06-25 21:45:52.146334994 +0200
+@@ -4,7 +4,7 @@
+ 
+ struct pstat {
+   unsigned long total;
+-  int nslice, cur_slice;
++  long nslice, cur_slice;
+   unsigned long *slices;
+   float update_interval;
+ };
+@@ -15,7 +15,7 @@ typedef struct {
+   struct pstat disk_read, disk_write;
+ } ProcStats;
+ 
+-void pstat_init(struct pstat *pst, int nslice, float update_interval);
++void pstat_init(struct pstat *pst, long nslice, float update_interval);
+ float pstat_current(struct pstat *pst);
+ void pstat_add(struct pstat *pst, unsigned long v);
+ void pstat_advance(struct pstat *pst);
diff --git a/x11-plugins/wmhdplop/wmhdplop-0.9.9-r1.ebuild b/x11-plugins/wmhdplop/wmhdplop-0.9.9-r1.ebuild
new file mode 100644 (file)
index 0000000..a999dce
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmhdplop/wmhdplop-0.9.9-r1.ebuild,v 1.1 2010/06/29 09:53:56 voyageur Exp $
+
+EAPI="2"
+
+inherit eutils multilib
+
+DESCRIPTION="a dockapp for monitoring disk activities with fancy visuals."
+HOMEPAGE="http://hules.free.fr/wmhdplop"
+SRC_URI="http://hules.free.fr/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gkrellm"
+
+RDEPEND="media-libs/imlib2[X]
+       x11-libs/libX11
+       x11-libs/libXext
+       media-fonts/corefonts
+       >=media-libs/freetype-2"
+DEPEND="${RDEPEND}
+       x11-proto/xextproto
+       gkrellm? ( dev-util/pkgconfig
+               >=app-admin/gkrellm-2 )"
+
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-64bit.patch
+       sed -i -e "s:-O3 -fomit-frame-pointer -ffast-math:${CFLAGS}:" "${S}"/configure
+}
+
+src_configure() {
+       econf $(use_enable gkrellm)
+}
+
+src_install() {
+       emake DESTDIR="${D}" install || die "emake install failed."
+       dodoc AUTHORS ChangeLog NEWS README || die
+
+       insinto /usr/$(get_libdir)/gkrellm2/plugins
+       use gkrellm && doins gkhdplop.so
+}