Rebuild for ImageMagick 6

This commit is contained in:
Michael Cronenworth 2017-09-06 10:50:04 -05:00
parent a8cca11cb9
commit de26e2cf83
2 changed files with 5 additions and 65 deletions

View File

@ -1,58 +0,0 @@
--- 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 <wand/MagickWand.h>
+#include <MagickWand/MagickWand.h>
/* 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 <magick/version.h>
+#include <MagickCore/version.h>
#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;

View File

@ -5,7 +5,7 @@ Summary: GNU Emacs text editor
Name: emacs Name: emacs
Epoch: 1 Epoch: 1
Version: 25.2 Version: 25.2
Release: 9%{?dist} Release: 10%{?dist}
License: GPLv3+ and CC0-1.0 License: GPLv3+ and CC0-1.0
URL: http://www.gnu.org/software/emacs/ URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors Group: Applications/Editors
@ -27,8 +27,6 @@ Patch2: emacs-pdf-default.patch
Patch3: emacs-system-crypto-policies.patch Patch3: emacs-system-crypto-policies.patch
# http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d781662873f228b110a128f7a2b6583a4d5e0a3a # http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d781662873f228b110a128f7a2b6583a4d5e0a3a
Patch4: emacs-xwidget.patch 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: atk-devel
BuildRequires: cairo-devel BuildRequires: cairo-devel
@ -67,8 +65,6 @@ BuildRequires: texinfo
BuildRequires: gzip BuildRequires: gzip
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
BuildRequires: webkitgtk4-devel BuildRequires: webkitgtk4-devel
@ -195,8 +191,7 @@ packages that add functionality to Emacs.
%patch2 -p1 -b .pdf-default.patch %patch2 -p1 -b .pdf-default.patch
%patch3 -p1 -b .system-crypto-policies %patch3 -p1 -b .system-crypto-policies
%patch4 -p1 %patch4 -p1
%patch5 -p1 autoconf
autoreconf -f -i
# We prefer our emacs.desktop file # We prefer our emacs.desktop file
cp %SOURCE1 etc/emacs.desktop cp %SOURCE1 etc/emacs.desktop
@ -506,6 +501,9 @@ update-desktop-database &> /dev/null || :
%dir %{_datadir}/emacs/site-lisp/site-start.d %dir %{_datadir}/emacs/site-lisp/site-start.d
%changelog %changelog
* Wed Sep 06 2017 Michael Cronenworth <mike@cchtml.com> - 1:25.2-10
- Rebuild for ImageMagick 6
* Fri Aug 25 2017 Michael Cronenworth <mike@cchtml.com> - 1:25.2-9 * Fri Aug 25 2017 Michael Cronenworth <mike@cchtml.com> - 1:25.2-9
- Add patch for ImageMagick 7 detection - Add patch for ImageMagick 7 detection