Update to libpng 1.2.16, respond to Fedora merge review comments.

This commit is contained in:
Tom Lane 2007-02-12 16:16:05 +00:00
parent 96412869bd
commit 8b34992d2b
5 changed files with 121 additions and 29 deletions

View File

@ -1 +1 @@
libpng-1.2.10.tar.bz2
libpng-1.2.16.tar.bz2

20
libpng-multilib.patch Normal file
View File

@ -0,0 +1,20 @@
diff -Naur libpng-1.2.16.orig/scripts/libpng-config.in libpng-1.2.16/scripts/libpng-config.in
--- libpng-1.2.16.orig/scripts/libpng-config.in 2007-01-04 14:00:25.000000000 -0500
+++ libpng-1.2.16/scripts/libpng-config.in 2007-02-12 10:25:43.000000000 -0500
@@ -8,11 +8,11 @@
# Modeled after libxml-config.
-version="@PNGLIB_VERSION@"
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-libdir="@libdir@"
-includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
+version=`pkg-config --modversion libpng`
+prefix=`pkg-config --variable prefix libpng`
+exec_prefix=`pkg-config --variable exec_prefix libpng`
+libdir=`pkg-config --variable libdir libpng`
+includedir=`pkg-config --variable includedir libpng`
libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -lz -lm"
I_opts="-I${includedir}"

53
libpng-pngconf.patch Normal file
View File

@ -0,0 +1,53 @@
diff -Naur libpng-1.2.16.orig/configure libpng-1.2.16/configure
--- libpng-1.2.16.orig/configure 2007-01-31 08:22:51.000000000 -0500
+++ libpng-1.2.16/configure 2007-02-12 10:29:04.000000000 -0500
@@ -20558,6 +20558,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#define PNG_CONFIGURE_LIBPNG
#include "pnggccrd.c"
int
main ()
diff -Naur libpng-1.2.16.orig/configure.ac libpng-1.2.16/configure.ac
--- libpng-1.2.16.orig/configure.ac 2007-01-31 08:22:41.000000000 -0500
+++ libpng-1.2.16/configure.ac 2007-02-12 10:29:04.000000000 -0500
@@ -62,7 +62,8 @@
AC_MSG_CHECKING(
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
AC_TRY_COMPILE(
- [#include "pnggccrd.c"],
+ [#define PNG_CONFIGURE_LIBPNG
+ #include "pnggccrd.c"],
[return 0;],
AC_MSG_RESULT(yes)
LIBPNG_NO_MMX="",
diff -Naur libpng-1.2.16.orig/pngconf.h libpng-1.2.16/pngconf.h
--- libpng-1.2.16.orig/pngconf.h 2007-01-31 08:22:33.000000000 -0500
+++ libpng-1.2.16/pngconf.h 2007-02-12 10:31:39.000000000 -0500
@@ -35,6 +35,25 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#else
+/* pngconf.h is part of the exported API. When a libpng-using application
+ includes us, PNG_CONFIGURE_LIBPNG is of course not defined as we do not have
+ libpng's config.h available in this case. This means that we do not have the
+ defines added to config.h and the commandline by libpng's ./configure .
+
+ For all defines from config.h not having them set is not a problem, however
+ ./configure also adds -DPNG_NO_ASSEMBLER_CODE to the CFLAGS when compiling
+ on a platform on which the MMX and SSE asm code in libpng is not supported.
+
+ We do need this define as this define is used to determine whether or not
+ to define PNG_ASSEMBLER_CODE_SUPPORTED and other assembler related defines
+ and prototypes. PNG_ASSEMBLER_CODE_SUPPORTED in turn is used by applications
+ (ImageMagick for example) to determine whether or not they can use the asm
+ functions. Thus we need to define PNG_NO_ASSEMBLER_CODE here on platforms
+ on which the MMX and SSE asm code in libpng is not supported: */
+#ifndef __i386__ /* change this if MMX/SSE become supported on x86_64! */
+#define PNG_NO_ASSEMBLER_CODE
+#endif
#endif
/*

View File

@ -1,18 +1,18 @@
Summary: A library of functions for manipulating PNG image format files
Name: libpng
Version: 1.2.10
Release: 7
License: OSI certified
Group: System Environment/Libraries
Source: ftp://swrinde.nde.swri.edu/pub/png/src/libpng-%{version}.tar.bz2
Patch0: libpng-1.2.10-multilib.patch
Patch1: libpng-1.2.10-pngconf.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildPrereq: zlib-devel
Provides: libpng.so.3
URL: http://www.libpng.org/pub/png/
%define LIBVER 3.%{version}
Epoch: 2
Version: 1.2.16
Release: 1%{?dist}
License: BSD
Group: System Environment/Libraries
URL: http://www.libpng.org/pub/png/
Source: ftp://ftp.simplesystems.org/pub/png/src/libpng-%{version}.tar.bz2
Patch0: libpng-multilib.patch
Patch1: libpng-pngconf.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel
Conflicts: qt < 0:2.2.2
%description
@ -26,33 +26,42 @@ Libpng should be installed if you need to manipulate PNG format image
files.
%package devel
Summary: Development tools for programs to manipulate PNG image format files.
Summary: Development tools for programs to manipulate PNG image format files
Group: Development/Libraries
Requires: libpng = %{epoch}:%{version}-%{release}, zlib-devel, pkgconfig
Requires: libpng = %{epoch}:%{version}-%{release} zlib-devel pkgconfig
%description devel
The libpng-devel package contains the header files and static
libraries necessary for developing programs using the PNG (Portable
Network Graphics) library.
The libpng-devel package contains header files and documentation necessary
for developing programs using the PNG (Portable Network Graphics) library.
If you want to develop programs which will manipulate PNG image format
files, you should install libpng-devel. You'll also need to install
the libpng package.
%package static
Summary: Static PNG image format file library
Group: Development/Libraries
Requires: libpng-devel = %{epoch}:%{version}-%{release}
%description static
The libpng-static package contains the statically linkable version of libpng.
Linking to static libraries is discouraged for most applications, but it is
necessary for some boot packages.
%prep
%setup -q
%patch0 -p1 -b .multilib
%patch1 -p1 -b .pngconf
%patch0 -p1
%patch1 -p1
%build
%configure
make
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
# we keep the static libraries in the -devel package, since some
# graphical boot packages need to link statically against libpng
# We don't ship .la files.
rm -rf $RPM_BUILD_ROOT%{_libdir}/libpng.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/libpng12.la
@ -71,14 +80,24 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/libpng12.la
%{_bindir}/*
%{_includedir}/*
%{_libdir}/libpng*.so
%{_libdir}/libpng*.a
%{_libdir}/pkgconfig/*
%{_mandir}/man3/*
%files static
%defattr(-,root,root)
%{_libdir}/libpng*.a
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Feb 12 2007 Tom Lane <tgl@redhat.com> 2:1.2.16-1
- Update to libpng 1.2.16
Resolves: #211705, #216706, #227334
- Separate libpng.a into a -static subpackage
- Other minor packaging fixes per Fedora merge review
Resolves: #226038
* Mon Oct 02 2006 Jesse Keating <jkeating@redhat.com> - 2:1.2.10-7
- Require pkgconfig in the -devel subpackage as it gets called by
/usr/bin/libpng-config
@ -217,7 +236,7 @@ rm -rf $RPM_BUILD_ROOT
- automated rebuild
* Tue May 7 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-4
- Don't own %{_libdir}/pkgconfig
- Don't own {_libdir}/pkgconfig
- Don't strip library, that's up to rpm
* Tue May 7 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-3
@ -239,7 +258,7 @@ rm -rf $RPM_BUILD_ROOT
* Wed Sep 19 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.0-1
- 1.2.0
* Mon Jul 16 2001 Trond Eivind Glomsrød <teg@redhat.com>
* Mon Jul 16 2001 Trond Eivind Glomsrd <teg@redhat.com>
- s/Copyright/License/
- fix weird versioning system (epoch was set to "2" in the main
package, serial to "1" in the devel package. Huh?)
@ -295,11 +314,11 @@ rm -rf $RPM_BUILD_ROOT
* Fri Feb 11 2000 Nalin Dahyabhai <nalin@redhat.com>
- move buildroot and add URL
* Sat Feb 5 2000 Bernhard Rosenkränzer <bero@redhat.com>
* Sat Feb 5 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- strip library
- rebuild to compress man pages
* Sun Nov 21 1999 Bernhard Rosenkränzer <bero@redhat.com>
* Sun Nov 21 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- 1.0.5
- some tweaks to spec file to make updating easier
- handle RPM_OPT_FLAGS

View File

@ -1 +1 @@
4f23eebd59ddd01a8f91ff8c823dd7d6 libpng-1.2.10.tar.bz2
7a1ca4f49bcffdec60d50f48460642bd libpng-1.2.16.tar.bz2