homebrew-cask/Casks/dotnet.rb

37 lines
1.4 KiB
Ruby
Raw Normal View History

2016-06-29 01:48:04 +08:00
cask 'dotnet' do
2017-05-23 05:56:15 +08:00
version '1.1.2'
sha256 '6f7b90c38f90944c94312161561d6f9f4baaaaca4601c3d5ca3947402d4ff26c'
2016-06-29 01:48:04 +08:00
2017-05-23 05:56:15 +08:00
url "https://download.microsoft.com/download/D/0/2/D028801E-0802-43C8-9F9F-C7DB0A39B344/dotnet-osx-x64.#{version}.pkg"
2016-06-29 01:48:04 +08:00
name '.Net Core'
homepage 'https://www.microsoft.com/net/core#macos'
depends_on formula: 'openssl'
2017-03-09 09:17:20 +08:00
pkg "dotnet-osx-x64.#{version}.pkg"
2016-06-29 01:48:04 +08:00
# Patch .NET Core to use the latest version of OpenSSL installed via Homebrew.
# https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#openssl
postflight do
dotnet_core = "/usr/local/share/dotnet/shared/Microsoft.NETCore.App/#{version}"
system_command '/usr/bin/install_name_tool',
args: [
"#{dotnet_core}/System.Security.Cryptography.Native.OpenSsl.dylib",
'-add_rpath', "#{HOMEBREW_PREFIX}/opt/openssl/lib"
],
sudo: true
system_command '/usr/bin/install_name_tool',
args: [
"#{dotnet_core}/System.Net.Http.Native.dylib",
'-change', '/usr/lib/libcurl.4.dylib',
"#{HOMEBREW_PREFIX}/opt/curl/lib/libcurl.4.dylib"
],
sudo: true
end
2016-06-29 01:48:04 +08:00
uninstall pkgutil: 'com.microsoft.dotnet.*',
delete: '/etc/paths.d/dotnet'
zap delete: '~/.nuget'
2016-06-29 01:48:04 +08:00
end