commit:     79a21bdf0ece816aa69ae848e6580aa5ade9d2d2
Author:     Branko Grubic <bitlord0xff <AT> gmail <DOT> com>
AuthorDate: Wed Feb 14 23:31:21 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Feb 20 10:31:15 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79a21bdf

media-video/dvdauthor: adjust imagemagick-7 patch

Bug: https://bugs.gentoo.org/647670
Closes: https://github.com/gentoo/gentoo/pull/7189

 media-video/dvdauthor/dvdauthor-0.7.2-r2.ebuild    | 49 ++++++++++++++
 .../files/dvdauthor-0.7.2-r2-imagemagick7.patch    | 75 ++++++++++++++++++++++
 2 files changed, 124 insertions(+)

diff --git a/media-video/dvdauthor/dvdauthor-0.7.2-r2.ebuild 
b/media-video/dvdauthor/dvdauthor-0.7.2-r2.ebuild
new file mode 100644
index 00000000000..bab0a74a5cf
--- /dev/null
+++ b/media-video/dvdauthor/dvdauthor-0.7.2-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Tools for generating DVD files to be played on standalone DVD 
players"
+HOMEPAGE="http://dvdauthor.sourceforge.net/";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="graphicsmagick +imagemagick"
+REQUIRED_USE="^^ ( graphicsmagick imagemagick )"
+
+RDEPEND=">=dev-libs/fribidi-0.19.2
+       dev-libs/libxml2
+       >=media-libs/freetype-2
+       media-libs/libdvdread
+       media-libs/libpng:0=
+       graphicsmagick? ( media-gfx/graphicsmagick:= )
+       imagemagick? ( media-gfx/imagemagick:= )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}"
+
+DOCS=( AUTHORS ChangeLog README TODO )
+
+src_prepare() {
+       default
+
+       if use imagemagick && has_version '>=media-gfx/imagemagick-7.0.1.0' ; 
then
+               eapply "${FILESDIR}/${PN}-0.7.2-r2-imagemagick7.patch"
+       fi
+
+       if use graphicsmagick ; then
+               sed -i -e 's:ExportImagePixels:dIsAbLeAuToMaGiC&:' configure \
+                       || die
+       fi
+}
+
+src_configure() {
+       use graphicsmagick && \
+               append-cppflags "$($(tc-getPKG_CONFIG) --cflags 
GraphicsMagick)" #459976
+       append-cppflags "$($(tc-getPKG_CONFIG) --cflags fribidi)" #417041
+       econf
+}

diff --git a/media-video/dvdauthor/files/dvdauthor-0.7.2-r2-imagemagick7.patch 
b/media-video/dvdauthor/files/dvdauthor-0.7.2-r2-imagemagick7.patch
new file mode 100644
index 00000000000..0f6bed4372a
--- /dev/null
+++ b/media-video/dvdauthor/files/dvdauthor-0.7.2-r2-imagemagick7.patch
@@ -0,0 +1,75 @@
+--- dvdauthor/src/subgen-image.c       2014-01-21 00:12:37.000000000 +0100
++++ dvdauthor/src/subgen-image.c       2017-11-27 20:26:53.682914041 +0100
+@@ -30,7 +30,7 @@
+ 
+ #if defined(HAVE_MAGICK) || defined(HAVE_GMAGICK)
+ #include <stdarg.h>
+-#include <magick/api.h>
++#include <MagickWand/MagickWand.h>
+ #else
+ #include <png.h>
+ #endif
+@@ -176,18 +176,18 @@
+ {
+     Image *im;
+     ImageInfo *ii;
+-    ExceptionInfo ei;
++    ExceptionInfo *ei;
+     int x,y;
+     unsigned long magickver;
+     unsigned char amask;
+ 
+-    GetExceptionInfo(&ei);
++    ei = AcquireExceptionInfo();
+     ii=CloneImageInfo(NULL);
+     strcpy(ii->filename,s->fname);
+-    im=ReadImage(ii,&ei);
++    im=ReadImage(ii,ei);
+ 
+     if( !im ) {
+-        MagickError(ei.severity,"Unable to load file",ii->filename);
++        MagickError(ei->severity,"Unable to load file",ii->filename);
+         return -1;
+     }
+ 
+@@ -202,10 +202,10 @@
+     for( y=0; y<im->rows; y++ ) {
+         char pdata[MAXX*4];
+ 
+-        
if(!ExportImagePixels(im,0,y,im->columns,1,"RGBA",CharPixel,pdata,&ei)) {
+-            fprintf(stderr,"ERR:  Extracting row %d from %s 
(%s,%s)\n",y,s->fname,ei.reason,ei.description);
+-            CatchException(&ei);
+-            MagickError(ei.severity,ei.reason,ei.description);
++        
if(!ExportImagePixels(im,0,y,im->columns,1,"RGBA",CharPixel,pdata,ei)) {
++            fprintf(stderr,"ERR:  Extracting row %d from %s 
(%s,%s)\n",y,s->fname,ei->reason,ei->description);
++            CatchException(ei);
++            MagickError(ei->severity,ei->reason,ei->description);
+             DestroyImage(im);
+             return -1;
+         }
+@@ -219,7 +219,7 @@
+         }
+     }
+     DestroyImage(im);
+-    DestroyExceptionInfo(&ei);
++    DestroyExceptionInfo(ei);
+     fprintf(stderr,"INFO: Picture %s had %d colors\n",s->fname,s->numpal);
+ 
+     return 0;
+@@ -1098,13 +1098,13 @@
+ void image_init()
+ {
+ #if defined(HAVE_MAGICK) || defined(HAVE_GMAGICK)
+-    InitializeMagick(NULL);
++    MagickCoreGenesis("", MagickFalse);
+ #endif
+ }
+ 
+ void image_shutdown()
+ {
+ #if defined(HAVE_MAGICK) || defined(HAVE_GMAGICK)
+-    DestroyMagick();
++    MagickCoreTerminus();
+ #endif
+ }
+

Reply via email to