[packages/gnustep-gui] - fix building with ImageMagick 7 - rel 8

baggins baggins at pld-linux.org
Sun Dec 25 18:42:47 CET 2016


commit 319a56d2eb1ec76bede4e9118c2617115e6132f3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Dec 25 18:42:27 2016 +0100

    - fix building with ImageMagick 7
    - rel 8

 gnustep-gui.spec   |  4 +++-
 imagemagick7.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)
---
diff --git a/gnustep-gui.spec b/gnustep-gui.spec
index 2ccc7e3..a1284b7 100644
--- a/gnustep-gui.spec
+++ b/gnustep-gui.spec
@@ -9,7 +9,7 @@ Summary(pl.UTF-8):	Biblioteka GNUstep GUI
 Name:		gnustep-gui
 %define	ver	0.24
 Version:	%{ver}.0
-Release:	7
+Release:	8
 License:	LGPL v2+ (library), GPL v3+ (applications)
 Group:		Libraries
 Source0:	ftp://ftp.gnustep.org/pub/gnustep/core/%{name}-%{version}.tar.gz
@@ -17,6 +17,7 @@ Source0:	ftp://ftp.gnustep.org/pub/gnustep/core/%{name}-%{version}.tar.gz
 Patch0:		%{name}-nocompressdocs.patch
 Patch1:		%{name}-doc.patch
 Patch2:		%{name}-giflib.patch
+Patch3:		imagemagick7.patch
 URL:		http://www.gnustep.org/
 %{?with_magick:BuildRequires:	ImageMagick-devel}
 BuildRequires:	aspell-devel
@@ -80,6 +81,7 @@ biblioteki GNUstep GUI.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 export GNUSTEP_MAKEFILES=%{_datadir}/GNUstep/Makefiles
diff --git a/imagemagick7.patch b/imagemagick7.patch
new file mode 100644
index 0000000..b77c79c
--- /dev/null
+++ b/imagemagick7.patch
@@ -0,0 +1,40 @@
+diff -ur gnustep-gui-0.24.0/Source/GSImageMagickImageRep.m gnustep-gui-0.24.0-im7/Source/GSImageMagickImageRep.m
+--- gnustep-gui-0.24.0/Source/GSImageMagickImageRep.m	2011-07-13 05:34:38.000000000 +0200
++++ gnustep-gui-0.24.0-im7/Source/GSImageMagickImageRep.m	2016-12-25 18:35:02.879438129 +0100
+@@ -43,7 +43,7 @@
+ 
+ #if HAVE_IMAGEMAGICK
+ 
+-#include <magick/MagickCore.h>
++#include <MagickCore/MagickCore.h>
+ 
+ @implementation GSImageMagickImageRep 
+ 
+@@ -82,11 +82,11 @@
+       NSSize res;
+       if (image->units == PixelsPerCentimeterResolution)
+ 	{
+-	  res = NSMakeSize(image->x_resolution * 2.54, image->y_resolution * 2.54);
++	  res = NSMakeSize(image->resolution.x * 2.54, image->resolution.y * 2.54);
+ 	}
+       else
+ 	{
+-	  res = NSMakeSize(image->x_resolution, image->y_resolution);
++	  res = NSMakeSize(image->resolution.x, image->resolution.y);
+ 	}
+ 
+       if (res.width > 0 && res.height > 0)
+@@ -117,11 +117,12 @@
+ 
+   ExceptionInfo *exception = AcquireExceptionInfo();
+   ImageInfo *imageinfo = CloneImageInfo(NULL);
++  const ColorInfo *colorinfo = GetColorInfo("none", exception);
+   Image *images, *image;
+   
+   // Set the background color to transparent
+   // (otherwise SVG's are rendered against a white background by default)
+-  QueryColorDatabase("none", &imageinfo->background_color, exception);
++  imageinfo->background_color = colorinfo->color;
+ 
+   images = BlobToImage(imageinfo, [data bytes], [data length], exception);
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gnustep-gui.git/commitdiff/319a56d2eb1ec76bede4e9118c2617115e6132f3



More information about the pld-cvs-commit mailing list