forked from pool/libpng16
Made sRGB check numbers consistent. Use parentheses more consistently in "#if defined(MACRO)" tests. Reenabled code to allow zero length PLTE chunks for MNG. Fixed ALIGNED_MEMORY support. Avoid a possible memory leak in contrib/gregbook/readpng.c Better documentation of unknown handling API interactions. Corrected simplified API default gamma for color-mapped output, added a flag to change default. In 1.6.0 when the simplified API was used to produce color-mapped output from an input image with no gamma information the gamma assumed for the input could be different from that assumed for non-color-mapped output. In particular 16-bit depth input files were assumed to be sRGB encoded, whereas in the 'direct' case they were assumed to have linear data. This was an error. The fix makes the simplified API treat all input files the same way and adds a new flag to the png_image::flags member to allow the application/user to specify that 16-bit files contain sRGB data rather than the default linear. etc., see ANNOUNCE or CHANGES for details - dropped upstreamed 0387-Reenable-code-to-allow-zero-length-PLTE-chunks-for-M.patch OBS-URL: https://build.opensuse.org/package/show/graphics/libpng16?expand=0&rev=23
146 lines
4.4 KiB
RPMSpec
146 lines
4.4 KiB
RPMSpec
#
|
|
# spec file for package libpng16
|
|
#
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
#
|
|
%define major 1
|
|
%define minor 6
|
|
%define micro 1
|
|
%define branch %{major}%{minor}
|
|
%define libname libpng%{branch}-%{branch}
|
|
|
|
Name: libpng16
|
|
Url: http://www.libpng.org/pub/png/libpng.html
|
|
Version: %{major}.%{minor}.%{micro}
|
|
Release: 0
|
|
Summary: Library for the Portable Network Graphics Format (PNG)
|
|
License: Zlib
|
|
Group: System/Libraries
|
|
Source: libpng-%{version}.tar.bz2
|
|
Source2: baselibs.conf
|
|
BuildRequires: libtool
|
|
BuildRequires: pkg-config
|
|
BuildRequires: zlib-devel
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%define debug_package_requires %{libname} = %{version}-%{release}
|
|
|
|
%package -n %{libname}
|
|
|
|
Summary: Library for the Portable Network Graphics Format (PNG)
|
|
Group: System/Libraries
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: libpng-64bit
|
|
%endif
|
|
#
|
|
Obsoletes: libpng < %{version}
|
|
Provides: libpng = %{version}-%{release}
|
|
|
|
%package devel
|
|
Summary: Development Tools for applications which will use the Libpng
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{libname} = %{version}
|
|
Requires: glibc-devel
|
|
Requires: pkg-config
|
|
Requires: zlib-devel
|
|
Recommends: libpng%{branch}-compat-devel
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: libpng-devel-64bit
|
|
%endif
|
|
#
|
|
|
|
%package compat-devel
|
|
Summary: Development Tools for applications which will use the Libpng
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libpng%{branch}-devel = %{version}
|
|
Provides: libpng-devel = %{version}
|
|
Obsoletes: libpng-devel < 1.2.44
|
|
Conflicts: otherproviders(libpng-devel)
|
|
|
|
%description
|
|
libpng is the official reference library for the Portable Network
|
|
Graphics format (PNG).
|
|
|
|
%description -n %{libname}
|
|
libpng is the official reference library for the Portable Network
|
|
Graphics format (PNG).
|
|
|
|
%description devel
|
|
The libpng%{branch}-devel package includes the header files, libraries,
|
|
configuration files and development tools necessary for compiling and
|
|
linking programs which will manipulate PNG files using libpng%{branch}.
|
|
|
|
libpng is the official reference library for the Portable Network
|
|
Graphics (PNG) format.
|
|
|
|
%description compat-devel
|
|
The libpng%{branch}-compat-devel package contains unversioned symlinks
|
|
to the header files, libraries, configuration files and development
|
|
tools necessary for compiling and linking programs that don't care
|
|
about libpng version.
|
|
|
|
%prep
|
|
%setup -n libpng-%{version}
|
|
|
|
%build
|
|
# We'll never use the old pgcc-2.95.1 with the buggy -O3, so having
|
|
# the -O3 that is originally used should work.
|
|
# Substitute the -O2 to -O3 because I'm not sure if simply appending
|
|
# it will preserve(not override) the detailed opt flags used in RPM_OPT_FLAGS:
|
|
CFLAGS="`echo $RPM_OPT_FLAGS|sed 's/-O2/-O3/'` -DPNG_SKIP_SETJMP_CHECK" \
|
|
./configure --prefix=/usr \
|
|
--libdir=%{_libdir} \
|
|
--mandir=%{_mandir} \
|
|
--disable-static \
|
|
--with-libpng-compat=no
|
|
|
|
%check
|
|
make check
|
|
|
|
%install
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
rm $RPM_BUILD_ROOT/%{_libdir}/libpng*.la
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
%files -n %{libname}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libpng%{branch}.so.*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%{_bindir}/libpng%{branch}-config
|
|
%{_includedir}/libpng%{branch}
|
|
%{_libdir}/libpng%{branch}.so
|
|
%{_libdir}/pkgconfig/libpng%{branch}.pc
|
|
%doc CHANGES README TODO ANNOUNCE LICENSE libpng-*.txt
|
|
|
|
%files compat-devel
|
|
%defattr(-,root,root)
|
|
%{_bindir}/libpng-config
|
|
%{_includedir}/*.h
|
|
%{_libdir}/libpng.so
|
|
%{_libdir}/pkgconfig/libpng.pc
|
|
%doc %{_mandir}/man3/libpng.3.gz
|
|
%doc %{_mandir}/man3/libpngpf.3.gz
|
|
%doc %{_mandir}/man5/png.5.gz
|
|
|
|
%changelog
|