From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 66CED138334 for ; Fri, 7 Sep 2018 18:03:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7CDF5E053C; Fri, 7 Sep 2018 18:03:34 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3C673E053C for ; Fri, 7 Sep 2018 18:03:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EA80A335CCB for ; Fri, 7 Sep 2018 18:03:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ED0863BC for ; Fri, 7 Sep 2018 18:03:29 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1536343338.7fc4eccc4345963c8e8bd5bd1e12988f31e2fc96.perfinion@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/google-cloud-cpp/files/, net-libs/google-cloud-cpp/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/google-cloud-cpp/Manifest net-libs/google-cloud-cpp/files/0001-cmake-Fix-GOOGLE_CLOUD_CPP_GRPC_PROVIDER-pkg-config.patch net-libs/google-cloud-cpp/files/0002-cmake-fix-library-issues.patch net-libs/google-cloud-cpp/google-cloud-cpp-0.2.0.ebuild net-libs/google-cloud-cpp/metadata.xml X-VCS-Directories: net-libs/google-cloud-cpp/ net-libs/google-cloud-cpp/files/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 7fc4eccc4345963c8e8bd5bd1e12988f31e2fc96 X-VCS-Branch: master Date: Fri, 7 Sep 2018 18:03:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5d309d2c-c6e4-482d-89a9-313ca8363dbc X-Archives-Hash: df40b36eda1190686a1f93e6a388ae8c commit: 7fc4eccc4345963c8e8bd5bd1e12988f31e2fc96 Author: Jason Zaman gentoo org> AuthorDate: Fri Sep 7 18:02:02 2018 +0000 Commit: Jason Zaman gentoo org> CommitDate: Fri Sep 7 18:02:18 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fc4eccc net-libs/google-cloud-cpp: new package ebuild by me Package-Manager: Portage-2.3.40, Repoman-2.3.9 net-libs/google-cloud-cpp/Manifest | 3 + ...GOOGLE_CLOUD_CPP_GRPC_PROVIDER-pkg-config.patch | 33 ++++ .../files/0002-cmake-fix-library-issues.patch | 180 +++++++++++++++++++++ .../google-cloud-cpp/google-cloud-cpp-0.2.0.ebuild | 60 +++++++ net-libs/google-cloud-cpp/metadata.xml | 11 ++ 5 files changed, 287 insertions(+) diff --git a/net-libs/google-cloud-cpp/Manifest b/net-libs/google-cloud-cpp/Manifest new file mode 100644 index 00000000000..410732fa271 --- /dev/null +++ b/net-libs/google-cloud-cpp/Manifest @@ -0,0 +1,3 @@ +DIST google-cloud-cpp-0.2.0.tar.gz 687020 BLAKE2B 45c09c7cb5b9cc93c87e6d1faedf04f29ae81196dda95660abeadeaaf522376b4e50fd42489476c081e8de7336202d3883ab276c0e2334f1ad1b0e4e1f90fdb8 SHA512 ded3b564ef264a8bff4d81b08f2a97462e063127bf75a006bc7b18d18cfaee2f3cbe5957fe2c56cec06da5a7765854444fad8cd5045579c416c5f3de8462382e +DIST googleapis-79ab27f3b70ebc221e265d2e8ab30a8cc2d21fa2.tar.gz 874997 BLAKE2B c837323124d26364c83dba72d4f73f3147ad117468b271e8d9502991c1f9a7b20d4f5405351147b65e99c57d207a2b8c1471228d2060ad238ade5159be1b009e SHA512 774e56fc30a4daf2e88d8d3b6747c1ac369d016e9d52527565b88d93252a22597339c17e612304f8823867da4b6df4b58a42dc9d4d480fc59962ee5314a85ab8 +DIST nlohmann-json-3.1.2-json.hpp 595822 BLAKE2B 510278344a510a516606f84aea53c682a64a7d1f4703e41503a1688e7c62ab1df8f197a697bd1149e958d21ab986d1b42cb78db6261b07239d9587756813acf5 SHA512 05df0ad3338f0bca885c0aa9da523922b99016986a9b01426b13888c0febd83bf1f6f063886f6c75f8a656ef79abac6292fe442dc05b1897d546ba5b70be48a5 diff --git a/net-libs/google-cloud-cpp/files/0001-cmake-Fix-GOOGLE_CLOUD_CPP_GRPC_PROVIDER-pkg-config.patch b/net-libs/google-cloud-cpp/files/0001-cmake-Fix-GOOGLE_CLOUD_CPP_GRPC_PROVIDER-pkg-config.patch new file mode 100644 index 00000000000..d479a82b1e3 --- /dev/null +++ b/net-libs/google-cloud-cpp/files/0001-cmake-Fix-GOOGLE_CLOUD_CPP_GRPC_PROVIDER-pkg-config.patch @@ -0,0 +1,33 @@ +From eb0155e90498a5d7341490b9ed123f7638bffe44 Mon Sep 17 00:00:00 2001 +From: Jason Zaman +Date: Fri, 7 Sep 2018 21:19:11 +0800 +Subject: [PATCH 1/2] cmake: Fix GOOGLE_CLOUD_CPP_GRPC_PROVIDER=pkg-config + +The grpc_cpp_plugin executable needs to be marked imported otherwise +cmake will try (and fail) to build it. +Also the location variable was typo'd. + +Signed-off-by: Jason Zaman +--- + cmake/IncludeGrpc.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/IncludeGrpc.cmake b/cmake/IncludeGrpc.cmake +index 14273cbb..929f984d 100644 +--- a/cmake/IncludeGrpc.cmake ++++ b/cmake/IncludeGrpc.cmake +@@ -231,9 +231,9 @@ elseif("${GOOGLE_CLOUD_CPP_GRPC_PROVIDER}" STREQUAL "pkg-config") + ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release + ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug) + mark_as_advanced(PROTOC_GRPCPP_PLUGIN_EXECUTABLE) +- add_executable(grpc_cpp_plugin ${PROTOC_GRPC_PLUGIN_EXECUTABLE}) ++ add_executable(grpc_cpp_plugin IMPORTED) + set_property(TARGET grpc_cpp_plugin + PROPERTY IMPORTED_LOCATION +- ${PROTOC_GRPCPP_CPP_PLUGIN_EXECUTABLE}) ++ ${PROTOC_GRPCPP_PLUGIN_EXECUTABLE}) + + endif () +-- +2.16.4 + diff --git a/net-libs/google-cloud-cpp/files/0002-cmake-fix-library-issues.patch b/net-libs/google-cloud-cpp/files/0002-cmake-fix-library-issues.patch new file mode 100644 index 00000000000..23a6d24d54d --- /dev/null +++ b/net-libs/google-cloud-cpp/files/0002-cmake-fix-library-issues.patch @@ -0,0 +1,180 @@ +From 9978d05d4418bf813b8a457a2e49d0fc8fc8b26b Mon Sep 17 00:00:00 2001 +From: Jason Zaman +Date: Fri, 7 Sep 2018 22:35:24 +0800 +Subject: [PATCH 2/2] cmake: fix library issues + +Set library soversions so CMake sets the symlinks and soversions +properly. +Install the cmake files in the correct dir. + +Signed-off-by: Jason Zaman +--- + google/cloud/CMakeLists.txt | 14 +++++++------- + google/cloud/bigtable/CMakeLists.txt | 11 ++++++++--- + google/cloud/firestore/CMakeLists.txt | 14 ++++++++------ + google/cloud/storage/CMakeLists.txt | 12 +++++++----- + 4 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/google/cloud/CMakeLists.txt b/google/cloud/CMakeLists.txt +index 4d777261..4e26290c 100644 +--- a/google/cloud/CMakeLists.txt ++++ b/google/cloud/CMakeLists.txt +@@ -99,6 +99,9 @@ target_include_directories(google_cloud_cpp_common + $) + target_compile_options(google_cloud_cpp_common + PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) ++set_target_properties(google_cloud_cpp_common PROPERTIES ++ VERSION ${GOOGLE_CLOUD_CPP_VERSION_MAJOR}.${GOOGLE_CLOUD_CPP_VERSION_MINOR}.${GOOGLE_CLOUD_CPP_VERSION_PATCH} ++ SOVERSION ${GOOGLE_CLOUD_CPP_VERSION_MAJOR}) + + include(CreateBazelConfig) + create_bazel_config(google_cloud_cpp_common) +@@ -150,7 +153,7 @@ endforeach () + + # Export the CMake targets to make it easy to create configuration files. + install(EXPORT google_cloud_cpp_common-targets +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common") ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") + + # Install the libraries and headers in the locations determined by + # GNUInstallDirs +@@ -186,12 +189,9 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common.pc" + configure_file("config.cmake.in" "google_cloud_cpp_common-config.cmake" @ONLY) + configure_file("${PROJECT_SOURCE_DIR}/google/cloud/config-version.cmake.in" + "google_cloud_cpp_common-config-version.cmake" @ONLY) +-install( +- FILES +- "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config-version.cmake" +- DESTINATION +- "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common") ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config-version.cmake" ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") + + add_subdirectory(bigtable) + add_subdirectory(firestore) +diff --git a/google/cloud/bigtable/CMakeLists.txt b/google/cloud/bigtable/CMakeLists.txt +index 8aaff05c..9bd3effd 100644 +--- a/google/cloud/bigtable/CMakeLists.txt ++++ b/google/cloud/bigtable/CMakeLists.txt +@@ -102,6 +102,9 @@ target_include_directories(bigtable_protos + $) + target_compile_options(bigtable_protos + PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) ++set_target_properties(bigtable_protos PROPERTIES ++ VERSION ${BIGTABLE_CLIENT_VERSION_MAJOR}.${BIGTABLE_CLIENT_VERSION_MINOR}.${BIGTABLE_CLIENT_VERSION_PATCH} ++ SOVERSION ${BIGTABLE_CLIENT_VERSION_MAJOR}) + add_library(bigtable::protos ALIAS bigtable_protos) + + # Enable unit tests +@@ -212,6 +215,9 @@ target_include_directories(bigtable_client + $) + target_compile_options(bigtable_client + PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) ++set_target_properties(bigtable_client PROPERTIES ++ VERSION ${BIGTABLE_CLIENT_VERSION_MAJOR}.${BIGTABLE_CLIENT_VERSION_MINOR}.${BIGTABLE_CLIENT_VERSION_PATCH} ++ SOVERSION ${BIGTABLE_CLIENT_VERSION_MAJOR}) + add_library(bigtable::client ALIAS bigtable_client) + + include(CreateBazelConfig) +@@ -369,7 +375,7 @@ if (NOT ${GOOGLE_CLOUD_CPP_GRPC_PROVIDER} STREQUAL "module") + + # Export the CMake targets to make it easy to create configuration files. + install(EXPORT bigtable-targets +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/bigtable_client") ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") + endif () + + install(TARGETS bigtable_client +@@ -407,5 +413,4 @@ configure_file("${PROJECT_SOURCE_DIR}/google/cloud/config-version.cmake.in" + "bigtable_client-config-version.cmake" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bigtable_client-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/bigtable_client-config-version.cmake" +- DESTINATION +- "${CMAKE_INSTALL_LIBDIR}/cmake/bigtable_client") ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") +diff --git a/google/cloud/firestore/CMakeLists.txt b/google/cloud/firestore/CMakeLists.txt +index 88c5ad6d..63d8add1 100644 +--- a/google/cloud/firestore/CMakeLists.txt ++++ b/google/cloud/firestore/CMakeLists.txt +@@ -62,6 +62,9 @@ target_include_directories(firestore_client + $) + target_compile_options(firestore_client + PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) ++set_target_properties(firestore_client PROPERTIES ++ VERSION ${FIRESTORE_CLIENT_VERSION_MAJOR}.${FIRESTORE_CLIENT_VERSION_MINOR}.${FIRESTORE_CLIENT_VERSION_PATCH} ++ SOVERSION ${FIRESTORE_CLIENT_VERSION_MAJOR}) + add_library(firestore::client ALIAS firestore_client) + + include(CreateBazelConfig) +@@ -104,7 +107,8 @@ install(TARGETS + + # The exports can only be installed if all the dependencies are installed. CMake + # needs to know where the submodules will be installed from, +-install(EXPORT firestore-targets DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake) ++install(EXPORT firestore-targets ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") + + install(TARGETS firestore_client + EXPORT firestore-targets +@@ -138,8 +142,6 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/firestore_client.pc" DESTINATION + configure_file("config.cmake.in" "firestore_client-config.cmake" @ONLY) + configure_file("${PROJECT_SOURCE_DIR}/google/cloud/config-version.cmake.in" + "firestore_client-config-version.cmake" @ONLY) +-install( +- FILES "${CMAKE_CURRENT_BINARY_DIR}/firestore_client-config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/firestore_client-config-version.cmake" +- DESTINATION +- ${CMAKE_INSTALL_DATAROOTDIR}/cmake) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/firestore_client-config.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/firestore_client-config-version.cmake" ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") +diff --git a/google/cloud/storage/CMakeLists.txt b/google/cloud/storage/CMakeLists.txt +index c8b641a0..c91bb17c 100644 +--- a/google/cloud/storage/CMakeLists.txt ++++ b/google/cloud/storage/CMakeLists.txt +@@ -216,6 +216,9 @@ target_include_directories(storage_client + $) + target_compile_options(storage_client + PUBLIC ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) ++set_target_properties(storage_client PROPERTIES ++ VERSION ${STORAGE_CLIENT_VERSION_MAJOR}.${STORAGE_CLIENT_VERSION_MINOR}.${STORAGE_CLIENT_VERSION_PATCH} ++ SOVERSION ${STORAGE_CLIENT_VERSION_MAJOR}) + + add_library(storage_client_testing + testing/canonical_errors.h +@@ -326,20 +329,20 @@ install(TARGETS storage_common_options nlohmann_json + + # Export the CMake targets to make it easy to create configuration files. + install(EXPORT storage-targets +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/storage_client") ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") + + install(TARGETS storage_client + EXPORT storage-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(DIRECTORY . DESTINATION include/storage/client ++install(DIRECTORY . DESTINATION include/google/cloud/storage/client + FILES_MATCHING + PATTERN "*.h" + PATTERN "testing/*" + EXCLUDE) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version_info.h DESTINATION +- include/storage/client) ++ include/google/cloud/storage/client) + + # Setup global variables used in the following *.in files. + set(GOOGLE_CLOUD_CPP_CONFIG_VERSION_MAJOR ${STORAGE_CLIENT_VERSION_MAJOR}) +@@ -362,5 +365,4 @@ configure_file("${PROJECT_SOURCE_DIR}/google/cloud/config-version.cmake.in" + "storage_client-config-version.cmake" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/storage_client-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/storage_client-config-version.cmake" +- DESTINATION +- "${CMAKE_INSTALL_LIBDIR}/cmake/storage_client") ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules") +-- +2.16.4 + diff --git a/net-libs/google-cloud-cpp/google-cloud-cpp-0.2.0.ebuild b/net-libs/google-cloud-cpp/google-cloud-cpp-0.2.0.ebuild new file mode 100644 index 00000000000..fc309dfdbc6 --- /dev/null +++ b/net-libs/google-cloud-cpp/google-cloud-cpp-0.2.0.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils + +JSON_VER="3.1.2" +GOOGLEAPIS_COMMIT="79ab27f3b70ebc221e265d2e8ab30a8cc2d21fa2" + +DESCRIPTION="Google Cloud Client Library for C++" +HOMEPAGE="https://cloud.google.com/" +SRC_URI="https://github.com/GoogleCloudPlatform/google-cloud-cpp/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/nlohmann/json/releases/download/v${JSON_VER}/json.hpp -> nlohmann-json-${JSON_VER}-json.hpp + https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_COMMIT}.tar.gz -> googleapis-${GOOGLEAPIS_COMMIT}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND="dev-libs/protobuf + net-misc/curl + net-libs/grpc" +RDEPEND="${DEPEND}" + +DOCS=( README.md ) +PATCHES=( + "${FILESDIR}/0001-cmake-Fix-GOOGLE_CLOUD_CPP_GRPC_PROVIDER-pkg-config.patch" + "${FILESDIR}/0002-cmake-fix-library-issues.patch" +) + +src_prepare() { + rm -rf "${S}/third_party/googleapis/" || die + mv "${WORKDIR}/googleapis-${GOOGLEAPIS_COMMIT}/" "${S}/third_party/googleapis/" || die + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DGOOGLE_CLOUD_CPP_GMOCK_PROVIDER=package + -DGOOGLE_CLOUD_CPP_GRPC_PROVIDER=pkg-config + -DBUILD_SHARED_LIBS=ON + ) + + cmake-utils_src_configure + + mkdir -p "${BUILD_DIR}/external/nlohmann_json/src/" || die + cp "${DISTDIR}/nlohmann-json-${JSON_VER}-json.hpp" "${BUILD_DIR}/external/nlohmann_json/src/json.hpp" || die +} + +src_test() { + # test fails + local myctestargs=( + -E internal_parse_rfc3339_test + ) + + cmake-utils_src_test +} diff --git a/net-libs/google-cloud-cpp/metadata.xml b/net-libs/google-cloud-cpp/metadata.xml new file mode 100644 index 00000000000..19a918bcc96 --- /dev/null +++ b/net-libs/google-cloud-cpp/metadata.xml @@ -0,0 +1,11 @@ + + + + + perfinion@gentoo.org + Jason Zaman + + + Google Cloud Client Library for C++ + +