diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-28 16:37:22 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-28 16:37:22 +0100 |
commit | 0c59fd5caa123ae7755b01bb4826776078bf1b81 (patch) | |
tree | 8a596e6251db168aba10901161e43d3c0d0f7477 /media-gfx/graphicsmagick/files | |
parent | a150275298c698f2489d072115ed2e2591204b31 (diff) |
gentoo auto-resync : 28:07:2023 - 16:37:22
Diffstat (limited to 'media-gfx/graphicsmagick/files')
3 files changed, 148 insertions, 0 deletions
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-001.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-001.patch new file mode 100644 index 000000000000..a505f8b7e2d8 --- /dev/null +++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-001.patch @@ -0,0 +1,69 @@ +https://bugs.gentoo.org/909834 +https://hg.osdn.net/view/graphicsmagick/GM/rev/f07f6a9c3a58 + +# HG changeset patch +# User Bob Friesenhahn <bfriesen@GraphicsMagick.org> +# Date 1675529318 21600 +# Node ID f07f6a9c3a5862971b17d1481bb53f0666b0b66c +# Parent 166bc6d3500ddeb243c7c1b25ca0d9eade8e3b55 +configure.ac: Test for interesting libjpeg-turbo 3.0 functions + +--- a/configure ++++ b/configure +@@ -26116,6 +26116,20 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + have_jpeg='yes' ++ # Test for interesting libjpeg-turbo 3.0 functions (which may also appear in other JPEG libraries) ++ for ac_func in jpeg_enable_lossless jpeg12_write_scanlines jpeg16_write_scanlines \ ++ jpeg12_read_scanlines jpeg16_read_scanlines ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +--- a/configure.ac ++++ b/configure.ac +@@ -2250,6 +2250,9 @@ + AC_DEFINE([HasJPEG],[1],[Define if you have JPEG library]) + AC_MSG_RESULT([yes]) + have_jpeg='yes' ++ # Test for interesting libjpeg-turbo 3.0 functions (which may also appear in other JPEG libraries) ++ AC_CHECK_FUNCS([jpeg_enable_lossless jpeg12_write_scanlines jpeg16_write_scanlines \ ++ jpeg12_read_scanlines jpeg16_read_scanlines]) + fi + else + AC_MSG_RESULT([no]) +--- a/magick/magick_config.h.in ++++ b/magick/magick_config.h.in +@@ -149,6 +149,21 @@ + /* Define to 1 if you have the `jas_init_library' function. */ + #undef HAVE_JAS_INIT_LIBRARY + ++/* Define to 1 if you have the `jpeg12_read_scanlines' function. */ ++#undef HAVE_JPEG12_READ_SCANLINES ++ ++/* Define to 1 if you have the `jpeg12_write_scanlines' function. */ ++#undef HAVE_JPEG12_WRITE_SCANLINES ++ ++/* Define to 1 if you have the `jpeg16_read_scanlines' function. */ ++#undef HAVE_JPEG16_READ_SCANLINES ++ ++/* Define to 1 if you have the `jpeg16_write_scanlines' function. */ ++#undef HAVE_JPEG16_WRITE_SCANLINES ++ ++/* Define to 1 if you have the `jpeg_enable_lossless' function. */ ++#undef HAVE_JPEG_ENABLE_LOSSLESS ++ + /* Define if you have the <lcms2.h> header file. */ + #undef HAVE_LCMS2_H + diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-002.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-002.patch new file mode 100644 index 000000000000..d45fc6d9605b --- /dev/null +++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-002.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/909834 +https://hg.osdn.net/view/graphicsmagick/GM/rev/166bc6d3500d + +# HG changeset patch +# User Bob Friesenhahn <bfriesen@GraphicsMagick.org> +# Date 1675522420 21600 +# Node ID 166bc6d3500ddeb243c7c1b25ca0d9eade8e3b55 +# Parent 8c82d3be78692071e2f74fb1b9543e9b8384d7cb +JPEG: Ignore C_LOSSLESS_SUPPORTED/D_LOSSLESS_SUPPORTED defined by JPEG-Turbo + +--- a/coders/jpeg.c ++++ b/coders/jpeg.c +@@ -1,5 +1,5 @@ + /* +-% Copyright (C) 2003-2022 GraphicsMagick Group ++% Copyright (C) 2003-2023 GraphicsMagick Group + % Copyright (C) 2002 ImageMagick Studio + % Copyright 1991-1999 E. I. du Pont de Nemours and Company + % +@@ -954,7 +954,7 @@ + i; + + save_quality=0; +-#ifdef D_LOSSLESS_SUPPORTED ++#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(D_LOSSLESS_SUPPORTED) + if (image->compression==LosslessJPEGCompression) + { + save_quality=100; +@@ -1461,7 +1461,9 @@ + } + #endif + #if (JPEG_LIB_VERSION >= 61) && defined(D_PROGRESSIVE_SUPPORTED) +-#ifdef D_LOSSLESS_SUPPORTED ++#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(D_LOSSLESS_SUPPORTED) ++ /* This code is based on a patch to IJG JPEG 6b, or somesuch. Standard ++ library does not have a 'process' member. */ + image->interlace= + jpeg_info.process == JPROC_PROGRESSIVE ? LineInterlace : NoInterlace; + image->compression=jpeg_info.process == JPROC_LOSSLESS ? +@@ -2896,7 +2898,7 @@ + if ((image->compression == LosslessJPEGCompression) || + (quality > 100)) + { +-#if defined(C_LOSSLESS_SUPPORTED) ++#if !defined(LIBJPEG_TURBO_VERSION_NUMBER) && defined(C_LOSSLESS_SUPPORTED) + if (quality < 100) + ThrowException(&image->exception,CoderWarning, + LosslessToLossyJPEGConversion,(char *) NULL); diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-003.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-003.patch new file mode 100644 index 000000000000..5b72576b1512 --- /dev/null +++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.40-libjpeg-turbo-3-003.patch @@ -0,0 +1,31 @@ +https://bugs.gentoo.org/909834 +https://hg.osdn.net/view/graphicsmagick/GM/rev/03561d79e918 + +# HG changeset patch +# User Bob Friesenhahn <bfriesen@GraphicsMagick.org> +# Date 1676216369 21600 +# Node ID 03561d79e9180a65d204b6240a5846fd8b01d1b4 +# Parent 6eb67db043d537ae350409535873c5cbf55ba14c +ReadJPEGImage(): Use MagickAllocateResourceLimitedClearedArray() + +--- a/coders/jpeg.c ++++ b/coders/jpeg.c +@@ -1695,7 +1695,7 @@ + } + } + +- jpeg_pixels=MagickAllocateResourceLimitedArray(JSAMPLE *, ++ jpeg_pixels=MagickAllocateResourceLimitedClearedArray(JSAMPLE *, + jpeg_info.output_components, + MagickArraySize(image->columns, + sizeof(JSAMPLE))); +@@ -1704,9 +1704,6 @@ + jpeg_destroy_decompress(&jpeg_info); + ThrowJPEGReaderException(ResourceLimitError,MemoryAllocationFailed,image); + } +- (void) memset(jpeg_pixels,0,MagickArraySize(jpeg_info.output_components, +- MagickArraySize(image->columns, +- sizeof(JSAMPLE)))); + + /* + Extended longjmp-based error handler (with jpeg_pixels) |