Merge pull request #194004 from Homebrew/bump-binance-1.54.4
[Homebrew/homebrew-cask.git] / Casks / m / mplab-xc16.rb
blobfc49aee688607fd3e3a195c64797aa9b9ad0dd2c
1 cask "mplab-xc16" do
2   version "2.10"
3   sha256 "db0ac553fbe9a6e903113cafff1f343a692728aa839c28a7bff36a9b6a12de55"
5   url "https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/xc16-v#{version}-full-install-osx64-installer.dmg"
6   name "MPLab XC16 Compiler"
7   desc "Compiler for 16-bit PIC and SAM MCUs and MPUs"
8   homepage "https://www.microchip.com/mplab/compilers"
10   livecheck do
11     url "https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers/xc16"
12     regex(%r{href=.*?ProductDocuments/SoftwareTools/xc16[._-]v?(\d+(?:\.\d+)+)-full-install-osx64-installer\.dmg}i)
13   end
15   depends_on arch: :x86_64
17   installer script: {
18     executable: "xc16-v#{version}-osx-installer.app/Contents/MacOS/installbuilder.sh",
19     args:       [
20       "--mode", "unattended",
21       "--unattendedmodeui", "none",
22       "--ModifyAll", "0",
23       "--netservername", '""',
24       "--LicenseType", "WorkstationMode",
25       "--prefix", staged_path.to_s
26     ],
27     input:      ["y"],
28     sudo:       true,
29   }
30   binary "#{staged_path}/bin/xc16-ar"
31   binary "#{staged_path}/bin/xc16-as"
32   binary "#{staged_path}/bin/xc16-bin2hex"
33   binary "#{staged_path}/bin/xc16-cc1"
34   binary "#{staged_path}/bin/xc16-gcc"
35   binary "#{staged_path}/bin/xc16-ld"
36   binary "#{staged_path}/bin/xc16-nm"
37   binary "#{staged_path}/bin/xc16-objcopy"
38   binary "#{staged_path}/bin/xc16-objdump"
39   binary "#{staged_path}/bin/xc16-pa"
40   binary "#{staged_path}/bin/xc16-ranlib"
41   binary "#{staged_path}/bin/xc16-readelf"
42   binary "#{staged_path}/bin/xc16-strings"
43   binary "#{staged_path}/bin/xc16-strip"
45   postflight do
46     set_ownership staged_path.to_s
47   end
49   uninstall script: {
50     executable: "Uninstall-xc16-v#{version}.app/Contents/MacOS/installbuilder.sh",
51     args:       ["--mode", "unattended"],
52     sudo:       true,
53   }
55   # No zap stanza required
56 end