Add patch for ImageMagick 7 support
This commit is contained in:
parent
39bc5c84e3
commit
cda0f6323b
58
emacs-imagemagick-7.patch
Normal file
58
emacs-imagemagick-7.patch
Normal file
@ -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 <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;
|
13
emacs.spec
13
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 <mike@cchtml.com> - 1:25.2-9
|
||||
- Add patch for ImageMagick 7 detection
|
||||
|
||||
* Fri Aug 25 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:25.2-8
|
||||
- Rebuilt for ImageMagick soname bump
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user