From 075dd9fbb4028fe72c47d6fd72bb9ab380a3b6b0 Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Tue, 26 Nov 2019 17:23:39 -0500 Subject: [PATCH] [google-cloud-cpp-spanner] Add new port (#9096) * [google-cloud-cpp-spanner] New port A client library for Google's Cloud Spanner. * Fix package version. --- ports/google-cloud-cpp-spanner/CONTROL | 5 +++ ports/google-cloud-cpp-spanner/portfile.cmake | 31 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 ports/google-cloud-cpp-spanner/CONTROL create mode 100644 ports/google-cloud-cpp-spanner/portfile.cmake diff --git a/ports/google-cloud-cpp-spanner/CONTROL b/ports/google-cloud-cpp-spanner/CONTROL new file mode 100644 index 00000000000000..40f35fbb88b809 --- /dev/null +++ b/ports/google-cloud-cpp-spanner/CONTROL @@ -0,0 +1,5 @@ +Source: google-cloud-cpp-spanner +Version: 0.3.0 +Build-Depends: grpc, curl[ssl], crc32c, googleapis, google-cloud-cpp-common +Description: C++ Client Library for Google Cloud Spanner. +Homepage: https://github.com/googleapis/google-cloud-cpp-spanner diff --git a/ports/google-cloud-cpp-spanner/portfile.cmake b/ports/google-cloud-cpp-spanner/portfile.cmake new file mode 100644 index 00000000000000..12f4e3ce8cf6cf --- /dev/null +++ b/ports/google-cloud-cpp-spanner/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO googleapis/google-cloud-cpp-spanner + REF v0.3.0 + SHA512 8148a78b83770d38d4ad9ce3c4e7229920b731c2150214bdd0e89a94d1d0d618322f36cb7e8cd0cb0281ee3dae328b87cac5ccd25cb36bef5762cc5c93921616 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/google-cloud-cpp-spanner RENAME copyright) + +vcpkg_copy_pdbs()