summaryrefslogtreecommitdiffstats
path: root/src/nsis-1-fixes.patch
blob: db7192c714aaacdeeb5a59575f62af24c329e3f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sun, 12 Aug 2012 12:33:26 +0200
Subject: [PATCH] explicit mingw cross prefix

This patch has been taken from:
http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085

diff --git a/SCons/Tools/crossmingw.py b/SCons/Tools/crossmingw.py
index 1111111..2222222 100755
--- a/SCons/Tools/crossmingw.py
+++ b/SCons/Tools/crossmingw.py
@@ -65,6 +65,9 @@ prefixes = SCons.Util.Split("""
 """)
 
 def find(env):
+    if env.has_key('MINGW_CROSS_PREFIX'):
+        return env['MINGW_CROSS_PREFIX']
+
     # Explicitly specified toolchain to build Windows executables
     # takes predominance.
     prefix = SCons.Script.ARGUMENTS.get('XGCC_W32_PREFIX', None)
diff --git a/SConstruct b/SConstruct
index 1111111..2222222 100755
--- a/SConstruct
+++ b/SConstruct
@@ -67,6 +67,7 @@ doctypes = [
 path = ARGUMENTS.get('PATH', '')
 toolset = ARGUMENTS.get('TOOLSET', '')
 arch = ARGUMENTS.get('TARGET_ARCH', 'x86')
+mingw_cross_prefix = ARGUMENTS.get('MINGW_CROSS_PREFIX', '')
 
 if toolset and path:
 	defenv = Environment(TARGET_ARCH = arch, ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip'])
@@ -77,6 +78,8 @@ else:
 		defenv = Environment(TARGET_ARCH = arch, TOOLS = toolset.split(',') + ['zip'])
 if not toolset and not path:
 	defenv = Environment(TARGET_ARCH = arch)
+if mingw_cross_prefix:
+	defenv['MINGW_CROSS_PREFIX'] = mingw_cross_prefix
 
 Export('defenv')