[mingw-libpng: 2/25] Initial import.

Kalev Lember kalev at fedoraproject.org
Tue Mar 6 19:39:32 UTC 2012


commit 628f4ac41b4692a43b92a91e268110dbff691ac9
Author: Richard W.M. Jones <rjones at fedoraproject.org>
Date:   Wed Jan 14 09:45:21 2009 +0000

    Initial import.

 .cvsignore            |    1 +
 import.log            |    1 +
 libpng-multilib.patch |   23 +++++++++++
 libpng-pngconf.patch  |   42 ++++++++++++++++++++
 mingw32-libpng.spec   |  100 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    1 +
 6 files changed, 168 insertions(+), 0 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
index e69de29..b576525 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+libpng-1.2.34.tar.bz2
diff --git a/import.log b/import.log
new file mode 100644
index 0000000..bf6fa25
--- /dev/null
+++ b/import.log
@@ -0,0 +1 @@
+mingw32-libpng-1_2_34-2_fc10:HEAD:mingw32-libpng-1.2.34-2.fc10.src.rpm:1231925894
diff --git a/libpng-multilib.patch b/libpng-multilib.patch
new file mode 100644
index 0000000..8b10eb9
--- /dev/null
+++ b/libpng-multilib.patch
@@ -0,0 +1,23 @@
+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 at 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 at PNGLIB_MAJOR@@PNGLIB_MINOR@"
+ all_libs="-lpng at PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
+ I_opts="-I${includedir}"
diff --git a/libpng-pngconf.patch b/libpng-pngconf.patch
new file mode 100644
index 0000000..dbaadcb
--- /dev/null
+++ b/libpng-pngconf.patch
@@ -0,0 +1,42 @@
+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
+ 
+ /*
diff --git a/mingw32-libpng.spec b/mingw32-libpng.spec
new file mode 100644
index 0000000..55faab5
--- /dev/null
+++ b/mingw32-libpng.spec
@@ -0,0 +1,100 @@
+%define __strip %{_mingw32_strip}
+%define __objdump %{_mingw32_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_mingw32_findrequires}
+%define __find_provides %{_mingw32_findprovides}
+
+Name:           mingw32-libpng
+Version:        1.2.34
+Release:        2%{?dist}
+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.bz2
+Patch0:         libpng-multilib.patch
+Patch1:         libpng-pngconf.patch
+
+Group:          Development/Libraries
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  mingw32-filesystem >= 40
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-binutils
+BuildRequires:  mingw32-zlib
+
+Requires:       pkgconfig
+
+%description
+MinGW Windows Libpng library.
+
+
+%prep
+%setup -q -n libpng-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{_mingw32_configure}
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libpng.a
+
+# No need to distribute manpages which appear in the Fedora
+# native packages already.
+rm -rf $RPM_BUILD_ROOT%{_mingw32_mandir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%doc ANNOUNCE CHANGES KNOWNBUG LICENSE README TODO Y2KINFO
+%{_mingw32_bindir}/libpng-3.dll
+%{_mingw32_bindir}/libpng-config
+%{_mingw32_bindir}/libpng12-0.dll
+%{_mingw32_bindir}/libpng12-config
+%{_mingw32_includedir}/libpng12
+%{_mingw32_includedir}/png.h
+%{_mingw32_includedir}/pngconf.h
+%{_mingw32_libdir}/libpng.dll.a
+%{_mingw32_libdir}/libpng.la
+%{_mingw32_libdir}/libpng12.a
+%{_mingw32_libdir}/libpng12.dll.a
+%{_mingw32_libdir}/libpng12.la
+%{_mingw32_libdir}/pkgconfig/libpng.pc
+%{_mingw32_libdir}/pkgconfig/libpng12.pc
+
+
+%changelog
+* Tue Jan 13 2009 Richard W.M. Jones <rjones at redhat.com> - 1.2.34-2
+- Depend on mingw32-filesystem >= 40 so we can still build in F-10.
+
+* Tue Jan 13 2009 Richard W.M. Jones <rjones at redhat.com> - 1.2.34-1
+- Rebase to 1.2.34 and patches from Fedora.
+- Requires pkgconfig.
+- Add documentation.
+
+* Wed Sep 24 2008 Richard W.M. Jones <rjones at redhat.com> - 1.2.31-5
+- Rename mingw -> mingw32.
+
+* Mon Sep 22 2008 Daniel P. Berrange <berrange at redhat.com> - 1.2.31-4
+- Add patches from rawhide RPM
+
+* Sun Sep 21 2008 Richard W.M. Jones <rjones at redhat.com> - 1.2.31-3
+- Don't duplicate Fedora native manpages.
+
+* Wed Sep 10 2008 Richard W.M. Jones <rjones at redhat.com> - 1.2.31-2
+- Remove static library.
+
+* Tue Sep  9 2008 Daniel P. Berrange <berrange at redhat.com> - 1.2.31-1
+- Initial RPM release
diff --git a/sources b/sources
index e69de29..2b5caa3 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+37362876feb21344fd3af1228527db0f  libpng-1.2.34.tar.bz2


More information about the mingw mailing list