mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 21:51:34 +02:00
88 lines
4.4 KiB
Diff
88 lines
4.4 KiB
Diff
From 1d18ad3bcbae9ff5e6eff434ee2729e9ff738709 Mon Sep 17 00:00:00 2001
|
|
PatchSource: https://github.com/dotnet/installer/pull/13410
|
|
From: Antoine Martin <dev@ayakael.net>
|
|
Date: Sun, 13 Mar 2022 23:28:21 +0000
|
|
Subject: [PATCH 1/1] musl-build-fix
|
|
|
|
Musl support for dotnet build
|
|
|
|
---
|
|
Directory.Build.props | 4 ++++
|
|
Directory.Build.targets | 7 +++++++
|
|
repos/aspnetcore.proj | 2 ++
|
|
repos/installer.proj | 3 ++-
|
|
src/redist/targets/GetRuntimeInformation.targets | 9 +++++++++
|
|
5 files changed, 24 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/Directory.Build.props b/Directory.Build.props
|
|
index fdc0999af..2c659c200 100644
|
|
--- a/Directory.Build.props
|
|
+++ b/Directory.Build.props
|
|
@@ -171,6 +171,9 @@
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
+ <OSPlatformIsMusl Condition="$(OSPlatformIsMuslCheck) == '0'">true</OSPlatformIsMusl>
|
|
+ <OSPlatformIsMusl Condition="$(OSPlatformIsMusl) == ''">true</OSPlatformIsMusl>
|
|
+
|
|
<TargetRid Condition="'$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
|
|
|
|
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('WINDOWS'))">Windows_NT</TargetOS>
|
|
@@ -183,6 +186,7 @@
|
|
<TargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</TargetRid>
|
|
<TargetRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</TargetRid>
|
|
<TargetRid Condition="'$(TargetOS)' == 'Linux'">linux-$(Platform)</TargetRid>
|
|
+ <TargetRid Condition="'$(TargetOS)' == 'Linux' AND '$(OSPlatformIsMusl)' == 'true'">linux-musl-$(Platform)</TargetRid>
|
|
<TargetRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(Platform)</TargetRid>
|
|
</PropertyGroup>
|
|
|
|
diff --git a/Directory.Build.targets b/Directory.Build.targets
|
|
index 02ff624bc..c7e3bd141 100644
|
|
--- a/Directory.Build.targets
|
|
+++ b/Directory.Build.targets
|
|
@@ -10,6 +10,13 @@
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
+ <Target Name="GetOSPlatformIsMuslCheck"
|
|
+ BeforeTargets="CollectPackageReferences">
|
|
+ <Exec IgnoreExitCode="true" Command="ldd --version 2>&1 | grep -q musl">
|
|
+ <Output TaskParameter="ExitCode" PropertyName="OSPlatformIsMuslCheck" />
|
|
+ </Exec>
|
|
+ </Target>
|
|
+
|
|
<Import Condition="'$(SkipArcadeSdkImport)' != 'true'" Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
|
|
|
</Project>
|
|
diff --git a/repos/aspnetcore.proj b/repos/aspnetcore.proj
|
|
index 480f3c713..04694770d 100644
|
|
--- a/repos/aspnetcore.proj
|
|
+++ b/repos/aspnetcore.proj
|
|
@@ -15,6 +15,8 @@
|
|
<!-- https://github.com/dotnet/sdk/pull/20136 has not flowed into our bootstrap SDK yet, which causes file-in-use issues in ASP.NET
|
|
due to an interaction with the RemoveSharedFrameworkDependencies task. disable package validation until this is fixed. -->
|
|
<BuildCommandArgs>$(BuildCommandArgs) /p:EnablePackageValidation=false</BuildCommandArgs>
|
|
+ <!-- below is temporary fix till https://github.com/dotnet/aspnetcore/issues/39822 is addressed -->
|
|
+ <BuildCommandArgs Condition="'$(OSPlatformIsMusl)' == 'true'">$(BuildCommandArgs) --os-name linux-musl</BuildCommandArgs>
|
|
<BuildCommand>$(ProjectDirectory)\eng\build$(ShellExtension) $(BuildCommandArgs)</BuildCommand>
|
|
|
|
<LogVerbosityOptOut>true</LogVerbosityOptOut>
|
|
diff --git a/repos/installer.proj b/repos/installer.proj
|
|
index 712d7cd14..587384128 100644
|
|
--- a/repos/installer.proj
|
|
+++ b/repos/installer.proj
|
|
@@ -25,7 +25,8 @@
|
|
<BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:Rid=$(TargetRid)</BuildCommandArgs>
|
|
<BuildCommandArgs>$(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir)</BuildCommandArgs>
|
|
|
|
- <BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:AspNetCoreSharedFxInstallerRid=linux-$(Platform)</BuildCommandArgs>
|
|
+ <BuildCommandArgs Condition="'$(TargetOS)' == 'Linux' AND '$(OSPlatformIsMusl)' == 'false'">$(BuildCommandArgs) /p:AspNetCoreSharedFxInstallerRid=linux-$(Platform)</BuildCommandArgs>
|
|
+ <BuildCommandArgs Condition="'$(TargetOS)' == 'Linux' AND '$(OSPlatformIsMusl)' == 'true'">$(BuildCommandArgs) /p:AspNetCoreSharedFxInstallerRid=linux-musl-$(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>
|
|
|
|
--
|
|
2.34.1
|
|
|