SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,24 @@
abseil-cpp>=20230115.0 used by libphonenumber fails unless C++17 is used.
CMAKE_REQUIRED_FLAGS must not be passed globally as it effects all targets,
including C files.
Index: cmake/modules/FindPhonenumber.cmake
--- cmake/modules/FindPhonenumber.cmake.orig
+++ cmake/modules/FindPhonenumber.cmake
@@ -53,6 +53,7 @@ unset(optupper)
set(CMAKE_REQUIRED_DEFINITIONS ${PHONENUMBER_DEFINITIONS})
set(CMAKE_REQUIRED_INCLUDES ${PHONENUMBER_INCLUDE_DIRS})
+set(CMAKE_REQUIRED_FLAGS "-std=gnu++17")
foreach(lib boost_thread-mt boost_thread)
set(CMAKE_REQUIRED_LIBRARIES ${PHONENUMBER_LDFLAGS} -l${lib})
CHECK_CXX_SOURCE_COMPILES("#include <phonenumbers/phonenumberutil.h>
@@ -67,6 +68,7 @@ foreach(lib boost_thread-mt boost_thread)
break()
endif(phone_number_with_${lib})
endforeach(lib)
+unset(CMAKE_REQUIRED_FLAGS)
if(NOT ENABLE_PHONENUMBER)
message(FATAL_ERROR "libphonenumber cannot be used. Use -DWITH_PHONENUMBER=PATH to specify the library prefix, or -DWITH_PHONENUMBER=OFF to disable it.")