From 73cd0d127410aabfa8200a9d4c49b23fee8a0eba Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 28 May 2017 18:31:20 +0200 Subject: add upstream patch for #501 + --with-openjp2 --- ImageMagick6.spec | 16 +++++++++------- b0c5222ce31e8f941fa02ff9c7a040fb2db30dbc.patch | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 b0c5222ce31e8f941fa02ff9c7a040fb2db30dbc.patch diff --git a/ImageMagick6.spec b/ImageMagick6.spec index d9de3ca..2563d31 100644 --- a/ImageMagick6.spec +++ b/ImageMagick6.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 @@ -62,13 +57,15 @@ Name: %{libname} Name: %{libname}6 %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: b0c5222ce31e8f941fa02ff9c7a040fb2db30dbc.patch + BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel BuildRequires: libtiff-devel, giflib-devel, zlib-devel %if 0%{?fedora} >= 7 || 0%{?rhel} >= 6 @@ -289,6 +286,7 @@ however. %prep %setup -q -n %{libname}-%{VER}-%{Patchlevel} +%patch0 -p1 -b .upstream # for %%doc mkdir Magick++/examples @@ -526,6 +524,10 @@ fi %changelog +* Sun May 28 2017 Remi Collet - 6.9.8.7-2 +- add upstream patch for #501 +- use --with-openjp2 option on Enterprise Linux + * Sun May 28 2017 Remi Collet - 6.9.8.7-1 - update to version 6.9.8 patch level 7 - open https://github.com/ImageMagick/ImageMagick/issues/501 diff --git a/b0c5222ce31e8f941fa02ff9c7a040fb2db30dbc.patch b/b0c5222ce31e8f941fa02ff9c7a040fb2db30dbc.patch new file mode 100644 index 0000000..e7923ca --- /dev/null +++ b/b0c5222ce31e8f941fa02ff9c7a040fb2db30dbc.patch @@ -0,0 +1,22 @@ +From b0c5222ce31e8f941fa02ff9c7a040fb2db30dbc Mon Sep 17 00:00:00 2001 +From: Cristy +Date: Sun, 28 May 2017 06:43:22 -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 2d519e692e..25b1798fdc 100644 +--- a/coders/jp2.c ++++ b/coders/jp2.c +@@ -393,7 +393,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