aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/functions-framework-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/functions-framework-cpp')
-rw-r--r--vcpkg/ports/functions-framework-cpp/fix-asio-error.patch13
-rw-r--r--vcpkg/ports/functions-framework-cpp/fix-integral-include.patch12
-rw-r--r--vcpkg/ports/functions-framework-cpp/portfile.cmake35
-rw-r--r--vcpkg/ports/functions-framework-cpp/vcpkg.json24
4 files changed, 84 insertions, 0 deletions
diff --git a/vcpkg/ports/functions-framework-cpp/fix-asio-error.patch b/vcpkg/ports/functions-framework-cpp/fix-asio-error.patch
new file mode 100644
index 0000000..a06218c
--- /dev/null
+++ b/vcpkg/ports/functions-framework-cpp/fix-asio-error.patch
@@ -0,0 +1,13 @@
+diff --git a/google/cloud/functions/internal/framework_impl.cc b/google/cloud/functions/internal/framework_impl.cc
+index 4a4a43d..33a7661 100644
+--- a/google/cloud/functions/internal/framework_impl.cc
++++ b/google/cloud/functions/internal/framework_impl.cc
+@@ -78,7 +78,7 @@ int RunForTestImpl(int argc, char const* const argv[],
+
+ asio::io_context ioc{1};
+ tcp::acceptor acceptor{ioc, {address, static_cast<std::uint16_t>(port)}};
+- acceptor.listen(boost::asio::socket_base::max_connections);
++ acceptor.listen(boost::asio::socket_base::max_listen_connections);
+ actual_port(acceptor.local_endpoint().port());
+
+ auto handler = FunctionImpl::GetImpl(function)->GetHandler(target);
diff --git a/vcpkg/ports/functions-framework-cpp/fix-integral-include.patch b/vcpkg/ports/functions-framework-cpp/fix-integral-include.patch
new file mode 100644
index 0000000..0635853
--- /dev/null
+++ b/vcpkg/ports/functions-framework-cpp/fix-integral-include.patch
@@ -0,0 +1,12 @@
+diff --git a/google/cloud/functions/internal/parse_options.cc b/google/cloud/functions/internal/parse_options.cc
+index ba3a2b5..54daf29 100644
+--- a/google/cloud/functions/internal/parse_options.cc
++++ b/google/cloud/functions/internal/parse_options.cc
+@@ -17,6 +17,7 @@
+ #include <iostream>
+ #include <limits>
+ #include <stdexcept>
++#include <cstdint>
+
+ namespace google::cloud::functions_internal {
+ FUNCTIONS_FRAMEWORK_CPP_INLINE_NAMESPACE_BEGIN
diff --git a/vcpkg/ports/functions-framework-cpp/portfile.cmake b/vcpkg/ports/functions-framework-cpp/portfile.cmake
new file mode 100644
index 0000000..8801311
--- /dev/null
+++ b/vcpkg/ports/functions-framework-cpp/portfile.cmake
@@ -0,0 +1,35 @@
+# TODO(coryan) - fix support for DLLs
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO GoogleCloudPlatform/functions-framework-cpp
+ REF "v${VERSION}"
+ SHA512 3832e205a2505152ed6955d7cf5630b2045133221ddd96e2bef62e66cad58cea326f32428e2f494bbe1a10f5d66453d09ae46e6b972a7ed13f211efbb79527a8
+ HEAD_REF main
+ PATCHES
+ fix-integral-include.patch
+ fix-asio-error.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DBUILD_TESTING=OFF
+)
+
+vcpkg_cmake_install(ADD_BIN_TO_PATH)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_cmake_config_fixup(PACKAGE_NAME functions_framework_cpp CONFIG_PATH lib/cmake/functions_framework_cpp)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(
+ INSTALL "${SOURCE_PATH}/LICENSE"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
+ RENAME copyright)
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/functions-framework-cpp/vcpkg.json b/vcpkg/ports/functions-framework-cpp/vcpkg.json
new file mode 100644
index 0000000..6472fd9
--- /dev/null
+++ b/vcpkg/ports/functions-framework-cpp/vcpkg.json
@@ -0,0 +1,24 @@
+{
+ "name": "functions-framework-cpp",
+ "version": "1.2.0",
+ "port-version": 1,
+ "description": "Functions Framework for C++.",
+ "homepage": "https://github.com/GoogleCloudPlatform/functions-framework-cpp/",
+ "license": "Apache-2.0",
+ "supports": "!uwp",
+ "dependencies": [
+ "abseil",
+ "boost-beast",
+ "boost-program-options",
+ "boost-serialization",
+ "nlohmann-json",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}