summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2009-07-21 23:44:28 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2009-07-21 23:44:28 +0000
commitcfa25f0812d09e674ec78fa3d4f69c157b5e3137 (patch)
tree54cb9e0543993032914a87b4dad6625bac4de7dd /net-misc/twitux
parentStable for HPPA (bug #277194). (diff)
downloadgentoo-2-cfa25f0812d09e674ec78fa3d4f69c157b5e3137.tar.gz
gentoo-2-cfa25f0812d09e674ec78fa3d4f69c157b5e3137.tar.bz2
gentoo-2-cfa25f0812d09e674ec78fa3d4f69c157b5e3137.zip
Handle large avatars wrt #265813, thanks to Alexandre Nuno Milheiro.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/twitux')
-rw-r--r--net-misc/twitux/ChangeLog8
-rw-r--r--net-misc/twitux/files/twitux-0.69-large_avatars.patch30
-rw-r--r--net-misc/twitux/twitux-0.69-r1.ebuild (renamed from net-misc/twitux/twitux-0.69.ebuild)11
3 files changed, 46 insertions, 3 deletions
diff --git a/net-misc/twitux/ChangeLog b/net-misc/twitux/ChangeLog
index f1f20fd2a957..6e39bfbf51a2 100644
--- a/net-misc/twitux/ChangeLog
+++ b/net-misc/twitux/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/twitux
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/twitux/ChangeLog,v 1.8 2009/07/21 11:10:32 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/twitux/ChangeLog,v 1.9 2009/07/21 23:44:28 ssuominen Exp $
+
+*twitux-0.69-r1 (21 Jul 2009)
+
+ 21 Jul 2009; Samuli Suominen <ssuominen@gentoo.org>
+ +twitux-0.69-r1.ebuild, +files/twitux-0.69-large_avatars.patch:
+ Handle large avatars wrt #265813, thanks to Alexandre Nuno Milheiro.
21 Jul 2009; Samuli Suominen <ssuominen@gentoo.org> twitux-0.69.ebuild:
twitux.xml is broken and doesn't validate with xmllint wrt #277159.
diff --git a/net-misc/twitux/files/twitux-0.69-large_avatars.patch b/net-misc/twitux/files/twitux-0.69-large_avatars.patch
new file mode 100644
index 000000000000..422e59351562
--- /dev/null
+++ b/net-misc/twitux/files/twitux-0.69-large_avatars.patch
@@ -0,0 +1,30 @@
+Handle large avatars. http://bugs.gentoo.org/show_bug.cgi?id=265813.
+
+diff -abBU 1 -rP twitux-0.69/src/twitux-app.c twitux-0.69-r1/src/twitux-app.c
+--- twitux-0.69/src/twitux-app.c 2009-01-25 01:24:00.000000000 +0000
++++ twitux-0.69-r1/src/twitux-app.c 2009-04-12 00:15:23.000000000 +0100
+@@ -68,2 +68,3 @@
+ #define TYPE_TWITTER "twitter"
++#define MAX_SIZE 73
+
+@@ -1472,4 +1473,20 @@
+
++ int height, width;
+ pixbuf = gdk_pixbuf_new_from_file (file, &error);
++ height = gdk_pixbuf_get_height(pixbuf);
++ width = gdk_pixbuf_get_width(pixbuf);
+
++ if (height > MAX_SIZE || width > MAX_SIZE)
++ {
++ double ratio;
++ GdkPixbuf *scaled;
++
++ ratio = width/(height*1.0);
++ if (ratio >= 1.0) /* width is bigger */
++ scaled = gdk_pixbuf_scale_simple(pixbuf, MAX_SIZE, MAX_SIZE/ratio,GDK_INTERP_BILINEAR);
++ else
++ scaled = gdk_pixbuf_scale_simple(pixbuf, MAX_SIZE*ratio, MAX_SIZE,GDK_INTERP_BILINEAR);
++ g_object_unref(pixbuf);
++ pixbuf = scaled;
++ }
+ if (!pixbuf){
diff --git a/net-misc/twitux/twitux-0.69.ebuild b/net-misc/twitux/twitux-0.69-r1.ebuild
index da5848dfea29..390b05a0a4ee 100644
--- a/net-misc/twitux/twitux-0.69.ebuild
+++ b/net-misc/twitux/twitux-0.69-r1.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/twitux/twitux-0.69.ebuild,v 1.4 2009/07/21 11:10:32 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/twitux/twitux-0.69-r1.ebuild,v 1.1 2009/07/21 23:44:28 ssuominen Exp $
EAPI=2
+inherit eutils
DESCRIPTION="A Twitter client for the Gnome desktop"
HOMEPAGE="http://live.gnome.org/DanielMorales/Twitux"
@@ -11,11 +12,13 @@ SRC_URI="mirror://sourceforge/twitux/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="dbus gnome-keyring nls spell"
+IUSE="+dbus gnome-keyring nls spell"
RDEPEND="net-libs/libsoup:2.4
dev-libs/libxml2
gnome-base/gconf
+ x11-libs/libsexy
+ x11-libs/libnotify
>=x11-libs/gtk+-2.14:2
dbus? ( dev-libs/dbus-glib )
app-text/iso-codes
@@ -32,6 +35,10 @@ DEPEND="${RDEPEND}
# twitux.xml is broken and doesn't validate with xmllint
RESTRICT="test"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-large_avatars.patch
+}
+
src_configure() {
econf \
--disable-dependency-tracking \