491362
# Conformance tests disabled by default since it requires 1 GB of test data
491362
#global runcheck 1
491362
491362
#global optional_components 1
491362
491362
# https://bugzilla.redhat.com/show_bug.cgi?id=1751749
491362
%global _target_platform %{_vendor}-%{_target_os}
491362
491362
Name:           openjpeg2
491362
Version:        2.4.0
9a56be
Release:        7%{?dist}
491362
Summary:        C-Library for JPEG 2000
491362
491362
# windirent.h is MIT, the rest is BSD
491362
License:        BSD and MIT
491362
URL:            https://github.com/uclouvain/openjpeg
491362
Source0:        https://github.com/uclouvain/openjpeg/archive/v%{version}/openjpeg-%{version}.tar.gz
491362
%if 0%{?runcheck}
491362
# git clone git@github.com:uclouvain/openjpeg-data.git
491362
Source1:        data.tar.xz
491362
%endif
491362
491362
# Rename tool names to avoid conflicts with openjpeg-1.x
491362
Patch0:         openjpeg2_opj2.patch
491362
# Fix CVE-2021-29338
491362
Patch1:         openjpeg2-CVE-2021-29338.patch
491362
# Fix CVE-2021-3575
491362
Patch2:         openjpeg2-CVE-2021-3575.patch
9a56be
Patch3:         openjpeg2-CVE-2022-1122.patch
491362
491362
BuildRequires:  cmake
491362
# The library itself is C only, but there is some optional C++ stuff, hence the project is not marked as C-only in cmake and hence cmake looks for a c++ compiler
491362
BuildRequires:  gcc-c++
491362
BuildRequires:  make
491362
BuildRequires:  zlib-devel
491362
BuildRequires:  libpng-devel
491362
BuildRequires:  libtiff-devel
491362
BuildRequires:  lcms2-devel
491362
BuildRequires:  doxygen
491362
491362
%if 0%{?optional_components}
491362
BuildRequires:  java-devel
491362
BuildRequires:  xerces-j2
491362
%endif
491362
491362
%description
491362
The OpenJPEG library is an open-source JPEG 2000 library developed in order to
491362
promote the use of JPEG 2000.
491362
491362
This package contains
491362
* JPEG 2000 codec compliant with the Part 1 of the standard (Class-1 Profile-1
491362
  compliance).
491362
* JP2 (JPEG 2000 standard Part 2 - Handling of JP2 boxes and extended multiple
491362
  component transforms for multispectral and hyperspectral imagery)
491362
491362
491362
%package devel
491362
Summary:        Development files for OpenJPEG 2
491362
Requires:       %{name}%{?_isa} = %{version}-%{release}
491362
# OpenJPEGTargets.cmake refers to the tools
491362
Requires:       %{name}-tools%{?_isa} = %{version}-%{release}
491362
491362
%description devel
491362
The %{name}-devel package contains libraries and header files for developing
491362
applications that use OpenJPEG 2.
491362
491362
491362
%package devel-docs
491362
Summary:        Developer documentation for OpenJPEG 2
491362
BuildArch:      noarch
491362
491362
%description devel-docs
491362
The %{name}-devel-docs package contains documentation files for developing
491362
applications that use OpenJPEG 2.
491362
491362
491362
%package tools
491362
Summary:        OpenJPEG 2 command line tools
491362
Requires:       %{name}%{?_isa} = %{version}-%{release}
491362
491362
%description tools
491362
Command line tools for JPEG 2000 file manipulation, using OpenJPEG2:
491362
 * opj2_compress
491362
 * opj2_decompress
491362
 * opj2_dump
491362
491362
%if 0%{?optional_components}
491362
##### MJ2 #####
491362
491362
%package mj2
491362
Summary:        OpenJPEG2 MJ2 module
491362
Requires:       %{name}%{?_isa} = %{version}-%{release}
491362
491362
%description mj2
491362
The OpenJPEG library is an open-source JPEG 2000 library developed in order to
491362
promote the use of JPEG 2000.
491362
491362
This package contains the MJ2 module (JPEG 2000 standard Part 3)
491362
491362
491362
%package mj2-devel
491362
Summary:        Development files for OpenJPEG2 MJ2 module
491362
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
491362
Requires:       %{name}-mj2%{?_isa} = %{version}-%{release}
491362
491362
%description mj2-devel
491362
Development files for OpenJPEG2 MJ2 module
491362
491362
491362
%package mj2-tools
491362
Summary:        OpenJPEG2 MJ2 module command line tools
491362
Requires:       %{name}-mj2%{?_isa} = %{version}-%{release}
491362
491362
%description mj2-tools
491362
OpenJPEG2 MJ2 module command line tools
491362
491362
##### JPWL #####
491362
491362
%package jpwl
491362
Summary:        OpenJPEG2 JPWL module
491362
Requires:       %{name}%{?_isa} = %{version}-%{release}
491362
491362
%description jpwl
491362
The OpenJPEG library is an open-source JPEG 2000 library developed in order to
491362
promote the use of JPEG 2000.
491362
491362
This package contains the JPWL (JPEG 2000 standard Part 11 - Jpeg 2000 Wireless)
491362
491362
491362
%package jpwl-devel
491362
Summary:        Development files for OpenJPEG2 JPWL module
491362
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
491362
Requires:       %{name}-jpwl%{?_isa} = %{version}-%{release}
491362
491362
%description jpwl-devel
491362
Development files for OpenJPEG2 JPWL module
491362
491362
491362
%package jpwl-tools
491362
Summary:        OpenJPEG2 JPWL module command line tools
491362
Requires:       %{name}-jpwl%{?_isa} = %{version}-%{release}
491362
491362
%description jpwl-tools
491362
OpenJPEG2 JPWL module command line tools
491362
491362
##### JPIP #####
491362
491362
%package jpip
491362
Summary:        OpenJPEG2 JPIP module
491362
Requires:       %{name}%{?_isa} = %{version}-%{release}
491362
491362
%description jpip
491362
The OpenJPEG library is an open-source JPEG 2000 library developed in order to
491362
promote the use of JPEG 2000.
491362
491362
This package contains the JPWL (JPEG 2000 standard Part 9 - Jpeg 2000 Interactive Protocol)
491362
491362
491362
%package jpip-devel
491362
Summary:        Development files for OpenJPEG2 JPIP module
491362
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
491362
Requires:       %{name}-jpwl%{?_isa} = %{version}-%{release}
491362
491362
%description jpip-devel
491362
Development files for OpenJPEG2 JPIP module
491362
491362
491362
%package jpip-tools
491362
Summary:        OpenJPEG2 JPIP module command line tools
491362
Requires:       %{name}-jpip%{?_isa} = %{version}-%{release}
491362
Requires:       jpackage-utils
491362
Requires:       java
491362
491362
%description jpip-tools
491362
OpenJPEG2 JPIP module command line tools
491362
491362
##### JP3D #####
491362
491362
%package jp3d
491362
Summary:        OpenJPEG2 JP3D module
491362
Requires:       %{name}%{?_isa} = %{version}-%{release}
491362
491362
%description jp3d
491362
The OpenJPEG library is an open-source JPEG 2000 library developed in order to
491362
promote the use of JPEG 2000.
491362
491362
This package contains the JP3D (JPEG 2000 standard Part 10 - Jpeg 2000 3D)
491362
491362
491362
%package jp3d-devel
491362
Summary:        Development files for OpenJPEG2 JP3D module
491362
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
491362
Requires:       %{name}-jp3d%{?_isa} = %{version}-%{release}
491362
491362
%description jp3d-devel
491362
Development files for OpenJPEG2 JP3D module
491362
491362
491362
%package jp3d-tools
491362
Summary:        OpenJPEG2 JP3D module command line tools
491362
Requires:       %{name}-jp3d%{?_isa} = %{version}-%{release}
491362
491362
%description jp3d-tools
491362
OpenJPEG2 JP3D module command line tools
491362
%endif
491362
491362
491362
%prep
491362
%autosetup -p1 -n openjpeg-%{version} %{?runcheck:-a 1}
491362
491362
# Remove all third party libraries just to be sure
491362
find thirdparty/ -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;
491362
491362
491362
%build
491362
# TODO: Consider
491362
# -DBUILD_JPIP_SERVER=ON -DBUILD_JAVA=ON
491362
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \
491362
    %{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \
491362
    -DBUILD_DOC=ON \
491362
    -DBUILD_STATIC_LIBS=OFF \
491362
    -DBUILD_SHARED_LIBS=ON \
491362
    %{?runcheck:-DBUILD_TESTING:BOOL=ON -DOPJ_DATA_ROOT=$PWD/../data}
491362
491362
%cmake_build
491362
491362
491362
%install
491362
%cmake_install
491362
491362
mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1
491362
mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1
491362
mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump.1
491362
491362
# Docs are installed through %%doc
491362
rm -rf %{buildroot}%{_datadir}/doc/
491362
491362
%if 0%{?optional_components}
491362
# Move the jar to the correct place
491362
mkdir -p %{buildroot}%{_javadir}
491362
mv %{buildroot}%{_datadir}/opj_jpip_viewer.jar %{buildroot}%{_javadir}/opj2_jpip_viewer.jar
491362
cat > %{buildroot}%{_bindir}/opj2_jpip_viewer <
491362
java -jar %{_javadir}/opj2_jpip_viewer.jar "$@"
491362
EOF
491362
chmod +x %{buildroot}%{_bindir}/opj2_jpip_viewer
491362
%endif
491362
491362
491362
%ldconfig_scriptlets
491362
491362
491362
%check
491362
%if 0%{?runcheck}
491362
%ctest
491362
%endif
491362
491362
491362
%files
491362
%{!?_licensedir:%global license %doc}
491362
%license LICENSE
491362
%doc AUTHORS.md NEWS.md README.md THANKS.md
491362
%{_libdir}/libopenjp2.so.*
491362
%{_mandir}/man3/libopenjp2.3*
491362
491362
%files devel
491362
%dir %{_includedir}/openjpeg-2.4/
491362
%{_includedir}/openjpeg-2.4/openjpeg.h
491362
%{_includedir}/openjpeg-2.4/opj_config.h
491362
%{_includedir}/openjpeg-2.4/opj_stdint.h
491362
%{_libdir}/libopenjp2.so
491362
%{_libdir}/openjpeg-2.4/
491362
%{_libdir}/pkgconfig/libopenjp2.pc
491362
491362
%files devel-docs
491362
%doc %{__cmake_builddir}/doc/html
491362
491362
%files tools
491362
%{_bindir}/opj2_compress
491362
%{_bindir}/opj2_decompress
491362
%{_bindir}/opj2_dump
491362
%{_mandir}/man1/opj2_compress.1*
491362
%{_mandir}/man1/opj2_decompress.1*
491362
%{_mandir}/man1/opj2_dump.1*
491362
491362
%if 0%{?optional_components}
491362
%files mj2
491362
%{_libdir}/libopenmj2.so.*
491362
491362
%files mj2-devel
491362
%{_libdir}/libopenmj2.so
491362
491362
%files mj2-tools
491362
%{_bindir}/opj2_mj2*
491362
491362
%files jpwl
491362
%{_libdir}/libopenjpwl.so.*
491362
491362
%files jpwl-devel
491362
%{_libdir}/libopenjpwl.so
491362
%{_libdir}/pkgconfig/libopenjpwl.pc
491362
491362
%files jpwl-tools
491362
%{_bindir}/opj2_jpwl*
491362
491362
%files jpip
491362
%{_libdir}/libopenjpip.so.*
491362
491362
%files jpip-devel
491362
%{_libdir}/libopenjpip.so
491362
%{_libdir}/pkgconfig/libopenjpip.pc
491362
491362
%files jpip-tools
491362
%{_bindir}/opj2_jpip*
491362
%{_bindir}/opj2_dec_server
491362
%{_javadir}/opj2_jpip_viewer.jar
491362
491362
%files jp3d
491362
%{_libdir}/libopenjp3d.so.*
491362
491362
%files jp3d-devel
491362
%{_includedir}/openjpeg-2.0/openjp3d.h
491362
%{_libdir}/libopenjp3d.so
491362
%{_libdir}/pkgconfig/libopenjp3d.pc
491362
491362
%files jp3d-tools
491362
%{_bindir}/opj2_jp3d*
491362
%endif
491362
491362
491362
%changelog
9a56be
* Wed Jun 15 2022 Matej Mužila <mmuzila@redhat.com> - 2.4.0-7
9a56be
- Fix CVE-2022-1122
9a56be
491362
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.0-6
491362
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
491362
  Related: rhbz#1991688
491362
491362
* Fri Jun 25 2021 Nikola Forró <nforro@redhat.com> - 2.4.0-5
491362
- Fix CVE-2021-3575 (#1969280)
491362
491362
* Fri Jun 25 2021 Nikola Forró <nforro@redhat.com> - 2.4.0-4
491362
- Fix CVE-2021-29338 (#1951333)
491362
491362
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.0-3
491362
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
491362
491362
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-2
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
491362
491362
* Tue Dec 29 2020 Sandro Mani <manisandro@gmail.com> - 2.4.0-1
491362
- Update to 2.4.0
491362
491362
* Thu Dec 17 2020 Sandro Mani <manisandro@gmail.com> - 2.3.1-10
491362
* Backport patches for CVE-2020-27841, CVE-2020-27842, CVE-2020-27843, CVE-2020-27845
491362
491362
* Thu Dec 10 2020 Sandro Mani <manisandro@gmail.com> - 2.3.1-9
491362
* Backport patches for CVE-2020-27824 and CVE-2020-27823
491362
491362
* Sat Nov 28 2020 Sandro Mani <manisandro@gmail.com> - 2.3.1-8
491362
- Backport patch for CVE-2020-27814
491362
491362
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-7
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
491362
491362
* Thu Feb 13 2020 Sandro Mani <manisandro@gmail.com> - 2.3.1-6
491362
- Backport patch for CVE 2020-8112
491362
491362
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-5
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
491362
491362
* Fri Jan 17 2020 Sandro Mani <manisandro@gmail.com> - 2.3.1-4
491362
- Backport patch for CVE 2020-6851
491362
491362
* Wed Oct 02 2019 Sandro Mani <manisandro@gmail.com> - 2.3.1-3
491362
- Fix unbundling 3rd party libraries (#1757822)
491362
491362
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-2
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
491362
491362
* Tue Apr 02 2019 Sandro Mani <manisandro@gmail.com> - 2.3.1-1
491362
- Update to 2.3.1
491362
491362
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-11
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
491362
491362
* Thu Dec 20 2018 Sandro Mani <manisandro@gmail.com> - 2.3.0-10
491362
- Backport patches for CVE-2018-18088, CVE-2018-6616
491362
491362
* Thu Oct 04 2018 Sandro Mani <manisandro@gmail.com> - 2.3.0-9
491362
- Backport patch for CVE-2018-5785 (#1537758)
491362
491362
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-8
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
491362
491362
* Wed Mar 07 2018 Sandro Mani <manisandro@gmail.com> - 2.3.0-7
491362
- BR: gcc-c++
491362
491362
* Mon Feb 19 2018 Sandro Mani <manisandro@gmail.com> - 2.3.0-6
491362
- Add missing BR: gcc, make
491362
491362
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-5
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
491362
491362
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.3.0-4
491362
- Switch to %%ldconfig_scriptlets
491362
491362
* Mon Dec 25 2017 Sandro Mani <manisandro@gmail.com> - 2.3.0-3
491362
- Rename tool names at cmake level to ensure OpenJPEGTargets.cmake refers to the renamed files
491362
491362
* Mon Dec 25 2017 Sandro Mani <manisandro@gmail.com> - 2.3.0-2
491362
- Use BUILD_STATIC_LIBS=OFF instead of deleting the static library after build
491362
491362
* Thu Oct 05 2017 Sandro Mani <manisandro@gmail.com> - 2.3.0-1
491362
- Update to 2.3.0
491362
491362
* Thu Sep 07 2017 Sandro Mani <manisandro@gmail.com> - 2.2.0-4
491362
- Backport fix for CVE-2017-14039
491362
491362
* Thu Aug 31 2017 Sandro Mani <manisandro@gmail.com> - 2.2.0-3
491362
- Backport more security fixes, including for CVE-2017-14041 and CVE-2017-14040
491362
491362
* Thu Aug 31 2017 Sandro Mani <manisandro@gmail.com> - 2.2.0-2
491362
- Backport patch for CVE-2017-12982
491362
491362
* Thu Aug 10 2017 Sandro Mani <manisandro@gmail.com> - 2.2.0-1
491362
- Update to 2.2.0
491362
491362
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-6
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
491362
491362
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-5
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
491362
491362
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-4
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
491362
491362
* Sat Dec 17 2016 Sandro Mani <manisandro@gmail.com> - 2.1.2-3
491362
- Add patch for CVE-2016-9580 (#1405128) and CVE-2016-9581 (#1405135)
491362
491362
* Thu Dec 08 2016 Sandro Mani <manisandro@gmail.com> - 2.1.2-2
491362
- Add patch for CVE-2016-9572 (#1402714) and CVE-2016-9573 (#1402711)
491362
491362
* Wed Sep 28 2016 Sandro Mani <manisandro@gmail.com> - 2.1.2-1
491362
- Update to 2.1.2
491362
- Fixes: CVE-2016-7445
491362
491362
* Fri Sep 09 2016 Sandro Mani <manisandro@gmail.com> - 2.1.1-3
491362
- Backport: Add sanity check for tile coordinates (#1374337)
491362
491362
* Fri Sep 09 2016 Sandro Mani <manisandro@gmail.com> - 2.1.1-2
491362
- Backport fixes for CVE-2016-7163
491362
491362
* Wed Jul 06 2016 Sandro Mani <manisandro@gmail.com> - 2.1.1-1
491362
- Update to 2.1.1
491362
- Fixes: CVE-2016-3183, CVE-2016-3181, CVE-2016-3182, CVE-2016-4796, CVE-2016-4797, CVE-2015-8871
491362
491362
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-8
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
491362
491362
* Thu Oct 01 2015 Sandro Mani <manisandro@gmail.com> - 2.1.0-7
491362
- Backport fix for possible double-free (#1267983)
491362
491362
* Tue Sep 15 2015 Sandro Mani <manisandro@gmail.com> - 2.1.0-6
491362
- Backport fix for use after free vulnerability (#1263359)
491362
491362
* Thu Jun 25 2015 Sandro Mani <manisandro@gmail.com> - 2.1.0-5
491362
- Add openjpeg2_bigendian.patch (#1232739)
491362
491362
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-4
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
491362
491362
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
491362
491362
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
491362
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
491362
491362
* Tue May 27 2014 Sandro Mani <manisandro@gmail.com> - 2.1.0-1
491362
- Update to 2.1.0
491362
491362
* Wed Apr 16 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-5
491362
- Switch to official 2.0 release and backport pkg-config patch
491362
491362
* Thu Apr 10 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-4.svn20140403
491362
- Replace define with global
491362
- Fix #define optional_components 1S typo
491362
- Fix %%(pwd) -> $PWD for test data
491362
- Added some BR for optional components
491362
- Include opj2_jpip_viewer.jar in %%files
491362
491362
* Wed Apr 09 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-3.svn20140403
491362
- Fix source url
491362
- Fix mixed tabs and spaces
491362
- Fix description too long
491362
491362
* Wed Apr 09 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-2.svn20140403
491362
- Remove thirdparty libraries folder in prep
491362
- Own %%{_libdir}/openjpeg-2.0/
491362
- Fix Requires
491362
- Add missing ldconfig
491362
- Add possibility to run conformance tests if desired
491362
 
491362
* Thu Apr 03 2014 Sandro Mani <manisandro@gmail.com> - 2.0.0-1.svn20140403
491362
- Initial package