pulseview has been hardcoding C++11 for a while. This no longer works
with the parts of newer boost they use which started using C++14
features. Letting the compiler use its default dialect should be fine
nowadays as g++ 8 uses C++14 and clang 16 uses C++17.

This is also what FreeBSD is doing.

Index: Makefile
===================================================================
RCS file: /cvs/ports/comms/sigrok/pulseview/Makefile,v
diff -u -p -r1.9 Makefile
--- Makefile    24 Apr 2023 11:40:36 -0000      1.9
+++ Makefile    19 Apr 2025 15:33:08 -0000
@@ -1,8 +1,10 @@
 COMMENT =              graphical frontend for sigrok logic analyzer
-REVISION =             0
+REVISION =             1
 
 SIGROK_PROJECT =       pulseview
 SIGROK_VERSION =       0.4.2
+
+FIX_EXTRACT_PERMISSIONS = yes
 
 WANTLIB += ${COMPILER_LIBCXX}
 WANTLIB += Qt5Core Qt5Gui Qt5Svg Qt5Widgets boost_filesystem-mt
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt        19 Apr 2025 15:40:35 -0000
@@ -0,0 +1,22 @@
+Fix build with boost 1.87 whose math/tools/type_traits.hpp use
+C++ constructs such as is_null_pointer
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -146,7 +146,6 @@ function(check_working_cxx_atomics varname additional_
+   include(CheckCXXSourceCompiles)
+   include(CMakePushCheckState)
+   cmake_push_check_state()
+-  set(CMAKE_REQUIRED_FLAGS "-std=c++11")
+   set(CMAKE_REQUIRED_LIBRARIES "${additional_lib}")
+   set(CMAKE_REQUIRED_QUIET 1)
+   CHECK_CXX_SOURCE_COMPILES("
+@@ -445,7 +444,6 @@ qt5_add_resources(pulseview_RESOURCES_RCC ${CMAKE_BINA
+ add_definitions(-DQT_NO_KEYWORDS)
+ add_definitions(-D__STDC_LIMIT_MACROS)
+ add_definitions(-Wall -Wextra)
+-add_definitions(-std=c++11)
+ add_definitions(-DBOOST_MATH_DISABLE_FLOAT128=1)
+ 
+ if(ENABLE_FLOW)

Reply via email to