[mingw32-zlib] Fix invalid .def file and use correct RPM macros

epienbro epienbro at fedoraproject.org
Mon Feb 27 19:48:27 UTC 2012


commit cc83bfe58317d043d50f3af538fb3f331fb4a8c5
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Mon Feb 27 20:48:04 2012 +0100

    Fix invalid .def file and use correct RPM macros
    
    Use the correct RPM macros
    Fix FTBFS against the latest binutils caused by the use of an invalid .def file

 mingw32-zlib.spec                     |   10 ++++++++--
 zlib-1.2.5-use-correct-def-file.patch |    8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/mingw32-zlib.spec b/mingw32-zlib.spec
index 7937e74..7e39d45 100644
--- a/mingw32-zlib.spec
+++ b/mingw32-zlib.spec
@@ -18,6 +18,9 @@ Source0:        http://www.zlib.net/zlib-%{version}.tar.gz
 Patch3:         mingw32-zlib-1.2.5-autotools.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=591317
 Patch4:         zlib-1.2.5-gentoo.patch
+# The .def file contains an empty LIBRARY line which isn't valid
+Patch5:         zlib-1.2.5-use-correct-def-file.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 
@@ -55,6 +58,7 @@ MinGW Minizip manipulates files from a .zip archive.
 
 %prep
 %setup -q -n zlib-%{version}
+%patch5 -p1 -b .def
 cd ..
 cp -a zlib-%{version} x
 mv x zlib-%{version}
@@ -76,8 +80,8 @@ make -f win32/Makefile.gcc \
   CFLAGS="%{_mingw32_cflags}" \
   CC=%{_mingw32_cc} \
   AR=%{_mingw32_ar} \
-  RC=i686-pc-mingw32-windres \
-  DLLWRAP=i686-pc-mingw32-dllwrap \
+  RC=%{_mingw32_windres} \
+  DLLWRAP=%{_mingw32_dllwrap} \
   STRIP=%{_mingw32_strip} \
   all
 popd
@@ -138,6 +142,8 @@ rm -rf $RPM_BUILD_ROOT
 %changelog
 * Mon Feb 27 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.2.5-7
 - Rebuild against the mingw-w64 toolchain
+- Use the correct RPM macros
+- Fix FTBFS against the latest binutils caused by the use of an invalid .def file
 
 * Fri Feb 17 2012 David Tardon <dtardon at redhat.com> - 1.2.5-6
 - fix dlname in libz.la
diff --git a/zlib-1.2.5-use-correct-def-file.patch b/zlib-1.2.5-use-correct-def-file.patch
new file mode 100644
index 0000000..42cb76e
--- /dev/null
+++ b/zlib-1.2.5-use-correct-def-file.patch
@@ -0,0 +1,8 @@
+--- zlib-1.2.5/win32/zlib.def.orig      2012-02-26 16:19:28.608868501 +0100
++++ zlib-1.2.5/win32/zlib.def   2012-02-26 16:19:34.156864592 +0100
+@@ -1,4 +1,4 @@
+-LIBRARY
++LIBRARY zlib1.dll
+ ; zlib data compression library
+
+ EXPORTS


More information about the mingw mailing list