From 06657dc387bc0c77a6fb2338b144ae2eb4b6a158 Mon Sep 17 00:00:00 2001 From: Alexis Christoforides Date: Thu, 27 Apr 2017 11:32:24 -0400 Subject: [PATCH] [MacSDK] Update F# -> 4.1.8 --- packaging/MacSDK/fsharp.py | 20 +++++++--- .../fsharp-Fix-mono-gac-location.patch | 29 +++++++++++++++ ...enable-jit-tracking-for-portable-pdb.patch | 37 +++++++++++++++++++ .../patches/fsharp-fix-mdb-support.patch | 6 +-- .../patches/fsharp-fix-xbuild-check.patch | 19 ++++++++++ 5 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 packaging/MacSDK/patches/fsharp-Fix-mono-gac-location.patch create mode 100644 packaging/MacSDK/patches/fsharp-enable-jit-tracking-for-portable-pdb.patch create mode 100644 packaging/MacSDK/patches/fsharp-fix-xbuild-check.patch diff --git a/packaging/MacSDK/fsharp.py b/packaging/MacSDK/fsharp.py index a5af6000994..d7e9be77169 100644 --- a/packaging/MacSDK/fsharp.py +++ b/packaging/MacSDK/fsharp.py @@ -1,14 +1,24 @@ class FsharpPackage(GitHubTarballPackage): def __init__(self): - GitHubTarballPackage.__init__(self, - 'fsharp', 'fsharp', - '4.0.1.20', - '9bd7c2420e06c1597ef5a37b6cb6e0f8d2911b10', - configure='./configure --prefix="%{package_prefix}"') + GitHubTarballPackage.__init__( + self, + 'fsharp', + 'fsharp', + '4.1.8', + '991186f6c95b30a80f217b9319354b32c86212de', + configure='./configure --prefix="%{package_prefix}"', + override_properties={ + 'make': 'make'}) self.extra_stage_files = [ 'lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets'] + self.sources.extend( + [ + 'patches/fsharp-enable-jit-tracking-for-portable-pdb.patch', + 'patches/fsharp-fix-mdb-support.patch', + 'patches/fsharp-Fix-mono-gac-location.patch', + 'patches/fsharp-fix-xbuild-check.patch']) def prep(self): Package.prep(self) diff --git a/packaging/MacSDK/patches/fsharp-Fix-mono-gac-location.patch b/packaging/MacSDK/patches/fsharp-Fix-mono-gac-location.patch new file mode 100644 index 00000000000..67e088b34b9 --- /dev/null +++ b/packaging/MacSDK/patches/fsharp-Fix-mono-gac-location.patch @@ -0,0 +1,29 @@ +From 208aa8170bede4c176b5e3afa6811d1d7a5a330c Mon Sep 17 00:00:00 2001 +From: nosami +Date: Tue, 11 Apr 2017 12:10:04 +0100 +Subject: [PATCH] Fix mono/gac location + +--- + src/fsharp/targets.make | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/fsharp/targets.make b/src/fsharp/targets.make +index 014294a..716adb7 100644 +--- a/src/fsharp/targets.make ++++ b/src/fsharp/targets.make +@@ -157,9 +157,9 @@ install-gac-lib: + echo "Using gacutil to install $(outdir)$(ASSEMBLY) into GAC root $(DESTDIR)$(libdir) as package $(TARGET)"; \ + $(monobindir)/gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)$(libdir) -package $(TARGET); \ + else \ +- echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(gacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/"; \ +- mkdir -p $(DESTDIR)$(gacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \ +- $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(gacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \ ++ echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/"; \ ++ mkdir -p $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \ ++ $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN)/; \ + fi; \ + fi + +-- +2.8.0 + diff --git a/packaging/MacSDK/patches/fsharp-enable-jit-tracking-for-portable-pdb.patch b/packaging/MacSDK/patches/fsharp-enable-jit-tracking-for-portable-pdb.patch new file mode 100644 index 00000000000..d3fef81f75a --- /dev/null +++ b/packaging/MacSDK/patches/fsharp-enable-jit-tracking-for-portable-pdb.patch @@ -0,0 +1,37 @@ +From f28dbdfaa4427c1e62c16bc6d59106f9f5db15f7 Mon Sep 17 00:00:00 2001 +From: nosami +Date: Fri, 21 Apr 2017 16:34:27 +0100 +Subject: [PATCH] Enable JIT tracking for portable PDB debugging + +Setting JIT tracking to true adds the `DebuggableAttribute.DebuggingModes.Default` +flag to the generated Debuggable attribute +See https://msdn.microsoft.com/en-us/library/system.diagnostics.debuggableattribute.debuggingmodes(v=vs.110).aspx + +Without this flag I see the following message when debugging unless I have "Debug project code only: do not step into framework code" unchecked to allow stepping into framework code. +``` +Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. +``` +Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55092 +--- + src/fsharp/CompileOptions.fs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/fsharp/CompileOptions.fs b/src/fsharp/CompileOptions.fs +index 209cdd90..97860085 100755 +--- a/src/fsharp/CompileOptions.fs ++++ b/src/fsharp/CompileOptions.fs +@@ -466,9 +466,9 @@ let SetDebugSwitch (tcConfigB : TcConfigBuilder) (dtype : string option) (s : Op + match dtype with + | Some(s) -> + match s with +- | "portable" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- false; tcConfigB.ignoreSymbolStoreSequencePoints <- true ++ | "portable" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- true; tcConfigB.ignoreSymbolStoreSequencePoints <- true + | "pdbonly" -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- false +- | "embedded" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- true; tcConfigB.jitTracking <- false; tcConfigB.ignoreSymbolStoreSequencePoints <- true ++ | "embedded" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- true; tcConfigB.jitTracking <- true; tcConfigB.ignoreSymbolStoreSequencePoints <- true + | "full" -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- true + | _ -> error(Error(FSComp.SR.optsUnrecognizedDebugType(s), rangeCmdArgs)) + | None -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- s = OptionSwitch.On; +-- +2.11.0 (Apple Git-81) + diff --git a/packaging/MacSDK/patches/fsharp-fix-mdb-support.patch b/packaging/MacSDK/patches/fsharp-fix-mdb-support.patch index 576942ae47d..164ad3d2bc8 100644 --- a/packaging/MacSDK/patches/fsharp-fix-mdb-support.patch +++ b/packaging/MacSDK/patches/fsharp-fix-mdb-support.patch @@ -13,10 +13,10 @@ Date: Wed Feb 8 18:44:41 2017 -0500 F# yet. diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.targets -index 82125d2..e7ddac2 100644 +index e185bdf..2788988 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.targets +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.targets -@@ -40,6 +40,10 @@ Copyright (C) Microsoft Corporation. Apache 2.0 License. +@@ -38,6 +38,10 @@ this file. RootNamespace false $(Prefer32Bit) @@ -25,5 +25,5 @@ index 82125d2..e7ddac2 100644 + <_DebugFileExt Condition="'$(FscDebugFileExt)' != ''">$(FscDebugFileExt) + <_DebugFileExt Condition="'$(_DebugFileExt)' == ''">.mdb - +