diff --git a/.gitignore b/.gitignore index aa0ab41..47d01d6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /libimagequant-2.10.0.tar.gz /libimagequant-2.10.1.tar.gz /libimagequant-2.10.2.tar.gz +/libimagequant-2.11.0.tar.gz diff --git a/libimagequant.spec b/libimagequant.spec index 873e121..205e5e5 100644 --- a/libimagequant.spec +++ b/libimagequant.spec @@ -1,11 +1,13 @@ Name: libimagequant -Version: 2.10.2 +Version: 2.11.0 Release: 1%{?dist} Summary: Palette quantization library License: GPLv3+ and MIT URL: https://github.com/ImageOptim/libimagequant Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# Fix ‘acolormap’ not specified in enclosing ‘parallel’ +Patch0: libimagequant_openmp.patch BuildRequires: gcc @@ -24,7 +26,7 @@ developing applications that use %{name}. %prep -%autosetup +%autosetup -p1 %build @@ -54,6 +56,9 @@ install -Dpm 0644 %{name}.h %{buildroot}%{_includedir}/%{name}.h %changelog +* Mon Oct 30 2017 Sandro Mani - 2.11.0-1 +- Update to 2.11.0 + * Tue Aug 08 2017 Sandro Mani - 2.10.2-1 - Update to 2.10.2 diff --git a/libimagequant_openmp.patch b/libimagequant_openmp.patch new file mode 100644 index 0000000..1e2ec68 --- /dev/null +++ b/libimagequant_openmp.patch @@ -0,0 +1,12 @@ +diff -rupN libimagequant-2.11.0/libimagequant.c libimagequant-2.11.0-new/libimagequant.c +--- libimagequant-2.11.0/libimagequant.c 2017-10-27 16:44:26.000000000 +0200 ++++ libimagequant-2.11.0-new/libimagequant.c 2017-11-01 17:41:12.874643124 +0100 +@@ -1256,7 +1256,7 @@ LIQ_NONNULL static float remap_to_palett + kmeans_init(map, max_threads, average_color); + + #pragma omp parallel for if (rows*cols > 3000) \ +- schedule(static) default(none) shared(average_color) reduction(+:remapping_error) ++ schedule(static) default(none) shared(average_color) shared(acolormap) reduction(+:remapping_error) + for(int row = 0; row < rows; ++row) { + const f_pixel *const row_pixels = liq_image_get_row_f(input_image, row); + const f_pixel *const bg_pixels = input_image->background && acolormap[transparent_index].acolor.a < 1.f/256.f ? liq_image_get_row_f(input_image->background, row) : NULL; diff --git a/sources b/sources index 7ccb15b..23a366e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libimagequant-2.10.2.tar.gz) = c7d3ccd38456748bab07ca8d855c7b963ca5bbedff26af72a7da80892683bc31b902544274042010076b0a119bd256988a828d36fe1e786f31743948b324dbc9 +SHA512 (libimagequant-2.11.0.tar.gz) = 9a3c20ebdead89b8d78604a07b7e22e8d6d7537d5641d0f4e7d8749f20d31200dad0cb71f0bf3c9008a5f46dad08d85e72c1e5d41c0f773d1938840044a01726