netpbm/netpbm.spec

191 lines
6.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package netpbm
#
Accepting request 1143208 from home:pgajdos - version update to 11.5.2 Release 11.05.02 + ppmtowinicon: fix array overrun with 4 and 8 bits per pixel. Release 11.05.01 Fix typo in ppmforge test case. Release 11.05.00 + pnmpad: Add -color, -promote, -extend-edge, -detect-background . + pnmconvol: Restore ability of convolution matrix to be a pseudo-plain-PNM with samples that exceed the maxval. Lost in 10.30 (October 2005) because maxval-checking code was added to libnetpbm. (Was fixed in 10.47.08 in November 2010, but only in the 10.47 series). + pnmindex: Improve failure mode when -size or -across is zero. + pnmindex: Make -plain work. + pnmpad: fix behavior with -left, -right, and -width together or -top, -bottom, -height together: ignores -width where it should fail. Broken in Netpbm 10.72 (September 2015). + pamtosvg: fix "zero determinant" failure. Introduced in Netpbm 11.04 (September 2023). + pjtoppm: fix crash based on uninitialized variable. Introduced in Netpbm 11.04 (September 2023). + ppmtopcxl: fix incorrect output with > 256 colors. Always broken. (Program was added in primordial Netpbm in 1990). + pbmtext: fix buffer overrun with insanely large input. + picttoppm: fix buffer overrun with insanely wide input. + ppmtoxpm: fix incorrect output with insanely large number of colors. + pnmscalefixed: fix incorrect output with really big image and -pixels option. + ppmdither: fix buffer overrun with insanely large dithering OBS-URL: https://build.opensuse.org/request/show/1143208 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=145
2024-02-02 10:12:34 +01:00
# Copyright (c) 2024 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.
- 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/
#
%define debug_build 0
%define asan_build 0
%define ubsan_build 0
%define libmaj 11
Accepting request 1143208 from home:pgajdos - version update to 11.5.2 Release 11.05.02 + ppmtowinicon: fix array overrun with 4 and 8 bits per pixel. Release 11.05.01 Fix typo in ppmforge test case. Release 11.05.00 + pnmpad: Add -color, -promote, -extend-edge, -detect-background . + pnmconvol: Restore ability of convolution matrix to be a pseudo-plain-PNM with samples that exceed the maxval. Lost in 10.30 (October 2005) because maxval-checking code was added to libnetpbm. (Was fixed in 10.47.08 in November 2010, but only in the 10.47 series). + pnmindex: Improve failure mode when -size or -across is zero. + pnmindex: Make -plain work. + pnmpad: fix behavior with -left, -right, and -width together or -top, -bottom, -height together: ignores -width where it should fail. Broken in Netpbm 10.72 (September 2015). + pamtosvg: fix "zero determinant" failure. Introduced in Netpbm 11.04 (September 2023). + pjtoppm: fix crash based on uninitialized variable. Introduced in Netpbm 11.04 (September 2023). + ppmtopcxl: fix incorrect output with > 256 colors. Always broken. (Program was added in primordial Netpbm in 1990). + pbmtext: fix buffer overrun with insanely large input. + picttoppm: fix buffer overrun with insanely wide input. + ppmtoxpm: fix incorrect output with insanely large number of colors. + pnmscalefixed: fix incorrect output with really big image and -pixels option. + ppmdither: fix buffer overrun with insanely large dithering OBS-URL: https://build.opensuse.org/request/show/1143208 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=145
2024-02-02 10:12:34 +01:00
%define libmin 105
%define libver %{libmaj}.%{libmin}
Name: netpbm
Accepting request 1143208 from home:pgajdos - version update to 11.5.2 Release 11.05.02 + ppmtowinicon: fix array overrun with 4 and 8 bits per pixel. Release 11.05.01 Fix typo in ppmforge test case. Release 11.05.00 + pnmpad: Add -color, -promote, -extend-edge, -detect-background . + pnmconvol: Restore ability of convolution matrix to be a pseudo-plain-PNM with samples that exceed the maxval. Lost in 10.30 (October 2005) because maxval-checking code was added to libnetpbm. (Was fixed in 10.47.08 in November 2010, but only in the 10.47 series). + pnmindex: Improve failure mode when -size or -across is zero. + pnmindex: Make -plain work. + pnmpad: fix behavior with -left, -right, and -width together or -top, -bottom, -height together: ignores -width where it should fail. Broken in Netpbm 10.72 (September 2015). + pamtosvg: fix "zero determinant" failure. Introduced in Netpbm 11.04 (September 2023). + pjtoppm: fix crash based on uninitialized variable. Introduced in Netpbm 11.04 (September 2023). + ppmtopcxl: fix incorrect output with > 256 colors. Always broken. (Program was added in primordial Netpbm in 1990). + pbmtext: fix buffer overrun with insanely large input. + picttoppm: fix buffer overrun with insanely wide input. + ppmtoxpm: fix incorrect output with insanely large number of colors. + pnmscalefixed: fix incorrect output with really big image and -pixels option. + ppmdither: fix buffer overrun with insanely large dithering OBS-URL: https://build.opensuse.org/request/show/1143208 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=145
2024-02-02 10:12:34 +01:00
Version: 11.5.2
Release: 0
Summary: A Graphics Conversion Package
License: BSD-3-Clause AND GPL-2.0-or-later AND IJG AND MIT AND SUSE-Public-Domain
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/
Source: netpbm-%{version}-nohpcdtoppm-noppmtompeg.tar.bz2
Source1: netpbm-%{version}-documentation.tar.bz2
Source2: baselibs.conf
Accepting request 638489 from home:pmonrealgonzalez:branches:graphics - updated to 10.83.00 * Add pamlevels. Thanks Anton Shepelev <anton.txt@gmail.com>. * Add pamgetcolor. Thanks Anton Shepelev <anton.txt@gmail.com>. * Add rgb-<maxval>:r/g/b color specification format. * pngtopam: Fix bogus warning of non-square pixels when image does not contain pixel resolution information. Introduced in Netpbm 10.48 (September 2009). * pstopnm: Fix divide-by-zero crash when Postscript input says the image has zero size. * pstopnm: Fix divide-by-zero crash when computed resolution rounds down to zero dots per inch. * pbmmask: Fix invalid memory reference with zero-dimension input image. Broken in primordial Netpbm, ca 1989. [CVE-2018-8975, bsc#1086777] https://sourceforge.net/p/netpbm/code/3279/ * libnetpbm: Add pnm_colorspec_rgb_integer, pnm_colorspec_rgb_norm, pnm_colorspec_rgb_x11, pnm_colorspec_dict, pnm_colorspec_dict_close. * libnetpbm: Add pnm_parsecolor2. * libnetpbm: Add pnm_allocpamtuplen, pnm_freepamtuplen. * libnetpbm: Make the normalized tuple functions respect the allocation depth specified in struct pam (member 'allocation_depth') instead of using the actual tuple depth (member 'depth'). * ilbmtoppm: Fix bug: may fail with bogus error message about an invalid CLUT chunk if image has a CLUT chunk. Introduced after Netpbm 10.26 (January 2005) and at or before Netpbm 10.35 (August 2006). - Refreshed patch netpbm-security-code.patch - Dropped patch fixed upstream netpbm-CVE-2018-8975.patch OBS-URL: https://build.opensuse.org/request/show/638489 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=93
2018-09-27 08:26:36 +02:00
Source3: prepare-src-tarball.sh
# SUSE specific
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
Patch0: %{name}-make.patch
# neccessary for running with ASAN
Patch2: %{name}-security-code.patch
Patch3: %{name}-security-scripts.patch
Patch4: %{name}-gcc-warnings.patch
Patch5: makeman-py3.patch
# bsc#1144255 disable jpeg2k support due to removal of jasper
Patch8: netpbm-disable-jasper.patch
# CVE-2017-5849 [bsc#1022790], CVE-2017-5849 [bsc#1022791]
Patch9: netpbm-use-byrow-when-needed.patch
BuildRequires: flex
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
BuildRequires: pkgconfig
# needed for the makeman
BuildRequires: python3-base
BuildRequires: pkgconfig(x11)
Provides: pbmplus
%description
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.
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
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}
%description -n libnetpbm%{libmaj}
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.
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%package -n libnetpbm-devel
Summary: Header files for the NetPBM libraries
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
Group: Development/Libraries/C and C++
Requires: libnetpbm%{libmaj} = %{version}
%description -n libnetpbm-devel
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
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%setup -q -D -a 1
%autopatch -p1
mkdir pnmtopalm # for %%doc pnmtopalm
cp -p converter/other/pnmtopalm/{LICENSE,README} pnmtopalm
%build
# netpbm has _interactive_ configure perl script
cp config.mk.in config.mk # recomended by upstream, see doc/INSTALL
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
export CFLAGS="%{optflags} -flax-vector-conversions -Wno-return-type"
%if %{debug_build}
export CFLAGS="$CFLAGS -O0"
%endif
%if %{asan_build}
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"
%endif
make %{?_smp_mflags} CFLAGS="$CFLAGS"
rm doc/INSTALL
#
# 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
%install
# netpbm has _interactive_ install perl script, see doc/INSTALL
make pkgdir=`pwd`/package package STRIPFLAG=
#
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
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}
install -m 644 converter/other/pnmtopalm/*.map \
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%{buildroot}%{_datadir}/%{name}
rm %{buildroot}%{_bindir}/g3topbm # conflict with g3utils
rm %{buildroot}%{_bindir}/pstopnm # disable due security reasons, e. g. [bsc#1105592]
%post -n libnetpbm%{libmaj} -p /sbin/ldconfig
%postun -n libnetpbm%{libmaj} -p /sbin/ldconfig
%check
%if %{asan_build}
export LSAN_OPTIONS="detect_leaks=0"
%endif
%if %{ubsan_build}
export UBSAN_OPTIONS="print_stacktrace=1"
%endif
# 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
# picttoppm.c: #error "Unfixable. Don't ship me"
sed -i '/pict-roundtrip/d' test/Test-Order
sed -i '/stdin-ppm3.test/d' test/Test-Order
# 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
# 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
# Unable to exec 'gs'
sed -i '/pbmtextps.test/d' test/Test-Order
sed -i '/stdin-pnm2.test/d' test/Test-Order
mkdir package-test-{tmp,results}
make pkgdir=`pwd`/package tmpdir=`pwd`/package-test-tmp RESULTDIR=`pwd`/package-test-results check-package
%files
%doc README doc/* netpbm.sourceforge.net/doc
%doc pnmtopalm/
Accepting request 509659 from home:scarabeus_iv:branches:graphics - Drop patch netpbm-missing-file-close.patch fixed differently by upstream - Drop patch netpbm-jasper.patch which is no longer needed - Remove accidental -O0 added to cflags - Version update to 10.79.2: * Fix 'format-security' GNU compiler warning. * libnetpbm: pnm_parsecolorn(), pnm_parsecolor(): fix parsing of rgb: color specifications: yields value slightly too dim. * pamgauss: Add -maximize, -oversample . Thanks Anton Shepelev <anton.txt@gmail.com> * pnmconvol: Extend -normalize to be applicable to convolution kernels specified by PGM file. Thanks Anton Shepelev <anton.txt@gmail.com> * g3topbm: tolerate fill bits. * pbmtog3: Add -align8, -align16. * ppmshadow: Improve results for very small maxval. * ppmshadow: eliminate extraneous messages from pnmconvol. * libnetpbm: Improve error message for purported image that is exactly 1 byte long (so ends in the middle of what would be the magic number). * pbmtox10bm: Get the Perl interpreter for this Perl program from the PATH instead of hardcoded as /usr/bin/perl (like all other Netpbm Perl programs). * ppmcolormask: fix incorrect output when input maxval is not 255. * bmptopnm: fix crash when input is a Windows BMP with negative number for width. Always broken. (bmptopnm was new, as bmptoppm, in original Netpbm, 1992). * pamcomp: fix incorrect output with -mixtransparency. Always broken. (-mixtransparency was new in Netpbm 10.56, September 2011). OBS-URL: https://build.opensuse.org/request/show/509659 OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=83
2017-07-15 01:48:15 +02:00
%{_mandir}/man1/*%{ext_man}
%{_mandir}/man5/*%{ext_man}
%{_bindir}/*
%{_datadir}/%{name}
%files -n libnetpbm%{libmaj}
%{_libdir}/lib*.so.%{libmaj}
%{_libdir}/lib*.so.%{libver}
%files -n libnetpbm-devel
%{_includedir}/%{name}
%{_libdir}/lib*.so
%{_mandir}/man3/*%{ext_man}
%changelog