# # spec file for package libjpeg62-turbo # # Copyright (c) 2016 SUSE LINUX 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/ # %define major 62 %define minor 1 %define micro 0 %define srcver 1.4.2 %define libver %{major}.%{minor}.%{micro} Name: libjpeg62-turbo Version: %{srcver} Release: 38.4 Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files License: BSD-3-Clause Group: Productivity/Graphics/Convertors Url: http://sourceforge.net/projects/libjpeg-turbo Source0: http://downloads.sf.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz Source1: baselibs.conf Patch1: libjpeg-turbo-1.3.0-tiff-ojpeg.patch Patch2: libjpeg-1.4.0-ocloexec.patch BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: yasm BuildRoot: %{_tmppath}/%{name}-%{version}-build Conflicts: jpeg%{major} %description The libjpeg-turbo package contains a library of functions for manipulating JPEG images. %package -n libjpeg%{major} Version: %{libver} Release: 38.4 Summary: The MMX/SSE accelerated JPEG compression/decompression library Group: System/Libraries Obsoletes: libjpeg = 6.2.0 # bug437293 %ifarch ppc64 Obsoletes: libjpeg-64bit < %{version} %endif # %description -n libjpeg%{major} This library contains MMX/SSE accelerated functions for manipulating JPEG images. %package -n libjpeg%{major}-devel Version: %{libver} Release: 38.4 Summary: Development Tools for applications which will use the Libjpeg Library Group: Development/Libraries/C and C++ Requires: libjpeg%{major} = %{version} Provides: libjpeg-devel = %{version} Obsoletes: libjpeg-devel < %{version} Conflicts: otherproviders(libjpeg-devel) # bug437293 %ifarch ppc64 Obsoletes: libjpeg-devel-64bit < %{version} %endif # %description -n libjpeg%{major}-devel The libjpeg-devel package includes the header files and libraries necessary for compiling and linking programs which will manipulate JPEG files using the libjpeg library. %prep %setup -q -n libjpeg-turbo-%{srcver} %patch1 %patch2 %build export LDFLAGS="-Wl,-z,relro,-z,now" %configure --disable-static make %{?_smp_mflags} %check make test libdir=%{_libdir} %install %make_install # Fix perms chmod -x README-turbo.txt # Remove unwanted files rm -f %{buildroot}%{_libdir}/lib{,turbo}jpeg.la rm %{buildroot}%{_bindir}/* rm %{buildroot}%{_mandir}/man1/* # libjpegturbo is provided with libjpeg-turbo.spec yet rm %{buildroot}%{_includedir}/turbojpeg.h rm %{buildroot}%{_libdir}/libturbojpeg.so* # Remove docs, we'll select docs manually rm -rf %{buildroot}%{_datadir}/doc/ %post -n libjpeg%{major} -p /sbin/ldconfig %postun -n libjpeg%{major} -p /sbin/ldconfig %files %defattr(-,root,root) %doc README README-turbo.txt change.log ChangeLog.txt %doc usage.txt wizard.txt %files -n libjpeg%{major} %defattr(-,root,root) %{_libdir}/libjpeg.so.%{major} %{_libdir}/libjpeg.so.%{libver} %files -n libjpeg%{major}-devel %defattr(-,root,root) %{_includedir}/*.h %{_libdir}/libjpeg.so %doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.c %changelog * Thu Oct 8 2015 idonmez@suse.com - Update to version 1.4.2 + Crash fixes + clang compatibility fixes + See the included ChangeLog.txt for the details - Drop libjpeg-turbo-1.4.0-int32.patch, not needed anymore. * Thu Mar 5 2015 jengelh@inai.de - Remove useless same-name provides. Use download URLs not dependent on directory structure. * Mon Mar 2 2015 normand@linux.vnet.ibm.com - Remove float tests with new libjpeg-turbo-remove-test.patch same as Fedora bug 1161585 related to upstream issue https://sourceforge.net/p/libjpeg-turbo/bugs/83/ * Sat Jan 10 2015 p.drouand@gmail.com - Update to version 1.4.0 + Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build because OS X does not provide the le32toh() and htole32() functions.) + The non-SIMD RGB565 color conversion code did not work correctly on big endian machines. This has been fixed. + Fixed an issue in tjPlaneSizeYUV() whereby it would erroneously return 1 instead of -1 if componentID was > 0 and subsamp was TJSAMP_GRAY. + Fixed an issue in tjBufSizeYUV2() wherby it would erroneously return 0 instead of -1 if width was < 1. + The Huffman encoder now uses clz and bsr instructions for bit counting on ARM64 platforms (see 1.4 beta1 [5].) + The close() method in the TJCompressor and TJDecompressor Java classes is now idempotent. Previously, that method would call the native tjDestroy() function even if the TurboJPEG instance had already been destroyed. This caused an exception to be thrown during finalization, if the close() method had already been called. The exception was caught, but it was still an expensive operation. + The TurboJPEG API previously generated an error ("Could not determine subsampling type for JPEG image") when attempting to decompress grayscale JPEG images that were compressed with a sampling factor other than 1 (for instance, with 'cjpeg -grayscale -sample 2x2'). Subsampling technically has no meaning with grayscale JPEGs, and thus the horizontal and vertical sampling factors for such images are ignored by the decompressor. However, the TurboJPEG API was being too rigid and was expecting the sampling factors to be equal to 1 before it treated the image as a grayscale JPEG. + cjpeg, djpeg, and jpegtran now accept an argument of -version, which will print the library version and exit. + Referring to 1.4 beta1 [15], another extremely rare circumstance was discovered under which the Huffman encoder's local buffer can be overrun when a buffered destination manager is being used and an extremely-high-frequency block (basically junk image data) is being encoded. Even though the Huffman local buffer was increased from 128 bytes to 136 bytes to address the previous issue, the new issue caused even the larger buffer to be overrun. Further analysis reveals that, in the absolute worst case (such as setting alternating AC coefficients to 32767 and -32768 in the JPEG scanning order), the Huffman encoder can produce encoded blocks that approach double the size of the unencoded blocks. Thus, the Huffman local buffer was increased to 256 bytes, which should prevent any such issue from re-occurring in the future. + The new tjPlaneSizeYUV(), tjPlaneWidth(), and tjPlaneHeight() functions were not actually usable on any platform except OS X and Windows, because those functions were not included in the libturbojpeg mapfile. This has been fixed. + Restored the JPP(), JMETHOD(), and FAR macros in the libjpeg-turbo header files. The JPP() and JMETHOD() macros were originally implemented in libjpeg as a way of supporting non-ANSI compilers that lacked support for prototype parameters. libjpeg-turbo has never supported such compilers, but some software packages still use the macros to define their own prototypes. Similarly, libjpeg-turbo has never supported MS-DOS and other platforms that have far symbols, but some software packages still use the FAR macro. A pretty good argument can be made that this is a bad practice on the part of the software in question, but since this affects more than one package, it's just easier to fix it here. + Fixed issues that were preventing the ARM 64-bit SIMD code from compiling for iOS, and included an ARMv8 architecture in all of the binaries installed by the "official" libjpeg-turbo SDK for OS X. - Adapt patches to upstream changes libjpeg-ocloexec.patch > libjpeg-1.4.0-ocloexec.patch libjpeg-turbo-1.3.0-int32.patch > libjpeg-turbo-1.4.0-int32.patch - Remove libjpeg-turbo-CVE-2014-9092.patch; fixed on upstream release - Bump tminor to 1 * Thu Nov 27 2014 pgajdos@suse.com - security update CVE-2014-9092 [bnc#906761] * added libjpeg-turbo-CVE-2014-9092.patch * Tue Oct 7 2014 coolo@suse.com - to obsolete old versions better use obsoletes * Sat Oct 4 2014 olaf@aepfle.de - add Conflicts: libjpeg-6.2.0 to libjpeg62 to obsolete old version and to avoid file conflicts * Mon Mar 31 2014 pgajdos@suse.com - update to 1.3.1: * Fixed a bug whereby attempting to encode a progressive JPEG with arithmetic entropy coding (by passing arguments of - progressive -arithmetic to cjpeg or jpegtran, for instance) would result in an error, "Requested feature was omitted at compile time". * Fixed a couple of issues whereby malformed JPEG images would cause libjpeg-turbo to use uninitialized memory during decompression. * Fixed an error ("Buffer passed to JPEG library is too small") that occurred when calling the TurboJPEG YUV encoding function with a very small (< 5x5) source image, and added a unit test to check for this error. * etc. see ChangeLog.txt * Tue Sep 10 2013 pgajdos@suse.com - update do 1.3.0: * Fixed a Huffman encoder bug that prevented I/O suspension from working properly. * Added support for additional scaling factors (3/8, 5/8, 3/4, 7/8, 9/8, 5/4, 11/8, 3/2, 13/8, 7/4, 15/8, and 2) when decompressing. Note that the IDCT will not be SIMD-accelerated when using any of these new scaling factors. * The tjDecompressToYUV() function now supports the TJFLAG_FASTDCT flag. * cjpeg can now be used to generate JPEG files with the RGB colorspace (feature ported from jpeg-8d.) * etc. see ChangeLog.txt * Fri Jun 14 2013 pgajdos@suse.com - by change from Wed Mar 6 11:19:02 UTC 2013, libjpeg62-turbo do not provide any binaries, so it should not provide jpeg * Mon May 27 2013 crrodriguez@opensuse.org - Build with full RELRO as this library is exposed to· possible malicious images. * Wed Mar 6 2013 pgajdos@suse.com - remove %%{_bindir}/* %%doc %%{_mandir}/man1/* https://bugzilla.novell.com/show_bug.cgi?id=807183#c14 * Wed Mar 6 2013 pgajdos@suse.com - libjpeg62-turbo package created [bnc#807183] * Mon Aug 13 2012 dmueller@suse.com - selfconflicts are not possible, remove it * Mon Jul 23 2012 pgajdos@suse.com - Update to version 1.2.1: * fixed heap overflow [bnc#771791] * Thu Mar 22 2012 idonmez@suse.com - Update to version 1.2.0 * Fixed out-of-bounds read in SSE2 SIMD code * Added a compile-time macro (LIBJPEG_TURBO_VERSION) that can be used to check the version of libjpeg-turbo against which an application was compiled. * Added new RGBA/BGRA/ABGR/ARGB colorspace extension constants * libjpeg-turbo will now correctly decompress erroneous CMYK/YCCK JPEGs whose K component is assigned a component ID of 1 instead of 4. * Added SIMD routines for RGB-to-grayscale color conversion * Improved the performance of the C color conversion routines * Added a function to the TurboJPEG API that performs lossless transforms. * Added support for 4:4:0 (transposed 4:2:2) subsampling * Sat Nov 19 2011 coolo@suse.com - add libtool as buildrequire to avoid implicit dependency * Sat Nov 12 2011 crrodriguez@opensuse.org - Open all file descriptors with O_CLOEXEC, extended description in the patch file. * Thu May 19 2011 pgajdos@suse.cz - updated to 1.1.1: * Fixed a 1-pixel error in row 0, column 21 of the luminance plane generated by tjEncodeYUV(). * libjpeg-turbo's accelerated Huffman decoder previously ignored unexpected markers found in the middle of the JPEG data stream during decompression. It will now hand off decoding of a particular block to the unaccelerated Huffman decoder if an unexpected marker is found, so that the unaccelerated Huffman decoder can generate an appropriate warning. * Fixed a bug in jpeg_read_coefficients() whereby it would not initialize cinfo->image_width and cinfo->image_height if libjpeg v7 or v8 emulation was enabled. This specifically caused the jpegoptim program to fail if it was linked against a version of libjpeg-turbo that was built with libjpeg v7 or v8 emulation. * Eliminated excessive I/O overhead that occurred when reading BMP files in cjpeg. * * Thu Mar 3 2011 pgajdos@suse.cz - updated to 1.1.0: * Added further protections against invalid Huffman codes. * Added an extended version of tjDecompressHeader(). * Added arithmetic encoding and decoding support. * TurboJPEG/OSS can now compress from/decompress to grayscale bitmaps. * Added emulation of the libjpeg v7 and v8 APIs and ABIs. * Added two new TurboJPEG API functions, tjEncodeYUV() and tjDecompressToYUV(). * The TurboJPEG dynamic library now uses versioned symbols. * Fixed visual artifacts in grayscale JPEG compression caused by a typo in the RGB-to-chrominance lookup tables. - see ChangeLog.txt for details. - removed upstreamed jpegtran.patch and rh639672.patch * Tue Dec 14 2010 pgajdos@suse.cz - spec file cleanup * Fri Dec 10 2010 pgajdos@novell.com - this jpeg version will be the default to the prejudice of jpeg8 from now on * Sun Nov 7 2010 prusnak@opensuse.org - created package based on Fedora one (v 1.0.1)