From 5d35e5882352f2cd7f6e86748d35bfab3aeb7952 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 19 Dec 2023 13:36:20 +0100 Subject: [PATCH] x11/waybar: unbreak build with libc++ 17 In file included from ../src/modules/clock.cpp:1: In file included from ../include/modules/clock.hpp:4: In file included from ../include/util/date.hpp:29: /usr/local/include/date/tz.h:235:8: error: use of overloaded operator '<<' is ambiguous (with operand types 'basic_ostream>' and 'const sys_seconds' (aka 'const time_point>>')) PR: 275651 Reported by: pkg-fallout --- x11/waybar/Makefile | 21 +++++++++++++++++++++ x11/waybar/distinfo | 2 ++ 2 files changed, 23 insertions(+) diff --git a/x11/waybar/Makefile b/x11/waybar/Makefile index 1f2c0870595b..15a8dc8eee49 100644 --- a/x11/waybar/Makefile +++ b/x11/waybar/Makefile @@ -160,4 +160,25 @@ pre-test: ${TOUCH} ${WRKDIR}/.meson_build_tests; \ fi +# XXX https://github.com/HowardHinnant/date/issues/799 +.if ${CXX} == c++ && exists(/usr/include/c++/v1/__chrono/concepts.h) +BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core +CONFIGURE_ENV+= CC="${CC}" CXX="${CXX}" CPP="${CPP}" +CMAKE_BIN= ${LOCALBASE}/bin/cmake + +# XXX Move into separate port and standardize via USES +GH_TUPLE+= llvm:llvm-project:llvmorg-16.0.1:libcxx +CXXFLAGS+= -nostdinc++ -isystem${WRKDIR}/libcxx_prefix/include/c++/v1 +# Don't link against new libc++ as it's not necessary +#LDFLAGS+= -nostdlib++ -L${WRKDIR}/libcxx_prefix/lib -l:libc++.a -lcxxrt + +pre-configure: bundled-libcxx +bundled-libcxx: + @${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} \ + -DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH=${WRKDIR}/libcxx_prefix \ + -B ${WRKDIR}/libcxx_build -S ${WRKSRC_libcxx}/libcxx + @${DO_MAKE_BUILD:NDESTDIR*} install -C ${WRKDIR}/libcxx_build +.endif # exists(/usr/include/c++/v1/__chrono/concepts.h) + .include diff --git a/x11/waybar/distinfo b/x11/waybar/distinfo index c87c0942e262..2eef355233ac 100644 --- a/x11/waybar/distinfo +++ b/x11/waybar/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1699016827 SHA256 (Alexays-Waybar-0.9.24_GH0.tar.gz) = 57aa7860bc066ebf4f3327dafa9841100b098c0dec1dce4baaa1fae63e9b57ae SIZE (Alexays-Waybar-0.9.24_GH0.tar.gz) = 275416 +SHA256 (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = b5a9ff1793b1e2d388a3819bf35797002b1d2e40bb35a10c65605e0ea1435271 +SIZE (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = 179289803