[packages/pstoedit] - fix building with ImageMagick 7 - rel 3

baggins baggins at pld-linux.org
Mon Dec 26 23:32:08 CET 2016


commit 1db94627498886a91a6e6ed80d0a8b2b6da1a16b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Dec 26 23:31:46 2016 +0100

    - fix building with ImageMagick 7
    - rel 3

 imagemagick7.patch | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 pstoedit.spec      |  4 +++-
 2 files changed, 68 insertions(+), 1 deletion(-)
---
diff --git a/pstoedit.spec b/pstoedit.spec
index 82ec11d..18236f4 100644
--- a/pstoedit.spec
+++ b/pstoedit.spec
@@ -2,12 +2,13 @@ Summary:	Convert PostScript and PDF files into various vector-graphic formats
 Summary(pl.UTF-8):	Konwerter PostScriptu i PDF do różnych formatów wektorowych
 Name:		pstoedit
 Version:	3.70
-Release:	2
+Release:	3
 License:	GPL v2+
 Group:		Applications/Graphics
 Source0:	http://downloads.sourceforge.net/pstoedit/%{name}-%{version}.tar.gz
 # Source0-md5:	d3ad4657b4944a8400f7ca76f78cb943
 Patch0:		pluginsdir.patch
+Patch1:		imagemagick7.patch
 URL:		http://www.helga-glunz.homepage.t-online.de/pstoedit/
 BuildRequires:	ImageMagick-c++-devel
 BuildRequires:	autoconf >= 2.50
@@ -133,6 +134,7 @@ Wtyczka wmf dla biblioteki pstoedit. Używa biblioteki libEMF.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
diff --git a/imagemagick7.patch b/imagemagick7.patch
new file mode 100644
index 0000000..e875a72
--- /dev/null
+++ b/imagemagick7.patch
@@ -0,0 +1,65 @@
+diff -ur pstoedit-3.70/configure.ac pstoedit-3.70-im7/configure.ac
+--- pstoedit-3.70/configure.ac	2014-12-28 21:39:18.000000000 +0100
++++ pstoedit-3.70-im7/configure.ac	2016-12-25 22:16:29.147826432 +0100
+@@ -299,7 +299,7 @@
+ else
+       if test -n "$PKG_CONFIG"; then
+         AC_MSG_CHECKING(ImageMagick flags through pkg-config)
+-	PKG_CHECK_MODULES(LIBMAGICK, ImageMagick++, 
++	PKG_CHECK_MODULES(LIBMAGICK, Magick++, 
+ 		HAVE_LIBMAGICK=yes 
+ 		LIBMAGICK_CFLAGS="-DHAVE_MAGIC $LIBMAGICK_CFLAGS" 
+ 		LIBMAGICK_LDFLAGS="$LIBMAGICK_LIBS" , 
+diff -ur pstoedit-3.70/src/drvmagick++.cpp pstoedit-3.70-im7/src/drvmagick++.cpp
+--- pstoedit-3.70/src/drvmagick++.cpp	2015-01-01 18:05:33.000000000 +0100
++++ pstoedit-3.70-im7/src/drvmagick++.cpp	2016-12-26 23:26:10.491193646 +0100
+@@ -120,14 +120,14 @@
+ 		const basedrawingelement & elem = pathElement(n);
+ 		switch (elem.getType()) {
+ 		case moveto:{
+-				const Point & p = elem.getPoint(0);
++				    const ::Point & p = elem.getPoint(0);
+ 				const Magick::Coordinate coord(p.x_ + x_offset,
+ 											   currentDeviceHeight - p.y_ + y_offset);
+ 				vpath.push_back(PathMovetoAbs(coord));
+ 			}
+ 			break;
+ 		case lineto:{
+-				const Point & p = elem.getPoint(0);
++				    const ::Point & p = elem.getPoint(0);
+ 				const Magick::Coordinate coord(p.x_ + x_offset,
+ 											   currentDeviceHeight - p.y_ + y_offset);
+ 				vpath.push_back(PathLinetoAbs(coord));
+@@ -137,9 +137,9 @@
+ 			vpath.push_back(PathClosePath());
+ 			break;
+ 		case curveto:{
+-				const Point & p0 = elem.getPoint(0);
+-				const Point & p1 = elem.getPoint(1);
+-				const Point & p2 = elem.getPoint(2);
++				     const ::Point & p0 = elem.getPoint(0);
++				     const ::Point & p1 = elem.getPoint(1);
++				     const ::Point & p2 = elem.getPoint(2);
+ 				vpath.
+ 					push_back(PathCurvetoAbs
+ 							  (PathCurvetoArgs
+@@ -278,7 +278,7 @@
+ 			dasharray[i] = d_numbers[i];
+ 		}
+ 		dasharray[dp.nrOfEntries] = 0;	// mark last element
+-		drawList.push_back(DrawableDashArray(dasharray));	// pulls a copy, so we are the owner of dasharray
++		drawList.push_back(DrawableStrokeDashArray(dasharray));	// pulls a copy, so we are the owner of dasharray
+ //??    DrawableDashOffset
+ 		delete[]dasharray;
+ 	}
+@@ -300,7 +300,9 @@
+ #ifndef onedrawlist
+ 	drawList.push_back(DrawablePopGraphicContext());
+ 	// Draw everything using completed drawing list 
+-	imageptr->draw(drawList);
++	std::vector<Magick::Drawable> drawVect;
++	copy(drawList.begin(),drawList.end(),back_inserter(drawVect));
++	imageptr->draw(drawVect);
+ #endif
+ 
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pstoedit.git/commitdiff/1db94627498886a91a6e6ed80d0a8b2b6da1a16b



More information about the pld-cvs-commit mailing list