# # spec file for package openjpeg # # Copyright (c) 2015 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 so_ver 1 Name: openjpeg Version: 1.5.2 Release: 4.2 Summary: An open-source JPEG 2000 codec License: BSD-2-Clause Group: Productivity/Graphics/Other Url: http://www.openjpeg.org/ Source0: http://downloads.sourceforge.net/%{name}.mirror/%{name}-%{version}.tar.gz Source1: baselibs.conf # PATCH-FIX-UPSTREAM openjpeg-1.5.1-cmake_libdir.patch asterios.dramis@gmail.com -- Fix libopenjpeg.pc symlink (taken from Fedora) Patch0: openjpeg-1.5.1-cmake_libdir.patch # PATCH-FIX-OPENSUSE openjpeg-1.5.1-soname.patch asterios.dramis@gmail.com -- Revert soname bump compared to 1.5.0 release (for now, remove patch in 2.0 release) (taken from Fedora) # See "http://code.google.com/p/openjpeg/source/browse/tags/version.1.5.1/CMakeLists.txt". The change was introduced in 1.5.1 but soname can remain the same between 1.5.0 and 1.5.1 versions. Patch1: openjpeg-1.5.1-soname.patch BuildRequires: cmake BuildRequires: doxygen BuildRequires: libtiff-devel BuildRequires: pkg-config BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(zlib) BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} BuildRequires: fdupes %endif %description OpenJPEG library is an open-source JPEG 2000 codec written in C. It has been developed in order to promote the use of JPEG 2000, the new still-image compression standard from the Joint Photographic Experts Group (JPEG). %package devel Summary: Development files for the OpenJPEG library Group: Development/Libraries/C and C++ Requires: libopenjpeg%{so_ver} = %{version} %description devel This package contains header files and libraries needed for developing programs using the OpenJPEG library. %package -n libopenjpeg%{so_ver} Summary: An open-source JPEG 2000 codec Group: System/Libraries %description -n libopenjpeg%{so_ver} OpenJPEG library is an open-source JPEG 2000 codec written in C. It has been developed in order to promote the use of JPEG 2000, the new still-image compression standard from the Joint Photographic Experts Group (JPEG). %prep %setup -q %patch0 -p1 %patch1 -p1 # Remove build time references so build-compare can do its work echo "HTML_TIMESTAMP = NO" >> doc/Doxyfile.dox.cmake.in %build %cmake \ -DOPENJPEG_INSTALL_LIB_DIR:PATH=%{_lib} \ -DOPENJPEG_INSTALL_DOC_DIR=%{_docdir}/%{name} \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_BUILD_TYPE=release \ -DBUILD_DOC=ON \ -DUSE_SYSTEM_GETOPT=ON \ -DBUILD_THIRDPARTY=OFF .. make %{?_smp_mflags} %install %cmake_install # Install devel docs manually in order to fix rpmlint warning "files-duplicate" cp -a build/doc/html/ %{buildroot}%{_docdir}/%{name}-devel/ # Compatibility symlink ln -s openjpeg-1.5/openjpeg.h %{buildroot}%{_includedir}/openjpeg.h # Fix of Fedora build %if 0%{?fedora_version} rm -f %{buildroot}%{_docdir}/openjpeg/{CHANGES,LICENSE} %endif %if 0%{?suse_version} %fdupes -s %{buildroot} %endif %post -n libopenjpeg%{so_ver} -p /sbin/ldconfig %postun -n libopenjpeg%{so_ver} -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc AUTHORS CHANGES LICENSE NEWS README THANKS %{_bindir}/image_to_j2k %{_bindir}/j2k_dump %{_bindir}/j2k_to_image %{_mandir}/man1/image_to_j2k.1%{ext_man} %{_mandir}/man1/j2k_dump.1%{ext_man} %{_mandir}/man1/j2k_to_image.1%{ext_man} %files devel %defattr(-,root,root,-) %doc %{_docdir}/%{name}-devel/ %{_includedir}/openjpeg-1.5/ %{_includedir}/openjpeg.h %{_libdir}/pkgconfig/libopenjpeg.pc %{_libdir}/pkgconfig/libopenjpeg1.pc %{_libdir}/openjpeg-1.5/ %{_libdir}/libopenjpeg.so %{_mandir}/man3/libopenjpeg.3%{ext_man} %files -n libopenjpeg%{so_ver} %defattr(-,root,root,-) %{_libdir}/libopenjpeg.so.%{version} %{_libdir}/libopenjpeg.so.%{so_ver}* %changelog * Mon Mar 2 2015 mpluskal@suse.com - Use cmake macros for building - Small spec file cleanups, use pkgconfig style dependencies * Fri Aug 8 2014 asterios.dramis@gmail.com - Update to version 1.5.2: Security: * Fixes: CVE-2013-4289 CVE-2013-4290 * Fixes: CVE-2013-1447 CVE-2013-6045 CVE-2013-6052 CVE-2013-6054 CVE-2013-6053 CVE-2013-6887 New Features: * Compile Java with source/target specific java version * Do not set SONAME for Java module, fix linking (missing math lib) * Support some BMP/RGB8 files * Fix compilation on ARM Misc: * Remove BSD-4 license from getopt copy, since upstream switched to BSD-3 * Support compilation against system installed getopt * Fix Big Endian checking (autotools) * Huge amount of bug fixes. See CHANGES for details. - Removed the following patches (fixed upstream): * openjpeg-1.5-r2029.patch * openjpeg-1.5-r2032.patch * openjpeg-1.5-r2033.patch * openjpeg-1.5.1-cve-2013-6045-1.patch * openjpeg-1.5.1-cve-2013-6045-2.patch * CVE-2013-6052.patch * CVE-2013-6053.patch * CVE-2013-1447.patch * CVE-2013-6887.patch * Wed Feb 12 2014 asterios.dramis@gmail.com - Added the following security patches (based also on Redhat/Fedora patches): * openjpeg-1.5-r2029.patch From upstream. Fix issue 155, jp2_read_boxhdr() can trigger random pointer memory access * openjpeg-1.5-r2032.patch From upstream. Fix issue 169, division by zero in j2k_read_siz * openjpeg-1.5-r2033.patch From upstream. Fix issue 166, missing range check in j2k_read_coc et al * CVE-2013-1447.patch Fix multiple denial of service flaws, CVE-2013-1447, bnc#853834 * CVE-2013-6052.patch Fix heap OOB reads, information leaks, CVE-2013-6052, bnc#853644 * CVE-2013-6053.patch Fix heap OOB reads, information leaks, CVE-2013-6053, bnc#853644 * CVE-2013-6887.patch Fix multiple denial of service flaws, CVE-2013-6887, bnc#853644 - Removed part of openjpeg-1.5.1-cve-2013-6045-1.patch that is already upstream, included in openjpeg-1.5-r2033.patch (slightly modified). * Fri Jan 10 2014 vpereira@novell.com - Security: * Patches openjpeg-1.5.1-cve-2013-6045-1.patch and openjpeg-1.5.1-cve-2013-6045-2.patch fix heap overflow described in CVE-2013-6045, bnc#853838. * Mon Nov 19 2012 sleep_walker@suse.cz - do fdupes only for SUSE distributions * Mon Oct 15 2012 asterios.dramis@gmail.com - Update to version 1.5.1: Security: * Fixes: CVE-2012-3535 * Fixes: CVE-2012-3358 New Features: * Use a new API scheme and solve the SOVERSIONing in OpenJPEG * Allow better integration with multi-arch system * Compile & Install Java bindings (CMake) * Install required addXMLinJP2 (JPIP) Misc: * Fix linker error by resolving all symbols (eg. missing -lm) * Fix some man page typos * Huge amount of bug fixes. See CHANGES for details. - Removed the following patches (fixed upstream): * heap_buffer_overflow_fix.patch * heap_buffer_overflow_2_fix.patch * heap_corruption_fix.patch * openjpeg-1.5.0-cmake_Config.patch * openjpeg-1.5.0-cmake_libdir.patch * openjpeg-1.5.0-pkgconfig_includedir.patch - Replaced openjpeg-1.5.0-cmake_header_symlink.patch with a fix inside the spec file. - Removed symlink from %%{_includedir}/openjpeg-1.5 to %%{_includedir}/openjpeg (not needed). - Added the following patches (taken from Fedora): * openjpeg-1.5.1-cmake_libdir.patch Fix libopenjpeg.pc symlink * openjpeg-1.5.1-soname.patch Revert soname bump compared to 1.5.0 release * Mon Sep 17 2012 sleep_walker@suse.cz - fix fedora build * Tue Sep 11 2012 asterios.dramis@gmail.com - Added a patch (heap_buffer_overflow_2_fix.patch) to fix heap-based buffer overflow when processing JPEG2000 images - (CVE-2012-3535), (bnc#777445). * Tue Jul 17 2012 idonmez@suse.com - Add baselibs.conf * Wed Jul 11 2012 asterios.dramis@gmail.com - Added a patch (heap_buffer_overflow_fix.patch) to fix heap-based buffer overflow when processing JPEG2000 images - (CVE-2012-3358), (bnc#770649). * Thu Jun 28 2012 asterios.dramis@gmail.com - Added a patch (heap_corruption_fix.patch) to fix heap corruption when processing certain Gray16 TIFF images - (CVE-2009-5030), (bnc#757260). * Mon Feb 27 2012 asterios.dramis@gmail.com - Update to version 1.5.0: New Features: * openjpip: + complete client-server architecture for remote browsing of jpeg 2000 images. + see corresponding README for more details. API modifications: * 'bool' type has been replaced by 'opj_bool' type. 'stdbool.h' is no more required. Misc: * improved cmake and autotools build methods. * removed manual makefiles, VS project files and XCode project files. * added a 'thirdparty' directory to contain all dependencies. + These libraries will be build only if there are not found on the system. + Note that libopenjpeg itself does not have any dependency. * changed the directory hierarchy of the whole project. See README files for details. * tests : a complete test suite has been setup. + both JPEG 2000 conformance tests and non-regressions tests are configured. + results are submitted to the OpenJPEG dashboard (http://my.cdash.org/index.php?project=OPENJPEG) + images are located in 'http://openjpeg.googlecode.com/svn/data' folder. + configuration files and utilities are located in 'tests' folder. * OPJViewer re-activated (need wxWidgets) * Huge amount of bug fixes. See CHANGES for details. - Removed the following patches (fixed upstream): * fix_no_undefined.patch * fix_soversion.patch * install_pkgconfig_file.patch - Replaced openjpeg-1.4-OpenJPEGConfig.patch with openjpeg-1.5.0-cmake_Config.patch (taken from Fedora) - Replaced openjpeg-1.4-cmake_symlink_fix.patch with openjpeg-1.5.0-cmake_header_symlink.patch (taken from Fedora) - Added 2 patches (taken from Fedora): * openjpeg-1.5.0-cmake_libdir.patch -- Fix installation directories * openjpeg-1.5.0-pkgconfig_includedir.patch -- Fix includedir in pkgconfig file - Spec file updates: * Added doxygen in BuildRequires: to enable compilation of devel docs. * Updated BuildRequires: to include also liblcms2-devel and zlib-devel. * Fixed rpmlint warning "file-contains-date-and-time" - No need to remove the JavaOpenJPEG/ directory from the package source anymore (the Sun proprietary code was removed from the package). * Tue Dec 6 2011 cfarrell@suse.com - license update: BSD-2-Clause SPDX format * Thu Dec 1 2011 asterios.dramis@gmail.com - Removed the JavaOpenJPEG/ directory from the package source (fix for bnc#733009 - openjpg contains Sun proprietary code). * Thu Oct 13 2011 asterios.dramis@gmail.com - Initial release (version 1.4). - Added 5 patches (taken from upstream and Fedora): * openjpeg-1.4-OpenJPEGConfig.patch -- Fix OpenJPEGConfig.cmake * openjpeg-1.4-cmake_symlink_fix.patch -- Fix cmake create_symlink usage for header file * fix_no_undefined.patch -- Fix libopenjpeg undefined references * fix_soversion.patch -- Fix so version to 1 instead of 1.4 * install_pkgconfig_file.patch -- Fix cmake to install pkgconfig file(s)