1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-12 07:37:35 +00:00
Purism-Calls/build-aux/fix-libphonenumber-build.patch

56 lines
1.9 KiB
Diff
Raw Normal View History

From 5b34d5883d1c7fc9d306491a0823badcaf03bdda Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Fri, 8 Nov 2019 16:44:18 +0100
Subject: [PATCH] Remove java dep, and fix build issue in libphonenumber
Java is used only for generating the metadata which is already included
in the git repo. Related upstream MR: https://github.com/google/libphonenumber/pull/2363
---
cpp/CMakeLists.txt | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 38ce1f50..b5e2770b 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -130,9 +130,6 @@ endif ()
find_required_program (PROTOC protoc
"Google Protocol Buffers compiler (protoc)")
-find_required_program (JAVA java
- "Java Runtime Environment")
-
if (APPLE)
FIND_LIBRARY (COREFOUNDATION_LIB CoreFoundation)
FIND_LIBRARY (FOUNDATION_LIB Foundation)
@@ -268,13 +265,10 @@ function (add_metadata_gen_target TARGET_NAME
set (METADATA_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/phonenumbers")
set (GEN_OUTPUT "${METADATA_SOURCE_DIR}/${METADATA_TYPE}.cc"
"${METADATA_SOURCE_DIR}/${METADATA_HEADER}.h")
- set (JAR_PATH "${CMAKE_SOURCE_DIR}/../tools/java/cpp-build/target")
- set (JAR_PATH "${JAR_PATH}/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar")
-
add_custom_command (
- COMMAND ${JAVA_BIN} -jar
- ${JAR_PATH} BuildMetadataCppFromXml ${XML_FILE}
- ${CMAKE_SOURCE_DIR}/src/phonenumbers ${METADATA_TYPE}
+ COMMAND echo "skip metadata generation from"
+ ${XML_FILE} "to"
+ ${CMAKE_SOURCE_DIR}/src/phonenumbers ${METADATA_TYPE}
OUTPUT ${GEN_OUTPUT}
DEPENDS ${XML_FILE}
@@ -314,7 +308,7 @@ add_metadata_gen_target (
${TEST_METADATA_TARGET}
"${RESOURCES_DIR}/PhoneNumberMetadataForTesting.xml"
"test_metadata"
- "metadata"
+ "test_metadata"
)
list (APPEND TESTING_LIBRARY_SOURCES "src/phonenumbers/test_metadata.cc")
--
2.20.1