2007-01-16 00:26:51 +01:00
|
|
|
#
|
2011-11-01 15:33:20 +01:00
|
|
|
# spec file for package netpbm
|
2007-01-16 00:26:51 +01:00
|
|
|
#
|
2024-02-02 10:12:34 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2007-01-16 00:26:51 +01:00
|
|
|
#
|
2008-10-22 18:26:13 +02:00
|
|
|
# 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.
|
|
|
|
|
- version update to 10.88.1
* anytopnm: Fix unpredictable behavior when file name contains
spaces.
pnmquant: Fail if user specifies more than one of -meanpixel,
-meancolor, and -center, rather than just pick one.
* pnmremap: Don't output any part of the image if program fails
because the maxval of input and map file do not match, in a
case where matching maxval is required, i.e. the user specified
-firstisdefault or -missingcolor.
* ppmhist: sort secondarily by RGB with -sort=frequency, so
output is repeatable.
* pnmcolormap: Add -splitpix, -splitcol, -splitdim.
Thanks Vladislav Zavjalov.
* pbmtext: fix erroneous failure message with long input text.
* jpeg2ktopam, pamtojpeg2k: fix negative array index. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam, pamtojpeg2k: fix assertion failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: Fix memory leak after decoder failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: fix null pointer dereference. Always broken
(pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* pnmtorle, rletopnm: fix wild pointer dereference when memory
allocation fails. Always broken (programs were added to
Netpbm in Release 9.0 (April 2000).
* pamsumm: Fix bug: with -mean and a conflicting option such as
-sum, the program ignores one of the options. It should fail.
Always broken (pamsumm was new in Netpbm 10.21 (March 2004).
pamfind: Add -machine .
* Multiple: fix bug: when you specify the same option twice, you
OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=115
2019-12-20 13:52:51 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:26:51 +01:00
|
|
|
#
|
|
|
|
|
2008-04-10 14:56:11 +02:00
|
|
|
|
2019-05-15 07:45:13 +02:00
|
|
|
%define debug_build 0
|
|
|
|
%define asan_build 0
|
2020-05-04 10:17:17 +02:00
|
|
|
%define ubsan_build 0
|
2012-09-14 08:19:47 +02:00
|
|
|
%define libmaj 11
|
2024-02-02 10:12:34 +01:00
|
|
|
%define libmin 105
|
2012-09-14 08:19:47 +02:00
|
|
|
%define libver %{libmaj}.%{libmin}
|
2012-12-03 09:08:58 +01:00
|
|
|
Name: netpbm
|
2024-02-02 10:12:34 +01:00
|
|
|
Version: 11.5.2
|
2012-08-07 14:55:04 +02:00
|
|
|
Release: 0
|
2019-01-02 08:12:27 +01:00
|
|
|
Summary: A Graphics Conversion Package
|
2018-06-27 13:42:32 +02:00
|
|
|
License: BSD-3-Clause AND GPL-2.0-or-later AND IJG AND MIT AND SUSE-Public-Domain
|
2012-08-07 14:55:04 +02:00
|
|
|
Group: Productivity/Graphics/Convertors
|
- version update to 10.88.1
* anytopnm: Fix unpredictable behavior when file name contains
spaces.
pnmquant: Fail if user specifies more than one of -meanpixel,
-meancolor, and -center, rather than just pick one.
* pnmremap: Don't output any part of the image if program fails
because the maxval of input and map file do not match, in a
case where matching maxval is required, i.e. the user specified
-firstisdefault or -missingcolor.
* ppmhist: sort secondarily by RGB with -sort=frequency, so
output is repeatable.
* pnmcolormap: Add -splitpix, -splitcol, -splitdim.
Thanks Vladislav Zavjalov.
* pbmtext: fix erroneous failure message with long input text.
* jpeg2ktopam, pamtojpeg2k: fix negative array index. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam, pamtojpeg2k: fix assertion failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: Fix memory leak after decoder failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: fix null pointer dereference. Always broken
(pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* pnmtorle, rletopnm: fix wild pointer dereference when memory
allocation fails. Always broken (programs were added to
Netpbm in Release 9.0 (April 2000).
* pamsumm: Fix bug: with -mean and a conflicting option such as
-sum, the program ignores one of the options. It should fail.
Always broken (pamsumm was new in Netpbm 10.21 (March 2004).
pamfind: Add -machine .
* Multiple: fix bug: when you specify the same option twice, you
OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=115
2019-12-20 13:52:51 +01:00
|
|
|
URL: http://netpbm.sourceforge.net/
|
2012-09-14 08:19:47 +02:00
|
|
|
Source: netpbm-%{version}-nohpcdtoppm-noppmtompeg.tar.bz2
|
2007-01-16 00:26:51 +01:00
|
|
|
Source1: netpbm-%{version}-documentation.tar.bz2
|
2010-01-07 13:01:15 +01:00
|
|
|
Source2: baselibs.conf
|
2018-09-27 08:26:36 +02:00
|
|
|
Source3: prepare-src-tarball.sh
|
2010-04-02 00:05:31 +02:00
|
|
|
# SUSE specific
|
2017-07-15 01:48:15 +02:00
|
|
|
Patch0: %{name}-make.patch
|
2019-05-16 14:26:29 +02:00
|
|
|
# neccessary for running with ASAN
|
2022-06-01 13:50:32 +02:00
|
|
|
Patch2: %{name}-security-code.patch
|
|
|
|
Patch3: %{name}-security-scripts.patch
|
|
|
|
Patch4: %{name}-gcc-warnings.patch
|
2020-12-29 12:51:30 +01:00
|
|
|
Patch5: makeman-py3.patch
|
2019-09-04 10:45:23 +02:00
|
|
|
# bsc#1144255 disable jpeg2k support due to removal of jasper
|
2020-12-29 12:51:30 +01:00
|
|
|
Patch8: netpbm-disable-jasper.patch
|
2024-02-04 15:54:09 +01:00
|
|
|
# CVE-2017-5849 [bsc#1022790], CVE-2017-5849 [bsc#1022791]
|
|
|
|
Patch9: netpbm-use-byrow-when-needed.patch
|
2012-12-03 09:08:58 +01:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
BuildRequires: libpng-devel
|
|
|
|
BuildRequires: libtiff-devel
|
|
|
|
BuildRequires: libxml2-devel
|
2017-07-15 01:48:15 +02:00
|
|
|
BuildRequires: pkgconfig
|
2017-12-30 06:50:22 +01:00
|
|
|
# needed for the makeman
|
|
|
|
BuildRequires: python3-base
|
2012-12-03 09:08:58 +01:00
|
|
|
BuildRequires: pkgconfig(x11)
|
|
|
|
Provides: pbmplus
|
2007-01-16 00:26:51 +01:00
|
|
|
|
|
|
|
%description
|
2019-01-02 08:12:27 +01:00
|
|
|
These are the Portable Bitmap Plus Utilities.
|
|
|
|
|
|
|
|
This package provides tools for graphics conversion. Using these
|
|
|
|
tools, images can be converted from virtually any format into any
|
|
|
|
other format. A few of the supported formats include: GIF,
|
|
|
|
PC-Paintbrush, IFF ILBM, Gould Scanner file, MTV ray tracer, Atari
|
|
|
|
Degas .pi1 and .pi3, Macintosh PICT, HP Paintjet file, QRT raytracer,
|
|
|
|
AUTOCAD slide, Atari Spectrum (compressed and uncompressed), Andrew
|
|
|
|
Toolkit raster object, and many more. On top of that, man pages are
|
|
|
|
included for all tools.
|
2007-01-16 00:26:51 +01:00
|
|
|
|
2017-07-15 01:48:15 +02:00
|
|
|
%package -n libnetpbm%{libmaj}
|
|
|
|
Summary: Libraries for the NetPBM (NetPortableBitmap) Graphic Formats
|
|
|
|
Group: System/Libraries
|
|
|
|
Provides: libnetpbm = %{version}
|
|
|
|
Obsoletes: libnetpbm < %{version}
|
|
|
|
|
2012-09-14 08:19:47 +02:00
|
|
|
%description -n libnetpbm%{libmaj}
|
2007-08-10 01:26:03 +02:00
|
|
|
These are the libs for the netpbm graphic formats. The tools can be
|
|
|
|
found in the netpbm package. The sources are contained in the netpbm
|
|
|
|
source package.
|
|
|
|
|
2017-07-15 01:48:15 +02:00
|
|
|
%package -n libnetpbm-devel
|
2019-01-02 08:12:27 +01:00
|
|
|
Summary: Header files for the NetPBM libraries
|
2017-07-15 01:48:15 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libnetpbm%{libmaj} = %{version}
|
|
|
|
|
2007-08-10 01:26:03 +02:00
|
|
|
%description -n libnetpbm-devel
|
2007-01-16 00:26:51 +01:00
|
|
|
These are the libs for the netpbm graphic formats. The tools can be
|
|
|
|
found in the netpbm package. The sources are contained in the netpbm
|
|
|
|
source package.
|
|
|
|
|
|
|
|
%prep
|
2017-07-15 01:48:15 +02:00
|
|
|
%setup -q -D -a 1
|
2020-12-29 12:51:30 +01:00
|
|
|
%autopatch -p1
|
2013-11-27 09:49:15 +01:00
|
|
|
mkdir pnmtopalm # for %%doc pnmtopalm
|
2012-09-14 08:19:47 +02:00
|
|
|
cp -p converter/other/pnmtopalm/{LICENSE,README} pnmtopalm
|
2007-01-16 00:26:51 +01:00
|
|
|
|
|
|
|
%build
|
2012-09-14 08:19:47 +02:00
|
|
|
# netpbm has _interactive_ configure perl script
|
|
|
|
cp config.mk.in config.mk # recomended by upstream, see doc/INSTALL
|
2014-04-01 13:34:57 +02:00
|
|
|
sed -i "s:STATICLIB_TOO = y:STATICLIB_TOO = n:" config.mk
|
|
|
|
# following two added 10.66.0, reported upstream
|
|
|
|
# recipe for target 'converter/install.manweb' failed
|
|
|
|
echo 'install.manweb:' >> converter/ppm/hpcdtoppm/Makefile
|
|
|
|
# dtto for ppmtompeg
|
|
|
|
echo 'install.manweb:' >> converter/ppm/ppmtompeg/Makefile
|
2020-12-29 12:51:30 +01:00
|
|
|
export CFLAGS="%{optflags} -flax-vector-conversions -Wno-return-type"
|
2019-05-15 07:45:13 +02:00
|
|
|
%if %{debug_build}
|
|
|
|
export CFLAGS="$CFLAGS -O0"
|
|
|
|
%endif
|
|
|
|
%if %{asan_build}
|
2020-05-04 10:17:17 +02:00
|
|
|
export CFLAGS="$CFLAGS -fsanitize=address -fno-sanitize-recover=all"
|
|
|
|
export LDFLAGS="$LDFLAGS -fsanitize=address"
|
|
|
|
%endif
|
|
|
|
%if %{ubsan_build}
|
|
|
|
export CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover=all"
|
|
|
|
export LDFLAGS="$LDFLAGS -fsanitize=undefined"
|
2019-05-15 07:45:13 +02:00
|
|
|
%endif
|
2019-05-15 08:50:59 +02:00
|
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS"
|
2011-11-01 15:41:30 +01:00
|
|
|
rm doc/INSTALL
|
2009-07-08 21:02:40 +02:00
|
|
|
#
|
|
|
|
# convert html to man pages
|
|
|
|
cd netpbm.sourceforge.net/doc
|
|
|
|
../../buildtools/makeman *.html
|
|
|
|
for i in 1 3 5 ; do
|
|
|
|
mkdir -p ../../man/man${i}
|
|
|
|
mv *.${i} ../../man/man${i}
|
|
|
|
done
|
2007-01-16 00:26:51 +01:00
|
|
|
|
|
|
|
%install
|
2012-09-14 08:19:47 +02:00
|
|
|
# netpbm has _interactive_ install perl script, see doc/INSTALL
|
2007-01-16 00:26:51 +01:00
|
|
|
make pkgdir=`pwd`/package package STRIPFLAG=
|
2012-09-14 08:19:47 +02:00
|
|
|
#
|
2017-07-15 01:48:15 +02:00
|
|
|
mkdir -p %{buildroot}%{_prefix}/{bin,include,%{_lib},share/man,share/%{name}}
|
|
|
|
cp -pd package/bin/* %{buildroot}%{_bindir}
|
|
|
|
cp -pd package/lib/*.so* %{buildroot}%{_libdir}
|
|
|
|
ln -s libnetpbm.so.%{libver} %{buildroot}%{_libdir}/libnetpbm.so
|
|
|
|
cp -prd package/include/netpbm %{buildroot}%{_includedir}
|
|
|
|
cp -prd man/* %{buildroot}%{_mandir}
|
2012-09-14 08:19:47 +02:00
|
|
|
install -m 644 converter/other/pnmtopalm/*.map \
|
2017-07-15 01:48:15 +02:00
|
|
|
%{buildroot}%{_datadir}/%{name}
|
2019-05-31 11:34:33 +02:00
|
|
|
rm %{buildroot}%{_bindir}/g3topbm # conflict with g3utils
|
|
|
|
rm %{buildroot}%{_bindir}/pstopnm # disable due security reasons, e. g. [bsc#1105592]
|
2012-09-14 08:19:47 +02:00
|
|
|
|
|
|
|
%post -n libnetpbm%{libmaj} -p /sbin/ldconfig
|
|
|
|
%postun -n libnetpbm%{libmaj} -p /sbin/ldconfig
|
2007-01-16 00:26:51 +01:00
|
|
|
|
2019-05-31 11:34:33 +02:00
|
|
|
%check
|
2020-05-04 10:17:17 +02:00
|
|
|
%if %{asan_build}
|
|
|
|
export LSAN_OPTIONS="detect_leaks=0"
|
|
|
|
%endif
|
|
|
|
%if %{ubsan_build}
|
|
|
|
export UBSAN_OPTIONS="print_stacktrace=1"
|
|
|
|
%endif
|
2019-05-31 11:34:33 +02:00
|
|
|
# do not run unneccesary tests
|
- version update to 10.88.1
* anytopnm: Fix unpredictable behavior when file name contains
spaces.
pnmquant: Fail if user specifies more than one of -meanpixel,
-meancolor, and -center, rather than just pick one.
* pnmremap: Don't output any part of the image if program fails
because the maxval of input and map file do not match, in a
case where matching maxval is required, i.e. the user specified
-firstisdefault or -missingcolor.
* ppmhist: sort secondarily by RGB with -sort=frequency, so
output is repeatable.
* pnmcolormap: Add -splitpix, -splitcol, -splitdim.
Thanks Vladislav Zavjalov.
* pbmtext: fix erroneous failure message with long input text.
* jpeg2ktopam, pamtojpeg2k: fix negative array index. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam, pamtojpeg2k: fix assertion failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: Fix memory leak after decoder failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: fix null pointer dereference. Always broken
(pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* pnmtorle, rletopnm: fix wild pointer dereference when memory
allocation fails. Always broken (programs were added to
Netpbm in Release 9.0 (April 2000).
* pamsumm: Fix bug: with -mean and a conflicting option such as
-sum, the program ignores one of the options. It should fail.
Always broken (pamsumm was new in Netpbm 10.21 (March 2004).
pamfind: Add -machine .
* Multiple: fix bug: when you specify the same option twice, you
OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=115
2019-12-20 13:52:51 +01:00
|
|
|
sed -i '/all-in-place/d' test/Test-Order
|
|
|
|
sed -i '/legacy-names/d' test/Test-Order
|
2019-05-31 11:34:33 +02:00
|
|
|
# picttoppm.c: #error "Unfixable. Don't ship me"
|
|
|
|
sed -i '/pict-roundtrip/d' test/Test-Order
|
2023-06-23 11:18:14 +02:00
|
|
|
sed -i '/stdin-ppm3.test/d' test/Test-Order
|
2019-05-31 11:34:33 +02:00
|
|
|
# pstopnm is not shipped
|
- version update to 10.88.1
* anytopnm: Fix unpredictable behavior when file name contains
spaces.
pnmquant: Fail if user specifies more than one of -meanpixel,
-meancolor, and -center, rather than just pick one.
* pnmremap: Don't output any part of the image if program fails
because the maxval of input and map file do not match, in a
case where matching maxval is required, i.e. the user specified
-firstisdefault or -missingcolor.
* ppmhist: sort secondarily by RGB with -sort=frequency, so
output is repeatable.
* pnmcolormap: Add -splitpix, -splitcol, -splitdim.
Thanks Vladislav Zavjalov.
* pbmtext: fix erroneous failure message with long input text.
* jpeg2ktopam, pamtojpeg2k: fix negative array index. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam, pamtojpeg2k: fix assertion failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: Fix memory leak after decoder failure. Always
broken (pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* jpeg2ktopam: fix null pointer dereference. Always broken
(pamtojpeg2k was new in Netpbm 10.12 (November 2002)).
* pnmtorle, rletopnm: fix wild pointer dereference when memory
allocation fails. Always broken (programs were added to
Netpbm in Release 9.0 (April 2000).
* pamsumm: Fix bug: with -mean and a conflicting option such as
-sum, the program ignores one of the options. It should fail.
Always broken (pamsumm was new in Netpbm 10.21 (March 2004).
pamfind: Add -machine .
* Multiple: fix bug: when you specify the same option twice, you
OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=115
2019-12-20 13:52:51 +01:00
|
|
|
sed -i '/^l\?ps.*\.test/d' test/Test-Order
|
2022-06-01 13:50:32 +02:00
|
|
|
# new winicon-roundtrip2.test failure reported to bryanh@giraffe-data.com on 2020-12-29
|
|
|
|
# $ LD_LIBRARY_PATH=lib PATH=package/bin pamtowinicon -pngthreshold=1 package-test-tmp/testimg1.pam
|
|
|
|
# pamtowinicon: bad magic number 0xf0f - not a PAM, PPM, PGM, or PBM file
|
|
|
|
# $
|
|
|
|
sed -i '/winicon-roundtrip2.test/d' test/Test-Order
|
2023-06-23 11:18:14 +02:00
|
|
|
# Unable to exec 'gs'
|
|
|
|
sed -i '/pbmtextps.test/d' test/Test-Order
|
|
|
|
sed -i '/stdin-pnm2.test/d' test/Test-Order
|
2019-05-31 13:56:19 +02:00
|
|
|
mkdir package-test-{tmp,results}
|
|
|
|
make pkgdir=`pwd`/package tmpdir=`pwd`/package-test-tmp RESULTDIR=`pwd`/package-test-results check-package
|
2019-05-31 11:34:33 +02:00
|
|
|
|
2007-01-16 00:26:51 +01:00
|
|
|
%files
|
2012-12-03 09:08:58 +01:00
|
|
|
%doc README doc/* netpbm.sourceforge.net/doc
|
|
|
|
%doc pnmtopalm/
|
2017-07-15 01:48:15 +02:00
|
|
|
%{_mandir}/man1/*%{ext_man}
|
|
|
|
%{_mandir}/man5/*%{ext_man}
|
2012-09-14 08:19:47 +02:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_datadir}/%{name}
|
2007-01-16 00:26:51 +01:00
|
|
|
|
2012-09-14 08:19:47 +02:00
|
|
|
%files -n libnetpbm%{libmaj}
|
2012-12-03 09:08:58 +01:00
|
|
|
%{_libdir}/lib*.so.%{libmaj}
|
|
|
|
%{_libdir}/lib*.so.%{libver}
|
2007-08-10 01:26:03 +02:00
|
|
|
|
|
|
|
%files -n libnetpbm-devel
|
2012-09-14 08:19:47 +02:00
|
|
|
%{_includedir}/%{name}
|
2007-08-10 01:26:03 +02:00
|
|
|
%{_libdir}/lib*.so
|
2014-09-08 09:52:06 +02:00
|
|
|
%{_mandir}/man3/*%{ext_man}
|
2007-11-23 01:52:03 +01:00
|
|
|
|
2007-03-29 18:22:31 +02:00
|
|
|
%changelog
|