From 0454a541d7069ff76124a3a8ed6440830d24f985 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Thu, 31 Oct 2024 12:34:54 -0700 Subject: [PATCH] cad/librepcb: Unbreak on 15 --- cad/librepcb/Makefile | 2 -- .../files/patch-libs_optional_tl_optional.hpp | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 cad/librepcb/files/patch-libs_optional_tl_optional.hpp diff --git a/cad/librepcb/Makefile b/cad/librepcb/Makefile index 61848df352d4..59d3cb64c5c2 100644 --- a/cad/librepcb/Makefile +++ b/cad/librepcb/Makefile @@ -13,8 +13,6 @@ WWW= https://librepcb.org/ \ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt -BROKEN_FreeBSD_15= compilation error: no member named 'construct' in 'optional', see https://github.com/LibrePCB/LibrePCB/issues/1454 - LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg4 \ libfontconfig.so:x11-fonts/fontconfig \ libfreeimage.so:graphics/freeimage \ diff --git a/cad/librepcb/files/patch-libs_optional_tl_optional.hpp b/cad/librepcb/files/patch-libs_optional_tl_optional.hpp new file mode 100644 index 000000000000..96d0ce2baa5b --- /dev/null +++ b/cad/librepcb/files/patch-libs_optional_tl_optional.hpp @@ -0,0 +1,22 @@ +- workaround for https://github.com/LibrePCB/LibrePCB/issues/1454 + +--- libs/optional/tl/optional.hpp.orig 2024-10-31 19:31:32 UTC ++++ libs/optional/tl/optional.hpp +@@ -1979,17 +1979,6 @@ template class optional { (public) + return *this; + } + +- /// Constructs the value in-place, destroying the current one if there is +- /// one. +- template T &emplace(Args &&... args) noexcept { +- static_assert(std::is_constructible::value, +- "T must be constructible with Args"); +- +- *this = nullopt; +- this->construct(std::forward(args)...); +- return value(); +- } +- + void swap(optional &rhs) noexcept { std::swap(m_value, rhs.m_value); } + + /// Returns a pointer to the stored value