commit:     7d920494dd39bcb954789111b5d10a1a29a1b388
Author:     Sebastian Pipping <sebastian <AT> pipping <DOT> org>
AuthorDate: Sat Sep 20 18:17:50 2014 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sat Sep 20 18:39:54 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=7d920494

gnome-extra/gnome-paint: 0.4.0-r1

---
 .../gnome-paint-0.4.0-crash-get_gtk_image.patch    | 38 ++++++++++++++++++++++
 .../gnome-paint/files/gnome-paint-0.4.0-libm.patch | 28 ++++++++++++++++
 ...nt-0.4.0.ebuild => gnome-paint-0.4.0-r1.ebuild} | 11 ++++++-
 3 files changed, 76 insertions(+), 1 deletion(-)

diff --git 
a/gnome-extra/gnome-paint/files/gnome-paint-0.4.0-crash-get_gtk_image.patch 
b/gnome-extra/gnome-paint/files/gnome-paint-0.4.0-crash-get_gtk_image.patch
new file mode 100644
index 0000000..8fe68b2
--- /dev/null
+++ b/gnome-extra/gnome-paint/files/gnome-paint-0.4.0-crash-get_gtk_image.patch
@@ -0,0 +1,38 @@
+From 80957a66306bc68af9119808f81b8e42171a39e4 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <[email protected]>
+Date: Sat, 20 Sep 2014 20:31:39 +0200
+Subject: [PATCH] Fix crash in get_gtk_image
+
+Based on 
https://bazaar.launchpad.net/~andrewwang43/gnome-paint/nosegfault/diff/84
+---
+ src/toolbar.c | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/src/toolbar.c b/src/toolbar.c
+index 1c5ba03..ad5cffd 100644
+--- a/src/toolbar.c
++++ b/src/toolbar.c
+@@ -497,15 +497,13 @@ on_brush11_realize   (GtkObject *object, gpointer 
user_data)
+ static GtkWidget * 
+ get_gtk_image ( GtkWidget *widget, gchar** xpm )
+ {
+-      GdkPixmap *gdkpixmap    = NULL;
+-    GdkBitmap *mask           = NULL;
++      GdkPixbuf *gdkpixbuf    = NULL;
+     GtkWidget *gtkimage       = NULL;
+-      gdkpixmap = gdk_pixmap_create_from_xpm_d(widget->window, &mask, NULL, 
xpm);
+-      g_assert ( gdkpixmap );
+-      gtkimage = gtk_image_new_from_pixmap(gdkpixmap, mask);
++      gdkpixbuf = gdk_pixbuf_new_from_xpm_data(xpm);
++      g_assert ( gdkpixbuf );
++      gtkimage = gtk_image_new_from_pixbuf(gdkpixbuf);
+     g_assert ( gtkimage );
+-      g_object_unref ( G_OBJECT(gdkpixmap) );
+-    g_object_unref ( G_OBJECT(mask) ); 
++      g_object_unref ( G_OBJECT(gdkpixbuf) );
+       gtk_widget_show(gtkimage);
+       return gtkimage;
+ }
+-- 
+2.1.0
+

diff --git a/gnome-extra/gnome-paint/files/gnome-paint-0.4.0-libm.patch 
b/gnome-extra/gnome-paint/files/gnome-paint-0.4.0-libm.patch
new file mode 100644
index 0000000..c8388f8
--- /dev/null
+++ b/gnome-extra/gnome-paint/files/gnome-paint-0.4.0-libm.patch
@@ -0,0 +1,28 @@
+From ff61205fc363473d8b029dd9e822a0bc0e6712b8 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <[email protected]>
+Date: Sat, 20 Sep 2014 20:10:42 +0200
+Subject: [PATCH] Add missing -lm to fix link error
+
+[..]/bin/ld: gnome_paint-cv_paintbrush_tool.o: undefined reference to symbol 
'sqrt@@GLIBC_2.2.5'
+/lib64/libm.so.6: error adding symbols: DSO missing from command line
+collect2: error: ld returned 1 exit status
+---
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 2bea3b4..852ae55 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -87,7 +87,7 @@ gnome_paint_LDFLAGS = \
+       -Wl,--export-dynamic
+ 
+ gnome_paint_LDADD = \
+-      $(GNOME_PAINT_LIBS) -lX11
++      $(GNOME_PAINT_LIBS) -lX11 -lm
+ 
+ SUBDIRS = \
+       pixmaps
+-- 
+2.1.0
+

diff --git a/gnome-extra/gnome-paint/gnome-paint-0.4.0.ebuild 
b/gnome-extra/gnome-paint/gnome-paint-0.4.0-r1.ebuild
similarity index 81%
rename from gnome-extra/gnome-paint/gnome-paint-0.4.0.ebuild
rename to gnome-extra/gnome-paint/gnome-paint-0.4.0-r1.ebuild
index 17333f8..794ca78 100644
--- a/gnome-extra/gnome-paint/gnome-paint-0.4.0.ebuild
+++ b/gnome-extra/gnome-paint/gnome-paint-0.4.0-r1.ebuild
@@ -2,7 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-EAPI="3"
+EAPI="5"
+
+inherit eutils autotools
 
 DESCRIPTION="Simple paint program inspired by MS Paint"
 HOMEPAGE="https://code.google.com/p/gnome-paint/";
@@ -17,6 +19,13 @@ RDEPEND=">=x11-libs/gtk+-2.16:2"
 DEPEND="${RDEPEND}
        >=dev-util/intltool-0.35"
 
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-libm.patch
+       epatch "${FILESDIR}"/${P}-crash-get_gtk_image.patch
+
+       eautoreconf
+}
+
 src_install() {
        emake DESTDIR="${D}" install || die
 

Reply via email to