diff --git a/misc/ola/Makefile b/misc/ola/Makefile index ae9c17a3d2c0..b62a7e2b874b 100644 --- a/misc/ola/Makefile +++ b/misc/ola/Makefile @@ -1,47 +1,44 @@ PORTNAME= ola DISTVERSION= 0.10.9 PORTREVISION= 10 CATEGORIES= misc MASTER_SITES= https://github.com/OpenLightingProject/ola/releases/download/${DISTVERSION}/ PATCH_SITES= https://github.com/OpenLightingProject/${PORTNAME}/commit/ PATCHFILES+= 321731ce73be4ea79adb2174591ce94695d3e85b.patch:-p1 PATCHFILES+= 4006f2129f0a6061d59fe5892a2a17c53699a31a.patch:-p1 MAINTAINER= yuri@FreeBSD.org COMMENT= Open Lighting Architecture: framework for lighting control information WWW= https://www.openlighting.org/ola/ \ https://github.com/OpenLightingProject/ola LICENSE= GPLv2+ -BROKEN_FreeBSD_14= Fails to build, error: implicit instantiation of undefined template 'std::char_traits' -BROKEN_FreeBSD_13= Fails to build, error: implicit instantiation of undefined template 'std::char_traits' - LIB_DEPENDS= libavahi-common.so:net/avahi-app \ libftdi1.so:devel/libftdi1 \ libmicrohttpd.so:www/libmicrohttpd \ libprotobuf.so:devel/protobuf3 \ libuuid.so:misc/libuuid TEST_DEPENDS= cppunit>0:devel/cppunit USES= bison gmake libtool localbase pkgconfig USE_LDCONFIG= yes LDFLAGS+= -lprotobuf # workaround for https://github.com/OpenLightingProject/ola/issues/1871 GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-unittests --disable-examples CONFIGURE_ARGS+= --disable-fatal-warnings # see https://github.com/OpenLightingProject/ola/issues/1962 TEST_TARGET= check INSTALL_TARGET= install-strip TESTING_UNSAFE= 1 test fails, see https://github.com/OpenLightingProject/ola/issues/1872 do-test: @cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ./configure ${CONFIGURE_ARGS} --enable-unittests && \ ${SETENV} ${MAKE_ENV} ${GMAKE} ${TEST_TARGET} .include diff --git a/misc/ola/files/patch-include_ola_io_ByteString.h b/misc/ola/files/patch-include_ola_io_ByteString.h new file mode 100644 index 000000000000..6f4a8690231a --- /dev/null +++ b/misc/ola/files/patch-include_ola_io_ByteString.h @@ -0,0 +1,41 @@ +- workaround for https://github.com/OpenLightingProject/ola/issues/1982 + +--- include/ola/io/ByteString.h.orig 2025-11-04 00:31:22.940654000 -0800 ++++ include/ola/io/ByteString.h 2025-11-04 00:31:40.486954000 -0800 +@@ -23,7 +23,36 @@ + + #include + #include ++#include + ++namespace std { ++ ++template<> ++struct char_traits { ++ typedef uint8_t char_type; ++ typedef int int_type; ++ typedef std::streamoff off_type; ++ typedef std::streampos pos_type; ++ typedef std::mbstate_t state_type; ++ ++ static void assign(char_type& r, const char_type& a) { r = a; } ++ static char_type* assign(char_type* p, size_t count, char_type a) { return static_cast(std::memset(p, a, count)); } ++ static bool eq(const char_type& a, const char_type& b) { return a == b; } ++ static bool lt(const char_type& a, const char_type& b) { return a < b; } ++ static char_type* move(char_type* dest, const char_type* src, size_t count) { return static_cast(std::memmove(dest, src, count)); } ++ static char_type* copy(char_type* dest, const char_type* src, size_t count) { return static_cast(std::memcpy(dest, src, count)); } ++ static int compare(const char_type* s1, const char_type* s2, size_t count) { return std::memcmp(s1, s2, count); } ++ static size_t length(const char_type* s) { return std::strlen(reinterpret_cast(s)); } ++ static const char_type* find(const char_type* p, size_t count, const char_type& ch) { return static_cast(std::memchr(p, ch, count)); } ++ static char_type to_char_type(const int_type& c) { return static_cast(c); } ++ static int_type to_int_type(const char_type& c) { return static_cast(c); } ++ static bool eq_int_type(const int_type& c1, const int_type& c2) { return c1 == c2; } ++ static int_type eof() { return static_cast(EOF); } ++ static int_type not_eof(const int_type& c) { return (c == eof()) ? 0 : c; } ++}; ++ ++} // namespace std ++ + namespace ola { + namespace io { +