From cda0f6323be373eaf6d44a35d77d13e189e0ea45 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Aug 25 2017 22:45:01 +0000 Subject: Add patch for ImageMagick 7 support --- diff --git a/emacs-imagemagick-7.patch b/emacs-imagemagick-7.patch new file mode 100644 index 0000000..e0f7784 --- /dev/null +++ b/emacs-imagemagick-7.patch @@ -0,0 +1,58 @@ +--- a/configure.ac 2017-02-03 08:34:30.000000000 -0600 ++++ b/configure.ac 2017-08-25 17:09:15.861172295 -0500 +@@ -2407,7 +2407,7 @@ + if test "${with_imagemagick}" != "no"; then + ## 6.3.5 is the earliest version known to work; see Bug#17339. + ## 6.8.2 makes Emacs crash; see Bug#13867. +- IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2" ++ IMAGEMAGICK_MODULE="MagickWand >= 7.0" + EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE]) + AC_SUBST(IMAGEMAGICK_CFLAGS) + AC_SUBST(IMAGEMAGICK_LIBS) +--- emacs-24.3/src/image.c~ 2016-12-25 12:47:48.000000000 +0100 ++++ emacs-24.3/src/image.c 2016-12-25 12:52:35.931084598 +0100 +@@ -7618,14 +7618,14 @@ + /* The GIF library also defines DrawRectangle, but its never used in Emacs. + Therefore rename the function so it doesn't collide with ImageMagick. */ + #define DrawRectangle DrawRectangleGif +-#include ++#include + + /* ImageMagick 6.5.3 through 6.6.5 hid PixelGetMagickColor for some reason. + Emacs seems to work fine with the hidden version, so unhide it. */ +-#include ++#include + #if 0x653 <= MagickLibVersion && MagickLibVersion <= 0x665 + extern WandExport void PixelGetMagickColor (const PixelWand *, +- MagickPixelPacket *); ++ PixelInfo *); + #endif + + /* Log ImageMagick error message. +@@ -8402,7 +8402,7 @@ + PixelWand **source, **dest; + size_t source_width, source_height; + ssize_t source_left, source_top; +- MagickPixelPacket pixel; ++ PixelInfo pixel; + DisposeType dispose; + ptrdiff_t lines = 0; + +@@ -8467,7 +8467,7 @@ + if (dispose == BackgroundDispose || PixelGetAlpha (source[x])) + { + PixelGetMagickColor (source[x], &pixel); +- PixelSetMagickColor (dest[x + source_left], &pixel); ++ PixelSetPixelColor (dest[x + source_left], &pixel); + } + } + PixelSyncIterator (dest_iterator); +@@ -8512,7 +8512,7 @@ + MagickWand *image_wand; + PixelIterator *iterator; + PixelWand **pixels, *bg_wand = NULL; +- MagickPixelPacket pixel; ++ PixelInfo pixel; + Lisp_Object image; + Lisp_Object value; + Lisp_Object crop; diff --git a/emacs.spec b/emacs.spec index 47048b3..df181a8 100644 --- a/emacs.spec +++ b/emacs.spec @@ -5,7 +5,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 Version: 25.2 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv3+ and CC0-1.0 URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -27,6 +27,8 @@ Patch2: emacs-pdf-default.patch Patch3: emacs-system-crypto-policies.patch # http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d781662873f228b110a128f7a2b6583a4d5e0a3a Patch4: emacs-xwidget.patch +# http://git.pld-linux.org/gitweb.cgi?p=packages/emacs.git;a=blob;f=imagemagick7.patch;h=199219b4d15ff2dbe325114192420a1241dd5522;hb=HEAD +Patch5: emacs-imagemagick-7.patch BuildRequires: atk-devel BuildRequires: cairo-devel @@ -65,6 +67,8 @@ BuildRequires: texinfo BuildRequires: gzip BuildRequires: desktop-file-utils BuildRequires: libacl-devel +BuildRequires: autoconf +BuildRequires: automake BuildRequires: gtk3-devel BuildRequires: webkitgtk4-devel @@ -191,7 +195,8 @@ packages that add functionality to Emacs. %patch2 -p1 -b .pdf-default.patch %patch3 -p1 -b .system-crypto-policies %patch4 -p1 -autoconf +%patch5 -p1 +autoreconf -f -i # We prefer our emacs.desktop file cp %SOURCE1 etc/emacs.desktop @@ -232,6 +237,7 @@ cd .. ln -s ../../%{name}/%{version}/etc/COPYING doc ln -s ../../%{name}/%{version}/etc/NEWS doc + %build export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS" @@ -500,6 +506,9 @@ update-desktop-database &> /dev/null || : %dir %{_datadir}/emacs/site-lisp/site-start.d %changelog +* Fri Aug 25 2017 Michael Cronenworth - 1:25.2-9 +- Add patch for ImageMagick 7 detection + * Fri Aug 25 2017 Igor Gnatenko - 1:25.2-8 - Rebuilt for ImageMagick soname bump