69 lines
2.5 KiB
Ruby
69 lines
2.5 KiB
Ruby
class Gmt < Formula
|
|
desc "Tools for processing and displaying xy and xyz datasets"
|
|
homepage "https://gmt.soest.hawaii.edu/"
|
|
url "ftp://ftp.soest.hawaii.edu/gmt/gmt-5.4.5-src.tar.gz"
|
|
mirror "https://mirrors.ustc.edu.cn/gmt/gmt-5.4.5-src.tar.xz"
|
|
mirror "https://fossies.org/linux/misc/GMT/gmt-5.4.5-src.tar.xz"
|
|
sha256 "225629c7869e204d5f9f1a384c4ada43e243f83e1ed28bdca4f7c2896bf39ef6"
|
|
revision 5
|
|
|
|
bottle do
|
|
sha256 "868d98dc2e20a1cff4fde9fefa4875c1fc521a00a98e160d42a710941de9d1e3" => :catalina
|
|
sha256 "99e92bb21df067317f94b494ae24b6b847d657cd37955694e1a7933dfd5361c4" => :mojave
|
|
sha256 "6c86abd905154e30481eb65755c58ac3533cf82aacfe01484eb43a1351d3c5a4" => :high_sierra
|
|
sha256 "f6a4c9643a16ae3bae398371f34c684f25d03bfba36c21ad312fb7446b4c83d1" => :sierra
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "fftw"
|
|
depends_on "gdal"
|
|
depends_on "netcdf"
|
|
depends_on "pcre"
|
|
|
|
resource "gshhg" do
|
|
url "ftp://ftp.soest.hawaii.edu/gmt/gshhg-gmt-2.3.7.tar.gz"
|
|
mirror "https://mirrors.ustc.edu.cn/gmt/gshhg-gmt-2.3.7.tar.gz"
|
|
mirror "https://fossies.org/linux/misc/GMT/gshhg-gmt-2.3.7.tar.gz"
|
|
sha256 "9bb1a956fca0718c083bef842e625797535a00ce81f175df08b042c2a92cfe7f"
|
|
end
|
|
|
|
resource "dcw" do
|
|
url "ftp://ftp.soest.hawaii.edu/gmt/dcw-gmt-1.1.4.tar.gz"
|
|
mirror "https://mirrors.ustc.edu.cn/gmt/dcw-gmt-1.1.4.tar.gz"
|
|
mirror "https://fossies.org/linux/misc/GMT/dcw-gmt-1.1.4.tar.gz"
|
|
sha256 "8d47402abcd7f54a0f711365cd022e4eaea7da324edac83611ca035ea443aad3"
|
|
end
|
|
|
|
def install
|
|
(buildpath/"gshhg").install resource("gshhg")
|
|
(buildpath/"dcw").install resource("dcw")
|
|
|
|
args = std_cmake_args.concat %W[
|
|
-DCMAKE_INSTALL_PREFIX=#{prefix}
|
|
-DGMT_DOCDIR=#{share}/doc/gmt
|
|
-DGMT_MANDIR=#{man}
|
|
-DGSHHG_ROOT=#{buildpath}/gshhg
|
|
-DCOPY_GSHHG:BOOL=TRUE
|
|
-DDCW_ROOT=#{buildpath}/dcw
|
|
-DCOPY_DCW:BOOL=TRUE
|
|
-DFFTW3_ROOT=#{Formula["fftw"].opt_prefix}
|
|
-DGDAL_ROOT=#{Formula["gdal"].opt_prefix}
|
|
-DNETCDF_ROOT=#{Formula["netcdf"].opt_prefix}
|
|
-DPCRE_ROOT=#{Formula["pcre"].opt_prefix}
|
|
-DFLOCK:BOOL=TRUE
|
|
-DGMT_INSTALL_MODULE_LINKS:BOOL=TRUE
|
|
-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES:BOOL=FALSE
|
|
-DLICENSE_RESTRICTED:BOOL=FALSE
|
|
]
|
|
|
|
mkdir "build" do
|
|
system "cmake", "..", *args
|
|
system "make", "install"
|
|
end
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/pscoast -R0/360/-70/70 -Jm1.2e-2i -Ba60f30/a30f15 -Dc -G240 -W1/0 -P > test.ps"
|
|
assert_predicate testpath/"test.ps", :exist?
|
|
end
|
|
end
|