Monday, August 09, 2021

[sparc64/base-gcc] Fix build of productivity/libphonenumber

A new -Werror popped up in an update of libphonenumber which breaks the
build on sparc64.

This patch fixes it.

ok?

--Kurt

Index: patches/patch-cpp_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/productivity/libphonenumber/patches/patch-cpp_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-cpp_CMakeLists_txt
--- patches/patch-cpp_CMakeLists_txt 23 May 2021 14:26:04 -0000 1.1.1.1
+++ patches/patch-cpp_CMakeLists_txt 9 Aug 2021 14:49:38 -0000
@@ -4,6 +4,8 @@ CMake Error:
ninja: error: build.ninja:1485: multiple rules generate ...
phonenumbers/metadata.h [-w dupbuild=err]

+Also Eliminate -Werror to fix sparc64 build
+
Index: cpp/CMakeLists.txt
--- cpp/CMakeLists.txt.orig
+++ cpp/CMakeLists.txt
@@ -16,3 +18,12 @@ Index: cpp/CMakeLists.txt
)
list (APPEND TESTING_LIBRARY_SOURCES "src/phonenumbers/test_metadata.cc")

+@@ -381,7 +381,7 @@ if (${USE_ICU_REGEXP} STREQUAL "ON")
+ endif ()
+
+ if (NOT WIN32)
+- add_definitions ("-Wall -Werror")
++ add_definitions ("-Wall")
+ endif ()
+
+ include_directories ("src")
Index: patches/patch-tools_cpp_CMakeLists_txt
===================================================================
RCS file: patches/patch-tools_cpp_CMakeLists_txt
diff -N patches/patch-tools_cpp_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-tools_cpp_CMakeLists_txt 9 Aug 2021 14:49:38 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Strip -Werror to fix sparc64 build
+
+Index: tools/cpp/CMakeLists.txt
+--- tools/cpp/CMakeLists.txt.orig
++++ tools/cpp/CMakeLists.txt
+@@ -32,7 +32,7 @@ set (
+ )
+
+ if (NOT WIN32)
+- add_definitions ("-Wall -Werror")
++ add_definitions ("-Wall")
+ endif ()
+
+ include_directories ("src")

No comments:

Post a Comment