From b50cc9bd3cd8d9504ab858608118fc395fb8c3b89ac86aa817cddd3d287c288c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 14:18:10 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main lcms2 revision 3b7d2db6aa9f68236416e5ce36604f43 --- .gitattributes | 23 +++ baselibs.conf | 6 + lcms2-2.16.tar.gz | 3 + lcms2-ocloexec.patch | 40 ++++++ lcms2-visibility.patch | 18 +++ lcms2.changes | 307 +++++++++++++++++++++++++++++++++++++++++ lcms2.spec | 133 ++++++++++++++++++ 7 files changed, 530 insertions(+) create mode 100644 .gitattributes create mode 100644 baselibs.conf create mode 100644 lcms2-2.16.tar.gz create mode 100644 lcms2-ocloexec.patch create mode 100644 lcms2-visibility.patch create mode 100644 lcms2.changes create mode 100644 lcms2.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..9c07aca --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,6 @@ +liblcms2-2 + provides "liblcms2- = " + obsoletes "liblcms2- <= " +liblcms2-devel + requires -liblcms2- + requires "liblcms2- = " diff --git a/lcms2-2.16.tar.gz b/lcms2-2.16.tar.gz new file mode 100644 index 0000000..e3f2d04 --- /dev/null +++ b/lcms2-2.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d873d34ad8b9b4cea010631f1a6228d2087475e4dc5e763eb81acc23d9d45a51 +size 7632822 diff --git a/lcms2-ocloexec.patch b/lcms2-ocloexec.patch new file mode 100644 index 0000000..26beeb1 --- /dev/null +++ b/lcms2-ocloexec.patch @@ -0,0 +1,40 @@ +Index: b/src/cmscgats.c +=================================================================== +--- a/src/cmscgats.c 2022-11-01 12:13:11.000000000 +0200 ++++ b/src/cmscgats.c 2022-11-11 14:16:56.842380821 +0200 +@@ -1017,7 +1017,7 @@ void InSymbol(cmsIT8* it8) + return; + } + +- FileNest->Stream = fopen(FileNest->FileName, "rt"); ++ FileNest->Stream = fopen(FileNest->FileName, "rte"); + if (FileNest->Stream == NULL) { + + SynError(it8, "File %s not found", FileNest->FileName); +@@ -1912,7 +1912,7 @@ cmsBool CMSEXPORT cmsIT8SaveToFile(cmsHA + + memset(&sd, 0, sizeof(sd)); + +- sd.stream = fopen(cFileName, "wt"); ++ sd.stream = fopen(cFileName, "wte"); + if (!sd.stream) return FALSE; + + for (i=0; i < it8 ->TablesCount; i++) { +@@ -2423,7 +2423,7 @@ cmsBool IsMyFile(const char* FileName) + cmsUInt32Number Size; + cmsUInt8Number Ptr[133]; + +- fp = fopen(FileName, "rt"); ++ fp = fopen(FileName, "rte"); + if (!fp) { + cmsSignalError(0, cmsERROR_FILE, "File '%s' not found", FileName); + return FALSE; +@@ -2506,7 +2506,7 @@ cmsHANDLE CMSEXPORT cmsIT8LoadFromFile( + if (!hIT8) return NULL; + + +- it8 ->FileStack[0]->Stream = fopen(cFileName, "rt"); ++ it8 ->FileStack[0]->Stream = fopen(cFileName, "rte"); + + if (!it8 ->FileStack[0]->Stream) { + cmsIT8Free(hIT8); diff --git a/lcms2-visibility.patch b/lcms2-visibility.patch new file mode 100644 index 0000000..0e64d35 --- /dev/null +++ b/lcms2-visibility.patch @@ -0,0 +1,18 @@ +Index: b/src/lcms2_internal.h +=================================================================== +--- a/src/lcms2_internal.h 2022-11-01 12:13:11.000000000 +0200 ++++ b/src/lcms2_internal.h 2022-11-11 14:17:12.797708563 +0200 +@@ -37,6 +37,7 @@ + // assert macro is part of C99 as per 7.2 + #include + ++#pragma GCC visibility push(hidden) + // Some needed constants + #ifndef M_PI + # define M_PI 3.14159265358979323846 +@@ -1149,4 +1150,5 @@ cmsBool _cmsBuildRGB2XYZtransferMatrix + cmsBool _cmsGetTime(struct tm* ptr_time); + + #define _lcms_internal_H ++#pragma GCC visibility pop + #endif diff --git a/lcms2.changes b/lcms2.changes new file mode 100644 index 0000000..7a06ffb --- /dev/null +++ b/lcms2.changes @@ -0,0 +1,307 @@ +------------------------------------------------------------------- +Mon Dec 4 20:27:04 UTC 2023 - Antonio Teixeira + +- update to 2.16: + * New: import .CUBE files as RGB device links + * New: Read/Write MHC2 tags for Windows GPU access + * New: Support for UTF8 on multi-localized Unicode functions + * New: Support for OkLab color space, built-in and formatter. + * Improved: floating point transforms float -> integer are now + honored as float + * Improved: MSYS2, mingw is now supported + * Improved: preferred CMM, platform and creator now survives profile + edition. + * Fixed: tificc now can deal with Lab TIFF + * Fixed: code can now be compiled by a C++17 compiler, "register" + keyword use detected at compile time. + * Fixed: Reverted PostScript creation that corrupted some interpreters. + * Bug fixing + +------------------------------------------------------------------- +Sat Apr 15 09:49:37 UTC 2023 - Dirk Müller + +- update to 2.15: + * New MESON build system, many thanks to amispark and Lovell + Fuller for bringing this. + * Fixed a bug that caused memory corruption on colord + * cmsReadRawTag can read portions of tags again. Removing this + caused colord to segfault when dumping profiles + * Added more checks based of fuzzer discoveries. + * MSYS2 can now compile lcms2 + * Checked on Apple Silicon M1 and M2 + * Fixed a bug of fastfloat plug-in that affected Krita CMYK + color selector +- drop 0001-fix-memory-corruption-when-unregistering-plugins.patch (upstream) + +------------------------------------------------------------------- +Mon Dec 12 08:50:13 UTC 2022 - Dirk Müller + +- switch to pkgconfig(zlib) for alternative providers support + +------------------------------------------------------------------- +Wed Nov 16 07:39:44 UTC 2022 - Dave Plater + +- Removed reverse-0001-fix-memory-leaks-on-testbed.patch and added + 0001-fix-memory-corruption-when-unregistering-plugins.patch as + final fix for https://github.com/hughsie/colord/issues/145 + +------------------------------------------------------------------- +Fri Nov 11 13:40:18 UTC 2022 - Dave Plater + +- Added reverse-0001-fix-memory-leaks-on-testbed.patch to fix + colord's i586 build failure + +------------------------------------------------------------------- +Tue Nov 8 08:12:31 UTC 2022 - Christophe Giboudeaux + +- Update to 2.14: + * lcms2 now implements ICC specification 4.4 + * New multi-threaded plug-in + * Several fixes to keep fuzzers happy + * Removed check on DLL when CMS_NO_REGISTER_KEYWORD is used + * Added more validation against broken profiles + * Added more help to several tools + * Revised documentation + +------------------------------------------------------------------- +Mon Feb 14 23:13:22 UTC 2022 - Dirk Müller + +- update to 2.13.1: + * Fix a bug on grayscale that made printing gray on white paper + * Added support for premultiplied alpha + * tifficc can now handle alpha channels, both unassociated and premultiplied + * Better documentation + * CGATS parser can now deal with very long strings + * Added Projects for Visual Studio 2020 + * Travis CI discontinued, GitHub actions used instead + * Added a very preliminary meson build script (thanks to xclaesse) + * Added ARM64 target to visual studio 2019 (thanks to gaborkertesz-linaro) + * Added thread safe code to get time + * Added automatic linear space detection + * Added cmsGetStageContextID function + * Added cmsDetectRGBProfileGamma + * configure now accepts --without-fastfloat to turn plugin off + * autogen.sh has now a --distclean toggle to get rid of all autotools generated files + * Checked to work on STM32 Cortex-A, Cortex-M families + * Bug & typos fixing (thanks to many reporters and contributors) + * Fixed mem leaks and out-of bounds accesses as reported by fuzzer + +------------------------------------------------------------------- +Mon Jan 31 12:56:29 UTC 2022 - Paolo Stivanin + +- Update to 2.13: + * Added support for premultiplied alpha + * tifficc can now handle alpha channels, both unassociated and premultiplied + * CGATS parser can now deal with very long strings + * Added Projects for Visual Studio 2020 + * Added ARM64 target to visual studio 2019 (thanks to gaborkertesz-linaro) + * Added thread safe code to get time + * Added automatic linear space detection + * Added cmsGetStageContextID function + * Added cmsDetectRGBProfileGamma function + * configure now accepts --without-fastfloat to turn plugin off + * Checked to work on STM32 Cortex-A, Cortex-M families + * Bug & typos fixing (thanks to many reporters and contributors) +- Rebase lcms2-visibility.patch + +------------------------------------------------------------------- +Sat Apr 24 09:28:16 UTC 2021 - Dirk Müller + +- update to 2.12: + * Added build system for fast-float plugin (see plugin documentation) + * Added new build-in sigmoidal tone curve + * Added XCode 12 project + * Added support for multichannel input up to 15 channels + * Fix LUT8 write matrix + * Fix version mess on 10/11 + * Fix tools & samples xgetopt + * Fix warnings on different function pointers + * Fix matlab MEX compilation + * plugin: cleanup and better SSE detection + * plugin: add lab to any on float + * plugin: it can now be compiled as C++ + * recover PDF documentation, but try to keep it under a resonable size. + * Prevent a rare but possible out-of-bounds read in postscript generator + * Fix some compiler warnings + * Add named color profile building sample to testbed + +------------------------------------------------------------------- +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 + +- Add check on CGATS memory allocation (bsc1108813, CVE-2018-16435, + lcms2-cgats-memory-allocation.patch). + +------------------------------------------------------------------- +Mon Nov 27 22:57:10 UTC 2017 - plinnell@opensuse.org + +- Update to 2.9 +- Drop 0001-Added-an-extra-check-to-MLU-bounds.patch, it is now + in the upstream code + * Bugfix release + + Several fixes related with security, and therefore not detailed here. + + C++ compiles now without warnings + + Added OSX and clang in travis + + Added a travis-ci test matrix for many compilers and OS. + Thanks to Thomas Weber (debian) for this great improvement. + + testbed can now work with dynamic versions of library + + Fixed wrong planar formatters regarding linestride interpretation + +------------------------------------------------------------------- +Tue Jan 24 00:47:25 UTC 2017 - plinnell@opensuse.org + +- Added 0001-Added-an-extra-check-to-MLU-bounds.patch + * fixes https://bugzilla.suse.com/show_bug.cgi?id=1021364 + +------------------------------------------------------------------- +Tue Aug 16 06:09:50 UTC 2016 - plinnell@opensuse.org +- Update to 2.8 + +* Fixed many typos in comments, thanks to Stefan Weil for doing that. +* Fixed localization bug, added a new test case crayons.icc thnaks to Richard Hughes for providing the profile. +* Fixed a bug in optimizer that made some formats (i.e, bits planar) unavailable +* Fixed misalignment problems on Alpha. The compiler does not align strings, and accessing begin of string as a uint16 makes code to fail. +* Added some extra checks to the tools and examples. +* Fix a bug that prevented to read luminance tag +* BIG amount of functionality contributed/Sponsored by Alien Skin Software: TransformStride, copyAlpha, performance plug-ins. Fixes some warnings as well. +* added an extra _ to _stdcall to make it more portable +* Fixed a bug in transicc for named color profiles +* Fixed several compiler warnings +* Added support for Visual Studio 2015 +* Fixed for XCODE project + +------------------------------------------------------------------- +Thu Apr 14 11:13:07 UTC 2016 - idonmez@suse.com + +- Update to GNOME 3.20 Fate#318572 + +------------------------------------------------------------------- +Fri Jun 26 11:04:33 UTC 2015 - aloisio@gmx.com + +- Update to version 2.7 + * improved multi-threading + * added contexts and a new locking plug-in type + * bugfixes and other minor features +- Dropped lcms-endian.patch that was fixed upstream. + +------------------------------------------------------------------- +Fri May 16 06:27:26 UTC 2014 - mailaender@opensuse.org + +- Fixed missing dependency pthread + +------------------------------------------------------------------- +Mon Mar 17 16:20:45 UTC 2014 - adrian@suse.de + +- update to version 2.6 + * Fixed a double free in recovering from a previous error in default intent handler. + * Fixed some indexing out of bounds in floating point interpolation + * Fixed a bug in PCS/Colorspace order when reading V2 Lab devicelinks + * Added a way to retrieve matrix shaper always, no matter LUT is present + * Changed endianess detection for PowerPC + * Fixed memory leaks on error handling + * Big revamp on Contexts, from Artifex + * New locking plug-in, from Artifex + * Added directories for tiff, jpeg in configure script + * Fix for delete tag memory corruption + * Added pthread dependency. From now lcms supports multithreading + +------------------------------------------------------------------- +Mon Jan 6 06:02:04 UTC 2014 - crrodriguez@opensuse.org + +- Correct lcms-endian.patch to rely on autoconf only, no + extra arch specific preprocessor hackery. + +------------------------------------------------------------------- +Wed Jul 3 02:42:52 UTC 2013 - mrdocs@opensuse.org + +- Update to version 2.5 + * Maintenance update + + Focused on incorrect path and error handling. + It also updates the black point compensation algorithm + to match the ICC including the new black point compensation algorithm + actually being standarized by TC130, ICC and ISO. + +------------------------------------------------------------------- +Sun Oct 28 18:52:41 UTC 2012 - tittiatcoke@gmail.com + +- Update to version 2.4 + * Featured release + + Performance and stability fixes + + Black point detection from the algorithm disclosed by Adobe + + Added support for transforms on planar data with different + stride + + Added a new plug-in type for optimizing full transforms + + Linear (gamma 1.0) profiles can now operate in unbounded mode + + Added "half" float support + + Please see the ChangeLog file for more details. + +------------------------------------------------------------------- +Sat Dec 17 13:12:55 UTC 2011 - adrian@suse.de + +- update to version 2.3 + * Full support for ICC 4.3 + +------------------------------------------------------------------- +Thu Nov 24 02:12:00 UTC 2011 - crrodriguez@opensuse.org + +- Open all fds with O_CLOEXEC +- Use gcc visibility, symbol table shrinks around 50% ... + +------------------------------------------------------------------- +Fri Jun 10 23:36:41 UTC 2011 - mrdocs@opensuse.org + +-update to 2.2 + *maintenance update + +Version 2.2 adds stability. + - fixes all known bugs + - adds support for dictionary metatag. Pascal unit now compiles + under FPK Pascal as well as Delphi. + + +------------------------------------------------------------------- +Tue Apr 19 00:15:43 CEST 2011 - ro@suse.de + +- fix devel package name in baselibs.conf + +------------------------------------------------------------------- +Sun Dec 26 18:03:50 UTC 2010 - adrian@suse.de + +- update to version 2.1 + * maintenance release (no further details in changelog) +- remove obsolete patches + +------------------------------------------------------------------- +Wed Nov 10 08:53:50 UTC 2010 - mrdocs@opensuse.org + +- build documentation noarch and recompress tar + +------------------------------------------------------------------- +Fri Oct 8 15:11:49 UTC 2010 - mrdocs@opensuse.org + +-more spec file cleanups and prepare for factory submit +-test building against it in my home repo + +------------------------------------------------------------------- +Tue May 18 14:17:45 UTC 2010 - adrian@suse.de + +- initial lcms2 package, based on package from version 1 +- use OBS source services to download tar ball + diff --git a/lcms2.spec b/lcms2.spec new file mode 100644 index 0000000..0253280 --- /dev/null +++ b/lcms2.spec @@ -0,0 +1,133 @@ +# +# spec file for package lcms2 +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: lcms2 +Version: 2.16 +Release: 0 +Summary: Little CMS Engine - A color management library and tools +License: MIT +Group: Productivity/Graphics/Other +URL: https://www.littlecms.com/ +Source0: https://github.com/mm2/Little-CMS/releases/download/lcms%{version}/lcms2-%{version}.tar.gz +Source1: baselibs.conf +Patch0: lcms2-ocloexec.patch +Patch1: lcms2-visibility.patch +%if 0%{?suse_version} +BuildRequires: autoconf +BuildRequires: glibc-devel +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(zlib) +%endif +%if 0%{?fedora_version} +BuildRequires: gcc +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: pkgconfig +BuildRequires: zlib-devel +%endif +%if 0%{?mandriva_version} +BuildRequires: gcc +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: pkgconfig +BuildRequires: zlib-devel +%endif + +%description +Littlecms is a small speed optimized color management engine. +Little CMS intends to be a small-footprint color management engine +with a special focus on accuracy and performance. It uses the International +Color Consortium standard (ICC), which is the modern standard when +regarding to color management. The ICC specification is widely used and is +referred to in many International and other de-facto standards. + +%package -n liblcms2-2 +Summary: Libraries for the Little CMS Engine +Group: System/Libraries + +%description -n liblcms2-2 +Little CMS Engine - A color management library and tools. + +%package -n liblcms2-devel +Summary: Include Files and Libraries Mandatory for Development +Group: Development/Libraries/C and C++ +Requires: glibc-devel +Requires: liblcms2-2 = %{version} + +%description -n liblcms2-devel +This package contains all necessary include files and libraries needed +to develop applications that require these. + +%package -n liblcms2-doc +Summary: User and developer documentation for lcms2 +Group: Documentation/Other +BuildArch: noarch + +%description -n liblcms2-doc +This package contains user and developer documentation for lcms2. + +%prep +%autosetup -p1 + +chmod a-x doc/* LICENSE AUTHORS + +%build + +autoreconf -fiv +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_build + +%check +%make_build check +%make_build utils + +%install +%make_install + +rm %{buildroot}/%{_libdir}/liblcms2.la + +%post -n liblcms2-2 -p /sbin/ldconfig +%postun -n liblcms2-2 -p /sbin/ldconfig + +%files +%license LICENSE +%doc AUTHORS +%{_bindir}/* +%{_mandir}/man?/*.* + +%files -n liblcms2-2 +%{_libdir}/liblcms2.so.2* + +%files -n liblcms2-devel + +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%files -n liblcms2-doc +%doc doc/*pdf + +%changelog