[96990] trunk/dports/gnome/dia
dports at macports.org
dports at macports.org
Thu Aug 23 13:27:54 PDT 2012
Revision: 96990
https://trac.macports.org/changeset/96990
Author: dports at macports.org
Date: 2012-08-23 13:27:54 -0700 (Thu, 23 Aug 2012)
Log Message:
-----------
dia: backport upstream bugfixes to fix crash on start (#34520)
This replaces patch-glib-2.32.diff with an equivalent patch from
upstream.
Modified Paths:
--------------
trunk/dports/gnome/dia/Portfile
Added Paths:
-----------
trunk/dports/gnome/dia/files/0001-aa94ba030885f3105e6452929d04917a2ef94393.patch
trunk/dports/gnome/dia/files/0002-ae61326cf5e7aaba6e72af757a5cd33efe8280a1.patch
trunk/dports/gnome/dia/files/0003-3a589dedfbf2b0ada111a3e2cb6b14837f2c8b5e.patch
Removed Paths:
-------------
trunk/dports/gnome/dia/files/patch-glib-2.32.diff
Modified: trunk/dports/gnome/dia/Portfile
===================================================================
--- trunk/dports/gnome/dia/Portfile 2012-08-23 20:25:50 UTC (rev 96989)
+++ trunk/dports/gnome/dia/Portfile 2012-08-23 20:27:54 UTC (rev 96990)
@@ -6,7 +6,7 @@
name dia
version 0.97.2
-revision 1
+revision 2
set branch [join [lrange [split ${version} .] 0 1] .]
maintainers nomaintainer
categories gnome graphics
@@ -29,7 +29,13 @@
checksums sha1 dc7ed6f8cd83acc8f421d28f30e4042fe370e9ba \
rmd160 f9270f1f2cb6ad505219463827d02e3759693796
-patchfiles patch-glib-2.32.diff
+# backport patches for glib 2.32 compatibility and to fix crash on
+# start (#34520)
+patch.pre_args -p1
+patchfiles \
+ 0001-aa94ba030885f3105e6452929d04917a2ef94393.patch \
+ 0002-ae61326cf5e7aaba6e72af757a5cd33efe8280a1.patch \
+ 0003-3a589dedfbf2b0ada111a3e2cb6b14837f2c8b5e.patch
post-patch {
reinplace s/isspecial/char_isspecial/ \
Added: trunk/dports/gnome/dia/files/0001-aa94ba030885f3105e6452929d04917a2ef94393.patch
===================================================================
--- trunk/dports/gnome/dia/files/0001-aa94ba030885f3105e6452929d04917a2ef94393.patch (rev 0)
+++ trunk/dports/gnome/dia/files/0001-aa94ba030885f3105e6452929d04917a2ef94393.patch 2012-08-23 20:27:54 UTC (rev 96990)
@@ -0,0 +1,35 @@
+From aa94ba030885f3105e6452929d04917a2ef94393 Mon Sep 17 00:00:00 2001
+From: Hans Breuer <hans at breuer.org>
+Date: Sun, 08 Apr 2012 12:42:41 +0000
+Subject: Bug 668587 - Double free() for some SVG rendering
+
+The fix for bug 665648 introduced a memory corruption.
+Now the #if-0'ed code as well as the #else branch respect
+DiaSvgRender::get_fill_style() having a const return.
+(cherry picked from commit 47bb76af3ba20b5e83be79a874df02c405934899)
+---
+diff --git a/lib/diasvgrenderer.c b/lib/diasvgrenderer.c
+index 4dc0695..14aefc4 100644
+--- a/lib/diasvgrenderer.c
++++ b/lib/diasvgrenderer.c
+@@ -677,13 +677,15 @@ draw_text_line(DiaRenderer *self, TextLine *text_line,
+
+ saved_width = renderer->linewidth;
+ renderer->linewidth = 0.001;
+- style = (char*)get_fill_style(renderer, colour);
+ /* return value must not be freed */
+ renderer->linewidth = saved_width;
+ #if 0 /* would need a unit: https://bugzilla.mozilla.org/show_bug.cgi?id=707071#c4 */
+- tmp = g_strdup_printf("%s; font-size: %s", style,
++ style = g_strdup_printf("%s; font-size: %s", get_fill_style(renderer, colour),
+ dia_svg_dtostr(d_buf, text_line_get_height(text_line)));
+- style = tmp;
++#else
++ /* get_fill_style: the return value of this function must not be saved
++ * anywhere. And of course it must not be free'd */
++ style = g_strdup (get_fill_style(renderer, colour));
+ #endif
+ /* This is going to break for non-LTR texts, as SVG thinks 'start' is
+ * 'right' for those. */
+--
+cgit v0.9.0.2
Added: trunk/dports/gnome/dia/files/0002-ae61326cf5e7aaba6e72af757a5cd33efe8280a1.patch
===================================================================
--- trunk/dports/gnome/dia/files/0002-ae61326cf5e7aaba6e72af757a5cd33efe8280a1.patch (rev 0)
+++ trunk/dports/gnome/dia/files/0002-ae61326cf5e7aaba6e72af757a5cd33efe8280a1.patch 2012-08-23 20:27:54 UTC (rev 96990)
@@ -0,0 +1,63 @@
+From ae61326cf5e7aaba6e72af757a5cd33efe8280a1 Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar at opensuse.org>
+Date: Thu, 01 Dec 2011 21:08:12 +0000
+Subject: Bug 665335: Only #include <glib.h>: the other headers are implicit
+
+---
+diff --git a/objects/custom/shape_typeinfo.c b/objects/custom/shape_typeinfo.c
+index c6133b1..3fb3d73 100644
+--- a/objects/custom/shape_typeinfo.c
++++ b/objects/custom/shape_typeinfo.c
+@@ -27,7 +27,7 @@
+ #include "custom_util.h"
+ #include <string.h>
+ #include <stdarg.h>
+-#include <glib/gstrfuncs.h>
++#include <glib.h>
+ #include <glib/gstdio.h>
+ #include <libxml/parser.h>
+
+diff --git a/plug-ins/pgf/render_pgf.c b/plug-ins/pgf/render_pgf.c
+index 3fe5bbd..24b812e 100644
+--- a/plug-ins/pgf/render_pgf.c
++++ b/plug-ins/pgf/render_pgf.c
+@@ -61,7 +61,7 @@ TODO:
+ #endif
+ #include <errno.h>
+
+-#include <glib/gprintf.h>
++#include <glib.h>
+ #include <glib/gstdio.h>
+
+ #include "intl.h"
+diff --git a/tests/test-boundingbox.c b/tests/test-boundingbox.c
+index 7adaab5..a13d018 100644
+--- a/tests/test-boundingbox.c
++++ b/tests/test-boundingbox.c
+@@ -28,9 +28,6 @@
+ #include <glib.h>
+ #include <glib-object.h>
+
+-#if GLIB_CHECK_VERSION(2,16,0)
+-#include <glib/gtestutils.h>
+-#endif
+ #include "dialib.h"
+
+ /*
+diff --git a/tests/test-objects.c b/tests/test-objects.c
+index 57d5675..c5980a5 100644
+--- a/tests/test-objects.c
++++ b/tests/test-objects.c
+@@ -28,10 +28,6 @@
+ #include <glib.h>
+ #include <glib-object.h>
+
+-#if GLIB_CHECK_VERSION(2,16,0)
+-#include <glib/gtestutils.h>
+-#endif
+-
+ #include "object.h"
+ #include "plug-ins.h"
+ #include "dialib.h"
+--
+cgit v0.9.0.2
Added: trunk/dports/gnome/dia/files/0003-3a589dedfbf2b0ada111a3e2cb6b14837f2c8b5e.patch
===================================================================
--- trunk/dports/gnome/dia/files/0003-3a589dedfbf2b0ada111a3e2cb6b14837f2c8b5e.patch (rev 0)
+++ trunk/dports/gnome/dia/files/0003-3a589dedfbf2b0ada111a3e2cb6b14837f2c8b5e.patch 2012-08-23 20:27:54 UTC (rev 96990)
@@ -0,0 +1,31 @@
+From 3a589dedfbf2b0ada111a3e2cb6b14837f2c8b5e Mon Sep 17 00:00:00 2001
+From: Hans Breuer <hans at breuer.org>
+Date: Sat, 06 Jun 2009 18:01:38 +0000
+Subject: Bug #585004 - implicit declaration of function 'finite' (2nd iteration)
+
+To get the definition either _BSD_SOURCE or _SVID_SOURCE needs to
+be defined before inclusion of <math.h>.
+Removed HAVE_CONFIG_H and chanegd inclusion order
+(cherry picked from commit 8f363f6dd82f9fbf502fceaf1d73a258c17593db)
+---
+diff --git a/objects/standard/arc.c b/objects/standard/arc.c
+index 28302a6..3a50838 100644
+--- a/objects/standard/arc.c
++++ b/objects/standard/arc.c
+@@ -16,13 +16,11 @@
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+-#ifdef HAVE_CONFIG_H
+ #include <config.h>
+-#endif
+
+-#include <assert.h>
+ #define _BSD_SOURCE 1 /* to get finite */
+ #include <math.h>
++#include <assert.h>
+
+ #include "intl.h"
+ #include "object.h"
+--
+cgit v0.9.0.2
Deleted: trunk/dports/gnome/dia/files/patch-glib-2.32.diff
===================================================================
--- trunk/dports/gnome/dia/files/patch-glib-2.32.diff 2012-08-23 20:25:50 UTC (rev 96989)
+++ trunk/dports/gnome/dia/files/patch-glib-2.32.diff 2012-08-23 20:27:54 UTC (rev 96990)
@@ -1,36 +0,0 @@
---- objects/custom/shape_typeinfo.c.orig 2009-11-07 08:28:34.000000000 -0600
-+++ objects/custom/shape_typeinfo.c 2012-04-11 01:39:00.000000000 -0500
-@@ -27,8 +27,7 @@
- #include "custom_util.h"
- #include <string.h>
- #include <stdarg.h>
--#include <glib/gstrfuncs.h>
--#include <glib/gstdio.h>
-+#include <glib.h>
- #include <libxml/parser.h>
-
- /*
---- tests/test-boundingbox.c.orig 2009-11-07 08:28:35.000000000 -0600
-+++ tests/test-boundingbox.c 2012-04-11 01:47:51.000000000 -0500
-@@ -28,9 +28,6 @@
- #include <glib.h>
- #include <glib-object.h>
-
--#if GLIB_CHECK_VERSION(2,16,0)
--#include <glib/gtestutils.h>
--#endif
- #include "dialib.h"
-
- /*
---- tests/test-objects.c.orig 2009-11-07 08:28:35.000000000 -0600
-+++ tests/test-objects.c 2012-04-11 01:46:51.000000000 -0500
-@@ -28,9 +28,6 @@
- #include <glib.h>
- #include <glib-object.h>
-
--#if GLIB_CHECK_VERSION(2,16,0)
--#include <glib/gtestutils.h>
--#endif
-
- #include "object.h"
- #include "plug-ins.h"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120823/120927c1/attachment.html>
More information about the macports-changes
mailing list