1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-21 20:50:31 -04:00
ports/devel/libphonenumber/files/patch-CMakeLists.txt
Adriaan de Groot 652e447482 devel/libphonenumber: update to 8.12.41, latest upstream
This update introduces new tools, which use abseil. The build
system tries to git-clone the abseil repo and build that.
Instead, use devel/abseil. However, devel/abseil is built as
C++17, so we need to patch the build to force C++17 on
libphonenumber as well (otherwise, abseil introduces pre-C++17
versions of string_view and link failures follow).

We set WRKSRC_SUBDIR, but the build system now *also*
goes off to ../tools/cpp (from that SUBDIR), so .. I suppose
we could drop the SUBDIR setting and instead try some other
way of invoking CMake for only the C++ parts. Rather than doing
that, keep SUBDIR, but that gives us a patch with path ../tools/
which deservers mention. Consider it mentioned.
2022-01-22 22:42:05 +01:00

19 lines
562 B
Text

--- CMakeLists.txt.orig 2022-01-21 23:54:09.004204000 +0100
+++ CMakeLists.txt 2022-01-22 17:06:23.060147000 +0100
@@ -18,7 +18,7 @@
# Pick the C++ standard to compile with.
# Abseil currently supports C++11, C++14, and C++17.
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project (libphonenumber)
@@ -101,6 +101,7 @@
endif ()
# Find all the required libraries and programs.
+find_package(absl REQUIRED)
if (${USE_BOOST} STREQUAL "ON")
add_definitions ("-DI18N_PHONENUMBERS_USE_BOOST")
if (WIN32)