Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Imison <nosami@users.noreply.github.com>2018-03-26 16:06:52 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2018-03-26 16:06:52 +0300
commitf66032b7c0f814b61129ee0f0264de249f0989c3 (patch)
treed8b5a9963b3225100f05f83f74f64f63a6a5634b /packaging
parente610e443cd67c78c2aeabef4209e380226dd65d5 (diff)
Fix F# build. (#7826)
We need to be specific about the type of `switchName` as String.StartsWith got a new char overload. Fixes #7805
Diffstat (limited to 'packaging')
-rw-r--r--packaging/MacSDK/fsharp.py2
-rw-r--r--packaging/MacSDK/patches/fsharp-string-switchName.patch13
2 files changed, 14 insertions, 1 deletions
diff --git a/packaging/MacSDK/fsharp.py b/packaging/MacSDK/fsharp.py
index b17702f6c5b..e7dfaf25f30 100644
--- a/packaging/MacSDK/fsharp.py
+++ b/packaging/MacSDK/fsharp.py
@@ -8,7 +8,7 @@ class FsharpPackage(GitHubTarballPackage):
override_properties={ 'make': 'make' })
self.extra_stage_files = ['lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets']
- self.sources.extend(['patches/fsharp-portable-pdb.patch'])
+ self.sources.extend(['patches/fsharp-portable-pdb.patch', 'patches/fsharp-string-switchName.patch'])
def prep(self):
Package.prep(self)
diff --git a/packaging/MacSDK/patches/fsharp-string-switchName.patch b/packaging/MacSDK/patches/fsharp-string-switchName.patch
new file mode 100644
index 00000000000..7668e28856b
--- /dev/null
+++ b/packaging/MacSDK/patches/fsharp-string-switchName.patch
@@ -0,0 +1,13 @@
+diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx
+index cc797e305..5a7be7d2b 100644
+--- a/src/scripts/scriptlib.fsx
++++ b/src/scripts/scriptlib.fsx
+@@ -36,7 +36,7 @@ module Scripting =
+ #if INTERACTIVE
+ let argv = Microsoft.FSharp.Compiler.Interactive.Settings.fsi.CommandLineArgs |> Seq.skip 1 |> Seq.toArray
+
+- let getCmdLineArgOptional switchName =
++ let getCmdLineArgOptional (switchName: string) =
+ argv |> Array.filter(fun t -> t.StartsWith(switchName)) |> Array.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> Array.tryHead
+
+ let getCmdLineArg switchName defaultValue =