summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-05-05 13:25:56 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-05-05 13:25:56 +0200
commit5c97ce1ea9378ee01688ede3837ab6a76964da9a (patch)
tree5cab99e112bd5541b41a94bd56a41b1742456650 /gnu/packages
parentad7f6e5f0d618bafc4430b77f6d85892a7762818 (diff)
downloadguix-5c97ce1ea9378ee01688ede3837ab6a76964da9a.tar.gz
gnu: abiword: Update to 3.0.2.
* gnu/packages/patches/abiword-explictly-cast-bools.patch: Update patch.
* gnu/packages/patches/abiword-black-drawing-with-gtk322.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/abiword.scm (abiword): Update to 3.0.2.
[source]: Remove outdated snippet; add new patch.
[arguments]: Pass CXXFLAGS.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/abiword.scm18
-rw-r--r--gnu/packages/patches/abiword-black-drawing-with-gtk322.patch49
-rw-r--r--gnu/packages/patches/abiword-explictly-cast-bools.patch14
3 files changed, 64 insertions, 17 deletions
diff --git a/gnu/packages/abiword.scm b/gnu/packages/abiword.scm
index 514ac0ceb5..30c2411df3 100644
--- a/gnu/packages/abiword.scm
+++ b/gnu/packages/abiword.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Marek Benc <merkur32@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,7 +45,7 @@
 (define-public abiword
   (package
     (name "abiword")
-    (version "3.0.1")
+    (version "3.0.2")
     (source
       (origin
         (method url-fetch)
@@ -52,16 +53,11 @@
           (string-append "http://abisource.org/downloads/" name "/" version
                          "/source/" name "-" version ".tar.gz"))
         (sha256
-          (base32 "1ik591rx15nn3n1297cwykl8wvrlgj78i528id9wbidgy3xzd570"))
-        (modules '((guix build utils)))
-        (snippet
-         ;; Ensure reproducibility.
-         '(substitute* "src/wp/main/xp/abi_ver.cpp"
-            (("__DATE__") "\"2017\"")
-            (("__TIME__") "\"00:00\"")))
+         (base32 "08imry821g81apdwym3gcs4nss0l9j5blqk31j5rv602zmcd9gxg"))
         (patches
          (search-patches "abiword-wmf-version-lookup-fix.patch"
-                         "abiword-explictly-cast-bools.patch"))))
+                         "abiword-explictly-cast-bools.patch"
+                         "abiword-black-drawing-with-gtk322.patch"))))
 
     (build-system glib-or-gtk-build-system)
     (arguments                   ;; NOTE: rsvg is disabled, since Abiword
@@ -84,7 +80,9 @@
         ;;                  assertion 'G_IS_OBJECT (object)' failed
         ;; Manually starting the X server before the test phase did not help
         ;; the tests to pass.
-        #:tests? #f))
+        #:tests? #f
+        #:make-flags
+        (list "CXXFLAGS=-std=c++11")))
     (inputs
       `(("boost" ,boost)
         ("enchant" ,enchant)
diff --git a/gnu/packages/patches/abiword-black-drawing-with-gtk322.patch b/gnu/packages/patches/abiword-black-drawing-with-gtk322.patch
new file mode 100644
index 0000000000..88a5ca4c38
--- /dev/null
+++ b/gnu/packages/patches/abiword-black-drawing-with-gtk322.patch
@@ -0,0 +1,49 @@
+commit 2ee38d1881aeea27bb49acc450631d813d1f28ba
+Author: Hubert Figuière <hub@figuiere.net>
+Date:   Wed Dec 7 09:44:01 2016 -0500
+
+    Bug 13815 - draw event should return TRUE
+    
+    This fix the black drawing regression witj Gtk3.22
+
+diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.cpp b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
+index 780000e..10f8e00 100644
+--- a/src/af/xap/gtk/xap_UnixFrameImpl.cpp
++++ b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
+@@ -1208,9 +1208,9 @@ gint XAP_UnixFrameImpl::_fe::delete_event(GtkWidget * w, GdkEvent * /*event*/, g
+ }
+ 
+ #if GTK_CHECK_VERSION(3,0,0)
+-gint XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr)
++gboolean XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr)
+ #else
+-gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
++gboolean XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
+ #endif
+ {
+ 	XAP_UnixFrameImpl * pUnixFrameImpl = static_cast<XAP_UnixFrameImpl *>(g_object_get_data(G_OBJECT(w), "user_data"));
+@@ -1243,7 +1243,7 @@ gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
+ 		pView->draw(&rClip);
+ #endif
+ 	}
+-	return FALSE;
++	return TRUE;
+ }
+ 
+ static bool bScrollWait = false;
+diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.h b/src/af/xap/gtk/xap_UnixFrameImpl.h
+index 30ee5d8..a0ff57f 100644
+--- a/src/af/xap/gtk/xap_UnixFrameImpl.h
++++ b/src/af/xap/gtk/xap_UnixFrameImpl.h
+@@ -152,9 +152,9 @@ protected:
+ 			static gint key_release_event(GtkWidget* w, GdkEventKey* e);
+ 			static gint delete_event(GtkWidget * w, GdkEvent * /*event*/, gpointer /*data*/);
+ #if GTK_CHECK_VERSION(3,0,0)
+-			static gint draw(GtkWidget * w, cairo_t * cr);
++			static gboolean draw(GtkWidget * w, cairo_t * cr);
+ #else
+-			static gint expose(GtkWidget * w, GdkEventExpose* pExposeEvent);
++			static gboolean expose(GtkWidget * w, GdkEventExpose* pExposeEvent);
+ #endif
+ 			static gint do_ZoomUpdate( gpointer /* xap_UnixFrame * */ p);
+ 			static void vScrollChanged(GtkAdjustment * w, gpointer /*data*/);
diff --git a/gnu/packages/patches/abiword-explictly-cast-bools.patch b/gnu/packages/patches/abiword-explictly-cast-bools.patch
index 7927a180ba..97ae6653c2 100644
--- a/gnu/packages/patches/abiword-explictly-cast-bools.patch
+++ b/gnu/packages/patches/abiword-explictly-cast-bools.patch
@@ -2,18 +2,18 @@ As of JPEG-9, the type 'boolean' is an enumeration, but since glib defines
 TRUE and FALSE as numeric constants and this is C++, they need to be explicitly
 casted.
 
---- a/src/af/util/xp/ut_jpeg.cpp	2009-07-08 19:33:53.000000000 +0200
-+++ b/src/af/util/xp/ut_jpeg.cpp	2014-09-06 19:55:55.876997404 +0200
-@@ -102,7 +102,7 @@
+--- a/src/af/util/xp/ut_jpeg.cpp
++++ b/src/af/util/xp/ut_jpeg.cpp
+@@ -102,7 +102,7 @@ static boolean _jpegFillInputBuffer (j_decompress_ptr cinfo)
  	src->pub.next_input_byte = src->sourceBuf->getPointer (src->pos);
  	src->pub.bytes_in_buffer = src->sourceBuf->getLength ();
- 	
--	return TRUE;
+ 
+-	return 1; // boolean is a libjpeg type that is an int.
 +	return (boolean)TRUE;
  }
  
  /*
-@@ -161,7 +161,7 @@
+@@ -161,7 +161,7 @@ bool UT_JPEG_getDimensions(const UT_ByteBuf* pBB, UT_sint32& iImageWidth,
  	/* set the data source */
  	_JPEG_ByteBufSrc (&cinfo, pBB);
  
@@ -22,7 +22,7 @@ casted.
  	jpeg_start_decompress(&cinfo);
      iImageWidth = cinfo.output_width;
      iImageHeight = cinfo.output_height;
-@@ -189,7 +189,7 @@
+@@ -189,7 +189,7 @@ bool UT_JPEG_getRGBData(const UT_ByteBuf* pBB, UT_Byte* pDest, UT_sint32 iDestRo
  	/* set the data source */
  	_JPEG_ByteBufSrc (&cinfo, pBB);