summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-06-24 11:46:02 +0200
committerRemi Collet <remi@remirepo.net>2020-06-24 11:46:02 +0200
commitbef7e7b33aee238302bdebc5686b69c6e5e35688 (patch)
tree1864a972a209232beb7cf42062c0910add1015b0
parente06e600c217b884d89bf2f12560103082a922dba (diff)
add fix from https://github.com/ImageMagick/ImageMagick6/pull/86
-rw-r--r--86.patch44
-rw-r--r--ImageMagick6.spec12
2 files changed, 51 insertions, 5 deletions
diff --git a/86.patch b/86.patch
new file mode 100644
index 0000000..97b1507
--- /dev/null
+++ b/86.patch
@@ -0,0 +1,44 @@
+From c99f35ad120aa9f8cc95f1262b4f5ecf8ef7598a Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 24 Jun 2020 11:06:47 +0200
+Subject: [PATCH] fix #85 regression in DrawSetTextInterlineSpacing
+
+revert 77849ee5a5f0481e0bfd67f72f6b7e07c5d2ba46
+revert 147e71502f8f08f986c35bb1387dc0e7543dbcb7
+
+also fix https://github.com/ImageMagick/ImageMagick/issues/2178
+---
+ magick/annotate.c | 7 ++-----
+ magick/draw.c | 1 +
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/magick/annotate.c b/magick/annotate.c
+index 32a08e767..89b06ba36 100644
+--- a/magick/annotate.c
++++ b/magick/annotate.c
+@@ -324,11 +324,8 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
+ (void) CloneString(&annotate->text,textlist[i]);
+ if ((metrics.width == 0) || (annotate->gravity != NorthWestGravity))
+ (void) GetTypeMetrics(image,annotate,&metrics);
+- height=(size_t) ceil(metrics.ascent-metrics.descent+
+- draw_info->interline_spacing-0.5);
+- if (height == 0)
+- height=(size_t) ceil(draw_info->pointsize+draw_info->interline_spacing-
+- 0.5);
++ height=(ssize_t) (metrics.ascent-metrics.descent+
++ draw_info->interline_spacing+0.5);
+ switch (annotate->gravity)
+ {
+ case UndefinedGravity:
+diff --git a/magick/draw.c b/magick/draw.c
+index 5950d6ff2..194a9ee27 100644
+--- a/magick/draw.c
++++ b/magick/draw.c
+@@ -5781,6 +5781,7 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
+ draw_info->pointsize=12.0;
+ if (fabs(clone_info->pointsize) >= MagickEpsilon)
+ draw_info->pointsize=clone_info->pointsize;
++ draw_info->interline_spacing=draw_info->pointsize;
+ draw_info->undercolor.opacity=(Quantum) TransparentOpacity;
+ draw_info->border_color=clone_info->border_color;
+ draw_info->compose=OverCompositeOp;
diff --git a/ImageMagick6.spec b/ImageMagick6.spec
index 3a28c6e..8fe3f52 100644
--- a/ImageMagick6.spec
+++ b/ImageMagick6.spec
@@ -12,7 +12,7 @@
%global Patchlevel 21
%global incsuffixe -6
%global libsuffixe -6.Q16
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
%global with_djvu 1
%global with_webp 1
@@ -71,7 +71,7 @@ Name: %{libname}6
%global move 1
%endif
Version: %{VER}.%{Patchlevel}
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: An X application for displaying and manipulating images
License: ImageMagick
Url: http://www.imagemagick.org/
@@ -79,6 +79,7 @@ Url: http://www.imagemagick.org/
Source0: https://www.imagemagick.org/download/ImageMagick-%{VER}-%{Patchlevel}.tar.xz
Patch0: https://github.com/ImageMagick/ImageMagick6/commit/147e71502f8f08f986c35bb1387dc0e7543dbcb7.patch
+Patch1: https://patch-diff.githubusercontent.com/raw/ImageMagick/ImageMagick6/pull/86.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@@ -382,6 +383,7 @@ however.
%prep
%setup -q -n %{libname}-%{VER}-%{Patchlevel}
%patch0 -p1
+%patch1 -p1
# for %%doc
mkdir Magick++/examples
@@ -516,7 +518,7 @@ multilibFileVersions %{buildroot}%{_includedir}/%{libname}-6/magick/magick-basec
multilibFileVersions %{buildroot}%{_includedir}/%{libname}-6/magick/version.h
-%if %{with_tests}
+%if %{with tests}
%check
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
make %{?_smp_mflags} check
@@ -640,8 +642,8 @@ fi
%changelog
-* Wed Jun 24 2020 Remi Collet <remi@remirepo.net> - 6.9.11.21-2
-- test build for upstream fix
+* Wed Jun 24 2020 Remi Collet <remi@remirepo.net> - 6.9.11.21-3
+- add fix from https://github.com/ImageMagick/ImageMagick6/pull/86
* Wed Jun 24 2020 Remi Collet <remi@remirepo.net> - 6.9.11.21-1
- update to version 6.9.11 patch level 21 still affected by