diff --git a/lcms2-2.11.tar.gz b/lcms2-2.11.tar.gz new file mode 100644 index 0000000..0b61045 --- /dev/null +++ b/lcms2-2.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc49b9c8e4d7cdff376040571a722902b682a795bf92985a85b48854c270772e +size 6574121 diff --git a/lcms2-2.9.tar.gz b/lcms2-2.9.tar.gz deleted file mode 100644 index 2eb6a0f..0000000 --- a/lcms2-2.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20 -size 10974649 diff --git a/lcms2-cgats-memory-allocation.patch b/lcms2-cgats-memory-allocation.patch deleted file mode 100644 index 000688b..0000000 --- a/lcms2-cgats-memory-allocation.patch +++ /dev/null @@ -1,49 +0,0 @@ -Partial patch. -From 768f70ca405cd3159d990e962d54456773bb8cf8 Mon Sep 17 00:00:00 2001 -From: Marti Maria -Date: Wed, 15 Aug 2018 20:07:56 +0200 -Subject: [PATCH] Upgrade Visual studio 2017 15.8 - -... -- Add check on CGATS memory allocation (thanks to Quang Nguyen for -pointing out this) ---- - Projects/VC2017/jpegicc/jpegicc.vcxproj | 1 + - Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj | 2 +- - Projects/VC2017/lcms2_static/lcms2_static.vcxproj | 2 +- - Projects/VC2017/linkicc/linkicc.vcxproj | 2 +- - Projects/VC2017/psicc/psicc.vcxproj | 2 +- - Projects/VC2017/testbed/testbed.vcxproj | 2 +- - Projects/VC2017/tiffdiff/tiffdiff.vcxproj | 2 +- - Projects/VC2017/tifficc/tifficc.vcxproj | 2 +- - Projects/VC2017/transicc/transicc.vcxproj | 1 + - src/cmscgats.c | 14 ++++++++++---- - 10 files changed, 19 insertions(+), 11 deletions(-) - -diff --git a/src/cmscgats.c b/src/cmscgats.c -index 1a87613..8c3e96d 100644 ---- a/src/cmscgats.c -+++ b/src/cmscgats.c -@@ -1506,10 +1506,16 @@ void AllocateDataSet(cmsIT8* it8) - t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); - t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS")); - -- t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*)); -- if (t->Data == NULL) { -+ if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe) -+ { -+ SynError(it8, "AllocateDataSet: too much data"); -+ } -+ else { -+ t->Data = (char**)AllocChunk(it8, ((cmsUInt32Number)t->nSamples + 1) * ((cmsUInt32Number)t->nPatches + 1) * sizeof(char*)); -+ if (t->Data == NULL) { - -- SynError(it8, "AllocateDataSet: Unable to allocate data array"); -+ SynError(it8, "AllocateDataSet: Unable to allocate data array"); -+ } - } - - } --- -2.19.0 - diff --git a/lcms2-ocloexec.patch b/lcms2-ocloexec.patch index 60bf406..00c40bc 100644 --- a/lcms2-ocloexec.patch +++ b/lcms2-ocloexec.patch @@ -1,8 +1,7 @@ -Index: src/cmscgats.c -=================================================================== ---- src/cmscgats.c 2012-09-10 18:01:51.000000000 +0200 -+++ src/cmscgats.c 2012-10-28 19:50:34.772962052 +0100 -@@ -914,7 +914,7 @@ +diff -Naur lcms2-2.11.orig/src/cmscgats.c lcms2-2.11/src/cmscgats.c +--- lcms2-2.11.orig/src/cmscgats.c 2020-08-05 15:14:07.488229633 +0200 ++++ lcms2-2.11/src/cmscgats.c 2020-08-05 15:16:41.214899028 +0200 +@@ -930,7 +930,7 @@ return; } @@ -11,7 +10,7 @@ Index: src/cmscgats.c if (FileNest->Stream == NULL) { SynError(it8, "File %s not found", FileNest->FileName); -@@ -1744,7 +1744,7 @@ +@@ -1773,7 +1773,7 @@ memset(&sd, 0, sizeof(sd)); @@ -20,7 +19,7 @@ Index: src/cmscgats.c if (!sd.stream) return FALSE; for (i=0; i < it8 ->TablesCount; i++) { -@@ -2252,7 +2252,7 @@ +@@ -2266,7 +2266,7 @@ cmsUInt32Number Size; cmsUInt8Number Ptr[133]; @@ -29,7 +28,7 @@ Index: src/cmscgats.c if (!fp) { cmsSignalError(0, cmsERROR_FILE, "File '%s' not found", FileName); return FALSE; -@@ -2330,7 +2330,7 @@ +@@ -2349,7 +2349,7 @@ if (!hIT8) return NULL; diff --git a/lcms2-visibility.patch b/lcms2-visibility.patch index 2547897..c6d2f77 100644 --- a/lcms2-visibility.patch +++ b/lcms2-visibility.patch @@ -1,5 +1,6 @@ ---- src/lcms2_internal.h.orig -+++ src/lcms2_internal.h +diff -Naur lcms2-2.11.orig/src/lcms2_internal.h lcms2-2.11/src/lcms2_internal.h +--- lcms2-2.11.orig/src/lcms2_internal.h 2020-08-05 15:14:07.484229667 +0200 ++++ lcms2-2.11/src/lcms2_internal.h 2020-08-05 15:19:51.517248023 +0200 @@ -37,6 +37,7 @@ // assert macro is part of C99 as per 7.2 #include @@ -8,7 +9,7 @@ // Some needed constants #ifndef M_PI # define M_PI 3.14159265358979323846 -@@ -602,4 +603,5 @@ +@@ -1125,4 +1126,5 @@ #define _lcms_internal_H diff --git a/lcms2.changes b/lcms2.changes index 7af761b..3b78bb7 100644 --- a/lcms2.changes +++ b/lcms2.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Wed Aug 5 13:31:44 UTC 2020 - Matthias Eliasson + +- Update to 2.11 + * Fixed __cpuid() on fast float plugin to allow gnu gcc + * Fixed copy alpha bounds check + * Fixed data race condition on contexts pool + * Fixed LUT16 write matrix on multichannel V2 profiles +- Changes in 2.10 + * Added a compilation toggle to remove "register" keyword in API. + * Previously commercial, fast_float plug-in is now released as open source + under GPL3 license. + * MD5 functions are now accesible through plug-in API. + * Added support for Visual Studio 2019 + * Bug fixing. +- Drop lcms2-cgats-memory-allocation.patch, its now in upstream code +- Refresh patches +- Run spec-cleaner + ------------------------------------------------------------------- Wed Oct 3 17:34:41 CEST 2018 - sbrabec@suse.com diff --git a/lcms2.spec b/lcms2.spec index f6b184e..6538b9b 100644 --- a/lcms2.spec +++ b/lcms2.spec @@ -1,7 +1,7 @@ # # spec file for package lcms2 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,23 +17,25 @@ Name: lcms2 +Version: 2.11 +Release: 0 Summary: Little CMS Engine - A color managment library and tools License: MIT Group: Productivity/Graphics/Other -Url: http://www.littlecms.com/ -Version: 2.9 -Release: 0 - +URL: http://www.littlecms.com/ +Source0: http://sourceforge.net/projects/lcms/files/lcms/%{version}/%{name}-%{version}.tar.gz +Source1: baselibs.conf +Patch1: lcms2-ocloexec.patch +Patch2: lcms2-visibility.patch %if 0%{?suse_version} BuildRequires: autoconf BuildRequires: glibc-devel BuildRequires: libjpeg-devel BuildRequires: libtiff-devel BuildRequires: libtool -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: zlib-devel %endif - %if 0%{?fedora_version} BuildRequires: gcc BuildRequires: libjpeg-devel @@ -41,7 +43,6 @@ BuildRequires: libtiff-devel BuildRequires: pkgconfig BuildRequires: zlib-devel %endif - %if 0%{?mandriva_version} BuildRequires: gcc BuildRequires: libjpeg-devel @@ -50,14 +51,6 @@ BuildRequires: pkgconfig BuildRequires: zlib-devel %endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: http://sourceforge.net/projects/lcms/files/lcms/%{version}/%{name}-%{version}.tar.gz -Source1: baselibs.conf -Patch1: lcms2-ocloexec.patch -Patch2: lcms2-visibility.patch -# PATCH-FIX-SECURITY lcms2-cgats-memory-allocation.patch bsc1108813 CVE-2018-16435 sbrabec@suse.cz -- Add check on CGATS memory allocation. -Patch3: lcms2-cgats-memory-allocation.patch - %description Littlecms is a small speed optimized color management engine. Little CMS intends to be a small-footprint color management engine @@ -93,59 +86,51 @@ BuildArch: noarch %description -n liblcms2-doc This package contains user and developer documentation for lcms2. - %prep -%setup -q -%patch1 -%patch2 -%patch3 -p1 +%autosetup -p1 chmod a-x doc/* COPYING AUTHORS %build autoreconf -fiv -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +export CFLAGS="%{optflags} -fno-strict-aliasing" +export CXXFLAGS="%{optflags} -fno-strict-aliasing" # FIXME --without-threads is a workaround for a linker error %configure --disable-static --without-threads -make %{?_smp_flags} +%make_build %check # FIXME before submitting to factory - make %{?_smp_flags} check || true - make utils + %make_build check || true + %make_build utils %install -make install DESTDIR=%{buildroot} +%make_install rm %{buildroot}/%{_libdir}/liblcms2.la %post -n liblcms2-2 -p /sbin/ldconfig - %postun -n liblcms2-2 -p /sbin/ldconfig %files -%defattr(-,root,root) -%doc COPYING AUTHORS +%license COPYING +%doc AUTHORS %{_bindir}/* %{_mandir}/man?/*.* %files -n liblcms2-2 -%defattr(-,root,root) %{_libdir}/liblcms2.so.2* %files -n liblcms2-devel -%defattr(-,root,root) %{_includedir}/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %files -n liblcms2-doc -%defattr(-,root,root) -%doc doc/*.pdf +%doc doc/*.odt %changelog