From aa1b10984b2f610dae9b0866733c619c20153ba88b9ceaa578892b202a02a748 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 13 Oct 2010 22:55:59 +0000 Subject: [PATCH] Accepting request 50374 from multimedia:libs Copy from multimedia:libs/lcms2 based on submit request 50374 from user plater OBS-URL: https://build.opensuse.org/request/show/50374 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lcms2?expand=0&rev=1 --- .gitattributes | 23 ++++ .gitignore | 1 + _service | 13 +++ _service:download_url:lcms2-2.0a.tar.gz | 3 + baselibs.conf | 6 + lcms-2.0.tar.bz2 | 3 + lcms-endian.patch | 15 +++ lcms-fix-return-values.patch | 18 +++ lcms2.changes | 12 ++ lcms2.spec | 139 ++++++++++++++++++++++++ workaround-gcc-bug.diff | 12 ++ 11 files changed, 245 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 _service:download_url:lcms2-2.0a.tar.gz create mode 100644 baselibs.conf create mode 100644 lcms-2.0.tar.bz2 create mode 100644 lcms-endian.patch create mode 100644 lcms-fix-return-values.patch create mode 100644 lcms2.changes create mode 100644 lcms2.spec create mode 100644 workaround-gcc-bug.diff 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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..35a71c6 --- /dev/null +++ b/_service @@ -0,0 +1,13 @@ + + + + http + downloads.sourceforge.net + /project/lcms/lcms/2.0/lcms2-2.0a.tar.gz + + + _service:download_url:lcms2-2.0a.tar.gz + sha256 + 6deaf78611f5978ff58aa85efc37cf070b6ffb7106486b894914c4fc548d054f + + diff --git a/_service:download_url:lcms2-2.0a.tar.gz b/_service:download_url:lcms2-2.0a.tar.gz new file mode 100644 index 0000000..53e7d90 --- /dev/null +++ b/_service:download_url:lcms2-2.0a.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6deaf78611f5978ff58aa85efc37cf070b6ffb7106486b894914c4fc548d054f +size 3449841 diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..1da4b76 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,6 @@ +liblcms2-2 + provides "liblcms2- = " + obsoletes "liblcms2- <= " +liblcms2-2-devel + requires -liblcms2- + requires "liblcms2- = " diff --git a/lcms-2.0.tar.bz2 b/lcms-2.0.tar.bz2 new file mode 100644 index 0000000..b21d911 --- /dev/null +++ b/lcms-2.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5d7ecba1253e295773b492a88963019405179831a11d0dcfd7cac7505c7598c +size 3505895 diff --git a/lcms-endian.patch b/lcms-endian.patch new file mode 100644 index 0000000..5ed2d20 --- /dev/null +++ b/lcms-endian.patch @@ -0,0 +1,15 @@ +--- include/lcms2.h.orig 2010-05-18 16:11:48.852037802 +0200 ++++ include/lcms2.h 2010-05-18 16:12:22.116041439 +0200 +@@ -30,8 +30,10 @@ + + // ********** Configuration toggles **************************************** + +-// Uncomment this one if you are using big endian machines +-// #define CMS_USE_BIG_ENDIAN 1 ++#include ++#if __BYTE_ORDER == __BIG_ENDIAN ++#define USE_BIG_ENDIAN 1 ++#endif + + // Uncomment this one if your compiler/machine does NOT support the + // "long long" type. diff --git a/lcms-fix-return-values.patch b/lcms-fix-return-values.patch new file mode 100644 index 0000000..d475856 --- /dev/null +++ b/lcms-fix-return-values.patch @@ -0,0 +1,18 @@ +--- utils/common/vprf.c.orig 2010-05-18 16:39:06.108039608 +0200 ++++ utils/common/vprf.c 2010-05-18 16:39:33.600045841 +0200 +@@ -280,6 +280,7 @@ + + FatalError("What a weird separation of %d channels?!?!", ColorChannels); + } ++ return -1; + } + + +@@ -315,6 +316,7 @@ + + FatalError("Unsupported color space of %d channels", ColorChannels); + } ++ return -1; + } + + diff --git a/lcms2.changes b/lcms2.changes new file mode 100644 index 0000000..762eee9 --- /dev/null +++ b/lcms2.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +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..8d77190 --- /dev/null +++ b/lcms2.spec @@ -0,0 +1,139 @@ +# +# spec file for package lcms2 (Version 2.0a) +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: lcms2 +License: MIT License (or similar) +Group: Productivity/Graphics/Other +Summary: Little CMS Engine - A color managment library and tools +Url: http://www.littlecms.com/ +Version: 2.0a +Release: 1 + +%if 0%{?suse_version} +BuildRequires: libjpeg-devel libtiff-devel pkg-config zlib-devel +%endif + +%if 0%{?fedora_version} +BuildRequires: gcc libjpeg-devel libtiff-devel pkgconfig zlib-devel +%endif + +%if 0%{?mandriva_version} +BuildRequires: gcc libjpeg-devel libtiff-devel pkgconfig zlib-devel +%endif + +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source0: %{name}-%{version}.tar.gz +Source1: baselibs.conf +Patch: lcms-endian.patch +Patch1: lcms-fix-return-values.patch +Patch2: workaround-gcc-bug.diff + +%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 +License: MIT License (or similar) +Summary: Libraries for the Little CMS Engine +Group: System/Libraries + +%description -n liblcms2-2 +Little CMS Engine - A color managment library and tools. + +%package -n liblcms2-devel +License: MIT License (or similar) +Summary: Include Files and Libraries Mandatory for Development +Requires: liblcms2-2 = %{version} glibc-devel +Group: Development/Libraries/C and C++ + +%description -n liblcms2-devel +This package contains all necessary include files and libraries needed +to develop applications that require these. + +%package -n liblcms2-doc +License: MIT License (or similar) +Summary: User and developer documentation for lcms2 +Group: Documentation/Other + +%description -n liblcms2-doc +This package contains user and developer documentation for lcms2. + + +%prep +%setup -q -n lcms-2.0 +%patch +%patch1 +%if 0%{?suse_version} == 01110 +%patch2 +%endif +chmod a-x doc/* COPYING AUTHORS NEWS + +%build +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" + +%configure --disable-static + +make %{?_smp_flags} + +#%check +# FIXME before submitting to factory +# make %{?_smp_flags} check || true +# make utils + +%install + +%makeinstall + +rm $RPM_BUILD_ROOT/%_libdir/liblcms2.la + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -n liblcms2-2 -p /sbin/ldconfig + +%postun -n liblcms2-2 -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc COPYING AUTHORS NEWS +%{_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 + +%changelog diff --git a/workaround-gcc-bug.diff b/workaround-gcc-bug.diff new file mode 100644 index 0000000..d16d274 --- /dev/null +++ b/workaround-gcc-bug.diff @@ -0,0 +1,12 @@ +--- ./utils/linkicc/linkicc.c.orig 2010-05-19 17:06:01.157118683 +0200 ++++ ./utils/linkicc/linkicc.c 2010-05-19 17:08:03.257142292 +0200 +@@ -294,7 +294,8 @@ + + // Ink limiting + if (InkLimit != 400.0) { +- Profiles[nargs++] = cmsCreateInkLimitingDeviceLink(cmsGetColorSpace(Profiles[nargs-1]), InkLimit); ++ Profiles[nargs] = cmsCreateInkLimitingDeviceLink(cmsGetColorSpace(Profiles[nargs]), InkLimit); ++ nargs++; + } + + // Set the flags