aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-12-19 12:36:20 +0000
committerJan Beich <jbeich@FreeBSD.org>2023-12-19 13:22:47 +0000
commit5d35e5882352f2cd7f6e86748d35bfab3aeb7952 (patch)
tree087149fe099776624d49e99bcebc29535562684a
parent6d2357bf5fa4901e32cb73e6a974fd426bd5c439 (diff)
downloadports-5d35e5882352f2cd7f6e86748d35bfab3aeb7952.tar.gz
ports-5d35e5882352f2cd7f6e86748d35bfab3aeb7952.zip
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<char, char_traits<char>>' and 'const sys_seconds' (aka 'const time_point<std::chrono::system_clock, std::chrono::duration<long long, std::ratio<1, 1>>>')) PR: 275651 Reported by: pkg-fallout
-rw-r--r--x11/waybar/Makefile21
-rw-r--r--x11/waybar/distinfo2
2 files changed, 23 insertions, 0 deletions
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 <bsd.port.mk>
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