Fix crypto libs patching logic to accomodate multiply files (#2541)

Native library also changed from System.Security.Cryptography.Native.dylib
to System.Security.Cryptography.Native.OpenSsl.dylib

See discussion in #2510
This commit is contained in:
Sergei Vorobev
2016-11-02 14:25:46 -07:00
committed by Dongbo Wang
parent f4c1569421
commit 46ff660271
+3 -3
View File
@@ -242,8 +242,8 @@ function Start-PSBuild {
# This is the restored library used to build
# This is allowed to fail since the user may have already restored
Write-Warning ".NET Core links the incorrect OpenSSL, correcting NuGet package libraries..."
find $env:HOME/.nuget -name System.Security.Cryptography.Native.dylib | xargs sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib
find $env:HOME/.nuget -name System.Net.Http.Native.dylib | xargs sudo install_name_tool -change /usr/lib/libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib
find $env:HOME/.nuget -name System.Security.Cryptography.Native.OpenSsl.dylib | % { sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib $_ }
find $env:HOME/.nuget -name System.Net.Http.Native.dylib | % { sudo install_name_tool -change /usr/lib/libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib $_ }
}
}
@@ -885,7 +885,7 @@ function Install-Dotnet {
# This is the library shipped with .NET Core
# This is allowed to fail as the user may have installed other versions of dotnet
Write-Warning ".NET Core links the incorrect OpenSSL, correcting .NET CLI libraries..."
find $env:HOME/.dotnet -name System.Security.Cryptography.Native.dylib | xargs sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib
find $env:HOME/.dotnet -name System.Security.Cryptography.Native.dylib | % { sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib }
}
} elseif ($IsWindows) {
Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet