@@ -2,8 +2,8 @@ class Mavsdk < Formula
22 desc "API and library for MAVLink compatible systems written in C++17"
33 homepage "https://mavsdk.mavlink.io/main/en/index.html"
44 url "https://github.com/mavlink/MAVSDK.git" ,
5- tag : "v3.11.1 " ,
6- revision : "52825795bc79a9c0b8fbf02d3a5e2df2f58a32c8 "
5+ tag : "v3.11.2 " ,
6+ revision : "a25fd153f92a7572c4bb6964bfcdbc7ba96e0892 "
77 license "BSD-3-Clause"
88
99 livecheck do
@@ -12,12 +12,12 @@ class Mavsdk < Formula
1212 end
1313
1414 bottle do
15- sha256 arm64_tahoe : "b22ac708d7d3ef2db91b220deb89285b9b6304646a89b1c03cbb4a4fec04dee2 "
16- sha256 arm64_sequoia : "eaacf2474285d160aa5a491e253cd3e30c43632e3ce66d48fe5e998d0c6d5e3d "
17- sha256 arm64_sonoma : "4ee746d3c9b5516567a264f653e96b3c47b79e945d0c3c8af36be12c50ce9e4d "
18- sha256 cellar : :any , sonoma : "21e0db9382386d84d83bce18320d94d270b4046f17eca2697ae15b593a1a05e1 "
19- sha256 arm64_linux : "68c710c51a1d293afd588f216759413cf23d0c0a050de05d799a5d25bc146d79 "
20- sha256 x86_64_linux : "ceb76adc0da30824592fc96ee5ed8a5fd8bcbe4d15cec1eb4a9328e157298637 "
15+ sha256 arm64_tahoe : "30b7b4238767d5941bd4f4353cea2dfd51a7db89c34e18d79c96dfbc5cba0d8d "
16+ sha256 arm64_sequoia : "e7c44e6102e43565a47696a98281eb363837acb2adacd5d1667c7497d8a4a0d6 "
17+ sha256 arm64_sonoma : "8ee910c8c16ce19f6cc53c2f32d354f0260d9217a9cf983ac08ba1aeb5876734 "
18+ sha256 cellar : :any , sonoma : "f87acf1a01a612d18c2e41d3cccba50321451ece27278387d7969d566bd31aa1 "
19+ sha256 arm64_linux : "3b8ab75d1ce97f6f04c14bec143152df9673d396448e163f660598e7d1765e18 "
20+ sha256 x86_64_linux : "70f4809b7eaaf5f238eeca8066f264a941b478e1fcd72071bfcc60c6da488533 "
2121 end
2222
2323 depends_on "cmake" => :build
@@ -48,6 +48,18 @@ class Mavsdk < Formula
4848 EOS
4949 end
5050
51+ # Git is required to fetch submodules
52+ resource "mavlink" do
53+ url "https://github.com/mavlink/mavlink.git" ,
54+ revision : "d6a7eeaf43319ce6da19a1973ca40180a4210643"
55+ version "d6a7eeaf43319ce6da19a1973ca40180a4210643"
56+
57+ livecheck do
58+ url "https://raw.githubusercontent.com/mavlink/MAVSDK/refs/tags/v#{ LATEST_VERSION } /third_party/CMakeLists.txt"
59+ regex ( /MAVLINK_HASH.*(\h {40})/i )
60+ end
61+ end
62+
5163 def install
5264 ENV . llvm_clang if OS . mac? && ( DevelopmentTools . clang_build_version <= 1100 )
5365
@@ -57,12 +69,21 @@ def install
5769 # Regenerate files to support newer protobuf
5870 system "tools/generate_from_protos.sh"
5971
72+ # `mavlink` repo and hash info moved to `third_party/CMakeLists.txt` only for SUPERBUILD,
73+ # so we have to manage the hash manually, but then it is better to keep it as a resource.
74+ ( buildpath /"third_party/mavlink" ) . install resource ( "mavlink" )
75+
6076 %w[ mavlink picosha2 libevents libmavlike ] . each do |dep |
6177 system "cmake" , "-S" , "third_party/#{ dep } " , "-B" , "build_#{ dep } " , *std_cmake_args ( install_prefix : libexec )
6278 system "cmake" , "--build" , "build_#{ dep } "
6379 system "cmake" , "--install" , "build_#{ dep } "
6480 end
6581
82+ # Install MAVLink message definitions manually
83+ messages_files = "{minimal,standard,common,ardupilotmega}.xml"
84+ messages_dir = Dir [ "#{ buildpath } /third_party/mavlink/message_definitions/v1.0/#{ messages_files } " ]
85+ ( libexec /"include/mavlink/message_definitions/v1.0" ) . install messages_dir
86+
6687 # Source build adapted from
6788 # https://mavsdk.mavlink.io/main/en/cpp/guide/build.html
6889 args = %W[
0 commit comments