From 76b3aa021ed265cbaec8a48fcde202157b3f7b55 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 28 May 2017 18:12:07 +0200 Subject: add upstream patch for #501 + --with-openjp2 --- ImageMagick7.spec | 16 +++++++++------- f13c6b54a879aaa771ec64b5a066b939e8f8e7f0.patch | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 f13c6b54a879aaa771ec64b5a066b939e8f8e7f0.patch diff --git a/ImageMagick7.spec b/ImageMagick7.spec index 0831bc2..aa96d9b 100644 --- a/ImageMagick7.spec +++ b/ImageMagick7.spec @@ -16,6 +16,7 @@ %global with_djvu 1 %global with_webp 1 +%global with_jp2 1 %if 0%{?fedora} >= 16 || 0%{?rhel} >= 7 %global with_jbig 1 @@ -23,12 +24,6 @@ %global with_jbig 0 %endif -%if 0%{?fedora} >= 21 -%global with_jp2 1 -%else -%global with_jp2 0 -%endif - %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 %global with_gslib 1 %else @@ -65,13 +60,15 @@ Name: %{libname} Name: %{libname}7 %endif Version: %{VER}.%{Patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} Summary: An X application for displaying and manipulating images Group: Applications/Multimedia License: ImageMagick Url: http://www.imagemagick.org/ Source0: ftp://ftp.ImageMagick.org/pub/ImageMagick/ImageMagick-%{VER}-%{Patchlevel}.tar.xz +Patch0: f13c6b54a879aaa771ec64b5a066b939e8f8e7f0.patch + BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel BuildRequires: libtiff-devel, giflib-devel, zlib-devel %if 0%{?fedora} >= 7 || 0%{?rhel} >= 6 @@ -288,6 +285,7 @@ however. %prep %setup -q -n %{libname}-%{VER}-%{Patchlevel} +%patch0 -p1 -b .upstream # for %%doc mkdir Magick++/examples @@ -503,6 +501,10 @@ make %{?_smp_mflags} check %changelog +* Sun May 28 2017 Remi Collet - 7.0.5.8-2 +- add upstream patch for #501 +- use --with-openjp2 option on Enterprise Linux + * Sun May 28 2017 Remi Collet - 7.0.5.8-1 - update to version 7.0.5 patch level 8 - open https://github.com/ImageMagick/ImageMagick/issues/501 diff --git a/f13c6b54a879aaa771ec64b5a066b939e8f8e7f0.patch b/f13c6b54a879aaa771ec64b5a066b939e8f8e7f0.patch new file mode 100644 index 0000000..231f816 --- /dev/null +++ b/f13c6b54a879aaa771ec64b5a066b939e8f8e7f0.patch @@ -0,0 +1,22 @@ +From f13c6b54a879aaa771ec64b5a066b939e8f8e7f0 Mon Sep 17 00:00:00 2001 +From: Cristy +Date: Sun, 28 May 2017 06:42:25 -0400 +Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/501 + +--- + coders/jp2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/coders/jp2.c b/coders/jp2.c +index 94b775e1ca..b9fe4ab001 100644 +--- a/coders/jp2.c ++++ b/coders/jp2.c +@@ -391,7 +391,7 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception) + (jp2_image->comps[0].dy != jp2_image->comps[i].dy) || + (jp2_image->comps[0].prec != jp2_image->comps[i].prec) || + (jp2_image->comps[0].sgnd != jp2_image->comps[i].sgnd) || +- (jp2_image->comps[i].data == NULL)) ++ ((image->ping == MagickFalse) && (jp2_image->comps[i].data == NULL))) + { + opj_destroy_codec(jp2_codec); + opj_image_destroy(jp2_image); -- cgit