Skip to content

Commit 1bac7ca

Browse files
BrewTestBotdaeho-ro
authored andcommitted
mavsdk 3.11.2
1 parent 2450b3f commit 1bac7ca

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

Formula/m/mavsdk.rb

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -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

Comments
 (0)