summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2011-08-19 11:47:29 +0000
committerNirbheek Chauhan <nirbheek@gentoo.org>2011-08-19 11:47:29 +0000
commitb981316d1aad05253fe9e82be7e064144c03832f (patch)
tree3bac2f42c6b43fa2bd56c6bf261aa4abcec64dda /gnome-extra
parentFix HOMEPAGE wrt #379353 by Jesús Guerrero <i92guboj@gentoo.org> (diff)
downloadgentoo-2-b981316d1aad05253fe9e82be7e064144c03832f.tar.gz
gentoo-2-b981316d1aad05253fe9e82be7e064144c03832f.tar.bz2
gentoo-2-b981316d1aad05253fe9e82be7e064144c03832f.zip
Bump to 3.0.1, from gnome overlay for GNOME 3
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra')
-rw-r--r--gnome-extra/gnome-system-monitor/ChangeLog12
-rw-r--r--gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-1.patch68
-rw-r--r--gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-2.patch150
-rw-r--r--gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-3.patch102
-rw-r--r--gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-linux-nice.patch21
-rw-r--r--gnome-extra/gnome-system-monitor/gnome-system-monitor-3.0.1-r1.ebuild49
6 files changed, 401 insertions, 1 deletions
diff --git a/gnome-extra/gnome-system-monitor/ChangeLog b/gnome-extra/gnome-system-monitor/ChangeLog
index 811c59b890a9..142b811f5e2b 100644
--- a/gnome-extra/gnome-system-monitor/ChangeLog
+++ b/gnome-extra/gnome-system-monitor/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for gnome-extra/gnome-system-monitor
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-system-monitor/ChangeLog,v 1.222 2011/08/13 17:37:36 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-system-monitor/ChangeLog,v 1.223 2011/08/19 11:47:29 nirbheek Exp $
+
+*gnome-system-monitor-3.0.1-r1 (19 Aug 2011)
+
+ 19 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org>
+ +gnome-system-monitor-3.0.1-r1.ebuild,
+ +files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-1.patch,
+ +files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-2.patch,
+ +files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-3.patch,
+ +files/gnome-system-monitor-3.0.1-linux-nice.patch:
+ Bump to 3.0.1, from gnome overlay for GNOME 3
13 Aug 2011; Raúl Porcel <armin76@gentoo.org>
gnome-system-monitor-2.28.2-r1.ebuild:
diff --git a/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-1.patch b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-1.patch
new file mode 100644
index 000000000000..156845f1295e
--- /dev/null
+++ b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-1.patch
@@ -0,0 +1,68 @@
+From 3ea7303181e80e188e72a4fcd98b9970fe554b3b Mon Sep 17 00:00:00 2001
+From: Chris Kühl <chrisk@openismus.com>
+Date: Sat, 16 Apr 2011 23:07:20 +0000
+Subject: Added SI prefix tera to network counter
+
+https://bugzilla.gnome.org/show_bug.cgi?id=639212
+---
+diff --git a/src/util.cpp b/src/util.cpp
+index 90073fe..234e6fc 100644
+--- a/src/util.cpp
++++ b/src/util.cpp
+@@ -149,10 +149,12 @@ procman_make_label_for_mmaps_or_ofiles(const char *format,
+ gchar*
+ procman::format_size(guint64 size, guint64 max_size, bool want_bits)
+ {
++
+ enum {
+ K_INDEX,
+ M_INDEX,
+- G_INDEX
++ G_INDEX,
++ T_INDEX
+ };
+
+ struct Format {
+@@ -160,16 +162,18 @@ procman::format_size(guint64 size, guint64 max_size, bool want_bits)
+ const char* string;
+ };
+
+- const Format all_formats[2][3] = {
+- { { 1UL << 10, N_("%.1f KiB") },
+- { 1UL << 20, N_("%.1f MiB") },
+- { 1UL << 30, N_("%.1f GiB") } },
+- { { 1000, N_("%.1f kbit") },
+- { 1000000, N_("%.1f Mbit") },
+- { 1000000000, N_("%.1f Gbit") } }
++ const Format all_formats[2][4] = {
++ { { 1UL << 10, N_("%.1f KiB") },
++ { 1UL << 20, N_("%.1f MiB") },
++ { 1UL << 30, N_("%.1f GiB") },
++ { 1UL << 40, N_("%.1f TiB") } },
++ { { 1000, N_("%.1f kbit") },
++ { 1000000, N_("%.1f Mbit") },
++ { 1000000000, N_("%.1f Gbit") },
++ { 1000000000000, N_("%.1f Tbit") } }
+ };
+
+- const Format (&formats)[3] = all_formats[want_bits ? 1 : 0];
++ const Format (&formats)[4] = all_formats[want_bits ? 1 : 0];
+
+ if (want_bits) {
+ size *= 8;
+@@ -194,9 +198,12 @@ procman::format_size(guint64 size, guint64 max_size, bool want_bits)
+ } else if (max_size < formats[G_INDEX].factor) {
+ factor = formats[M_INDEX].factor;
+ format = formats[M_INDEX].string;
+- } else {
++ } else if (max_size < formats[T_INDEX].factor) {
+ factor = formats[G_INDEX].factor;
+ format = formats[G_INDEX].string;
++ } else {
++ factor = formats[T_INDEX].factor;
++ format = formats[T_INDEX].string;
+ }
+
+ return g_strdup_printf(_(format), size / (double)factor);
+--
+cgit v0.9
diff --git a/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-2.patch b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-2.patch
new file mode 100644
index 000000000000..4fdc57ac076d
--- /dev/null
+++ b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-2.patch
@@ -0,0 +1,150 @@
+From c7275791a89623ad1edc820a6ef16faae37a18aa Mon Sep 17 00:00:00 2001
+From: Chris Kühl <chrisk@openismus.com>
+Date: Sun, 17 Apr 2011 22:31:00 +0000
+Subject: Fix network totals overflow on 32-bit machines.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=639212
+---
+diff --git a/src/load-graph.cpp b/src/load-graph.cpp
+index 57bca17..a6d2a7e 100644
+--- a/src/load-graph.cpp
++++ b/src/load-graph.cpp
+@@ -368,16 +368,16 @@ get_memory (LoadGraph *g)
+ }
+
+ static void
+-net_scale (LoadGraph *g, unsigned din, unsigned dout)
++net_scale (LoadGraph *g, guint64 din, guint64 dout)
+ {
+ g->data[0][0] = 1.0f * din / g->net.max;
+ g->data[0][1] = 1.0f * dout / g->net.max;
+
+- unsigned dmax = std::max(din, dout);
++ guint64 dmax = std::max(din, dout);
+ g->net.values[g->net.cur] = dmax;
+ g->net.cur = (g->net.cur + 1) % LoadGraph::NUM_POINTS;
+
+- unsigned new_max;
++ guint64 new_max;
+ // both way, new_max is the greatest value
+ if (dmax >= g->net.max)
+ new_max = dmax;
+@@ -389,7 +389,7 @@ net_scale (LoadGraph *g, unsigned din, unsigned dout)
+ // Round network maximum
+ //
+
+- const unsigned bak_max(new_max);
++ const guint64 bak_max(new_max);
+
+ if (ProcData::get_instance()->config.network_in_bits) {
+ // TODO: fix logic to give a nice scale with bits
+@@ -399,7 +399,7 @@ net_scale (LoadGraph *g, unsigned din, unsigned dout)
+ new_max = 1.1 * new_max;
+ // make sure max is not 0 to avoid / 0
+ // default to 125 bytes == 1kbit
+- new_max = std::max(new_max, 125U);
++ new_max = std::max(new_max, 125UL);
+
+ } else {
+ // round up to get some extra space
+@@ -407,7 +407,7 @@ net_scale (LoadGraph *g, unsigned din, unsigned dout)
+ new_max = 1.1 * new_max;
+ // make sure max is not 0 to avoid / 0
+ // default to 1 KiB
+- new_max = std::max(new_max, 1024U);
++ new_max = std::max(new_max, 1024UL);
+
+ // decompose new_max = coef10 * 2**(base10 * 10)
+ // where coef10 and base10 are integers and coef10 < 2**10
+@@ -415,16 +415,16 @@ net_scale (LoadGraph *g, unsigned din, unsigned dout)
+ // e.g: ceil(100.5 KiB) = 101 KiB = 101 * 2**(1 * 10)
+ // where base10 = 1, coef10 = 101, pow2 = 16
+
+- unsigned pow2 = std::floor(log2(new_max));
+- unsigned base10 = pow2 / 10;
+- unsigned coef10 = std::ceil(new_max / double(1UL << (base10 * 10)));
++ guint64 pow2 = std::floor(log2(new_max));
++ guint64 base10 = pow2 / 10.0;
++ guint64 coef10 = std::ceil(new_max / double(1UL <<(base10 * 10)));
+ g_assert(new_max <= (coef10 * (1UL << (base10 * 10))));
+
+ // then decompose coef10 = x * 10**factor10
+ // where factor10 is integer and x < 10
+ // so we new_max has only 1 significant digit
+
+- unsigned factor10 = std::pow(10.0, std::floor(std::log10(coef10)));
++ guint64 factor10 = std::pow(10.0, std::floor(std::log10(coef10)));
+ coef10 = std::ceil(coef10 / double(factor10)) * factor10;
+
+ // then make coef10 divisible by num_bars
+@@ -432,12 +432,12 @@ net_scale (LoadGraph *g, unsigned din, unsigned dout)
+ coef10 = coef10 + (g->num_bars() - coef10 % g->num_bars());
+ g_assert(coef10 % g->num_bars() == 0);
+
+- new_max = coef10 * (1UL << (base10 * 10));
+- procman_debug("bak %u new_max %u pow2 %u coef10 %u", bak_max, new_max, pow2, coef10);
++ new_max = coef10 * (1UL << guint64(base10 * 10));
++ procman_debug("bak %lu new_max %lu pow2 %lu coef10 %lu", bak_max, new_max, pow2, coef10);
+ }
+
+ if (bak_max > new_max) {
+- procman_debug("overflow detected: bak=%u new=%u", bak_max, new_max);
++ procman_debug("overflow detected: bak=%lu new=%lu", bak_max, new_max);
+ new_max = bak_max;
+ }
+
+@@ -446,7 +446,7 @@ net_scale (LoadGraph *g, unsigned din, unsigned dout)
+ if ((0.8 * g->net.max) < new_max && new_max <= g->net.max)
+ return;
+
+- const float scale = 1.0f * g->net.max / new_max;
++ const double scale = 1.0f * g->net.max / new_max;
+
+ for (size_t i = 0; i < LoadGraph::NUM_POINTS; i++) {
+ if (g->data[i][0] >= 0.0f) {
+@@ -455,7 +455,7 @@ net_scale (LoadGraph *g, unsigned din, unsigned dout)
+ }
+ }
+
+- procman_debug("rescale dmax = %u max = %u new_max = %u", dmax, g->net.max, new_max);
++ procman_debug("rescale dmax = %lu max = %lu new_max = %lu", dmax, g->net.max, new_max);
+
+ g->net.max = new_max;
+
+@@ -471,7 +471,7 @@ get_net (LoadGraph *g)
+ guint32 i;
+ guint64 in = 0, out = 0;
+ GTimeVal time;
+- unsigned din, dout;
++ guint64 din, dout;
+
+ ifnames = glibtop_get_netlist(&netlist);
+
+@@ -510,9 +510,9 @@ get_net (LoadGraph *g)
+ g->net.time.tv_sec != 0) {
+ float dtime;
+ dtime = time.tv_sec - g->net.time.tv_sec +
+- (float) (time.tv_usec - g->net.time.tv_usec) / G_USEC_PER_SEC;
+- din = static_cast<unsigned>((in - g->net.last_in) / dtime);
+- dout = static_cast<unsigned>((out - g->net.last_out) / dtime);
++ (double) (time.tv_usec - g->net.time.tv_usec) / G_USEC_PER_SEC;
++ din = static_cast<guint64>((in - g->net.last_in) / dtime);
++ dout = static_cast<guint64>((out - g->net.last_out) / dtime);
+ } else {
+ /* Don't calc anything if new data is less than old (interface
+ removed, counters reset, ...) or if it is the first time */
+diff --git a/src/load-graph.h b/src/load-graph.h
+index d90cf38..9b43c86 100644
+--- a/src/load-graph.h
++++ b/src/load-graph.h
+@@ -87,7 +87,7 @@ struct LoadGraph {
+ struct {
+ guint64 last_in, last_out;
+ GTimeVal time;
+- unsigned int max;
++ guint64 max;
+ unsigned values[NUM_POINTS];
+ size_t cur;
+ } net;
+--
+cgit v0.9
diff --git a/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-3.patch b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-3.patch
new file mode 100644
index 000000000000..d3ac4d962cd9
--- /dev/null
+++ b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-32-bit-network-totals-overflow-3.patch
@@ -0,0 +1,102 @@
+From 843cc40119d36873f9670975c7815fbd38481093 Mon Sep 17 00:00:00 2001
+From: Chris Kühl <chrisk@openismus.com>
+Date: Thu, 12 May 2011 21:43:31 +0000
+Subject: Fix for issues on 32-bit machines.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=649842
+---
+diff --git a/src/load-graph.cpp b/src/load-graph.cpp
+index a6d2a7e..9291179 100644
+--- a/src/load-graph.cpp
++++ b/src/load-graph.cpp
+@@ -399,7 +399,7 @@ net_scale (LoadGraph *g, guint64 din, guint64 dout)
+ new_max = 1.1 * new_max;
+ // make sure max is not 0 to avoid / 0
+ // default to 125 bytes == 1kbit
+- new_max = std::max(new_max, 125UL);
++ new_max = std::max(new_max, G_GUINT64_CONSTANT(125));
+
+ } else {
+ // round up to get some extra space
+@@ -407,7 +407,7 @@ net_scale (LoadGraph *g, guint64 din, guint64 dout)
+ new_max = 1.1 * new_max;
+ // make sure max is not 0 to avoid / 0
+ // default to 1 KiB
+- new_max = std::max(new_max, 1024UL);
++ new_max = std::max(new_max, G_GUINT64_CONSTANT(1024));
+
+ // decompose new_max = coef10 * 2**(base10 * 10)
+ // where coef10 and base10 are integers and coef10 < 2**10
+@@ -417,8 +417,8 @@ net_scale (LoadGraph *g, guint64 din, guint64 dout)
+
+ guint64 pow2 = std::floor(log2(new_max));
+ guint64 base10 = pow2 / 10.0;
+- guint64 coef10 = std::ceil(new_max / double(1UL <<(base10 * 10)));
+- g_assert(new_max <= (coef10 * (1UL << (base10 * 10))));
++ guint64 coef10 = std::ceil(new_max / double(G_GUINT64_CONSTANT(1) << (base10 * 10)));
++ g_assert(new_max <= (coef10 * (G_GUINT64_CONSTANT(1) << (base10 * 10))));
+
+ // then decompose coef10 = x * 10**factor10
+ // where factor10 is integer and x < 10
+@@ -431,13 +431,16 @@ net_scale (LoadGraph *g, guint64 din, guint64 dout)
+ if (coef10 % g->num_bars() != 0)
+ coef10 = coef10 + (g->num_bars() - coef10 % g->num_bars());
+ g_assert(coef10 % g->num_bars() == 0);
+-
+- new_max = coef10 * (1UL << guint64(base10 * 10));
+- procman_debug("bak %lu new_max %lu pow2 %lu coef10 %lu", bak_max, new_max, pow2, coef10);
++ new_max = coef10 * (G_GUINT64_CONSTANT(1) << guint64(base10 * 10));
++ procman_debug("bak %" G_GUINT64_FORMAT " new_max %" G_GUINT64_FORMAT
++ "pow2 %" G_GUINT64_FORMAT " coef10 %" G_GUINT64_FORMAT,
++ bak_max, new_max, pow2, coef10);
+ }
+
+ if (bak_max > new_max) {
+- procman_debug("overflow detected: bak=%lu new=%lu", bak_max, new_max);
++ procman_debug("overflow detected: bak=%" G_GUINT64_FORMAT
++ " new=%" G_GUINT64_FORMAT,
++ bak_max, new_max);
+ new_max = bak_max;
+ }
+
+@@ -455,7 +458,10 @@ net_scale (LoadGraph *g, guint64 din, guint64 dout)
+ }
+ }
+
+- procman_debug("rescale dmax = %lu max = %lu new_max = %lu", dmax, g->net.max, new_max);
++ procman_debug("rescale dmax = %" G_GUINT64_FORMAT
++ " max = %" G_GUINT64_FORMAT
++ " new_max = %" G_GUINT64_FORMAT,
++ dmax, g->net.max, new_max);
+
+ g->net.max = new_max;
+
+diff --git a/src/util.cpp b/src/util.cpp
+index 234e6fc..7183ff4 100644
+--- a/src/util.cpp
++++ b/src/util.cpp
+@@ -163,14 +163,14 @@ procman::format_size(guint64 size, guint64 max_size, bool want_bits)
+ };
+
+ const Format all_formats[2][4] = {
+- { { 1UL << 10, N_("%.1f KiB") },
+- { 1UL << 20, N_("%.1f MiB") },
+- { 1UL << 30, N_("%.1f GiB") },
+- { 1UL << 40, N_("%.1f TiB") } },
+- { { 1000, N_("%.1f kbit") },
+- { 1000000, N_("%.1f Mbit") },
+- { 1000000000, N_("%.1f Gbit") },
+- { 1000000000000, N_("%.1f Tbit") } }
++ { { G_GUINT64_CONSTANT(1) << 10, N_("%.1f KiB") },
++ { G_GUINT64_CONSTANT(1) << 20, N_("%.1f MiB") },
++ { G_GUINT64_CONSTANT(1) << 30, N_("%.1f GiB") },
++ { G_GUINT64_CONSTANT(1) << 40, N_("%.1f TiB") } },
++ { { G_GUINT64_CONSTANT(1000), N_("%.1f kbit") },
++ { G_GUINT64_CONSTANT(1000000), N_("%.1f Mbit") },
++ { G_GUINT64_CONSTANT(1000000000), N_("%.1f Gbit") },
++ { G_GUINT64_CONSTANT(1000000000000), N_("%.1f Tbit") } }
+ };
+
+ const Format (&formats)[4] = all_formats[want_bits ? 1 : 0];
+--
+cgit v0.9
diff --git a/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-linux-nice.patch b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-linux-nice.patch
new file mode 100644
index 000000000000..55d4e4110db3
--- /dev/null
+++ b/gnome-extra/gnome-system-monitor/files/gnome-system-monitor-3.0.1-linux-nice.patch
@@ -0,0 +1,21 @@
+From 7c493352b24fb6d0d8b003f25043b070244eeb2e Mon Sep 17 00:00:00 2001
+From: Chris Kühl <chrisk@openismus.com>
+Date: Fri, 15 Apr 2011 09:18:10 +0000
+Subject: Make maximum nice value 19 instead of 20 on Linux.
+
+---
+diff --git a/src/procdialogs.h b/src/procdialogs.h
+index eba3212..61decf8 100644
+--- a/src/procdialogs.h
++++ b/src/procdialogs.h
+@@ -26,7 +26,7 @@
+ /* These are the actual range of settable values. Values outside this range
+ are scaled back to these limits. So show these limits in the slider
+ */
+-#ifdef linux
++#ifdef __linux__
+ #define RENICE_VAL_MIN -20
+ #define RENICE_VAL_MAX 19
+ #else /* ! linux */
+--
+cgit v0.9
diff --git a/gnome-extra/gnome-system-monitor/gnome-system-monitor-3.0.1-r1.ebuild b/gnome-extra/gnome-system-monitor/gnome-system-monitor-3.0.1-r1.ebuild
new file mode 100644
index 000000000000..9a771b699d1e
--- /dev/null
+++ b/gnome-extra/gnome-system-monitor/gnome-system-monitor-3.0.1-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-system-monitor/gnome-system-monitor-3.0.1-r1.ebuild,v 1.1 2011/08/19 11:47:29 nirbheek Exp $
+
+EAPI="3"
+GCONF_DEBUG="no"
+
+inherit eutils gnome2
+
+DESCRIPTION="The Gnome System Monitor"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.28:2
+ >=x11-libs/libwnck-2.91.0:3
+ >=gnome-base/libgtop-2.28.2:2
+ >=x11-libs/gtk+-3.0:3
+ >=x11-themes/gnome-icon-theme-2.31
+ >=dev-cpp/gtkmm-2.99:3.0
+ >=dev-cpp/glibmm-2.27:2
+ >=dev-libs/libxml2-2.0:2
+ >=gnome-base/librsvg-2.12:2"
+
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.19
+ >=dev-util/intltool-0.41.0
+ >=sys-devel/gettext-0.17
+ >=app-text/gnome-doc-utils-0.20"
+
+pkg_setup() {
+ DOCS="AUTHORS ChangeLog NEWS README"
+ G2CONF="${G2CONF}
+ --disable-schemas-compile
+ --disable-scrollkeeper"
+}
+
+src_prepare() {
+ # Add some useful patches from upstream git master
+ # Use the correct maximum nice value on Linux
+ epatch "${FILESDIR}/${PN}-3.0.1-linux-nice.patch"
+ # Don't overflow the network history totals counters on 32-bit machines
+ epatch "${FILESDIR}/${PN}"-3.0.1-32-bit-network-totals-overflow-{1,2,3}.patch
+
+ gnome2_src_prepare
+}