homebrew-core/Formula/gmt@4.rb
2018-04-20 08:41:23 -07:00

47 lines
1.9 KiB
Ruby

class GmtAT4 < Formula
desc "Manipulation of geographic and Cartesian data sets"
homepage "https://gmt.soest.hawaii.edu/"
url "ftp://ftp.soest.hawaii.edu/gmt/gmt-4.5.17-src.tar.bz2"
mirror "https://fossies.org/linux/misc/GMT/gmt-4.5.17-src.tar.bz2"
mirror "https://mirrors.ustc.edu.cn/gmt/gmt-4.5.17-src.tar.bz2"
sha256 "d69c4e2075f16fb7c153ba77429a7b60e45c44583ebefd7aae63ae05439d1d41"
revision 2
bottle do
sha256 "1881b5ae177fd5a46b998c2b3b91b3f19d9e1f6d3d118e069255d2bd425f3017" => :high_sierra
sha256 "d482672713a9cd06c8ea109d4df8ec4c08b315b6b5ddb4def68720773816c696" => :sierra
sha256 "a862422e9ee1e2b2347f28f19326a4e507021ad8ab58cdc718dcecd15ccf26de" => :el_capitan
end
keg_only :versioned_formula
depends_on "gdal"
depends_on "netcdf"
resource "gshhg" do
url "ftp://ftp.soest.hawaii.edu/gmt/gshhg-gmt-2.3.7.tar.gz"
mirror "https://fossies.org/linux/misc/GMT/gshhg-gmt-2.3.7.tar.gz"
mirror "https://mirrors.ustc.edu.cn/gmt/gshhg-gmt-2.3.7.tar.gz"
sha256 "9bb1a956fca0718c083bef842e625797535a00ce81f175df08b042c2a92cfe7f"
end
def install
ENV.deparallelize # Parallel builds don't work due to missing makefile dependencies
system "./configure", "--prefix=#{prefix}",
"--datadir=#{share}/gmt4",
"--enable-gdal=#{Formula["gdal"].opt_prefix}",
"--enable-netcdf=#{Formula["netcdf"].opt_prefix}",
"--enable-shared",
"--enable-triangle",
"--disable-xgrid",
"--disable-mex"
system "make"
system "make", "install-gmt", "install-data", "install-suppl", "install-man"
(share/"gmt4").install resource("gshhg")
end
test do
system "#{bin}/gmt pscoast -R-90/-70/0/20 -JM6i -P -Ba5 -Gchocolate > test.ps"
assert_predicate testpath/"test.ps", :exist?
end
end