e8d57f
Name:           libjpeg-turbo
e8d57f
Version:        1.5.3
4ed40e
Release:        12%{?dist}
e8d57f
Summary:        A MMX/SSE2/SIMD accelerated library for manipulating JPEG image files
e8d57f
License:        IJG
e8d57f
URL:            http://sourceforge.net/projects/libjpeg-turbo
e8d57f
e8d57f
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
e8d57f
Patch0:         libjpeg-turbo14-noinst.patch
e8d57f
Patch1:         libjpeg-turbo-header-files.patch
e8d57f
Patch2:         libjpeg-turbo-CVE-2018-11813.patch
e8d57f
Patch3:         libjpeg-turbo-CVE-2018-1152.patch
e8d57f
Patch4:         libjpeg-turbo-honor-naflags.patch
e8d57f
Patch5:         libjpeg-turbo-coverity.patch
e8d57f
Patch6:         libjpeg-turbo-CET.patch
e8d57f
Patch7:         libjpeg-turbo-CVE-2018-14498.patch
e8d57f
Patch8:         libjpeg-turbo-CVE-2020-17541.patch
e8d57f
e8d57f
BuildRequires:  autoconf
e8d57f
BuildRequires:  automake
e8d57f
BuildRequires:  libtool
e8d57f
BuildRequires:  nasm
e8d57f
e8d57f
Obsoletes:      libjpeg < 6b-47
e8d57f
# add provides (even if it not needed) to workaround bad packages, like
e8d57f
# java-1.6.0-openjdk (#rh607554) -- atkac
e8d57f
Provides:       libjpeg = 6b-47%{?dist}
e8d57f
%if "%{?_isa}" != ""
e8d57f
Provides:       libjpeg%{_isa} = 6b-47%{?dist}
e8d57f
%endif
e8d57f
e8d57f
%description
e8d57f
The libjpeg-turbo package contains a library of functions for manipulating JPEG
e8d57f
images.
e8d57f
e8d57f
%package devel
e8d57f
Summary:        Headers for the libjpeg-turbo library
e8d57f
Obsoletes:      libjpeg-devel < 6b-47
e8d57f
Provides:       libjpeg-devel = 6b-47%{?dist}
e8d57f
%if "%{?_isa}" != ""
e8d57f
Provides:       libjpeg-devel%{_isa} = 6b-47%{?dist}
e8d57f
%endif
e8d57f
Requires:       libjpeg-turbo%{?_isa} = %{version}-%{release}
e8d57f
Obsoletes:      libjpeg-turbo-static < 1.3.1
e8d57f
Provides:       libjpeg-turbo-static = 1.3.1%{?dist}
e8d57f
e8d57f
%description devel
e8d57f
This package contains header files necessary for developing programs which will
e8d57f
manipulate JPEG files using the libjpeg-turbo library.
e8d57f
e8d57f
%package utils
e8d57f
Summary:        Utilities for manipulating JPEG images
e8d57f
Requires:       libjpeg-turbo%{?_isa} = %{version}-%{release}
e8d57f
e8d57f
%description utils
e8d57f
The libjpeg-turbo-utils package contains simple client programs for accessing
e8d57f
the libjpeg functions. It contains cjpeg, djpeg, jpegtran, rdjpgcom and
e8d57f
wrjpgcom. Cjpeg compresses an image file into JPEG format. Djpeg decompresses a
e8d57f
JPEG file into a regular image file. Jpegtran can perform various useful
e8d57f
transformations on JPEG files. Rdjpgcom displays any text comments included in a
e8d57f
JPEG file. Wrjpgcom inserts text comments into a JPEG file.
e8d57f
e8d57f
%package -n turbojpeg
e8d57f
Summary:        TurboJPEG library
e8d57f
e8d57f
%description -n turbojpeg
e8d57f
The turbojpeg package contains the TurboJPEG shared library.
e8d57f
e8d57f
%package -n turbojpeg-devel
e8d57f
Summary:        Headers for the TurboJPEG library
e8d57f
Requires:       turbojpeg%{?_isa} = %{version}-%{release}
e8d57f
e8d57f
%description -n turbojpeg-devel
e8d57f
This package contains header files necessary for developing programs which will
e8d57f
manipulate JPEG files using the TurboJPEG library.
e8d57f
e8d57f
%prep
e8d57f
%setup -q
e8d57f
%patch0 -p1 -b .noinst
e8d57f
%patch1 -p1 -b .header-files
e8d57f
%patch2 -p1 -b .CVE-2018-11813
e8d57f
%patch3 -p1 -b .CVE-2018-1152
e8d57f
%patch4 -p1 -b .honor-naflags
e8d57f
%patch5 -p1 -b .coverity
e8d57f
%patch6 -p1 -b .CET
e8d57f
%patch7 -p1 -b .CVE-2018-14498
e8d57f
%patch8 -p1 -b .CVE-2020-17541
e8d57f
e8d57f
%build
e8d57f
autoreconf -vif
e8d57f
export NAFLAGS="-g -Fdwarf"
e8d57f
export CCASFLAGS="-Wa,--generate-missing-build-notes=yes"
e8d57f
# NASM object files are missing GNU Property note for Intel CET,
e8d57f
# force it on the resulting library
e8d57f
%ifarch %{ix86} x86_64
e8d57f
export LDFLAGS="$RPM_LD_FLAGS -Wl,-z,ibt -Wl,-z,shstk"
e8d57f
%endif
e8d57f
%configure --disable-static
e8d57f
e8d57f
make %{?_smp_mflags} V=1
e8d57f
e8d57f
%install
e8d57f
make install DESTDIR=%{buildroot}
e8d57f
find %{buildroot} -name "*.la" -delete
e8d57f
e8d57f
# Fix perms
e8d57f
chmod -x README.md
e8d57f
e8d57f
# multilib header hack
e8d57f
# we only apply this to known Red Hat multilib arches, per bug #1264675
e8d57f
case `uname -i` in
e8d57f
  i386 | ppc | s390 | sparc )
e8d57f
    wordsize="32"
e8d57f
    ;;
e8d57f
  x86_64 | ppc64 | s390x | sparc64 )
e8d57f
    wordsize="64"
e8d57f
    ;;
e8d57f
  *)
e8d57f
    wordsize=""
e8d57f
    ;;
e8d57f
esac
e8d57f
e8d57f
if test -n "$wordsize"
e8d57f
then
e8d57f
  mv $RPM_BUILD_ROOT%{_includedir}/jconfig.h \
e8d57f
     $RPM_BUILD_ROOT%{_includedir}/jconfig-$wordsize.h
e8d57f
e8d57f
  cat >$RPM_BUILD_ROOT%{_includedir}/jconfig.h <
e8d57f
#ifndef JCONFIG_H_MULTILIB
e8d57f
#define JCONFIG_H_MULTILIB
e8d57f
e8d57f
#include <bits/wordsize.h>
e8d57f
e8d57f
#if __WORDSIZE == 32
e8d57f
# include "jconfig-32.h"
e8d57f
#elif __WORDSIZE == 64
e8d57f
# include "jconfig-64.h"
e8d57f
#else
e8d57f
# error "unexpected value for __WORDSIZE macro"
e8d57f
#endif
e8d57f
e8d57f
#endif
e8d57f
EOF
e8d57f
e8d57f
fi
e8d57f
e8d57f
%check
e8d57f
make test %{?_smp_mflags}
e8d57f
e8d57f
%ldconfig_scriptlets
e8d57f
%ldconfig_scriptlets -n turbojpeg
e8d57f
e8d57f
%files
4ed40e
%license LICENSE.md
e8d57f
%doc README.md README.ijg ChangeLog.md
e8d57f
%{_libdir}/libjpeg.so.62*
e8d57f
e8d57f
%files devel
e8d57f
%doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.c
e8d57f
%{_includedir}/jconfig*.h
e8d57f
%{_includedir}/jerror.h
e8d57f
%{_includedir}/jmorecfg.h
e8d57f
%{_includedir}/jpegint.h
e8d57f
%{_includedir}/jpeglib.h
e8d57f
%{_libdir}/libjpeg.so
e8d57f
%{_libdir}/pkgconfig/libjpeg.pc
e8d57f
e8d57f
%files utils
e8d57f
%doc usage.txt wizard.txt
e8d57f
%{_bindir}/cjpeg
e8d57f
%{_bindir}/djpeg
e8d57f
%{_bindir}/jpegtran
e8d57f
%{_bindir}/rdjpgcom
e8d57f
%{_bindir}/wrjpgcom
e8d57f
%{_mandir}/man1/cjpeg.1*
e8d57f
%{_mandir}/man1/djpeg.1*
e8d57f
%{_mandir}/man1/jpegtran.1*
e8d57f
%{_mandir}/man1/rdjpgcom.1*
e8d57f
%{_mandir}/man1/wrjpgcom.1*
e8d57f
e8d57f
%files -n turbojpeg
4ed40e
%license LICENSE.md
e8d57f
%{_libdir}/libturbojpeg.so.0*
e8d57f
e8d57f
%files -n turbojpeg-devel
e8d57f
%{_includedir}/turbojpeg.h
e8d57f
%{_libdir}/libturbojpeg.so
e8d57f
%{_libdir}/pkgconfig/libturbojpeg.pc
e8d57f
e8d57f
%changelog
4ed40e
* Thu Jul 15 2021 Nikola Forró <nforro@redhat.com> - 1.5.3-12
4ed40e
- Add missing license file (#1982572)
4ed40e
e8d57f
* Wed Jun 30 2021 Nikola Forró <nforro@redhat.com> - 1.5.3-11
e8d57f
- Fix CVE-2020-17541 (#1972289)
e8d57f
e8d57f
* Thu Jun 06 2019 Nikola Forró <nforro@redhat.com> - 1.5.3-10
e8d57f
- Fix CVE-2018-14498 (#1687477)
e8d57f
e8d57f
* Tue Jun 04 2019 Nikola Forró <nforro@redhat.com> - 1.5.3-9
e8d57f
- Fix LDFLAGS (#1688397)
e8d57f
e8d57f
* Thu Mar 21 2019 Nikola Forró <nforro@redhat.com> - 1.5.3-8
e8d57f
- Support running with Intel CET (#1688397)
e8d57f
e8d57f
* Mon Oct 15 2018 Nikola Forró <nforro@redhat.com> - 1.5.3-7
e8d57f
- Fix important Covscan defects (#1606984)
e8d57f
e8d57f
* Mon Oct 01 2018 Nikola Forró <nforro@redhat.com> - 1.5.3-6
e8d57f
- Compile NASM sources with debug info, annotate GAS object files (#1630583)
e8d57f
e8d57f
* Fri Jun 29 2018 Nikola Forró <nforro@redhat.com> - 1.5.3-5
e8d57f
- Fix CVE-2018-1152 (#1593557)
e8d57f
e8d57f
* Fri Jun 15 2018 Nikola Forró <nforro@redhat.com> - 1.5.3-4
e8d57f
- Fix CVE-2018-11813 (#1588807)
e8d57f
e8d57f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-3
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e8d57f
e8d57f
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5.3-2
e8d57f
- Switch to %%ldconfig_scriptlets
e8d57f
e8d57f
* Tue Dec 19 2017 Nikola Forró <nforro@redhat.com> - 1.5.3-1
e8d57f
- New upstream release 1.5.3 (#1468783)
e8d57f
e8d57f
* Tue Dec 19 2017 Nikola Forró <nforro@redhat.com> - 1.5.1-5
e8d57f
- re-enable check on ppc64(le)
e8d57f
e8d57f
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-4
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
e8d57f
e8d57f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-3
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e8d57f
e8d57f
* Thu May 18 2017 Karsten Hopp <karsten@redhat.com> - 1.5.1-2
e8d57f
- disable check on ppc64(le)
e8d57f
e8d57f
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-1
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e8d57f
e8d57f
* Thu Oct 06 2016 Petr Hracek <phracek@redhat.com> - 1.5.1-1
e8d57f
- New upstream relelase 1.5.1 (#1377903)
e8d57f
e8d57f
* Wed Sep 21 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.0-4
e8d57f
- Add upstream aarch64 NEON fix, re-enable SIMD on aarch64
e8d57f
e8d57f
* Mon Sep 19 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.0-3
e8d57f
- Temporarily disable SIMD on aarch64 until upstream #97 is fixed
e8d57f
- Add NEON fix for ARMv7
e8d57f
e8d57f
* Tue Sep 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.0-2
e8d57f
- Add upstream fix to fix SIMD crash on aarch64 (rhbz #1368569)
e8d57f
e8d57f
* Tue Jun 21 2016 Petr Hracek <phracek@redhat.com> - 1.5.0-1
e8d57f
- New upstream release 1.5.0 (#1343786)
e8d57f
e8d57f
* Thu Mar 10 2016 Petr Hracek <phracek@redhat.com> - 1.4.90-1
e8d57f
- New upstream release 1.4.90 (#1313111)
e8d57f
e8d57f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-3
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e8d57f
e8d57f
* Wed Oct 07 2015 Petr Hracek <phracek@redhat.com> - 1.4.2-2
e8d57f
- Fix problem with multilibs like jconfig.h (#1264675)
e8d57f
e8d57f
* Wed Oct 07 2015 Petr Hracek <phracek@redhat.com> - 1.4.2-1
e8d57f
- New upstream release 1.4.2 (#1265034)
e8d57f
e8d57f
* Tue Jun 16 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.1-1
e8d57f
- new upstream version 1.4.1
e8d57f
- nasm available on all arches
e8d57f
- run tests with SMP
e8d57f
e8d57f
* Tue Jan 20 2015 Petr Hracek <phracek@redhat.com> - 1.4.0-1
e8d57f
- new upstream version 1.4.0 (#1180442)
e8d57f
e8d57f
* Wed Nov 26 2014 Petr Hracek <phracek@redhat.com> - 1.3.90-3
e8d57f
- libjpeg-turbo no longer defined macros like JPP (#1164815)
e8d57f
e8d57f
* Wed Nov 19 2014 Petr Hracek <phracek@redhat.com> - 1.3.90-2
e8d57f
- Resolves #1161585 Add suport for secondary arches
e8d57f
e8d57f
* Mon Oct 27 2014 Petr Hracek <phracek@redhat.com> - 1.3.90-1
e8d57f
- new upstream version 1.3.90
e8d57f
Resolves #1135375
e8d57f
e8d57f
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e8d57f
e8d57f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-3
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e8d57f
e8d57f
* Thu Apr 17 2014 Simone Caronni <negativo17@gmail.com> - 1.3.1-2
e8d57f
- Re-add libjpeg-devel requirements for broken packages since Fedora 13.
e8d57f
e8d57f
* Wed Apr 16 2014 Petr Hracek <phracek@redhat.com> - 1.3.1-1
e8d57f
- New upstream version
e8d57f
- Remove upstreamed patches, add missing jpegint.h
e8d57f
- Clean up SPEC file
e8d57f
- Disable --static subpackage
e8d57f
- Remove libjpeg obsolency, removed in Fedora 13
e8d57f
e8d57f
* Thu Dec 19 2013 Petr Hracek <phracek@redhat.com> - 1.3.0-2
e8d57f
- Apply fixes CVE-2013-6629, CVE-2013-6630 (#20131737)
e8d57f
e8d57f
* Thu Jul 25 2013 Petr Hracek <phracek@redhat.com> - 1.3.0-1
e8d57f
- new upstream version
e8d57f
- no soname bump change
e8d57f
e8d57f
* Tue Mar 26 2013 Adam Tkac <atkac redhat com> - 1.2.90-2
e8d57f
- rebuild for ARM64 support
e8d57f
e8d57f
* Fri Feb 08 2013 Adam Tkac <atkac redhat com> 1.2.90-1
e8d57f
- update to 1.2.90
e8d57f
e8d57f
* Mon Feb 04 2013 Adam Tkac <atkac redhat com> 1.2.90-0.1.20130204svn922
e8d57f
- update to 1.2.80 snapshot (#854695)
e8d57f
- run `make test` during build
e8d57f
e8d57f
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> 1.2.1-6
e8d57f
- build with jpeg6 API/ABI (jpeg8-ABI feature was dropped)
e8d57f
e8d57f
* Tue Dec 04 2012 Adam Tkac <atkac redhat com> 1.2.1-5
e8d57f
- change license to IJG (#877517)
e8d57f
e8d57f
* Wed Oct 24 2012 Adam Tkac <atkac redhat com> 1.2.1-4
e8d57f
- build with jpeg8 API/ABI (#854695)
e8d57f
e8d57f
* Thu Oct 18 2012 Adam Tkac <atkac redhat com> 1.2.1-3
e8d57f
- minor provides tuning (#863231)
e8d57f
e8d57f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e8d57f
e8d57f
* Mon Jul 16 2012 Adam Tkac <atkac redhat com> 1.2.1-1
e8d57f
- update to 1.2.1
e8d57f
e8d57f
* Thu Mar 08 2012 Adam Tkac <atkac redhat com> 1.2.0-1
e8d57f
- update to 1.2.0
e8d57f
e8d57f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-4
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e8d57f
e8d57f
* Mon Nov 21 2011 Orion Poplawski <orion cora nwra com> 1.1.1-3
e8d57f
- Make turobojpeg-devel depend on turbojpeg
e8d57f
e8d57f
* Fri Oct 7 2011 Orion Poplawski <orion cora nwra com> 1.1.1-2
e8d57f
- Ship the turbojpeg library (#744258)
e8d57f
e8d57f
* Mon Jul 11 2011 Adam Tkac <atkac redhat com> 1.1.1-1
e8d57f
- update to 1.1.1
e8d57f
  - ljt11-rh688712.patch merged
e8d57f
e8d57f
* Tue Mar 22 2011 Adam Tkac <atkac redhat com> 1.1.0-2
e8d57f
- handle broken JPEGs better (#688712)
e8d57f
e8d57f
* Tue Mar 01 2011 Adam Tkac <atkac redhat com> 1.1.0-1
e8d57f
- update to 1.1.0
e8d57f
e8d57f
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.90-2
e8d57f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e8d57f
e8d57f
* Mon Jan 17 2011 Adam Tkac <atkac redhat com> 1.0.90-1
e8d57f
- update to 1.0.90
e8d57f
- libjpeg-turbo10-rh639672.patch merged
e8d57f
e8d57f
* Fri Oct 29 2010 Adam Tkac <atkac redhat com> 1.0.1-3
e8d57f
- add support for arithmetic coded files into decoder (#639672)
e8d57f
e8d57f
* Wed Sep 29 2010 jkeating - 1.0.1-2
e8d57f
- Rebuilt for gcc bug 634757
e8d57f
e8d57f
* Mon Sep 13 2010 Adam Tkac <atkac redhat com> 1.0.1-1
e8d57f
- update to 1.0.1
e8d57f
  - libjpeg-turbo10-rh617469.patch merged
e8d57f
- add -static subpkg (#632859)
e8d57f
e8d57f
* Wed Aug 04 2010 Adam Tkac <atkac redhat com> 1.0.0-3
e8d57f
- fix huffman decoder to handle broken JPEGs well (#617469)
e8d57f
e8d57f
* Fri Jul 02 2010 Adam Tkac <atkac redhat com> 1.0.0-2
e8d57f
- add libjpeg-devel%%{_isa} provides to -devel subpkg to satisfy imlib-devel
e8d57f
  deps
e8d57f
e8d57f
* Fri Jul 02 2010 Adam Tkac <atkac redhat com> 1.0.0-1
e8d57f
- update to 1.0.0
e8d57f
- patches merged
e8d57f
  - libjpeg-turbo-programs.patch
e8d57f
  - libjpeg-turbo-nosimd.patch
e8d57f
- add libjpeg provides to the main package to workaround problems with broken
e8d57f
  java-1.6.0-openjdk package
e8d57f
e8d57f
* Fri Jul 02 2010 Adam Tkac <atkac redhat com> 0.0.93-13
e8d57f
- remove libjpeg provides from -utils subpkg
e8d57f
e8d57f
* Wed Jun 30 2010 Rex Dieter <rdieter@fedoraproject.org> 0.0.93-12
e8d57f
- move Obsoletes: libjpeg to main pkg
e8d57f
e8d57f
* Wed Jun 30 2010 Rex Dieter <rdieter@fedoraproject.org> 0.0.93-11
e8d57f
- -utils: Requires: %%name ...
e8d57f
e8d57f
* Wed Jun 30 2010 Adam Tkac <atkac redhat com> 0.0.93-10
e8d57f
- add Provides = libjpeg to -utils subpackage
e8d57f
e8d57f
* Mon Jun 28 2010 Adam Tkac <atkac redhat com> 0.0.93-9
e8d57f
- merge review related fixes (#600243)
e8d57f
e8d57f
* Wed Jun 16 2010 Adam Tkac <atkac redhat com> 0.0.93-8
e8d57f
- merge review related fixes (#600243)
e8d57f
e8d57f
* Mon Jun 14 2010 Adam Tkac <atkac redhat com> 0.0.93-7
e8d57f
- obsolete -static libjpeg subpackage (#600243)
e8d57f
e8d57f
* Mon Jun 14 2010 Adam Tkac <atkac redhat com> 0.0.93-6
e8d57f
- improve package description a little (#600243)
e8d57f
- include example.c as %%doc in the -devel subpackage
e8d57f
e8d57f
* Fri Jun 11 2010 Adam Tkac <atkac redhat com> 0.0.93-5
e8d57f
- don't use "fc12" disttag in obsoletes/provides (#600243)
e8d57f
e8d57f
* Thu Jun 10 2010 Adam Tkac <atkac redhat com> 0.0.93-4
e8d57f
- fix compilation on platforms without MMX/SSE (#600243)
e8d57f
e8d57f
* Thu Jun 10 2010 Adam Tkac <atkac redhat com> 0.0.93-3
e8d57f
- package review related fixes (#600243)
e8d57f
e8d57f
* Wed Jun 09 2010 Adam Tkac <atkac redhat com> 0.0.93-2
e8d57f
- package review related fixes (#600243)
e8d57f
e8d57f
* Fri Jun 04 2010 Adam Tkac <atkac redhat com> 0.0.93-1
e8d57f
- initial package