From 65f1c2fbf8eea1e40875c9c2a50a2e46643c0b30 Mon Sep 17 00:00:00 2001 From: guibuilder_pel7x64builder0 Date: Mon, 26 Nov 2018 18:44:51 +0100 Subject: [PATCH] lcms2 package update Signed-off-by: guibuilder_pel7x64builder0 --- SOURCES/endianness.patch | 99 +++++++++++++++++ SOURCES/test_library_path.patch | 11 ++ SPECS/lcms2.spec | 191 ++++++++++++++++++++++++++++++++ 3 files changed, 301 insertions(+) create mode 100644 SOURCES/endianness.patch create mode 100644 SOURCES/test_library_path.patch create mode 100644 SPECS/lcms2.spec diff --git a/SOURCES/endianness.patch b/SOURCES/endianness.patch new file mode 100644 index 0000000..ea1e442 --- /dev/null +++ b/SOURCES/endianness.patch @@ -0,0 +1,99 @@ +commit b32dcedd13b3fc2ea7a8099cc0f67eaa31b8c298 +Author: Chris Liddell +Date: Thu May 21 09:06:01 2015 +0100 + + Simplify/Improve endian decisions in lcms2.h + + Firstly, protect the endian decisions in lcms2.h so that settings given on the + compiler command line are not silently overridden. Thus being set explicitly + gets the highest priority. + + Secondly, use the endianness detected by the configure script, and remove the + complex and error prone stuff for PPC platforms from lcms2.h. Thus the endianess + from configure gets second highest priority. + + Thirdly, if neither of the above are set, fall back to some simple (and long + standing) platform/compiler specific tests. These should rarely, if ever, come + into play in a "normal" build for a "normal" Unix-like system. + +diff --git a/include/lcms2.h b/include/lcms2.h +index a0421d8..f32beec 100644 +--- a/include/lcms2.h ++++ b/include/lcms2.h +@@ -173,46 +173,43 @@ + # define CMS_IS_WINDOWS_ 1 + #endif + +-// Try to detect big endian platforms. This list can be endless, so only some checks are performed over here. +-// you can pass this toggle to the compiler by using -DCMS_USE_BIG_ENDIAN or something similar +- +-#if defined(__sgi__) || defined(__sgi) || defined(sparc) +-# define CMS_USE_BIG_ENDIAN 1 +-#endif ++// Try to detect big endian platforms. This list can be endless, so primarily rely on the configure script ++// on Unix-like systems, and allow it to be set on the compiler command line using ++// -DCMS_USE_BIG_ENDIAN or something similar ++#ifdef CMS_USE_BIG_ENDIAN // set at compiler command line takes overall precedence ++# if CMS_USE_BIG_ENDIAN == 0 ++# undef CMS_USE_BIG_ENDIAN ++# endif ++#else // CMS_USE_BIG_ENDIAN + +-#if defined(__s390__) || defined(__s390x__) +-# define CMS_USE_BIG_ENDIAN 1 +-#endif ++# ifdef WORDS_BIGENDIAN // set by configure (or explicitly on compiler command line) ++# define CMS_USE_BIG_ENDIAN 1 ++# else // WORDS_BIGENDIAN ++// Fall back to platform/compiler specific tests ++# if defined(__sgi__) || defined(__sgi) || defined(sparc) ++# define CMS_USE_BIG_ENDIAN 1 ++# endif + +-# ifdef TARGET_CPU_PPC +-# if TARGET_CPU_PPC ++# if defined(__s390__) || defined(__s390x__) + # define CMS_USE_BIG_ENDIAN 1 + # endif +-# endif + +-#if defined(__powerpc__) || defined(__ppc__) || defined(TARGET_CPU_PPC) +-# define CMS_USE_BIG_ENDIAN 1 +-# if defined (__GNUC__) && defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) +-# if __BYTE_ORDER == __LITTLE_ENDIAN +-// // Don't use big endian for PowerPC little endian mode +-# undef CMS_USE_BIG_ENDIAN +-# endif +-# endif +-#endif ++# ifdef macintosh ++# ifdef __BIG_ENDIAN__ ++# define CMS_USE_BIG_ENDIAN 1 ++# endif ++# ifdef __LITTLE_ENDIAN__ ++# undef CMS_USE_BIG_ENDIAN ++# endif ++# endif ++# endif // WORDS_BIGENDIAN + +-// WORDS_BIGENDIAN takes precedence +-#if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN) +-# define CMS_USE_BIG_ENDIAN 1 +-#endif ++# if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) ++# define CMS_USE_BIG_ENDIAN 1 ++# endif ++ ++#endif // CMS_USE_BIG_ENDIAN + +-#ifdef macintosh +-# ifdef __BIG_ENDIAN__ +-# define CMS_USE_BIG_ENDIAN 1 +-# endif +-# ifdef __LITTLE_ENDIAN__ +-# undef CMS_USE_BIG_ENDIAN +-# endif +-#endif + + // Calling convention -- this is hardly platform and compiler dependent + #ifdef CMS_IS_WINDOWS_ diff --git a/SOURCES/test_library_path.patch b/SOURCES/test_library_path.patch new file mode 100644 index 0000000..3a0923d --- /dev/null +++ b/SOURCES/test_library_path.patch @@ -0,0 +1,11 @@ +--- testbed/Makefile.in.old 2015-10-16 14:05:13.000000000 -0400 ++++ testbed/Makefile.in 2015-10-16 14:31:17.000000000 -0400 +@@ -539,7 +539,7 @@ + if [ $(top_srcdir) != $(top_builddir) ]; then \ + cp $(top_srcdir)/testbed/*.ic? $(top_builddir)/testbed; \ + fi +- ./testcms ++ LD_LIBRARY_PATH=$(top_builddir)/src/.libs ./.libs/testcms + if [ $(top_srcdir) != $(top_builddir) ]; then \ + rm -f $(top_builddir)/testbed/*.ic?; \ + fi diff --git a/SPECS/lcms2.spec b/SPECS/lcms2.spec new file mode 100644 index 0000000..3b778a7 --- /dev/null +++ b/SPECS/lcms2.spec @@ -0,0 +1,191 @@ +Name: lcms2 +Version: 2.6 +Release: 3%{?dist} +Summary: Color Management Engine +License: MIT +URL: http://www.littlecms.com/ +Source0: http://www.littlecms.com/lcms2-2.6.tar.gz +Patch0: endianness.patch +Patch1: test_library_path.patch + +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: zlib-devel + +%description +LittleCMS intends to be a small-footprint, speed optimized color management +engine in open source form. LCMS2 is the current version of LCMS, and can be +parallel installed with the original (deprecated) lcms. + +%package utils +Summary: Utility applications for %{name} +Group: Applications/Productivity +Requires: %{name} = %{version}-%{release} + +%description utils +The %{name}-utils package contains utility applications for %{name}. + +%package devel +Summary: Development files for LittleCMS +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Provides: littlecms-devel = %{version}-%{release} + +%description devel +Development files for LittleCMS. + +%prep +%setup -q -n lcms2-2.6 +%patch0 -p1 +%patch1 +%build +export CFLAGS='-fno-strict-aliasing %optflags' +%configure --disable-static --program-suffix=2 + +# remove rpath from libtool +sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +make %{?_smp_mflags} + +%check +make check + +%install +rm -rf ${RPM_BUILD_ROOT} +make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p" +find ${RPM_BUILD_ROOT} -type f -name "*.la" -exec rm -f {} ';' +install -D -m 644 include/lcms2.h $RPM_BUILD_ROOT/usr/include/lcms2.h +install -D -m 644 include/lcms2_plugin.h $RPM_BUILD_ROOT/usr/include/lcms2_plugin.h + +# install docs as this is all we've got +install -D -m 644 doc/LittleCMS2.?\ tutorial.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.6/tutorial.pdf +install -D -m 644 doc/LittleCMS2.?\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.6/api.pdf +install -D -m 644 doc/LittleCMS2.?\ Plugin\ API.pdf $RPM_BUILD_ROOT/usr/share/doc/lcms2-devel-2.6/plugin-api.pdf + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING +%{_libdir}/*.so.* + +%files utils +%defattr(-,root,root,-) +%{_bindir}/* +%{_mandir}/man1/* + +%files devel +%defattr(-,root,root,-) +%{_datadir}/doc/lcms2-devel-2.6/*.pdf +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +* Fri Oct 16 2015 Andrew Hughes - 2.6-3 +- Run tests as part of %%check, fixing Makefile to set LD_LIBRARY_PATH +- Use upstream endianness fix to avoid ppc64le being built big-endian +- Resolves: #1250914 + +* Tue May 26 2015 Matthias Clasen 2.6-2 +- Build with -fno-strict-aliasing +Related: #1174406 + +* Tue Mar 17 2015 Richard Hughes 2.6-1 + Update to new upstream version. + Resolves: #1174406 + +* Thu Aug 14 2014 Richard Hughes - 2.5-5 +- Backport a patch for ppc64le support, many thanks to Tim Waugh. +- Resolves: #1125723 + +* Fri Jan 24 2014 Daniel Mach - 2.5-4 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 2.5-3 +- Mass rebuild 2013-12-27 + +* Tue Oct 8 2013 Matthias Clasen 2.5-2 +- Disable strict aliasing (related: #884068) + +* Mon Jul 01 2013 Richard Hughes 2.5-1 +- Update to new upstream version. +- Added a reference for Mac MLU tag +- Added a way to read the profile creator from header +- Added error descriptions on cmsSmoothToneCurve +- Added identity curves support for write V2 LUT +- Added new cmsPlugInTHR() and fixed some race conditions +- Added TIFF Lab16 handling on tifficc +- Fixed a bug on big endian platforms not supporting uint64 or long long. +- Fixed a multithead bug on optimization +- Fixed devicelink generation for 8 bits +- Fixed some 64 bit warnings on size_t to uint32 conversions +- Rendering intent used when creating the transform is now propagated to profile +- RGB profiles store only one copy of the curve to save space +- Transform2Devicelink now keeps white point when guessing deviceclass is enabled +- Update black point detection algorithm to reflect ICC changes +- User defined parametric curves can now be saved in ICC profiles + +* Thu Apr 25 2013 Tim Waugh - 2.4-6 +- Applied upstream fixes for threading (bug #951984). + +* Thu Mar 7 2013 Tim Waugh - 2.4-5 +- Added upstream fix for threading issue with plugin registration + (bug #912307). + +* Thu Feb 14 2013 Fedora Release Engineering - 2.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jan 18 2013 Adam Tkac - 2.4-3 +- rebuild due to "jpeg8-ABI" feature drop + +* Fri Dec 21 2012 Adam Tkac - 2.4-2 +- rebuild against new libjpeg + +* Sat Sep 15 2012 Richard Hughes 2.4-1 +- Update to new upstream version. +- 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 + +* Thu Jul 19 2012 Fedora Release Engineering - 2.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 2.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Jun 10 2011 Richard Hughes 2.3-1 +- Update to new upstream version which incorporates many bugfixes. + +* Fri Jun 10 2011 Richard Hughes 2.2-2 +- Actually update the sources... + +* Fri Jun 10 2011 Richard Hughes 2.2-1 +- Update to new upstream version +- Stability and efficienty fixes +- Adds support for dictionary metatag + +* Mon Feb 07 2011 Fedora Release Engineering - 2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 01 2010 Richard Hughes 2.1-1 +- Update to new upstream version. + +* Fri Jun 18 2010 Richard Hughes 2.0a-3 +- Address some more review comments. +- Resolves #590387 + +* Fri Jun 18 2010 Richard Hughes 2.0a-2 +- Address some review comments. +- Resolves #590387 + +* Fri Jun 18 2010 Richard Hughes 2.0a-1 +- Initial package for Fedora review