3480dde
%?mingw_package_header
3480dde
3480dde
%global mingw_build_win32 1
3480dde
%global mingw_build_win64 1
3f7f32a
bdf5cf5
Name:           mingw-jasper
27c7e06
Version:        1.900.28
f3ca197
Release:        4%{?dist}
3f7f32a
Summary:        MinGW Windows Jasper library
3f7f32a
3f7f32a
License:        JasPer
3f7f32a
Group:          Development/Libraries
3f7f32a
4b2d41a
URL:            http://www.ece.uvic.ca/~frodo/jasper/
27c7e06
Source0:        http://www.ece.uvic.ca/~frodo/jasper/software/jasper-%{version}.tar.gz
3f7f32a
3f7f32a
# Patches from Fedora native package.
4b2d41a
# OpenBSD hardening patches addressing couple of possible integer overflows
4b2d41a
# during the memory allocations
4b2d41a
# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3520
4b2d41a
Patch5: jasper-1.900.1-CVE-2008-3520.patch
3f7f32a
3f7f32a
# MinGW-specific patches.
3f7f32a
# This patch adds '-no-undefined' flag to libtool line:
3f7f32a
Patch1000:      jasper-1.900.1-mingw32.patch
3f7f32a
# This patch is a bit of a hack, but it's just there to fix a demo program:
3f7f32a
Patch1001:      jasper-1.900.1-sleep.patch
3f7f32a
3f7f32a
BuildArch:      noarch
3f7f32a
3480dde
BuildRequires:  mingw32-filesystem >= 95
3480dde
BuildRequires:  mingw64-filesystem >= 95
3f7f32a
BuildRequires:  mingw32-gcc
3480dde
BuildRequires:  mingw64-gcc
3f7f32a
BuildRequires:  mingw32-binutils
3480dde
BuildRequires:  mingw64-binutils
3f7f32a
BuildRequires:  mingw32-libjpeg
3480dde
BuildRequires:  mingw64-libjpeg
3f7f32a
Erik van Pienbroek c5e5048
BuildRequires:  autoconf automake libtool
Erik van Pienbroek c5e5048
Erik van Pienbroek c5e5048
3f7f32a
%description
3f7f32a
MinGW Windows Jasper library.
3f7f32a
3f7f32a
bdf5cf5
%package -n mingw32-jasper
bdf5cf5
Summary:        MinGW Windows Jasper library
bdf5cf5
bdf5cf5
%description -n mingw32-jasper
bdf5cf5
MinGW Windows Jasper library.
bdf5cf5
bdf5cf5
bdf5cf5
%package -n mingw32-jasper-static
855c2df
Summary:        Static version of the MinGW Windows Jasper library
bdf5cf5
Requires:       mingw32-jasper = %{version}-%{release}
855c2df
Group:          Development/Libraries
855c2df
bdf5cf5
%description -n mingw32-jasper-static
855c2df
Static version of the MinGW Windows Jasper library.
855c2df
855c2df
3480dde
%package -n mingw64-jasper
3480dde
Summary:        MinGW Windows Jasper library
3480dde
3480dde
%description -n mingw64-jasper
3480dde
MinGW Windows Jasper library.
3480dde
3480dde
3480dde
%package -n mingw64-jasper-static
3480dde
Summary:        Static version of the MinGW Windows Jasper library
3480dde
Requires:       mingw64-jasper = %{version}-%{release}
3480dde
Group:          Development/Libraries
3480dde
3480dde
%description -n mingw64-jasper-static
3480dde
Static version of the MinGW Windows Jasper library.
3480dde
3480dde
3480dde
%?mingw_debug_package
855c2df
855c2df
3f7f32a
%prep
3f7f32a
%setup -q -n jasper-%{version}
4b2d41a
%patch5 -p1 -b .CVE-2008-3520
3f7f32a
Erik van Pienbroek c5e5048
# The libtool bundled with this package is too old for win64 support
Erik van Pienbroek c5e5048
autoreconf -i --force
Erik van Pienbroek c5e5048
3f7f32a
%patch1000 -p1 -b .mingw32
3f7f32a
%patch1001 -p1 -b .sleep
3f7f32a
3f7f32a
3f7f32a
%build
27c7e06
# comment from Red Hat Security Response Team:
27c7e06
# gcc inlines jas_iccattrtab_resize into jas_iccattrtab_add. Additionally, it
27c7e06
# essentially removes the "assert(maxents >= tab->numattrs);" assertion in
27c7e06
# jas_iccattrtab_resize, because it assumes that "maxents >= tab->numattrs" will
27c7e06
# always be true due to jas_iccattrtab_resize(attrtab, attrtab->numattrs + 32),
27c7e06
# especially the + 32. This assumption can only be true if it completely ignores
27c7e06
# the problem of signed integer overflows. I don't think it's a smart idea to
27c7e06
# accept that.
27c7e06
# -fno-strict-overflow forces gcc into keeping the assertion there.
27c7e06
CFLAGS="%{optflags} -fno-strict-overflow" \
3480dde
%mingw_configure \
855c2df
  --disable-opengl --enable-libjpeg --enable-static --enable-shared
3480dde
%mingw_make %{?_smp_mflags}
3f7f32a
3f7f32a
3f7f32a
%install
3480dde
%mingw_make DESTDIR=$RPM_BUILD_ROOT install mandir=%{mingw32_mandir}
3f7f32a
6788007
# Remove .la files
6788007
rm $RPM_BUILD_ROOT%{mingw32_libdir}/*.la
3480dde
rm $RPM_BUILD_ROOT%{mingw64_libdir}/*.la
6788007
3f7f32a
# Remove the manual pages - don't duplicate documentation which
3f7f32a
# is in the native Fedora package.
1adb2c3
rm $RPM_BUILD_ROOT%{mingw32_mandir}/man1/*
3f7f32a
3f7f32a
bdf5cf5
%files -n mingw32-jasper
3f7f32a
%doc COPYRIGHT LICENSE NEWS README
27c7e06
%{mingw32_bindir}/imgcmp.exe
27c7e06
%{mingw32_bindir}/imginfo.exe
27c7e06
%{mingw32_bindir}/jasper.exe
27c7e06
%{mingw32_bindir}/tmrdemo.exe
27c7e06
%{mingw32_bindir}/libjasper-4.dll
1adb2c3
%{mingw32_libdir}/libjasper.dll.a
4b2d41a
%{mingw32_libdir}/pkgconfig/jasper.pc
1adb2c3
%{mingw32_includedir}/jasper/
3f7f32a
bdf5cf5
%files -n mingw32-jasper-static
1adb2c3
%{mingw32_libdir}/libjasper.a
855c2df
3480dde
%files -n mingw64-jasper
3480dde
%doc COPYRIGHT LICENSE NEWS README
27c7e06
%{mingw64_bindir}/imgcmp.exe
27c7e06
%{mingw64_bindir}/imginfo.exe
27c7e06
%{mingw64_bindir}/jasper.exe
27c7e06
%{mingw64_bindir}/tmrdemo.exe
27c7e06
%{mingw64_bindir}/libjasper-4.dll
3480dde
%{mingw64_libdir}/libjasper.dll.a
4b2d41a
%{mingw64_libdir}/pkgconfig/jasper.pc
3480dde
%{mingw64_includedir}/jasper/
3480dde
3480dde
%files -n mingw64-jasper-static
3480dde
%{mingw64_libdir}/libjasper.a
3480dde
3f7f32a
3f7f32a
%changelog
f3ca197
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.900.28-4
f3ca197
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f3ca197
5459259
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.900.28-3
5459259
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5459259
d92ff3f
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.900.28-2
d92ff3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d92ff3f
27c7e06
* Wed Nov 23 2016 Michael Cronenworth <mike@cchtml.com> - 1.900.28-1
27c7e06
- Upstream release.
27c7e06
- Many security fixes:
27c7e06
     CVE-2016-9395, CVE-2016-9262, CVE-2016-8690, CVE-2016-8691,
27c7e06
     CVE-2016-8693, CVE-2016-2089, CVE-2015-5203, CVE-2015-5221, CVE-2016-8692,
27c7e06
     CVE-2016-1867, CVE-2016-1577, CVE-2016-2116
27c7e06
aa9c50d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.900.1-28
aa9c50d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
aa9c50d
5a9ea8a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-27
5a9ea8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5a9ea8a
f208de0
* Thu Jan 22 2015 Michael Cronenworth <mike@cchtml.com> - 1.900.1-26
f208de0
- Fixes for CVE-2014-8157 and CVE-2014-8158
f208de0
b71e4b4
* Thu Dec 18 2014 Michael Cronenworth <mike@cchtml.com> - 1.900.1-25
b71e4b4
- Fixes for CVE-2014-8137 and CVE-2014-8138
b71e4b4
4b2d41a
* Sat Dec 13 2014 Michael Cronenworth <mike@cchtml.com> - 1.900.1-24
4b2d41a
- Apply all native patches for CVEs
4b2d41a
4f37c71
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-23
4f37c71
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4f37c71
22fe11d
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-22
22fe11d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
22fe11d
62bda9f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-21
62bda9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
62bda9f
b42e279
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-20
b42e279
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b42e279
Erik van Pienbroek c5e5048
* Wed Mar 14 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.900.1-19
Erik van Pienbroek c5e5048
- Eliminated the libtool hack
Erik van Pienbroek c5e5048
3480dde
* Wed Mar 14 2012 Kalev Lember <kalevlember@gmail.com> - 1.900.1-18
3480dde
- Build 64 bit Windows binaries
3480dde
6788007
* Fri Mar 09 2012 Kalev Lember <kalevlember@gmail.com> - 1.900.1-17
6788007
- Remove .la files
6788007
bdf5cf5
* Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 1.900.1-16
bdf5cf5
- Renamed the source package to mingw-jasper (#800426)
e390591
- Spec clean up
1adb2c3
- Use mingw macros without leading underscore
bdf5cf5
aa20621
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.900.1-15
aa20621
- Rebuild against the mingw-w64 toolchain
aa20621
3a8c543
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-14
3a8c543
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3a8c543
Kalev Lember b62f5a0
* Fri Jun 03 2011 Kalev Lember <kalev@smartlink.ee> - 1.900.1-13
Kalev Lember b62f5a0
- Rebuilt with mingw32-libjpeg-turbo
Kalev Lember b62f5a0
7f4b2ce
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-12
7f4b2ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7f4b2ce
e6e13ed
* Fri Sep 18 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.900.1-11
e6e13ed
- Rebuild because of broken mingw32-gcc/mingw32-binutils
e6e13ed
855c2df
* Thu Aug 27 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.900.1-10
855c2df
- Rebuild for mingw32-libjpeg 7
855c2df
- Automatically generate debuginfo subpackage
855c2df
- Added -static subpackage
855c2df
- Use %%global instead of %%define
855c2df
c17a98c
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.900.1-9
c17a98c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c17a98c
3f7f32a
* Mon Mar  9 2009 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-8
3f7f32a
- Fix defattr line.
3f7f32a
- Remove the enable-shared patch, and just use --enable-shared on
3f7f32a
  the configure line.
3f7f32a
- Disable the GL patch since OpenGL is disabled.
3f7f32a
- Document what the patches are for in the spec file.
3f7f32a
- Only patch Makefile.in so we don't have to rerun autotools, and
3f7f32a
  remove autotools dependency.
3f7f32a
3f7f32a
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-7
3f7f32a
- Rebuild for mingw32-gcc 4.4
3f7f32a
3f7f32a
* Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-6
3f7f32a
- Use _smp_mflags.
3f7f32a
- Disable static libraries.
3f7f32a
- Include documentation.
3f7f32a
- Use the same patches as Fedora native package.
3f7f32a
- Just run autoconf instead of autoreconf so we don't upgrade libtool.
3f7f32a
- +BR mingw32-dlfcn.
3f7f32a
- Don't need the manual pages.
3f7f32a
3f7f32a
* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-5
3f7f32a
- Rename mingw -> mingw32.
3f7f32a
3f7f32a
* Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 1.900.1-4
3f7f32a
- Add overflow patch from rawhide
3f7f32a
3f7f32a
* Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 1.900.1-3
3f7f32a
- Run autoreconf after changing configure.ac script and add BRs for autotools
3f7f32a
3f7f32a
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.900.1-2
3f7f32a
- Enable DLLs.
3f7f32a
- Remove static libraries.
3f7f32a
3f7f32a
* Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 1.900.1-1
3f7f32a
- Initial RPM release