summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--2195.patch64
-rw-r--r--ImageMagick7.spec19
2 files changed, 75 insertions, 8 deletions
diff --git a/2195.patch b/2195.patch
new file mode 100644
index 0000000..5fc006f
--- /dev/null
+++ b/2195.patch
@@ -0,0 +1,64 @@
+From f3381cbb2f02d6627f6bc4f21c8886a57102c8b5 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 24 Jun 2020 11:16:22 +0200
+Subject: [PATCH 2/3] Revert
+ "https://github.com/ImageMagick/ImageMagick/issues/2178"
+
+This reverts commit d91c43f3b92c1bf33e38bf54aee5c6303d54ebb4.
+---
+ MagickCore/annotate.c | 6 ++----
+ coders/caption.c | 2 +-
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c
+index 3c9889a1c4..3c649ae346 100644
+--- a/MagickCore/annotate.c
++++ b/MagickCore/annotate.c
+@@ -335,10 +335,8 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
+ (void) CloneString(&annotate->text,textlist[i]);
+ if ((metrics.width == 0) || (annotate->gravity != NorthWestGravity))
+ (void) GetTypeMetrics(image,annotate,&metrics,exception);
+- height=(size_t) ceil(metrics.ascent-metrics.descent+
+- draw_info->interline_spacing-0.5);
+- if (height == 0)
+- height=(size_t) draw_info->pointsize;
++ height=(ssize_t) (metrics.ascent-metrics.descent+
++ draw_info->interline_spacing+0.5);
+ switch (annotate->gravity)
+ {
+ case UndefinedGravity:
+diff --git a/coders/caption.c b/coders/caption.c
+index c7fa2a5074..44f3b7a4a4 100644
+--- a/coders/caption.c
++++ b/coders/caption.c
+@@ -228,7 +228,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
+ option=GetImageOption(image_info,"caption:max-pointsize");
+ if (option != (const char*) NULL)
+ {
+- high=StringToDouble(option,(char **) NULL);
++ high=StringToDouble(option,(char**) NULL);
+ if (high < 1.0)
+ high=1.0;
+ high+=1.0;
+
+From 8a2e5319b5d75775b2afdcb24c985929ac1652d7 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 24 Jun 2020 11:24:18 +0200
+Subject: [PATCH 3/3] Fix regression in DrawSetTextInterlineSpacing
+
+---
+ MagickCore/draw.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/MagickCore/draw.c b/MagickCore/draw.c
+index 5a143a2b09..26d0d19b6b 100644
+--- a/MagickCore/draw.c
++++ b/MagickCore/draw.c
+@@ -5877,6 +5877,7 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
+ draw_info->text_antialias=clone_info->antialias;
+ if (fabs(clone_info->pointsize) >= MagickEpsilon)
+ draw_info->pointsize=clone_info->pointsize;
++ draw_info->interline_spacing=draw_info->pointsize;
+ draw_info->border_color=clone_info->border_color;
+ if (clone_info->server_name != (char *) NULL)
+ draw_info->server_name=AcquireString(clone_info->server_name);
diff --git a/ImageMagick7.spec b/ImageMagick7.spec
index e6939e4..51a80e1 100644
--- a/ImageMagick7.spec
+++ b/ImageMagick7.spec
@@ -13,14 +13,10 @@
%global incsuffixe -7
%global libsuffixe -7.Q16HDRI
%ifarch x86_64
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
%else
-%if 0%{?fedora} < 29 && 0%{?rhel} < 7
# https://github.com/ImageMagick/ImageMagick/issues/1570
-%global with_tests 0%{?_with_tests:1}
-%else
-%global with_tests 0%{!?_without_tests:1}
-%endif
+%bcond_with tests
%endif
%global with_djvu 1
@@ -73,7 +69,7 @@ Name: %{libname}
Name: %{libname}7
%endif
Version: %{VER}.%{Patchlevel}
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: An X application for displaying and manipulating images
License: ImageMagick
Url: http://www.imagemagick.org/
@@ -81,6 +77,8 @@ Url: http://www.imagemagick.org/
#Source0: ftp://ftp.imagemagick.org/pub/ImageMagick/releases/ImageMagick-%%{VER}-%%{Patchlevel}.tar.xz
Source0: https://www.imagemagick.org/download/ImageMagick-%{VER}-%{Patchlevel}.tar.xz
+Patch0: https://patch-diff.githubusercontent.com/raw/ImageMagick/ImageMagick/pull/2195.patch
+
BuildRequires: gcc
BuildRequires: gcc-c++
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
@@ -379,6 +377,7 @@ however.
%prep
%setup -q -n %{libname}-%{VER}-%{Patchlevel}
+%patch0 -p1
# for %%doc
mkdir Magick++/examples
@@ -513,7 +512,7 @@ multilibFileVersions %{buildroot}%{_includedir}/%{libname}%{incsuffixe}/MagickCo
multilibFileVersions %{buildroot}%{_includedir}/%{libname}%{incsuffixe}/MagickCore/version.h
-%if %{with_tests}
+%if %{with tests}
%check
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
make %{?_smp_mflags} check
@@ -629,6 +628,10 @@ fi
%changelog
+* Wed Jun 24 2020 Remi Collet <remi@remirepo.net> - 7.0.10.21-3
+- add fix from https://github.com/ImageMagick/ImageMagick6/pull/86
+ https://github.com/ImageMagick/ImageMagick/pull/2195
+
* Wed Jun 24 2020 Remi Collet <remi@remirepo.net> - 7.0.10.21-1
- update to version 7.0.10 patch level 21