Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet 6.0.100 #92991

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Formula/archi-steam-farm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class ArchiSteamFarm < Formula
desc "Application for idling Steam cards from multiple accounts simultaneously"
homepage "https://github.com/JustArchiNET/ArchiSteamFarm"
url "https://github.com/JustArchiNET/ArchiSteamFarm.git",
tag: "5.1.5.3",
revision: "cc59875769dbc3e525e000a500da888b02785abb"
tag: "5.2.2.5",
revision: "29fae79aa03e8d916a387099dc6decd541386e81"
license "Apache-2.0"
head "https://github.com/JustArchiNET/ArchiSteamFarm.git", branch: "main"

Expand Down
6 changes: 2 additions & 4 deletions Formula/dafny.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Dafny < Formula
desc "Verification-aware programming language"
homepage "https://github.com/dafny-lang/dafny/blob/master/README.md"
url "https://github.com/dafny-lang/dafny/archive/v3.3.0.tar.gz"
sha256 "0cdbffa90d2556e068cb6fb8601c9ecda649dc671734354cd6071d3b8b948b41"
url "https://github.com/dafny-lang/dafny/archive/v3.4.1.tar.gz"
sha256 "75c86d22ed9b9b7b88b078e2f27cca6b408070dd95e865e3e57f2dc3c3cd0bbe"
license "MIT"

livecheck do
Expand All @@ -16,8 +16,6 @@ class Dafny < Formula
end

depends_on "gradle" => :build
depends_on "nuget" => :build
depends_on arch: :x86_64 # dotnet does not support ARM
depends_on "dotnet"
depends_on "openjdk@11"

Expand Down
130 changes: 113 additions & 17 deletions Formula/dotnet.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
class Dotnet < Formula
desc ".NET Core"
homepage "https://dotnet.microsoft.com/"
url "https://github.com/dotnet/source-build.git",
tag: "v5.0.207-SDK",
revision: "52296950a9e8d1b34a2e0e10e4b8bb06daba2dcc"
url "https://github.com/dotnet/installer.git",
tag: "v6.0.100",
revision: "9e8b04bbff820c93c142f99a507a46b976f5c14c"
license "MIT"

livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)-SDK$/i)
end

bottle do
sha256 cellar: :any, big_sur: "dd058f1a46a84ee8cfbdf5450a5248ca1b5af91ae018efd5f96b0b760a4cc84f"
sha256 cellar: :any, catalina: "a9c2b8e900351d1cb074100a60de404f033436032c1116c6094351446253e777"
Expand All @@ -20,31 +15,75 @@ class Dotnet < Formula

depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "[email protected]" => :build
depends_on xcode: :build
depends_on arch: :x86_64
depends_on "curl"
depends_on "icu4c"
depends_on "[email protected]"

# HACK: this should not be a test dependency but is due to a limitation with fails_with
uses_from_macos "llvm" => [:build, :test]
cho-m marked this conversation as resolved.
Show resolved Hide resolved
uses_from_macos "krb5"
uses_from_macos "zlib"

on_macos do
# arcade fails to build with BSD `sed` due to `-i` usage in SourceBuild.props
depends_on "gnu-sed" => :build
end

on_linux do
depends_on "llvm" => [:build, :test]
depends_on "libunwind"
depends_on "lttng-ust"
end

# Upstream only directly supports and tests llvm/clang builds.
# GCC builds have limited support via community.
fails_with :gcc

# Fix build with Clang 13.
# PR ref: https://github.com/dotnet/runtime/pull/63314
# TODO: Remove this in future release with .NET runtime v6.0.2+
resource "runtime-clang13-patch" do
url "https://github.com/dotnet/runtime/commit/f86caa54678535ead8e1977da37025a96e2afe8a.patch?full_index=1"
sha256 "bc264ce2a1f9f7f3d27db10276bb2d1b979f66da06727aaa04be15c36086a9a3"
end

# Fix previously-source-built bootstrap.
# PR ref: https://github.com/dotnet/installer/pull/12642
# TODO: Remove this in the next release
patch do
url "https://github.com/dotnet/installer/commit/7f02ccd30f55e7ac3436bd32af4b207869541ebf.patch?full_index=1"
sha256 "ff51630f9bfc4bbb502f57c6b1348d2e530a006234150606f9327fedcbb6591c"
end

# Fix build failure on macOS due to missing ILAsm/ILDAsm
# Fix build failure on macOS ARM due to `osx-x64` override
patch :DATA

def install
ENV.append_path "LD_LIBRARY_PATH", Formula["icu4c"].opt_lib if OS.linux?
if OS.linux?
ENV.append_path "LD_LIBRARY_PATH", Formula["icu4c"].opt_lib
else
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin"
end

# Arguments needed to not artificially time-limit downloads from Azure.
# See the following GitHub issue comment for details:
# https://github.com/dotnet/source-build/issues/1596#issuecomment-670995776
system "./build.sh", "/p:DownloadSourceBuildReferencePackagesTimeoutSeconds=N/A",
"/p:DownloadSourceBuiltArtifactsTimeoutSeconds=N/A"
# TODO: Remove this in future release with .NET runtime v6.0.2+
(buildpath/"src/SourceBuild/tarball/patches/runtime").install resource("runtime-clang13-patch")

sourcedir = buildpath.parent/"dotnet-sources"
system "./build.sh", "/p:ArcadeBuildTarball=true",
"/p:TarballDir=#{sourcedir}"
cd sourcedir
# Disable package validation in source-build for reliability
# PR ref: https://github.com/dotnet/runtime/pull/60881
# TODO: Remove this in the next release
inreplace Dir["src/runtime.*/eng/packaging.targets"].first,
"<EnablePackageValidation>true</EnablePackageValidation>",
"<EnablePackageValidation>false</EnablePackageValidation>"
# Rename patch fails on case-insensitive systems like macOS
# TODO: Remove whenever patch is no longer used
rm Dir["src/nuget-client.*/eng/source-build-patches/0001-Rename-NuGet.Config*.patch"].first if OS.mac?
system "./prep.sh", "--bootstrap"
system "./build.sh"

libexec.mkpath
tarball = Dir["artifacts/*/Release/dotnet-sdk-#{version}-*.tar.gz"].first
Expand Down Expand Up @@ -99,3 +138,60 @@ def caveats
shell_output("#{bin}/dotnet run --framework #{target_framework} #{testpath}/test.dll a b c")
end
end

__END__
diff --git a/src/SourceBuild/tarball/content/repos/installer.proj b/src/SourceBuild/tarball/content/repos/installer.proj
index 712d7cd14..31d54866c 100644
--- a/src/SourceBuild/tarball/content/repos/installer.proj
+++ b/src/SourceBuild/tarball/content/repos/installer.proj
@@ -7,7 +7,7 @@

<PropertyGroup>
<OverrideTargetRid>$(TargetRid)</OverrideTargetRid>
- <OverrideTargetRid Condition="'$(TargetOS)' == 'OSX'">osx-x64</OverrideTargetRid>
+ <OverrideTargetRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</OverrideTargetRid>
<OSNameOverride>$(OverrideTargetRid.Substring(0, $(OverrideTargetRid.IndexOf("-"))))</OSNameOverride>

<RuntimeArg>--runtime-id $(OverrideTargetRid)</RuntimeArg>
@@ -28,7 +28,7 @@
<BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:AspNetCoreSharedFxInstallerRid=linux-$(Platform)</BuildCommandArgs>
<!-- core-sdk always wants to build portable on OSX and FreeBSD -->
<BuildCommandArgs Condition="'$(TargetOS)' == 'FreeBSD'">$(BuildCommandArgs) /p:CoreSetupRid=freebsd-x64 /p:PortableBuild=true</BuildCommandArgs>
- <BuildCommandArgs Condition="'$(TargetOS)' == 'OSX'">$(BuildCommandArgs) /p:CoreSetupRid=osx-x64</BuildCommandArgs>
+ <BuildCommandArgs Condition="'$(TargetOS)' == 'OSX'">$(BuildCommandArgs) /p:CoreSetupRid=osx-$(Platform)</BuildCommandArgs>
<BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:CoreSetupRid=$(TargetRid)</BuildCommandArgs>

<!-- Consume the source-built Core-Setup and toolset. This line must be removed to source-build CLI without source-building Core-Setup first. -->
diff --git a/src/SourceBuild/tarball/content/repos/runtime.proj b/src/SourceBuild/tarball/content/repos/runtime.proj
index f3ed143f8..2c62d6854 100644
--- a/src/SourceBuild/tarball/content/repos/runtime.proj
+++ b/src/SourceBuild/tarball/content/repos/runtime.proj
@@ -3,7 +3,7 @@

<PropertyGroup>
<OverrideTargetRid>$(TargetRid)</OverrideTargetRid>
- <OverrideTargetRid Condition="'$(TargetOS)' == 'OSX'">osx-x64</OverrideTargetRid>
+ <OverrideTargetRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</OverrideTargetRid>
<OverrideTargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-x64</OverrideTargetRid>
<OverrideTargetRid Condition="'$(TargetOS)' == 'Windows_NT'">win-x64</OverrideTargetRid>

diff --git a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj
index 0a2fcff17..9033ff11a 100644
--- a/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj
+++ b/src/SourceBuild/tarball/content/scripts/bootstrap/buildBootstrapPreviouslySB.csproj
@@ -23,6 +23,14 @@
<PackageReference Include="runtime.linux-x64.Microsoft.NETCore.ILDAsm" Version="$(RuntimeLinuxX64MicrosoftNETCoreILDAsmVersion)" />
<PackageReference Include="runtime.linux-x64.Microsoft.NETCore.TestHost" Version="$(RuntimeLinuxX64MicrosoftNETCoreTestHostVersion)" />
<PackageReference Include="runtime.linux-x64.runtime.native.System.IO.Ports" Version="$(RuntimeLinuxX64RuntimeNativeSystemIOPortsVersion)" />
+ <PackageReference Include="runtime.osx-arm64.Microsoft.NETCore.ILAsm" Version="$(RuntimeOsxArm64MicrosoftNETCoreILAsmVersion)" />
+ <PackageReference Include="runtime.osx-arm64.Microsoft.NETCore.ILDAsm" Version="$(RuntimeOsxArm64MicrosoftNETCoreILDAsmVersion)" />
+ <PackageReference Include="runtime.osx-arm64.Microsoft.NETCore.TestHost" Version="$(RuntimeOsxArm64MicrosoftNETCoreTestHostVersion)" />
+ <PackageReference Include="runtime.osx-arm64.runtime.native.System.IO.Ports" Version="$(RuntimeOsxArm64RuntimeNativeSystemIOPortsVersion)" />
+ <PackageReference Include="runtime.osx-x64.Microsoft.NETCore.ILAsm" Version="$(RuntimeLinuxX64MicrosoftNETCoreILAsmVersion)" />
+ <PackageReference Include="runtime.osx-x64.Microsoft.NETCore.ILDAsm" Version="$(RuntimeLinuxX64MicrosoftNETCoreILDAsmVersion)" />
+ <PackageReference Include="runtime.osx-x64.Microsoft.NETCore.TestHost" Version="$(RuntimeLinuxX64MicrosoftNETCoreTestHostVersion)" />
+ <PackageReference Include="runtime.osx-x64.runtime.native.System.IO.Ports" Version="$(RuntimeLinuxX64RuntimeNativeSystemIOPortsVersion)" />
</ItemGroup>

<Target Name="BuildBoostrapPreviouslySourceBuilt" AfterTargets="Restore">

8 changes: 4 additions & 4 deletions Formula/gitversion.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Gitversion < Formula
desc "Easy semantic versioning for projects using Git"
homepage "https://gitversion.net"
url "https://github.com/GitTools/GitVersion/archive/5.7.0.tar.gz"
sha256 "d2c101d3b6ed5a0ee1e764c749bd869a2ce8f6d5563a5e2938dc3c32ad1375c7"
url "https://github.com/GitTools/GitVersion/archive/5.8.1.tar.gz"
sha256 "7e898a117aaf11a56233bdfae70e860321110dfe4f94cc517fe68c757f6587ec"
license "MIT"

bottle do
Expand All @@ -12,17 +12,17 @@ class Gitversion < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "029c5c10ede90c0f116a12fe47af0d2e9b0da43542b70117c5eae946756f24df"
end

depends_on arch: :x86_64 # dotnet does not support ARM
depends_on "dotnet"

def install
os = OS.mac? ? "osx" : OS.kernel_name.downcase
arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s

system "dotnet", "publish", "src/GitVersion.App/GitVersion.App.csproj",
"--configuration", "Release",
"--framework", "net#{Formula["dotnet"].version.major_minor}",
"--output", libexec,
"--runtime", "#{os}-x64",
"--runtime", "#{os}-#{arch}",
"--self-contained", "false",
"/p:PublishSingleFile=true"

Expand Down