Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions Formula/o/ola.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
include Language::Python::Virtualenv

desc "Open Lighting Architecture for lighting control information"
homepage "https://www.openlighting.org/ola/"
homepage "https://github.com/OpenLightingProject/ola"
license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"]
revision 5
revision 6

stable do
# TODO: Check if we can use unversioned `protobuf` at version bump
Expand Down Expand Up @@ -60,7 +60,7 @@
depends_on "libmicrohttpd"
depends_on "libusb"
depends_on "numpy"
depends_on "protobuf"
depends_on "protobuf@29"
depends_on "python@3.13"

uses_from_macos "bison" => :build
Expand All @@ -72,8 +72,8 @@
end

resource "protobuf" do
url "https://files.pythonhosted.org/packages/f7/d1/e0a911544ca9993e0f17ce6d3cc0932752356c1b0a834397f28e63479344/protobuf-5.29.3.tar.gz"
sha256 "5da0f41edaf117bde316404bad1a486cb4ededf8e4a54891296f648e8e076620"
url "https://files.pythonhosted.org/packages/43/29/d09e70352e4e88c9c7a198d5645d7277811448d76c23b00345670f7c8a38/protobuf-5.29.5.tar.gz"
sha256 "bc1463bafd4b0929216c35f437a8e28731a2b7fe3d98bb77a600efced5a15c84"
end

# Apply open PR to support Protobuf 22+ API
Expand All @@ -91,7 +91,7 @@
opt_libexec/Language::Python.site_packages(python3)
end

def install

Check failure on line 94 in Formula/o/ola.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

`brew install --verbose --formula --build-bottle ola` failed on macOS Sequoia (15) on Apple Silicon!

In file included from ./include/ola/Logging.h:47: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/ostream:177: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__ostream/basic_ostream.h:16: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__system_error/error_code.h:18: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__system_error/error_category.h:15: /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/string:821:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>' 821 | static_assert(is_same<_CharT, typename traits_type::char_type>::value, | ^ ./include/ola/rdm/RDMFrame.h:85:23: note: in instantiation of template class 'std::basic_string<unsigned char>' requested here 85 | ola::io::ByteString data; | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here 23 | struct _LIBCPP_TEMPLATE_VIS char_traits; | ^ In file included from examples/ola-rdm-discover.cpp:22: In file included from ./include/ola/Logging.h:47: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/ostream:177: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__ostream/basic_ostream.h:16: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__system_error/error_code.h:18: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__system_error/error_category.h:15: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/string:648: /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/string_view:300:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>' 300 | static_assert(is_same<_CharT, typename traits_type::char_type>::value, | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__type_traits/is_convertible.h:22:99: note: in instantiation of template class 'std::basic_string_view<unsigned char>' requested here 22 | struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant<bool, __is_convertible(_T1, _T2)> {}; | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/string:746:29: note: in instantiation of template class 'std::is_convertible<const std::basic_string<unsigned char> &, std::basic_string_view<unsigned char>>' requested here 746 | : public _BoolConstant< is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value && | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/string:1152:27: note: in instantiation of template class 'std::__can_be_converted_to_string_view<unsigned char, std::char_traits<unsigned char>, std::basic_string<unsigned char>>' requested here 1152 | __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/string:1155:93: note: while substituting prior template arguments into non-type template parameter [with _Tp = std::basic_string<unsigned char>] 1155 | _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1156 | : __r_(__default_init_tag(), __default_init_tag()) { | ~
# Workaround to build with newer Protobuf due to Abseil C++ standard
# Issue ref: https://github.com/OpenLightingProject/ola/issues/1879
inreplace "configure.ac", "-std=gnu++11", "-std=gnu++17"
Expand All @@ -105,6 +105,14 @@

# Skip flaky python tests. Remove when no longer running tests
inreplace "python/ola/Makefile.mk", /^test_scripts \+= \\$/, "skipped_test_scripts = \\"
# Skip flaky tests on macOS
if OS.mac?
# https://github.com/OpenLightingProject/ola/pull/1655#issuecomment-696756941
inreplace "common/network/Makefile.mk", %r{\bcommon/network/HealthCheckedConnectionTester }, "#\\0"
inreplace "plugins/usbpro/Makefile.mk", %r{\\\n\s*plugins/usbpro/WidgetDetectorThreadTester$}, ""
# TODO: SelectServerTester may need confirmation on sporadic failures.
inreplace "common/io/Makefile.mk", %r{\bcommon/io/SelectServerTester }, "#\\0"
end

venv = virtualenv_create(libexec, python3)
venv.pip_install resources
Expand All @@ -125,7 +133,11 @@
system "make"
# Run tests to check the workarounds applied haven't broken basic functionality.
# TODO: Remove and revert to `--disable-unittests` when workarounds can be dropped.
system "make", "check"
ENV.deparallelize do
system "make", "check"
ensure
logs.install buildpath/"test-suite.log" if (buildpath/"test-suite.log").exist?
end
system "make", "install"

rewrite_shebang python_shebang_rewrite_info(venv.root/"bin/python"), *bin.children
Expand Down
Loading