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"
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)
15 depends_on arch: :x86_64
18 executable: "xc16-v#{version}-osx-installer.app/Contents/MacOS/installbuilder.sh",
20 "--mode", "unattended",
21 "--unattendedmodeui", "none",
23 "--netservername", '""',
24 "--LicenseType", "WorkstationMode",
25 "--prefix", staged_path.to_s
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"
46 set_ownership staged_path.to_s
50 executable: "Uninstall-xc16-v#{version}.app/Contents/MacOS/installbuilder.sh",
51 args: ["--mode", "unattended"],
55 # No zap stanza required