Skip to content

Commit

Permalink
gmt@4: migrate from homebrew/science
Browse files Browse the repository at this point in the history
  • Loading branch information
fxcoudert committed Aug 19, 2017
1 parent af633f7 commit e076963
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Formula/gmt@4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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.16-src.tar.bz2"
mirror "ftp://ftp.star.nesdis.noaa.gov/pub/sod/lsa/gmt/gmt-4.5.16-src.tar.bz2"
sha256 "4ef6a55605821c3569279a7088586dfdcf1e779dd01b4c957db096cc60fe959d"

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 "ftp://ftp.star.nesdis.noaa.gov/pub/sod/lsa/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 File.exist?("test.ps")
end
end
1 change: 1 addition & 0 deletions formula_renames.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"glfw2": "glfw@2",
"glfw3": "glfw",
"gmp4": "gmp@4",
"gmt4": "gmt@4",
"gnupg2": "gnupg",
"gnuplot4": "gnuplot@4",
"go-app-engine-32": "app-engine-go-32",
Expand Down

0 comments on commit e076963

Please sign in to comment.