From 8f333b834b42911c6666bc7a3000f72610102106 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 04:57:42 +0100 Subject: [PATCH] rebuilt with python 2.7 [release 1.19-5mamba;Fri May 17 2013] --- README.md | 2 + ...s-1.17-coverity-boundchecking-cmsio1.patch | 45 +++++ liblcms-1.17-fix_s390_lcms_h.patch | 22 +++ liblcms.spec | 181 ++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 liblcms-1.17-coverity-boundchecking-cmsio1.patch create mode 100644 liblcms-1.17-fix_s390_lcms_h.patch create mode 100644 liblcms.spec diff --git a/README.md b/README.md index a9309c0..f16e3a7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # liblcms +Little cms intends to be a small-footprint, speed optimized color management engine in open source form. + diff --git a/liblcms-1.17-coverity-boundchecking-cmsio1.patch b/liblcms-1.17-coverity-boundchecking-cmsio1.patch new file mode 100644 index 0000000..da45450 --- /dev/null +++ b/liblcms-1.17-coverity-boundchecking-cmsio1.patch @@ -0,0 +1,45 @@ +Index: modules/lcms/src/cmsio1.c +=================================================================== +RCS file: /cvsroot/mozilla/modules/lcms/src/cmsio1.c,v +retrieving revision 1.2 +diff -u -8 -p -r1.2 cmsio1.c +--- modules/lcms/src/cmsio1.c 6 Aug 2007 20:01:21 -0000 1.2 ++++ modules/lcms/src/cmsio1.c 3 Jan 2008 11:15:18 -0000 +@@ -919,17 +919,17 @@ LPGAMMATABLE ReadCurve(LPLCMSICCPROFILE + icUInt32Number Reserved; + icUInt16Number Type; + int i; + + if (Icc -> Read(&Type, sizeof(icUInt16Number), 1, Icc) != 1) return NULL; + if (Icc -> Read(&Reserved, sizeof(icUInt16Number), 1, Icc) != 1) return NULL; + + AdjustEndianess16((LPBYTE) &Type); +- if (Type > 5) { ++ if (Type > 4) { + + cmsSignalError(LCMS_ERRC_ABORTED, "Unknown parametric curve type '%d' found.", Type); + return NULL; + } + + ZeroMemory(Params, 10* sizeof(double)); + n = ParamsByType[Type]; + +@@ -1028,17 +1028,17 @@ LPGAMMATABLE ReadCurveReversed(LPLCMSICC + icUInt16Number Type; + int i; + + + if (Icc -> Read(&Type, sizeof(icUInt16Number), 1, Icc) != 1) return NULL; + if (Icc -> Read(&Reserved, sizeof(icUInt16Number), 1, Icc) != 1) return NULL; + + AdjustEndianess16((LPBYTE) &Type); +- if (Type > 5) { ++ if (Type > 4) { + + cmsSignalError(LCMS_ERRC_ABORTED, "Unknown parametric curve type '%d' found.", Type); + return NULL; + } + + ZeroMemory(Params, 10* sizeof(double)); + n = ParamsByType[Type]; + diff --git a/liblcms-1.17-fix_s390_lcms_h.patch b/liblcms-1.17-fix_s390_lcms_h.patch new file mode 100644 index 0000000..4d93673 --- /dev/null +++ b/liblcms-1.17-fix_s390_lcms_h.patch @@ -0,0 +1,22 @@ +--- lcms-1.17/include/lcms.h.s390 ++++ lcms-1.17/include/lcms.h +@@ -139,7 +139,8 @@ + # define USE_BIG_ENDIAN 1 + #endif + +-#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(sparc) || defined(__ppc__) ++#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(sparc) || defined(__ppc__) \ ++ || defined(__s390__) || defined(__s390x__) + # define USE_BIG_ENDIAN 1 + #endif + +@@ -153,7 +154,7 @@ + # endif + #endif + +-#if __BIG_ENDIAN__ ++#ifdef __BIG_ENDIAN__ + # define USE_BIG_ENDIAN 1 + #endif + + diff --git a/liblcms.spec b/liblcms.spec new file mode 100644 index 0000000..5f9e80b --- /dev/null +++ b/liblcms.spec @@ -0,0 +1,181 @@ +Name: liblcms +Version: 1.19 +Release: 5mamba +Summary: A free color management engine in 100K +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.littlecms.com +Source: http://www.littlecms.com/lcms-%{version}.tar.gz +Patch0: liblcms-1.17-coverity-boundchecking-cmsio1.patch +Patch1: liblcms-1.17-fix_s390_lcms_h.patch +License: MIT +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libjpeg-devel +BuildRequires: libpython27-devel +BuildRequires: libstdc++6-devel +BuildRequires: libtiff-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +BuildRequires: swig +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Little cms intends to be a small-footprint, speed optimized color management engine in open source form. + +%package devel +Group: Development/Libraries +Summary: Libraries and header for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +Little cms intends to be a small-footprint, speed optimized color management engine in open source form. + +This package contains libraries and header files need for development. + +%package static +Group: Development/Libraries +Summary: Static libraries for %{name} +Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description static +Little cms intends to be a small-footprint, speed optimized color management engine in open source form. + +This package contains static libraries need for development. + +%package -n python-lcms +Summary: Python interface to %{name} +Group: Development/Libraries + +%description -n python-lcms +Little cms intends to be a small-footprint, speed optimized color management engine in open source form. + +This package contains Python interface to %{name}. + +%package -n python-lcms-static +Summary: Python interface to %{name} +Group: Development/Libraries +Requires: python-lcms = %{?epoch:%epoch:}%{version}-%{release} + +%description -n python-lcms-static +Little cms intends to be a small-footprint, speed optimized color management engine in open source form. + +This package contains static libraries need for development. + +%prep +%setup -q -n lcms-%{version} +#%patch0 -p2 -b .type4 +#%patch1 -p1 -b .s390 + +find . -name \*.[ch] | xargs chmod -x +# fix docs format +pushd doc +mkdir -p doctemp +for f in LCMSAPI.TXT TUTORIAL.TXT ;do +cp -p $f doctemp/$f +iconv -f ISO-8859-1 -t UTF-8 doctemp/$f > $f +touch -r doctemp/$f $f +done +rm -rf doctemp +popd + +%build +autoreconf -if +%configure \ + --with-pic \ +%if "%{stage1}" != "1" + --with-python +%endif + +(cd python; ./swig_lcms) +%make + +%if "%{_host}" == "%{_build}" +%make check +%endif + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +chmod 0644 AUTHORS COPYING ChangeLog NEWS README.1ST doc/TUTORIAL.TXT doc/LCMSAPI.TXT + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/* +%{_libdir}/*.so.* +%{_mandir}/man1/* +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%{_includedir}/* +%{_libdir}/*.la +%{_libdir}/*.so +%{_libdir}/pkgconfig/lcms.pc +%doc doc/LCMSAPI.TXT +%doc ChangeLog NEWS README.1ST +%doc doc/TUTORIAL.TXT + +%files static +%defattr(-,root,root) +%{_libdir}/*.a + +%if "%{stage1}" != "1" +%files -n python-lcms +%defattr(-,root,root) +%{python27_sitearch}/_lcms.so +%{python27_sitearch}/lcms.py + +%files -n python-lcms-static +%defattr(-,root,root) +%{python27_sitearch}/_lcms.a +%{python27_sitearch}/_lcms.la +%endif + +%changelog +* Fri May 17 2013 Silvan Calarco 1.19-5mamba +- rebuilt with python 2.7 + +* Sun Sep 19 2010 Davide Madrisan 1.19-4mamba +- run ldconfig after package install/remove + +* Tue Aug 10 2010 Silvan Calarco 1.19-3mamba +- move libtool file .la to -devel package from -static + +* Fri Jul 02 2010 Silvan Calarco 1.19-2mamba +- rebuilt with libjpeg 8 + +* Wed Nov 25 2009 Silvan Calarco 1.19-1mamba +- update to 1.19 + +* Sat Jan 31 2009 Silvan Calarco 1.17-3mamba +- rebuilt with python 2.6 + +* Sat Jan 31 2009 gil 1.17-2mamba +- fix for: https://bugzilla.redhat.com/show_bug.cgi?id=468245; https://bugzilla.redhat.com/show_bug.cgi?id=448066 +- added packages static: , python + +* Sat Oct 11 2008 gil 1.17-1mamba +- update to 1.17 + +* Wed Sep 26 2007 Silvan Calarco 1.16-1mamba +- update to 1.16 + +* Tue Apr 11 2006 Davide Madrisan 1.15-1qilnx +- update to version 1.15 by autospec + +* Wed Nov 23 2005 Stefano Cotta Ramusino 1.14-1qilnx +- update to version 1.14 by autospec + +* Wed Jul 14 2004 Davide Madrisan 1.13-1qilnx +- first build