Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/emacs:master commit in: app-editors/emacs/files/, app-editors/emacs/
Date: Sun, 02 Sep 2018 14:19:49
Message-Id: 1535897955.4c1429c6ab888e6276a2c4d75602d76d12bcb168.ulm@gentoo
1 commit: 4c1429c6ab888e6276a2c4d75602d76d12bcb168
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 2 14:19:15 2018 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 2 14:19:15 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=4c1429c6
7
8 app-editors/emacs: Fix support for >=media-gfx/imagemagick-7.
9
10 Package-Manager: Portage-2.3.48, Repoman-2.3.10
11
12 .../{emacs-24.3-r7.ebuild => emacs-24.3-r8.ebuild} | 3 +-
13 .../emacs/files/emacs-24.3-imagemagick-7.patch | 102 +++++++++++++++++++++
14 2 files changed, 104 insertions(+), 1 deletion(-)
15
16 diff --git a/app-editors/emacs/emacs-24.3-r7.ebuild b/app-editors/emacs/emacs-24.3-r8.ebuild
17 similarity index 99%
18 rename from app-editors/emacs/emacs-24.3-r7.ebuild
19 rename to app-editors/emacs/emacs-24.3-r8.ebuild
20 index ed89687..e0b48c1 100644
21 --- a/app-editors/emacs/emacs-24.3-r7.ebuild
22 +++ b/app-editors/emacs/emacs-24.3-r8.ebuild
23 @@ -117,7 +117,8 @@ src_prepare() {
24 ../patch-24.5/08_all_enriched-mode.patch \
25 "${FILESDIR}"/${P}-jpeg-version.patch \
26 "${FILESDIR}"/${P}-giflib-5.patch \
27 - "${FILESDIR}"/${P}-data-start.patch
28 + "${FILESDIR}"/${P}-data-start.patch \
29 + "${FILESDIR}"/${P}-imagemagick-7.patch
30 eapply_user
31
32 # Fix filename reference in redirected man page
33
34 diff --git a/app-editors/emacs/files/emacs-24.3-imagemagick-7.patch b/app-editors/emacs/files/emacs-24.3-imagemagick-7.patch
35 new file mode 100644
36 index 0000000..6c6d6ba
37 --- /dev/null
38 +++ b/app-editors/emacs/files/emacs-24.3-imagemagick-7.patch
39 @@ -0,0 +1,102 @@
40 +Support ImageMagick version 7.
41 +https://bugs.gentoo.org/665058
42 +https://debbugs.gnu.org/25967
43 +
44 +This backports and consolidates the following commits from upstream git:
45 +
46 +commit 3cc42bb60099c32f64e57d2ee33c8321adba7942
47 +Author: Glenn Morris <rgm@×××.org>
48 +Date: Thu Aug 30 13:56:08 2018 -0400
49 +
50 + * configure.ac: Fix goofs in my recent ImageMagick change.
51 +
52 +commit 42ed35c68b7c199aa797e655fdc3547c5c3087d2
53 +Author: Paul Eggert <eggert@×××××××.edu>
54 +Date: Thu Aug 30 10:03:43 2018 -0700
55 +
56 + Pacify -Wdouble-promotion in ImageMagick code
57 +
58 +commit bf1b147b55e1328efca6e40181e79dd9a369895d
59 +Author: Glenn Morris <rgm@×××.org>
60 +Date: Mon Aug 27 22:03:25 2018 -0400
61 +
62 + * configure.ac, src/image.c: Tweak previous ImageMagick change.
63 +
64 +commit 5729486951e6a60db55ea17ee3bac9baf8b54f6a
65 +Author: Karl Otness <karl@××××××××××.com>
66 +Date: Mon Aug 27 21:57:44 2018 -0400
67 +
68 + Support ImageMagick version 7 (bug#25967)
69 +
70 +commit 686b520ff9ae25f9fa293a92e65b9331e192d142
71 +Author: Andreas Schwab <schwab@××××××××××.org>
72 +Date: Sun Jul 10 20:18:44 2016 +0200
73 +
74 + Fix memory leak in imagemagick-types
75 +
76 +--- emacs-24.3-orig/configure.ac
77 ++++ emacs-24.3/configure.ac
78 +@@ -1846,11 +1846,14 @@
79 + HAVE_IMAGEMAGICK=no
80 + if test "${HAVE_X11}" = "yes"; then
81 + if test "${with_imagemagick}" != "no"; then
82 +- ## 6.2.8 is the earliest version known to work, but earlier versions
83 +- ## might work - let us know if you find one.
84 +- ## 6.0.7 does not work. See bug#7955.
85 +- IMAGEMAGICK_MODULE="Wand >= 6.2.8"
86 +- PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
87 ++ PKG_CHECK_MODULES(IMAGEMAGICK, MagickWand >= 7, HAVE_IMAGEMAGICK=yes, :)
88 ++ if test $HAVE_IMAGEMAGICK = yes; then
89 ++ AC_DEFINE([HAVE_IMAGEMAGICK7], 1, [Define to 1 if using ImageMagick7.])
90 ++ else
91 ++ ## 6.3.5 is the earliest version known to work; see Bug#17339.
92 ++ ## 6.8.2 makes Emacs crash; see Bug#13867.
93 ++ PKG_CHECK_MODULES(IMAGEMAGICK, Wand >= 6.3.5 Wand != 6.8.2, HAVE_IMAGEMAGICK=yes, :)
94 ++ fi
95 + AC_SUBST(IMAGEMAGICK_CFLAGS)
96 + AC_SUBST(IMAGEMAGICK_LIBS)
97 +
98 +--- emacs-24.3-orig/src/image.c
99 ++++ emacs-24.3/src/image.c
100 +@@ -7620,11 +7620,20 @@
101 + /* The GIF library also defines DrawRectangle, but its never used in Emacs.
102 + Therefore rename the function so it doesn't collide with ImageMagick. */
103 + #define DrawRectangle DrawRectangleGif
104 +-#include <wand/MagickWand.h>
105 ++
106 ++#ifdef HAVE_IMAGEMAGICK7
107 ++# include <MagickWand/MagickWand.h>
108 ++# include <MagickCore/version.h>
109 ++/* ImageMagick 7 compatibility definitions. */
110 ++# define PixelSetMagickColor PixelSetPixelColor
111 ++typedef PixelInfo MagickPixelPacket;
112 ++#else
113 ++# include <wand/MagickWand.h>
114 ++# include <magick/version.h>
115 ++#endif
116 +
117 + /* ImageMagick 6.5.3 through 6.6.5 hid PixelGetMagickColor for some reason.
118 + Emacs seems to work fine with the hidden version, so unhide it. */
119 +-#include <magick/version.h>
120 + #if 0x653 <= MagickLibVersion && MagickLibVersion <= 0x665
121 + extern WandExport void PixelGetMagickColor (const PixelWand *,
122 + MagickPixelPacket *);
123 +@@ -8053,14 +8062,14 @@
124 + {
125 + Lisp_Object typelist = Qnil;
126 + size_t numf = 0;
127 +- ExceptionInfo ex;
128 ++ ExceptionInfo *ex;
129 + char **imtypes;
130 + size_t i;
131 + Lisp_Object Qimagemagicktype;
132 +
133 +- GetExceptionInfo(&ex);
134 +- imtypes = GetMagickList ("*", &numf, &ex);
135 +- DestroyExceptionInfo(&ex);
136 ++ ex = AcquireExceptionInfo ();
137 ++ imtypes = GetMagickList ("*", &numf, ex);
138 ++ DestroyExceptionInfo (ex);
139 +
140 + for (i = 0; i < numf; i++)
141 + {