Skip to content

Commit

Permalink
Merge pull request #172354 from Homebrew/migrate-mono-mdk
Browse files Browse the repository at this point in the history
mono-mdk-for-visual-studio: migrate from homebrew/cask-versions
  • Loading branch information
krehel authored Apr 28, 2024
2 parents cd2481c + 9b57874 commit 9d1ae13
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions Casks/m/mono-mdk-for-visual-studio.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
cask "mono-mdk-for-visual-studio" do
version "6.12.0.206"
sha256 "80b0dbfa59ba9ed76dbf1393998e6a2ed2d1ccc8f5850c7a46fbe31a2aea88d8"

url "https://download.mono-project.com/archive/#{version.major_minor_patch}/macos-10-universal/MonoFramework-MDK-#{version}.macos10.xamarin.universal.pkg"
name "Mono"
desc "Open source implementation of Microsoft's .NET Framework"
homepage "https://www.mono-project.com/"

# The stable version is that listed on the download page. See:
# https://github.com/Homebrew/homebrew-cask-versions/pull/12974
livecheck do
url "https://www.mono-project.com/download/preview/"
regex(/MonoFramework-MDK-(\d+(?:\.\d+)+).macos10.xamarin.universal\.pkg/i)
end

conflicts_with cask: "mono-mdk",
formula: "mono"

pkg "MonoFramework-MDK-#{version}.macos10.xamarin.universal.pkg"

uninstall pkgutil: "com.xamarin.mono-*",
delete: [
"/Library/Frameworks/Mono.framework/Versions/#{version.major_minor_patch}",
"/private/etc/paths.d/mono-commands",
],
rmdir: [
"/Library/Frameworks/Mono.framework",
"/Library/Frameworks/Mono.framework/Versions",
]

zap delete: "~/Library/Preferences/mono-sgen64.plist",
trash: [
"~/.mono",
"~/Library/Caches/com.xamarin.fontconfig",
]

caveats <<~EOS
This is a version specific for Visual Studio users. This cask should follow the specific Visual Studio channel/branch maintained by mono developers.
Installing #{token} removes mono and mono dependant formula binaries in
/usr/local/bin and adds #{token} to /private/etc/paths.d/
You may want to:
brew unlink {formula} && brew link {formula}
and/or remove /private/etc/paths.d/mono-commands
EOS
end

0 comments on commit 9d1ae13

Please sign in to comment.