Merge pull request #198803 from Homebrew/bump-wizcli-0.69.0
[Homebrew/homebrew-cask.git] / Casks / n / ncar-ncl.rb
blobc68d2f9dafdca876666f52d4f0d4dd482d9fa381
1 cask "ncar-ncl" do
2   version "6.6.2"
4   on_high_sierra :or_older do
5     sha256 "4e937a6de4303a4928f0f42390d991b12a37659726d15b9da7e8072db74e1867"
7     url "https://www.earthsystemgrid.org/api/v1/dataset/ncl.#{version.no_dots}.dap/file/ncl_ncarg-#{version}-MacOS_10.13_64bit_gnu710.tar.gz",
8         verified: "earthsystemgrid.org/api/v1/dataset/"
9   end
10   on_mojave :or_newer do
11     sha256 "e2cd644f6b1bb41f55480b8818319e60c450998e31e5e489c69a5e84f3d1f359"
13     url "https://www.earthsystemgrid.org/api/v1/dataset/ncl.#{version.no_dots}.dap/file/ncl_ncarg-#{version}-MacOS_10.14_64bit_gnu730.tar.gz",
14         verified: "earthsystemgrid.org/api/v1/dataset/"
15   end
17   name "NCAR Command Language"
18   name "ncl"
19   desc "Interpreted language for scientific data analysis and visualization"
20   homepage "https://www.ncl.ucar.edu/"
22   livecheck do
23     url :homepage
24     regex(/>Current\s*Version.*?v?(\d+(?:\.\d+)+)\s*?</i)
25   end
27   depends_on cask: "xquartz"
28   depends_on formula: "gcc"
29   depends_on macos: ">= :high_sierra"
31   artifact "include", target: "#{HOMEBREW_PREFIX}/ncl-#{version}/include"
32   artifact "bin", target: "#{HOMEBREW_PREFIX}/ncl-#{version}/bin"
33   artifact "lib", target: "#{HOMEBREW_PREFIX}/ncl-#{version}/lib"
35   preflight do
36     system_command "/bin/mkdir", args: ["-p", "#{HOMEBREW_PREFIX}/ncl-#{version}"], sudo: true
37   end
39   uninstall delete: "#{HOMEBREW_PREFIX}/ncl-#{version}"
41   caveats <<~EOS
42     To use ncar-ncl, you must add the ${NCARG_ROOT}/bin directory
43     to your PATH environment variable.
45     For bash shell, add these lines to ~/.bash_profile:
47       export NCARG_ROOT="#{HOMEBREW_PREFIX}/ncl-#{version}"
48       export PATH="${NCARG_ROOT}/bin:${PATH}"
50     You may also need to modify your DYLD_FALLBACK_LIBRARY_PATH
51     environment variable:
53     export DYLD_FALLBACK_LIBRARY_PATH=$(dirname $(gfortran --print-file-name libgfortran.3.dylib)):$DYLD_FALLBACK_LIBRARY_PATH
55     For other information, please see:
56     https://www.ncl.ucar.edu/Download/macosx.shtml
57   EOS
58 end