diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2020-10-27 12:12:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 12:12:44 +0300 |
commit | 970783731fccf269dcc3d2385bfd4adadf172196 (patch) | |
tree | efb1aae42c269635b36f7c9b0d48ffabf35deabb | |
parent | 32ab5066f7274f6c2bd94fe0e6636e63130515fa (diff) |
Bump to F# 5.0 (#20511)mono-6.12.0.106
Fixes https://github.com/mono/mono/issues/16763
Closes https://github.com/mono/mono/pull/17925
Closes https://github.com/mono/mono/pull/17882
-rw-r--r-- | packaging/MacSDK/fsharp.py | 173 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-GetFileNameWithoutExtension-type-inference.patch | 13 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-IsPathRooted-type-inference.patch | 21 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-custom-prefix.patch | 26 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-debug.patch | 17 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-msbuild-16-0.patch | 57 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-netfx-multitarget.patch | 105 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-noinstall.patch | 13 | ||||
-rw-r--r-- | packaging/MacSDK/patches/fsharp-portable-pdb.patch | 4 |
9 files changed, 268 insertions, 161 deletions
diff --git a/packaging/MacSDK/fsharp.py b/packaging/MacSDK/fsharp.py index 2916fe63831..01c7485dedc 100644 --- a/packaging/MacSDK/fsharp.py +++ b/packaging/MacSDK/fsharp.py @@ -1,19 +1,17 @@ +import platform +from distutils.version import StrictVersion + class FsharpPackage(GitHubTarballPackage): def __init__(self): GitHubTarballPackage.__init__(self, - 'fsharp', 'fsharp', - '4.5.0', - '3de387432de8d11a89f99d1af87aa9ce194fe21b', + 'dotnet', 'fsharp', + '5.0.0', + '03283e07f6bd5717797acb288cf6044cedca2202', configure='', - override_properties={ 'make': 'make all install PREFIX="%{package_prefix}" DESTDIR=%{stage_root}' }) + override_properties={ 'make': 'version= ./build.sh -c Release && version= ./.dotnet/dotnet restore setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.csproj --packages fsharp-nugets' }) - self.extra_stage_files = ['lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets'] - self.sources.extend(['patches/fsharp-IsPathRooted-type-inference.patch', - 'patches/fsharp-portable-pdb.patch', - 'patches/fsharp-noinstall.patch', - 'patches/fsharp-GetFileNameWithoutExtension-type-inference.patch', - 'patches/fsharp-msbuild-16-0.patch', - 'patches/fsharp-custom-prefix.patch']) + self.sources.extend(['patches/fsharp-netfx-multitarget.patch', + 'patches/fsharp-portable-pdb.patch']) def prep(self): Package.prep(self) @@ -21,10 +19,161 @@ class FsharpPackage(GitHubTarballPackage): for p in range(1, len(self.sources)): self.sh('patch -p1 < "%{local_sources[' + str(p) + ']}"') + # .NET Core 3.1 officially only supports macOS 10.13+ but we can get it to work on 10.12 by compiling our own System.Native.dylib + if StrictVersion(platform.mac_ver()[0]) < StrictVersion("10.13.0"): + self.sh('git clone --branch release/3.1 git://github.com/dotnet/corefx && git -C corefx checkout 1b5b5f0bf030bf7250c3258c140fa9e4214325c8') + self.sh('echo \'\' > corefx/src/Native/Unix/System.Security.Cryptography.Native/CMakeLists.txt') + self.sh('env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c \'cd corefx && MACOSX_DEPLOYMENT_TARGET=10.12 src/Native/build-native.sh x64 Debug OSX outconfig netcoreapp-OSX-Debug-x64 -portable\'') + self.sh('bash -c \'source eng/common/tools.sh && InitializeDotNetCli true\'') + self.sh('cp corefx/artifacts/bin/native/netcoreapp-OSX-Debug-x64/System.Native.dylib .dotnet/shared/Microsoft.NETCore.App/3.1.6/System.Native.dylib') + def build(self): Package.make(self) def install(self): - pass + fsharp_files = [ + "artifacts/bin/fsc/Release/net472/fsc.exe", + "artifacts/bin/fsc/Release/net472/fsc.exe.config", + "artifacts/bin/fsc/Release/net472/FSharp.Build.dll", + "artifacts/bin/fsc/Release/net472/FSharp.Build.xml", + "artifacts/bin/fsc/Release/net472/FSharp.Compiler.Private.dll", + "artifacts/bin/fsc/Release/net472/FSharp.Compiler.Private.xml", + "artifacts/bin/fsc/Release/net472/FSharp.Core.dll", + "artifacts/bin/fsc/Release/net472/FSharp.Core.xml", + "artifacts/bin/fsc/Release/net472/Microsoft.FSharp.Targets", + "artifacts/bin/fsc/Release/net472/Microsoft.Portable.FSharp.Targets", + "artifacts/bin/fsc/Release/net472/Microsoft.Build.dll", + "artifacts/bin/fsc/Release/net472/Microsoft.Build.Framework.dll", + "artifacts/bin/fsc/Release/net472/Microsoft.Build.Tasks.Core.dll", + "artifacts/bin/fsc/Release/net472/Microsoft.Build.Utilities.Core.dll", + "artifacts/bin/fsc/Release/net472/System.Buffers.dll", + "artifacts/bin/fsc/Release/net472/System.Collections.Immutable.dll", + "artifacts/bin/fsc/Release/net472/System.Memory.dll", + "artifacts/bin/fsc/Release/net472/System.Numerics.Vectors.dll", + "artifacts/bin/fsc/Release/net472/System.Reflection.Metadata.dll", + "artifacts/bin/fsc/Release/net472/System.Reflection.TypeExtensions.dll", + "artifacts/bin/fsc/Release/net472/System.Resources.Extensions.dll", + "artifacts/bin/fsc/Release/net472/System.Runtime.CompilerServices.Unsafe.dll", + "artifacts/bin/fsc/Release/net472/System.Threading.Tasks.Dataflow.dll", + "artifacts/bin/fsi/Release/net472/fsi.exe", + "artifacts/bin/fsi/Release/net472/fsi.exe.config", + "artifacts/bin/fsiAnyCpu/Release/net472/fsiAnyCpu.exe", + "artifacts/bin/fsiAnyCpu/Release/net472/fsiAnyCpu.exe.config", + "artifacts/bin/fsi/Release/net472/FSharp.Compiler.Interactive.Settings.dll", + "artifacts/bin/fsi/Release/net472/FSharp.Compiler.Interactive.Settings.xml", + "artifacts/bin/fsi/Release/net472/FSharp.Compiler.Server.Shared.dll", + "artifacts/bin/fsi/Release/net472/FSharp.Compiler.Server.Shared.xml", + "artifacts/bin/fsi/Release/net472/FSharp.DependencyManager.Nuget.dll", + "artifacts/bin/fsi/Release/net472/FSharp.DependencyManager.Nuget.xml", + "artifacts/bin/fsi/Release/net472/Microsoft.DotNet.DependencyManager.dll", + "artifacts/bin/fsi/Release/net472/Microsoft.DotNet.DependencyManager.xml" + ] + + self.copy_files_to_dir(fsharp_files, os.path.join(self.staged_prefix, 'lib/mono/fsharp')) + + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETFramework/v4.0/4.3.0.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETFramework/v4.0/4.3.0.0')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETFramework/v4.0/4.3.1.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETFramework/v4.0/4.3.1.0')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETFramework/v4.0/4.4.0.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETFramework/v4.0/4.4.0.0')) + self.copy_api_files("fsharp-nugets/microsoft.portable.fsharp.core/10.1.0/lib/versions/4.4.1.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETFramework/v4.0/4.4.1.0')) + self.copy_api_files("fsharp-nugets/fsharp.core/4.3.4/lib/net45", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETFramework/v4.0/4.4.3.0')) + self.copy_api_files("fsharp-nugets/fsharp.core/4.3.4/lib/net45", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETFramework/v4.0/4.4.5.0')) + + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETCore/3.3.1.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.3.1.0')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETCore/3.7.4.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.7.4.0')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETCore/3.78.3.1", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.78.3.1')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETCore/3.78.4.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.78.4.0')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETCore/3.259.4.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.259.4.0')) + self.copy_api_files("fsharp-nugets/microsoft.portable.fsharp.core/10.1.0/lib/profiles/portable-net45+netcore45", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.7.41.0')) + self.copy_api_files("fsharp-nugets/microsoft.portable.fsharp.core/10.1.0/lib/profiles/portable-net45+netcore45+wp8", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.78.41.0')) + self.copy_api_files("fsharp-nugets/microsoft.portable.fsharp.core/10.1.0/lib/profiles/portable-net45+netcore45+wpa81+wp8", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETCore/3.259.41.0')) + + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETPortable/2.3.5.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETPortable/2.3.5.0')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETPortable/2.3.5.1", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETPortable/2.3.5.1')) + self.copy_api_files("fsharp-nugets/microsoft.visualfsharp.core.redist/1.0.0/content/.NETPortable/3.47.4.0", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETPortable/3.47.4.0')) + self.copy_api_files("fsharp-nugets/microsoft.portable.fsharp.core/10.1.0/lib/profiles/portable-net45+sl5+netcore45", os.path.join(self.staged_prefix, 'lib/mono/fsharp/api/.NETPortable/3.47.41.0')) + + self.copy_netsdk_files("artifacts/bin/fsc/Release/net472", os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp")) + self.copy_netsdk_files("artifacts/bin/fsc/Release/net472", os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v11.0/FSharp")) + self.copy_netsdk_files("artifacts/bin/fsc/Release/net472", os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v12.0/FSharp")) + self.copy_netsdk_files("artifacts/bin/fsc/Release/net472", os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v14.0/FSharp")) + self.copy_netsdk_files("artifacts/bin/fsc/Release/net472", os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v15.0/FSharp")) + self.copy_netsdk_files("artifacts/bin/fsc/Release/net472", os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v16.0/FSharp")) + + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/Microsoft F#/v4.0")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/Microsoft SDKs/F#/3.0/Framework/v4.0")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/Microsoft SDKs/F#/3.1/Framework/v4.0")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/Microsoft SDKs/F#/4.0/Framework/v4.0")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/Microsoft SDKs/F#/4.1/Framework/v4.0")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v11.0/FSharp")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v12.0/FSharp")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v14.0/FSharp")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v15.0/FSharp")) + self.write_targets_files(os.path.join(self.staged_prefix, "lib/mono/xbuild/Microsoft/VisualStudio/v16.0/FSharp")) + + self.write_script(os.path.join(self.staged_prefix, "bin"), "fsharpc", "fsc.exe") + self.write_script(os.path.join(self.staged_prefix, "bin"), "fsharpi", "fsi.exe") + self.write_script(os.path.join(self.staged_prefix, "bin"), "fsharpiAnyCpu", "fsiAnyCpu.exe") + + def copy_api_files(self, source_dir, target_dir): + fsharpcore_files = [ + os.path.join(source_dir, "FSharp.Core.dll"), + os.path.join(source_dir, "FSharp.Core.xml"), + os.path.join(source_dir, "FSharp.Core.sigdata"), + os.path.join(source_dir, "FSharp.Core.optdata") + ] + self.copy_files_to_dir(fsharpcore_files, target_dir) + + def copy_netsdk_files(self, source_dir, target_dir): + netsdk_files = [ + os.path.join(source_dir, "Microsoft.FSharp.NetSdk.props"), + os.path.join(source_dir, "Microsoft.FSharp.NetSdk.targets"), + os.path.join(source_dir, "Microsoft.FSharp.Overrides.NetSdk.targets") + ] + self.copy_files_to_dir(netsdk_files, target_dir) + + def write_targets_files(self, target_dir): + ensure_dir(target_dir) + with open(os.path.join(target_dir, "Microsoft.FSharp.Targets"), "w") as output: + output.write('<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n') + output.write(' <Import Project="' + self.package_prefix + '/lib/mono/fsharp/Microsoft.FSharp.Targets" />\n') + output.write('</Project>\n') + with open(os.path.join(target_dir, "Microsoft.Portable.FSharp.Targets"), "w") as output: + output.write('<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n') + output.write(' <Import Project="' + self.package_prefix + '/lib/mono/fsharp/Microsoft.Portable.FSharp.Targets" />\n') + output.write('</Project>\n') + + def write_script(self, target_dir, script_name, exe_name): + ensure_dir(target_dir) + wrapper = os.path.join(target_dir, script_name) + with open(wrapper, "w") as output: + output.write('#!/bin/sh\n') + output.write('EXEC="exec "\n') + output.write('\n') + output.write('if test x"$1" = x--debug; then\n') + output.write(' DEBUG=--debug\n') + output.write(' shift\n') + output.write('fi\n') + output.write('\n') + output.write('if test x"$1" = x--gdb; then\n') + output.write(' shift\n') + output.write(' EXEC="gdb --eval-command=run --args "\n') + output.write('fi\n') + output.write('\n') + output.write('if test x"$1" = x--valgrind; then\n') + output.write(' shift\n') + output.write(' EXEC="valgrind $VALGRIND_OPTIONS" \n') + output.write('fi\n') + output.write('\n') + output.write('$EXEC ' + self.package_prefix + '/bin/mono $DEBUG $MONO_OPTIONS ' + self.package_prefix + '/lib/mono/fsharp/' + exe_name + ' --exename:$(basename "$0") "$@"\n') + os.chmod(wrapper, 0o755) + + def copy_files_to_dir(self, files, target_dir): + ensure_dir(target_dir) + + for f in files: + source = os.path.join(self.workspace, f) + target = os.path.join(target_dir, os.path.basename(source)) + shutil.copy(source, target) FsharpPackage() diff --git a/packaging/MacSDK/patches/fsharp-GetFileNameWithoutExtension-type-inference.patch b/packaging/MacSDK/patches/fsharp-GetFileNameWithoutExtension-type-inference.patch deleted file mode 100644 index 14e9444b1de..00000000000 --- a/packaging/MacSDK/patches/fsharp-GetFileNameWithoutExtension-type-inference.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/scripts/fssrgen.fsx b/src/scripts/fssrgen.fsx -index 0bee9b79e..e6ceda11e 100644 ---- a/src/scripts/fssrgen.fsx -+++ b/src/scripts/fssrgen.fsx -@@ -329,7 +329,7 @@ let StringBoilerPlate filename = - // END BOILERPLATE - " - --let RunMain(filename, outFilename, outXmlFilenameOpt, projectNameOpt) = -+let RunMain(filename:string, outFilename, outXmlFilenameOpt, projectNameOpt) = - try - let justfilename = System.IO.Path.GetFileNameWithoutExtension(filename) - if justfilename |> Seq.exists (fun c -> not(System.Char.IsLetterOrDigit(c))) then diff --git a/packaging/MacSDK/patches/fsharp-IsPathRooted-type-inference.patch b/packaging/MacSDK/patches/fsharp-IsPathRooted-type-inference.patch deleted file mode 100644 index 06dd3e82adc..00000000000 --- a/packaging/MacSDK/patches/fsharp-IsPathRooted-type-inference.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit c37fce5b3019c7a150203fc3a484885591b194de -Author: Alexis Christoforides <alexis@thenull.net> -Date: Sun Dec 2 00:10:24 2018 -0500 - - Help Path.IsPathRooted method overload selection. - - .NET Core, and Mono after merging https://github.com/mono/mono/pull/11342, introduce ambiguity with a new overload. - -diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx -index cc797e305..699c7bb93 100644 ---- a/src/scripts/scriptlib.fsx -+++ b/src/scripts/scriptlib.fsx -@@ -92,7 +92,7 @@ module Scripting = - - module Process = - -- let processExePath baseDir exe = -+ let processExePath baseDir (exe:string) = - if Path.IsPathRooted(exe) then exe - else - match Path.GetDirectoryName(exe) with diff --git a/packaging/MacSDK/patches/fsharp-custom-prefix.patch b/packaging/MacSDK/patches/fsharp-custom-prefix.patch deleted file mode 100644 index 63401e18446..00000000000 --- a/packaging/MacSDK/patches/fsharp-custom-prefix.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/mono/config.make b/mono/config.make -index 00bd4a091..d7090a877 100644 ---- a/mono/config.make -+++ b/mono/config.make -@@ -4,7 +4,12 @@ DEFAULT: all - - monocmd = $(shell which mono) - monocmddir = $(dir $(monocmd)) -+ifeq (x-$(PREFIX)-,x--) - prefix = $(shell (cd $(monocmddir)/..; pwd)) -+else -+prefix = $(PREFIX) -+endif -+ - thisdir = $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) - topdir = $(thisdir)../ - builddir = $(topdir) -@@ -147,7 +152,7 @@ install-sdk-lib: - @mkdir -p $(DESTDIR)$(monodir)/fsharp - @if test "x$(DELAY_SIGN)" = "x1"; then \ - echo "Signing $(outdir)$(ASSEMBLY) with Mono key"; \ -- $(monobindir)sn -q -R $(outdir)$(ASSEMBLY) $(topdir)mono/mono.snk; \ -+ $(monocmddir)sn -q -R $(outdir)$(ASSEMBLY) $(topdir)mono/mono.snk; \ - fi - @if test x-$(NAME) = x-FSharp.Compiler.Private; then \ - echo "Installing extra dependency System.Collections.Immutable.dll to $(DESTDIR)$(monodir)/fsharp/"; \ diff --git a/packaging/MacSDK/patches/fsharp-debug.patch b/packaging/MacSDK/patches/fsharp-debug.patch deleted file mode 100644 index d454dfaf163..00000000000 --- a/packaging/MacSDK/patches/fsharp-debug.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/mono/config.make b/mono/config.make -index 00bd4a0..136c644 100644 ---- a/mono/config.make -+++ b/mono/config.make -@@ -144,6 +144,12 @@ NO_DIST = .gitignore lib/debug lib/proto lib/release - # - install-sdk-lib: - @echo "Installing $(ASSEMBLY)" -+ @echo "Dest dir" -+ @ls -la $(DESTDIR) -+ @chmod +w $(DESTDIR) -+ @ls -la $(DESTDIR) -+ @echo "Mono dir" - @mkdir -p $(DESTDIR)$(monodir)/fsharp -+ @ls -la $(DESTDIR)$(monodir) - @if test "x$(DELAY_SIGN)" = "x1"; then \ - echo "Signing $(outdir)$(ASSEMBLY) with Mono key"; \ diff --git a/packaging/MacSDK/patches/fsharp-msbuild-16-0.patch b/packaging/MacSDK/patches/fsharp-msbuild-16-0.patch deleted file mode 100644 index 7077e0760ca..00000000000 --- a/packaging/MacSDK/patches/fsharp-msbuild-16-0.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/mono/config.make b/mono/config.make -index 3106ab99f..8af247ffd 100644 ---- a/mono/config.make -+++ b/mono/config.make -@@ -148,6 +148,7 @@ install-sdk-lib: - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/"; \ - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/"; \ - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/"; \ -+ echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/"; \ - \ - mkdir -p $(tmpdir); \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \ -@@ -160,6 +161,7 @@ install-sdk-lib: - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ -+ mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \ - \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \ -@@ -177,6 +179,7 @@ install-sdk-lib: - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ -+ $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \ - \ - echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' > $(tmpdir)Microsoft.Portable.FSharp.Targets; \ - echo ' <Import Project="$(monodir)/fsharp/Microsoft.Portable.FSharp.Targets" />' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \ -@@ -191,18 +194,21 @@ install-sdk-lib: - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ -+ $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \ - \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ -+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \ - \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ -+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \ - \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ -+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v16.0/FSharp/; \ - fi - @if test x-$(outsuffix) = x-net40; then \ - if test -e $(outdir)$(NAME).dll; then \ diff --git a/packaging/MacSDK/patches/fsharp-netfx-multitarget.patch b/packaging/MacSDK/patches/fsharp-netfx-multitarget.patch new file mode 100644 index 00000000000..bf7ea8ce53f --- /dev/null +++ b/packaging/MacSDK/patches/fsharp-netfx-multitarget.patch @@ -0,0 +1,105 @@ +diff --git a/eng/build.sh b/eng/build.sh +index 32af25330..9a37cbfa4 100755 +--- a/eng/build.sh ++++ b/eng/build.sh +@@ -256,6 +256,7 @@ function BuildSolution { + BuildMessage="Error building bootstrap" + MSBuild "$repo_root/proto.proj" \ + /restore \ ++ /p:TargetFramework=netcoreapp3.1 \ + /p:Configuration=$bootstrap_config \ + /t:Publish + +diff --git a/proto.proj b/proto.proj +index f24b2580e..05db3d0ba 100644 +--- a/proto.proj ++++ b/proto.proj +@@ -7,13 +7,13 @@ + + <ItemGroup> + <Projects Include="src\fsharp\FSharp.Build\FSharp.Build.fsproj"> +- <AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp3.1</AdditionalProperties> ++ <AdditionalProperties Condition="'$(OS)' == 'Unix'">ProtoTargetFramework=netcoreapp3.1</AdditionalProperties> + </Projects> + <Projects Include="src\fsharp\fsc\fsc.fsproj"> +- <AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp3.1</AdditionalProperties> ++ <AdditionalProperties Condition="'$(OS)' == 'Unix'">ProtoTargetFramework=netcoreapp3.1</AdditionalProperties> + </Projects> + <Projects Include="src\fsharp\fsi\fsi.fsproj"> +- <AdditionalProperties Condition="'$(OS)' == 'Unix'">TargetFramework=netcoreapp3.1</AdditionalProperties> ++ <AdditionalProperties Condition="'$(OS)' == 'Unix'">ProtoTargetFramework=netcoreapp3.1</AdditionalProperties> + </Projects> + </ItemGroup> + +diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj +index c62b2c2d9..603fbe6a8 100644 +--- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj ++++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj +@@ -6,7 +6,6 @@ + <OutputType>Library</OutputType> + <TargetFrameworks Condition="'$(ProtoTargetFramework)' != ''">$(ProtoTargetFramework)</TargetFrameworks> + <TargetFrameworks Condition="'$(ProtoTargetFramework)' == ''">net472;netcoreapp3.1</TargetFrameworks> +- <TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.1</TargetFrameworks> + <AssemblyName>FSharp.Build</AssemblyName> + <NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn> + <AllowCrossTargeting>true</AllowCrossTargeting> +diff --git a/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj b/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj +index 75af428f4..4bedb285f 100644 +--- a/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj ++++ b/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj +@@ -5,7 +5,6 @@ + <PropertyGroup> + <OutputType>Library</OutputType> + <TargetFrameworks>net472;netstandard2.0</TargetFrameworks> +- <TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks> + <AssemblyName>FSharp.Compiler.Interactive.Settings</AssemblyName> + <NoWarn>$(NoWarn);45;55;62;75;1182;1204</NoWarn> + <AllowCrossTargeting>true</AllowCrossTargeting> +diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +index 78ebbfc4f..2490d884a 100644 +--- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj ++++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +@@ -5,7 +5,6 @@ + <PropertyGroup> + <OutputType>Library</OutputType> + <TargetFrameworks>net472;netstandard2.0</TargetFrameworks> +- <TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks> + <AssemblyName>FSharp.Compiler.Private</AssemblyName> + <NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn> + <AllowCrossTargeting>true</AllowCrossTargeting> +diff --git a/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj b/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj +index 13e50e196..57d833a4c 100644 +--- a/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj ++++ b/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj +@@ -6,7 +6,6 @@ + <OutputType>Library</OutputType> + <TargetFrameworks>netstandard2.0;net472</TargetFrameworks> + <IsPackable>true</IsPackable> +- <TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks> + <AssemblyName>Microsoft.DotNet.DependencyManager</AssemblyName> + <NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn> + <AllowCrossTargeting>true</AllowCrossTargeting> +diff --git a/src/fsharp/fsc/fsc.fsproj b/src/fsharp/fsc/fsc.fsproj +index 776cddc78..872103e29 100644 +--- a/src/fsharp/fsc/fsc.fsproj ++++ b/src/fsharp/fsc/fsc.fsproj +@@ -6,7 +6,6 @@ + <OutputType>Exe</OutputType> + <TargetFrameworks Condition="'$(ProtoTargetFramework)' != ''">$(ProtoTargetFramework)</TargetFrameworks> + <TargetFrameworks Condition="'$(ProtoTargetFramework)' == ''">net472;netcoreapp3.1</TargetFrameworks> +- <TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.1</TargetFrameworks> + <TargetExt>.exe</TargetExt> + <NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn> + <AllowCrossTargeting>true</AllowCrossTargeting> +diff --git a/src/fsharp/fsi/fsi.fsproj b/src/fsharp/fsi/fsi.fsproj +index bb2bcc73b..2a902381f 100644 +--- a/src/fsharp/fsi/fsi.fsproj ++++ b/src/fsharp/fsi/fsi.fsproj +@@ -6,7 +6,6 @@ + <OutputType>Exe</OutputType> + <TargetFrameworks Condition="'$(ProtoTargetFramework)' != ''">$(ProtoTargetFramework)</TargetFrameworks> + <TargetFrameworks Condition="'$(ProtoTargetFramework)' == ''">net472;netcoreapp3.1</TargetFrameworks> +- <TargetFrameworks Condition="'$(OS)' == 'Unix'">netcoreapp3.1</TargetFrameworks> + <TargetExt>.exe</TargetExt> + <NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn> + <AllowCrossTargeting>true</AllowCrossTargeting> diff --git a/packaging/MacSDK/patches/fsharp-noinstall.patch b/packaging/MacSDK/patches/fsharp-noinstall.patch deleted file mode 100644 index 133726cb1b3..00000000000 --- a/packaging/MacSDK/patches/fsharp-noinstall.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/mono/build-mono.sh b/mono/build-mono.sh -index 12e49fa..85145a9 100755 ---- a/mono/build-mono.sh -+++ b/mono/build-mono.sh -@@ -3,6 +3,6 @@ - # Bootstrap the compiler - # Install the compiler - ./mono/prepare-mono.sh && \ --make && \ --sudo make install -+make && make install -+ - diff --git a/packaging/MacSDK/patches/fsharp-portable-pdb.patch b/packaging/MacSDK/patches/fsharp-portable-pdb.patch index 2d633c43287..e023354dace 100644 --- a/packaging/MacSDK/patches/fsharp-portable-pdb.patch +++ b/packaging/MacSDK/patches/fsharp-portable-pdb.patch @@ -1,8 +1,8 @@ diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets -index 34d716485..ec99e87ed 100644 +index c45e62e6e..dc0c79c2a 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets -@@ -41,6 +41,21 @@ this file. +@@ -48,6 +48,21 @@ this file. <RootNamespace Condition="'$(RootNamespace)'==''">RootNamespace</RootNamespace> <Actual32Bit Condition="'$(TargetFrameworkVersion)'=='v2.0' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v4.0'">false</Actual32Bit> <Actual32Bit Condition="!('$(TargetFrameworkVersion)'=='v2.0' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v4.0')">$(Prefer32Bit)</Actual32Bit> |