Skip to content

Commit c368401

Browse files
authored
Merge pull request #219968 from Homebrew/gmt-cmake4
gmt: backport fix for CMake 4
2 parents 1af2bfb + 262a66b commit c368401

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

Formula/g/gmt.rb

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
class Gmt < Formula
22
desc "Tools for manipulating and plotting geographic and Cartesian data"
33
homepage "https://www.generic-mapping-tools.org/"
4-
url "https://github.com/GenericMappingTools/gmt/releases/download/6.5.0/gmt-6.5.0-src.tar.xz"
5-
mirror "https://mirrors.ustc.edu.cn/gmt/gmt-6.5.0-src.tar.xz"
6-
sha256 "4022adb44033f9c1d5a4d275b69506449e4d486efe2218313f3ff7a6c6c3141e"
74
license "LGPL-3.0-or-later"
85
revision 4
96
head "https://github.com/GenericMappingTools/gmt.git", branch: "master"
107

8+
stable do
9+
url "https://github.com/GenericMappingTools/gmt/releases/download/6.5.0/gmt-6.5.0-src.tar.xz"
10+
mirror "https://mirrors.ustc.edu.cn/gmt/gmt-6.5.0-src.tar.xz"
11+
sha256 "4022adb44033f9c1d5a4d275b69506449e4d486efe2218313f3ff7a6c6c3141e"
12+
13+
# Backport update to minimum CMake version
14+
# https://github.com/GenericMappingTools/gmt/commit/e8d68a575c0427f66b82f28a63ba87cdbd91aca7
15+
patch :DATA
16+
end
17+
1118
bottle do
1219
sha256 arm64_sequoia: "1b462c2bcbc6e95ce082b68729b36d2b8949045918256d7031c49908e1a7c75f"
1320
sha256 arm64_sonoma: "1d3a2dafaff73abfd68a892b3ca938682e4e4dfbdc80084d47541cdb7207f122"
@@ -88,3 +95,16 @@ def caveats
8895
refute_predicate shell_output(cmd), :empty?
8996
end
9097
end
98+
99+
__END__
100+
--- a/CMakeLists.txt
101+
+++ b/CMakeLists.txt
102+
@@ -46,7 +46,7 @@ if (${srcdir} STREQUAL ${bindir})
103+
endif (${srcdir} STREQUAL ${bindir})
104+
105+
# Define minimum CMake version required
106+
-cmake_minimum_required (VERSION 2.8.12)
107+
+cmake_minimum_required (VERSION 3.16)
108+
message ("CMake version: ${CMAKE_VERSION}")
109+
110+
# Use NEW behavior with newer CMake releases

0 commit comments

Comments
 (0)