pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/editors/abiword abiword: add upstream patches to fix v...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/32e91801ce52
branches:  trunk
changeset: 317058:32e91801ce52
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Fri Dec 28 22:24:52 2018 +0000

description:
abiword: add upstream patches to fix various bugs

Add upstream patches to address overflow bugs, fundamental rendering
problems, and miscellaneous crashers. (All of these commits have been
branched upstream, but no updated source release has been made in over
two years. Relevant upstream SVN commit IDs and bug IDs are noted in
each patch comment.) Bump PKGREVISION.

OK wiz@

diffstat:

 editors/abiword/Makefile                                                     |    4 +-
 editors/abiword/distinfo                                                     |   20 +-
 editors/abiword/patches/patch-src_af_gr_gtk_gr__UnixCairoGraphics.cpp        |   51 +
 editors/abiword/patches/patch-src_af_gr_gtk_gr__UnixImage.cpp                |   24 +
 editors/abiword/patches/patch-src_af_gr_xp_gr__Caret.cpp                     |  305 ++++++++++
 editors/abiword/patches/patch-src_af_gr_xp_gr__Caret.h                       |   26 +
 editors/abiword/patches/patch-src_af_gr_xp_gr__Graphics.cpp                  |   40 +
 editors/abiword/patches/patch-src_af_gr_xp_gr__Graphics.h                    |   17 +
 editors/abiword/patches/patch-src_af_util_unix_ut__unixTimer.cpp             |   22 +
 editors/abiword/patches/patch-src_af_util_xp_ut__png.cpp                     |   34 +
 editors/abiword/patches/patch-src_af_xap_gtk_xap__UnixFrameImpl.cpp          |   62 ++
 editors/abiword/patches/patch-src_af_xap_gtk_xap__UnixFrameImpl.h            |   18 +
 editors/abiword/patches/patch-src_af_xap_xp_xap__Frame.cpp                   |   31 +
 editors/abiword/patches/patch-src_text_fmt_xp_fl__SectionLayout.cpp          |   16 +
 editors/abiword/patches/patch-src_text_fmt_xp_fv__View.cpp                   |   43 +
 editors/abiword/patches/patch-src_text_fmt_xp_fv__ViewDoubleBuffering.cpp    |   15 +
 editors/abiword/patches/patch-src_text_fmt_xp_fv__View__protected.cpp        |   51 +
 editors/abiword/patches/patch-src_wp_ap_gtk_ap__UnixFrameImpl.cpp            |   20 +
 editors/abiword/patches/patch-src_wp_impexp_xp_ie__exp__DocRangeListener.cpp |   15 +
 editors/abiword/patches/patch-src_wp_impexp_xp_ie__imp__RTF.cpp              |   36 +
 20 files changed, 847 insertions(+), 3 deletions(-)

diffs (truncated from 951 to 300 lines):

diff -r 00d4779a68fa -r 32e91801ce52 editors/abiword/Makefile
--- a/editors/abiword/Makefile  Fri Dec 28 22:10:24 2018 +0000
+++ b/editors/abiword/Makefile  Fri Dec 28 22:24:52 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.183 2018/12/13 19:51:34 adam Exp $
+# $NetBSD: Makefile,v 1.184 2018/12/28 22:24:52 gutteridge Exp $
 
 .include       "Makefile.common"
 DISTNAME=      abiword-${ABIVERSION}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    editors
 MASTER_SITES=  http://www.abiword.com/downloads/abiword/${PKGVERSION_NOREV}/source/
 
diff -r 00d4779a68fa -r 32e91801ce52 editors/abiword/distinfo
--- a/editors/abiword/distinfo  Fri Dec 28 22:10:24 2018 +0000
+++ b/editors/abiword/distinfo  Fri Dec 28 22:24:52 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.76 2018/12/02 21:51:06 bsiegert Exp $
+$NetBSD: distinfo,v 1.77 2018/12/28 22:24:52 gutteridge Exp $
 
 SHA1 (abiword-3.0.2.tar.gz) = 8226e0962e6667e0a461955a0ac680a629e0b55a
 RMD160 (abiword-3.0.2.tar.gz) = fde551492b0cffa7d522082906f374490bd47f5c
@@ -20,11 +20,29 @@
 SHA1 (patch-plugins_wordperfect_xp_ie__impexp__WordPerfect.cpp) = c87bc227eebcfcc2ab11ee6b5237ef8fcc47c0bc
 SHA1 (patch-plugins_wordperfect_xp_ie__impexp__WordPerfect.h) = 0a75276dc0d1d99b97155f61d9f98de7126fb0a3
 SHA1 (patch-plugins_wpg_xp_ie__impGraphic__WPG.cpp) = 36d7ca7855ddc504701e392c28e3d8530f78b81e
+SHA1 (patch-src_af_gr_gtk_gr__UnixCairoGraphics.cpp) = 2fb170202d13c9ddf077cea545d8d8f79fdbf5c2
+SHA1 (patch-src_af_gr_gtk_gr__UnixImage.cpp) = 2546621961ce959a8d5078ff52efa4650362be54
+SHA1 (patch-src_af_gr_xp_gr__Caret.cpp) = 96b186c4fc762f6734226b4505e2d4c64fb2b03a
+SHA1 (patch-src_af_gr_xp_gr__Caret.h) = f7ee697a720205cd9026a85d7683092fc147a237
+SHA1 (patch-src_af_gr_xp_gr__Graphics.cpp) = 9cf398ea8e787e5820d41182c005fe2906c7ec06
+SHA1 (patch-src_af_gr_xp_gr__Graphics.h) = a3539f0e2e3a8f661a01428f7550f8a4bebb1ee5
+SHA1 (patch-src_af_util_unix_ut__unixTimer.cpp) = 543d8977c8da5c1db4e26581d82f72a4f936f190
 SHA1 (patch-src_af_util_xp_ut__endian.h) = e1dd4cc0df3b0eb66dbd673fb5c0d2e3b24b30a4
 SHA1 (patch-src_af_util_xp_ut__iconv.cpp) = 613f162d4db0ba9520e0481a98564e59ccd862d4
 SHA1 (patch-src_af_util_xp_ut__iconv.h) = bbcfa2098ea77d393feb50d69de9ae29fcce302f
 SHA1 (patch-src_af_util_xp_ut__mbtowc.cpp) = 01f6793651533e7e39f665e5c15e6c12e1c7b96d
 SHA1 (patch-src_af_util_xp_ut__misc.cpp) = f552ecbb87490355d8e74218dd59fd3961f1af5d
+SHA1 (patch-src_af_util_xp_ut__png.cpp) = 9f4ae043873fc6d66e063419d0736bb6104483b0
+SHA1 (patch-src_af_xap_gtk_xap__UnixFrameImpl.cpp) = 5b67bd234209beddc751e7c98b17cf1844b73b1a
+SHA1 (patch-src_af_xap_gtk_xap__UnixFrameImpl.h) = af256fec37a7b9cd4239802985ad1a46f8272ad8
 SHA1 (patch-src_af_xap_xp_enchant__checker.cpp) = 5ad3b8bb4e186e998d7e8930247534c9f058c534
+SHA1 (patch-src_af_xap_xp_xap__Frame.cpp) = d7f29f199b7109c8a09fa40f969be0db3a6b79ba
+SHA1 (patch-src_text_fmt_xp_fl__SectionLayout.cpp) = 3f1f9255bb979812c8062f542ed4b9faa488a368
 SHA1 (patch-src_text_fmt_xp_fv__FrameEdit.h) = 684310bf9aece4ce72d004dfae9a4b4b6ca69570
+SHA1 (patch-src_text_fmt_xp_fv__View.cpp) = 872f4d94a3797b0ae1c32500267e46afa5ebd3ac
+SHA1 (patch-src_text_fmt_xp_fv__ViewDoubleBuffering.cpp) = ef11cce5d6d07c33416666e30c1aed33abfa8e1c
+SHA1 (patch-src_text_fmt_xp_fv__View__protected.cpp) = c567a8962280aa6f5b20151b74616b14ff0c2aa7
 SHA1 (patch-src_text_ptbl_xp_pd__DocumentRDF.cpp) = 5673e9341372913156f2f722229569199d97af4c
+SHA1 (patch-src_wp_ap_gtk_ap__UnixFrameImpl.cpp) = 709abd20ccaffc96cf8b9e77ea506fe6732e6d62
+SHA1 (patch-src_wp_impexp_xp_ie__exp__DocRangeListener.cpp) = cab84cf239874409d8e349c58c3605d91712b3c4
+SHA1 (patch-src_wp_impexp_xp_ie__imp__RTF.cpp) = 89cddf0213c1aeb1c915f4722e5db3a68f553ae6
diff -r 00d4779a68fa -r 32e91801ce52 editors/abiword/patches/patch-src_af_gr_gtk_gr__UnixCairoGraphics.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/abiword/patches/patch-src_af_gr_gtk_gr__UnixCairoGraphics.cpp     Fri Dec 28 22:24:52 2018 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-src_af_gr_gtk_gr__UnixCairoGraphics.cpp,v 1.1 2018/12/28 22:24:53 gutteridge Exp $
+
+Abiword bug 13791, SVN revision 35476: Fix flicker and caret problems.
+
+Abiword bug 13791, SVN revision 35482: Disable double buffering on GTK3.
+
+--- src/af/gr/gtk/gr_UnixCairoGraphics.cpp.orig        2016-10-21 00:39:16.000000000 +0000
++++ src/af/gr/gtk/gr_UnixCairoGraphics.cpp
+@@ -126,8 +126,12 @@ GR_Graphics *   GR_UnixCairoGraphics::gr
+ 
+ //    UT_return_val_if_fail(!info.isPrinterGraphics(), NULL);
+       GR_UnixCairoAllocInfo &AI = (GR_UnixCairoAllocInfo&)info;
+-
++#if GTK_CHECK_VERSION(3,0,0)
++      // We disable double buffering on Gtk3 because it doesn't work.
++      return new GR_UnixCairoGraphics(AI.m_win, false);
++#else
+       return new GR_UnixCairoGraphics(AI.m_win, AI.m_double_buffered);
++#endif
+ }
+ 
+ inline UT_RGBColor _convertGdkColor(const GdkColor &c)
+@@ -566,7 +570,10 @@ void GR_UnixCairoGraphics::_beginPaint()
+ void GR_UnixCairoGraphics::_endPaint()
+ {
+       if (m_CairoCreated)
++      {
++              cairo_surface_flush(cairo_get_target(m_cr));
+               cairo_destroy (m_cr);
++      }
+       m_cr = NULL;
+ 
+       m_Painting = false;
+@@ -577,9 +584,17 @@ void GR_UnixCairoGraphics::_endPaint()
+ 
+ void GR_UnixCairoGraphics::flush(void)
+ {
++
+       if (m_Widget) {
+               gtk_widget_queue_draw(m_Widget);
+       }
++      
++/*
++      if(m_cr)
++      {
++              cairo_surface_flush(cairo_get_target(m_cr));
++      }
++*/
+ }
+ 
+ bool GR_UnixCairoGraphics::queryProperties(GR_Graphics::Properties gp) const
diff -r 00d4779a68fa -r 32e91801ce52 editors/abiword/patches/patch-src_af_gr_gtk_gr__UnixImage.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/abiword/patches/patch-src_af_gr_gtk_gr__UnixImage.cpp     Fri Dec 28 22:24:52 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_af_gr_gtk_gr__UnixImage.cpp,v 1.1 2018/12/28 22:24:53 gutteridge Exp $
+
+Abiword bug 13834, SVN revision 35393: Crash fixes.
+
+--- src/af/gr/gtk/gr_UnixImage.cpp.orig        2015-10-16 02:42:45.000000000 +0000
++++ src/af/gr/gtk/gr_UnixImage.cpp
+@@ -244,12 +244,13 @@ bool GR_UnixImage::saveToPNG(const char 
+         UT_return_val_if_fail(m_image,false);
+ 
+       GError * error = NULL;
+-      gboolean res = gdk_pixbuf_save (m_image, szFile, "png", &error,NULL);
+-      if(res != FALSE)
+-      {
++      gboolean res = gdk_pixbuf_save (m_image, szFile, "png", &error, NULL);
++      if (res != FALSE) {
++              if (error) {
++                      g_error_free (error);
++              }
+               return true;
+       }
+-      delete error;
+       return false;
+ 
+ }
diff -r 00d4779a68fa -r 32e91801ce52 editors/abiword/patches/patch-src_af_gr_xp_gr__Caret.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/abiword/patches/patch-src_af_gr_xp_gr__Caret.cpp  Fri Dec 28 22:24:52 2018 +0000
@@ -0,0 +1,305 @@
+$NetBSD: patch-src_af_gr_xp_gr__Caret.cpp,v 1.1 2018/12/28 22:24:53 gutteridge Exp $
+
+Abiword bug 13791, SVN revision 35476: Fix flicker and caret problems.
+
+--- src/af/gr/xp/gr_Caret.cpp.orig     2013-04-07 13:53:03.000000000 +0000
++++ src/af/gr/xp/gr_Caret.cpp
+@@ -30,6 +30,11 @@
+ #include "gr_Graphics.h"
+ #include "gr_Painter.h"
+ #include "ut_debugmsg.h"
++#include <inttypes.h>
++#include <math.h>
++#include <stdio.h>
++#include <time.h>
++
+ static const UT_uint32 CURSOR_DELAY_TIME = 10; // milliseconds
+ 
+ #ifdef TOOLKIT_GTK_ALL
+@@ -56,6 +61,11 @@ GR_Caret::GR_Caret(GR_Graphics * pG)
+               m_yPoint2(0),
+               m_pClr(NULL),
+               m_pG(pG),
++              m_iWindowWidth(0),
++              m_iWindowHeight(0),
++              m_worker(NULL),
++              m_enabler(NULL),
++              m_blinkTimeout(NULL),
+               m_nDisableCount(1),
+               m_bCursorBlink(true),
+               m_bCursorIsOn(false),
+@@ -70,7 +80,10 @@ GR_Caret::GR_Caret(GR_Graphics * pG)
+               m_bRemote(false),
+               m_clrRemote(0,0,0),
+               m_sID(""),
+-              m_iCaretNumber(0)
++              m_iCaretNumber(0),
++              m_iLastDrawTime(0),
++              m_iRetry(0),
++              m_bPendingBlink(false)
+ {
+       UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE;
+       m_worker = static_cast<UT_Timer *>(UT_WorkerFactory::static_constructor
+@@ -97,6 +110,11 @@ GR_Caret::GR_Caret(GR_Graphics * pG, con
+               m_yPoint2(0),
+               m_pClr(NULL),
+               m_pG(pG),
++              m_iWindowWidth(0),
++              m_iWindowHeight(0),
++              m_worker(NULL),
++              m_enabler(NULL),
++              m_blinkTimeout(NULL),
+               m_nDisableCount(1),
+               m_bCursorBlink(true),
+               m_bCursorIsOn(false),
+@@ -111,7 +129,10 @@ GR_Caret::GR_Caret(GR_Graphics * pG, con
+               m_bRemote(true),
+               m_clrRemote(0,0,0),
+               m_sID(sId),
+-              m_iCaretNumber(0)
++              m_iCaretNumber(0),
++              m_iLastDrawTime(0),
++              m_iRetry(0),
++              m_bPendingBlink(false)
+ {
+       UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE;
+       m_worker = static_cast<UT_Timer *>(UT_WorkerFactory::static_constructor
+@@ -145,9 +166,16 @@ GR_Caret::~GR_Caret()
+ void GR_Caret::s_work(UT_Worker * _w)
+ {
+       GR_Caret * c = static_cast<GR_Caret *>(_w->getInstanceData());
+-
++      xxx_UT_DEBUGMSG((" Caret timer called Disable Count = %d \n",c->m_nDisableCount));
+       if (c->m_nDisableCount == 0)
++      {
++#ifdef TOOLKIT_GTK_ALL
++              c->setPendingBlink();
++              c->m_pG->flush(); // set redraw for wayland
++#else
+               c->_blink(false);
++#endif
++      }
+ }
+ 
+ /** One-time enabler. */
+@@ -170,9 +198,12 @@ void GR_Caret::s_enable(UT_Worker * _w)
+ 
+ void GR_Caret::s_blink_timeout(UT_Worker * _w)
+ {
++      return;
++      /*
+       GR_Caret * c = static_cast<GR_Caret *>(_w->getInstanceData());
+       if (c->isEnabled())
+               c->disable();
++      */
+ }
+ 
+ UT_uint32 GR_Caret::_getCursorBlinkTime() const
+@@ -241,8 +272,6 @@ void GR_Caret::setCoords(UT_sint32 x, UT
+                                                UT_sint32 x2, UT_sint32 y2, UT_uint32 h2,
+                                                bool bPointDirection, const UT_RGBColor * pClr)
+ {
+-      // if visible, then hide while we change positions.
+-      _erase();
+ 
+       m_xPoint = x; m_yPoint = y; m_iPointHeight = h;
+       m_xPoint2 = x2; m_yPoint2 = y2; m_iPointHeight2 = h2;
+@@ -270,13 +299,17 @@ void GR_Caret::enable()
+ 
+       // If the caret is already enabled, just return
+       if (m_nDisableCount == 0)
++      {
++              xxx_UT_DEBUGMSG(("Don't emable disable Count is already zero \n"));
+               return;
+-
++      }
+       // Check to see if we still have pending disables.
+       --m_nDisableCount;
+-      if (m_nDisableCount)
++      if (m_nDisableCount != 0)
++      {
++              xxx_UT_DEBUGMSG(("Don't emable, disable Count has not reached zero \n"));
+               return;
+-
++      }
+       // stop pending enables; in 10 ms, really enable blinking.
+       m_enabler->stop();
+       m_enabler->start();
+@@ -326,19 +359,20 @@ void GR_Caret::JustErase(UT_sint32 xPoin
+ {
+        if(m_bRecursiveDraw)
+        {
+-          xxx_UT_DEBUGMSG(("Doing recursive Erase! - abort \n"));
++          xxx_UT_DEBUGMSG(("Doing recursive Just Erase! - abort \n"));
+           return;
+        }
+        if (m_bCursorIsOn && (((xPoint -m_pG->tlu(2)-1) <= m_xPoint) && (xPoint >= (m_xPoint-m_pG->tlu(2))-1)) && ((yPoint - m_pG->tlu(1)) <= m_yPoint) && (yPoint >= (m_yPoint - m_pG->tlu(1))))
+        {
++          xxx_UT_DEBUGMSG(("Doing Just Erase! now \n"));
+           m_pG->restoreRectangle(m_iCaretNumber*3+0);
+           if(m_bSplitCaret)
+           {
+                 m_pG->restoreRectangle(m_iCaretNumber*3+1);
+-                m_pG->restoreRectangle(m_iCaretNumber*3+2);
+-                m_bSplitCaret = false;
++                        m_pG->restoreRectangle(m_iCaretNumber*3+2);
++                        m_bSplitCaret = false;
+           }
+-          m_bCursorIsOn = !m_bCursorIsOn;
++          m_bCursorIsOn = false;
+           m_nDisableCount = 1;
+        }
+ }
+@@ -358,18 +392,42 @@ void GR_Caret::_blink(bool bExplicit)
+       }
+         if (!m_bPositionSet)
+               return;
++      if(!m_bPendingBlink)
++              return;
++      struct timespec spec;
++



Home | Main Index | Thread Index | Old Index