[mingw-nsis: 25/27] Added a patch to fix compatibility with mingw-w64
Kalev Lember
kalev at fedoraproject.org
Wed Mar 7 16:06:24 UTC 2012
commit 4bc29de1a1cf143ade51736f174afc6d3be482ee
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Mon Feb 27 21:21:10 2012 +0100
Added a patch to fix compatibility with mingw-w64
mingw32-nsis.spec | 4 +++
nsis-add-mingw-w64-support.patch | 39 ++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/mingw32-nsis.spec b/mingw32-nsis.spec
index d7e0353..d6ee4c3 100644
--- a/mingw32-nsis.spec
+++ b/mingw32-nsis.spec
@@ -23,6 +23,8 @@ Patch2: nsis-2.45-static-libgcc.patch
Patch3: nsis-2.46-static-libstdc++.patch
# Missing #include <unistd.h> to get close(2) function.
Patch4: nsis-2.46-missing-unistd-include.patch
+# Add support to build against the mingw-w64 toolchain
+Patch5: nsis-add-mingw-w64-support.patch
BuildRequires: mingw32-filesystem >= 40
BuildRequires: mingw32-gcc
@@ -67,6 +69,7 @@ all plugins.
%patch2 -p1 -b .static-libgcc
%patch3 -p1 -b .static-libstdc++
%patch4 -p1 -b .missing-unistd-include
+%patch5 -p0 -b .mingw-w64
%build
@@ -98,6 +101,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Feb 27 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.46-6
- Rebuild against the mingw-w64 toolchain
+- Added a patch to fix compatibility with mingw-w64
* Mon Jan 16 2012 Richard W.M. Jones <rjones at redhat.com> - 2.46-5
- Missing #include <unistd.h> to get close(2) function.
diff --git a/nsis-add-mingw-w64-support.patch b/nsis-add-mingw-w64-support.patch
new file mode 100644
index 0000000..1db4127
--- /dev/null
+++ b/nsis-add-mingw-w64-support.patch
@@ -0,0 +1,39 @@
+--- SCons/Tools/crossmingw.py.orig 2011-01-26 21:52:04.824806455 +0100
++++ SCons/Tools/crossmingw.py 2011-01-26 21:52:31.510159416 +0100
+@@ -58,6 +58,7 @@
+ i486-pc-mingw32-
+ i586-pc-mingw32-
+ i686-pc-mingw32-
++ i686-w64-mingw32-
+ """)
+
+ def find(env):
+--- Contrib/InstallOptions/InstallerOptions.cpp.mingw-w64 2009-02-04 15:08:31.000000000 +0100
++++ Contrib/InstallOptions/InstallerOptions.cpp 2011-01-26 23:22:58.270462807 +0100
+@@ -16,6 +16,12 @@
+
+ #include <nsis/pluginapi.h> // nsis plugin
+
++#ifdef __MINGW64_VERSION_MAJOR
++#ifndef min
++#define min(a,b) (((a) < (b)) ? (a) : (b))
++#endif
++#endif
++
+ // Use for functions only called from one place to possibly reduce some code
+ // size. Allows the source code to remain readable by leaving the function
+ // intact.
+--- Contrib/Makensisw/makensisw.h.orig 2011-01-26 23:24:44.982879796 +0100
++++ Contrib/Makensisw/makensisw.h 2011-01-26 23:22:30.023028857 +0100
+@@ -22,7 +22,11 @@
+ #ifndef MAKENSIS_H
+ #define MAKENSIS_H
+
++#include <stdio.h> /* Needed to get __MINGW64_VERSION_MAJOR set */
++#ifndef __MINGW64_VERSION_MAJOR
+ #define _WIN32_IE 0x0400
++#endif
++
+ #include <windows.h>
+ #include <commctrl.h>
+ #include "utils.h"
More information about the scm-commits
mailing list