File jasper.spec of Package jasper.18194

# spec file for package jasper
# Copyright (c) 2021 SUSE LLC
# 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

Name:           jasper
Version:        1.900.14
Release:        0
Summary:        An Implementation of the JPEG-2000 Standard, Part 1
License:        SUSE-Public-Domain
Group:          Productivity/Graphics/Convertors
Source:         %{name}-%{version}.tar.bz2
Source2:        baselibs.conf
Patch0:         jasper-1.900.1-uninitialized.patch
Patch1:         jasper-CVE-2016-8654.patch
Patch2:         jasper-CVE-2016-9395.patch
Patch3:         jasper-CVE-2016-9398.patch
Patch4:         jasper-CVE-2016-9560.patch
Patch5:         jasper-CVE-2016-9591.patch
Patch6:         jasper-CVE-2016-10251.patch
Patch7:         jasper-CVE-2017-5498.patch
Patch8:         jasper-CVE-2016-9600.patch
Patch9:         jasper-CVE-2016-9583.patch
Patch10:        jasper-CVE-2017-6850.patch
Patch11:        jasper-CVE-2017-1000050.patch
Patch12:        jasper-CVE-2016-9262.patch
Patch13:        jasper-CVE-2018-9055.patch
Patch14:        jasper-CVE-2016-9396.patch
Patch15:        jasper-CVE-2018-19542.patch
Patch16:        jasper-CVE-2018-19539.patch
Patch17:        jasper-CVE-2018-19540.patch
Patch18:        jasper-CVE-2018-19541.patch
Patch19:        jasper-CVE-2018-9154.patch
Patch20:        jasper-CVE-2016-9397-CVE-2016-9557.patch
Patch21:        jasper-CVE-2016-9399.patch
Patch22:        jasper-CVE-2017-5499.patch
Patch23:        jasper-CVE-2017-5503-CVE-2017-5504-CVE-2017-5505.patch
Patch24:        jasper-CVE-2018-20570.patch
Patch25:        jasper-CVE-2018-20622.patch
Patch26:        jasper-CVE-2018-19543-CVE-2017-9782.patch
Patch27:        jasper-CVE-2018-19139.patch
Patch28:        jasper-CVE-2018-18873.patch
Patch29:        jasper-CVE-2018-9252.patch
Patch30:        jasper-CVE-2017-14132.patch
Patch31:        jasper-CVE-2016-9398-upstream.patch
Patch32:        jasper-CVE-2020-27828.patch
Patch33:        jasper-CVE-2021-3272.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libdrm-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  unzip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This package contains an implementation of the image compression
standard, JPEG-2000, Part 1. It consists of tools for conversion to and
from the JP2 and JPC formats.

%package -n libjasper1
Summary:        JPEG-2000 library
# bug437293
# used in <= 11.3
Group:          Productivity/Graphics/Convertors
Obsoletes:      libjasper < %{version}-%{release}
Provides:       libjasper = %{version}-%{release}
%ifarch ppc64
Obsoletes:      libjasper-64bit

%description -n libjasper1
This package contains libjasper, a library implementing the JPEG-2000
image compression standard Part 1.

%package -n libjasper-devel
Summary:        JPEG-2000 library - files mandatory for development
# bug437293
Group:          Development/Libraries/C and C++
Requires:       libjasper1 = %{version}
Requires:       libjpeg-devel
%ifarch ppc64
Obsoletes:      libjasper-devel-64bit

%description -n libjasper-devel
This package contains libjasper, a library implementing the JPEG-2000
image compression standard Part 1.

%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1

libtoolize --force --copy --install
autoreconf -fi
export CFLAGS="%{optflags} -Wall -std=c99 -D_BSD_SOURCE"
%configure --prefix=%{_prefix} --enable-shared --disable-static --libdir=%{_libdir}
make %{?_smp_mflags}
# Sanity check
# With some CFLAGS sets, uint, ulong and ushort are not visible and jas_config.h
# refefines system types. It can trigger build failures after
# #include <jasper/jasper.h>.
if grep "#define ushort" src/libjasper/include/jasper/jas_config.h ; then
	echo "jas_config.h redefines system types" >&2
	exit 1

mv doc/README doc/README.doc
rm %{buildroot}%{_bindir}/tmrdemo
# compatibility link, there was no interface change
ln -s %{buildroot}%{_libdir}/

%post -n libjasper1 -p /sbin/ldconfig
%postun -n libjasper1 -p /sbin/ldconfig


%files -n libjasper1

%files -n libjasper-devel

openSUSE Build Service is sponsored by