Spec cleanup

Dropped unused patches, switched to using automatic mingw dep
extraction, and removed boilerplate code that isn't needed with
current rpmbuild.

Also dropped mingw32-libpng-fix-invalid-exports.patch, which doesn't
appear to be needed any more.
epel9
Kalev Lember 14 years ago
parent b6236ad344
commit a5e9f8ec06

@ -1,23 +0,0 @@
Use pkg-config to report libpng version and installation directories.
diff -Naur libpng-1.2.31.orig/scripts/libpng-config.in libpng-1.2.31/scripts/libpng-config.in
--- libpng-1.2.31.orig/scripts/libpng-config.in 2008-05-29 13:37:58.000000000 -0400
+++ libpng-1.2.31/scripts/libpng-config.in 2008-08-23 16:57:20.000000000 -0400
@@ -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@ @LIBS@"
I_opts="-I${includedir}"

@ -1,42 +0,0 @@
diff -Naur libpng-1.2.29.orig/configure.ac libpng-1.2.29/configure.ac
--- libpng-1.2.29.orig/configure.ac 2008-05-08 07:58:11.000000000 -0400
+++ libpng-1.2.29/configure.ac 2008-05-31 20:21:12.000000000 -0400
@@ -63,7 +63,8 @@
AC_MSG_CHECKING(
[if assembler code in pnggccrd.c can be compiled without PNG_NO_MMX_CODE])
AC_TRY_COMPILE(
- [#include "$srcdir/pnggccrd.c"],
+ [#define PNG_CONFIGURE_LIBPNG
+ #include "$srcdir/pnggccrd.c"],
[return 0;],
AC_MSG_RESULT(yes)
LIBPNG_NO_MMX="",
diff -Naur libpng-1.2.29.orig/pngconf.h libpng-1.2.29/pngconf.h
--- libpng-1.2.29.orig/pngconf.h 2008-05-08 07:58:03.000000000 -0400
+++ libpng-1.2.29/pngconf.h 2008-05-31 20:21:12.000000000 -0400
@@ -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
/*

@ -1,14 +0,0 @@
--- configure.orig 2009-11-20 01:18:09.926590381 +0100
+++ configure 2009-11-20 01:18:37.352678377 +0100
@@ -11447,10 +11447,7 @@
if test "$have_ld_version_script" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
$as_echo_n "checking for symbol prefix... " >&6; }
- SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
- | ${CPP-${CC-gcc} -E} - 2>&1 \
- | ${EGREP-grep} "^PREFIX=" \
- | ${SED-sed} "s:^PREFIX=::"`
+ SYMBOL_PREFIX=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
$as_echo "$SYMBOL_PREFIX" >&6; }

@ -1,8 +1,5 @@
%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
%define __debug_install_post %{_mingw32_debug_install_post}
Name: mingw32-libpng
@ -13,14 +10,12 @@ Summary: MinGW Windows Libpng library
License: zlib
URL: http://www.libpng.org/pub/png/
Source0: ftp://ftp.simplesystems.org/pub/png/src/libpng-%{version}.tar.xz
Patch2: mingw32-libpng-fix-invalid-exports.patch
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 49
BuildRequires: mingw32-filesystem >= 68
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: mingw32-zlib
@ -37,23 +32,13 @@ MinGW Windows Libpng library.
%prep
%setup -q -n libpng-%{version}
# The configure script tries to generate a prefix which is used for
# symbol declarations. However, when this prefix is prefix is used
# the resulting DLL's don't have any exported symbols at all
# When we drop this prefix we retain backwards compatibility with
# older versions of mingw32-libpng. We might need to research this
# issue more to find out the real cause, but this will do for now
%patch2 -p0
%build
%{_mingw32_configure} --disable-static
make
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# No need to distribute manpages which appear in the Fedora
@ -61,12 +46,7 @@ make DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc ANNOUNCE CHANGES LICENSE README TODO
%{_mingw32_bindir}/libpng-config
%{_mingw32_bindir}/libpng14-14.dll
@ -87,6 +67,7 @@ rm -rf $RPM_BUILD_ROOT
- Update to 1.4.8 (CVE-2011-2690, CVE-2011-2692)
- Generate debuginfo subpackage
- Removed static libs from the main package
- Spec cleanup
* Wed Jun 29 2011 Richard W.M. Jones <rjones@redhat.com> - 1.4.3-3
- Include fix for CVE-2011-2501 (RHBZ#717510, RHBZ#717511).

Loading…
Cancel
Save