aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcuroky <cccuroky@gmail.com>2020-09-28 09:55:52 +0800
committerGitHub <noreply@github.com>2020-09-27 18:55:52 -0700
commit10d005d01423466de3b2994fd371a9f86ab46edc (patch)
treeb7f9f4a41cee24bf34625cfdecfe7e3a1192d9f8
parented26fc681fc0d154036199d36e1f8d9ba88b0048 (diff)
downloadvcpkg-10d005d01423466de3b2994fd371a9f86ab46edc.tar.gz
vcpkg-10d005d01423466de3b2994fd371a9f86ab46edc.zip
[fbthrift] Add new port (#13072)
* [fbthrift] Add new port * [fbthrift] only supports x64, except osx * [fbthrift] add missing vcpkg_fail_port_install * [fbthrift] format code * [fbthrift] use vcpkg_copy_tools install thrift1 * [fbthrift] support build on osx * [fbthrift] specify the bison path directly
-rw-r--r--ports/fbthrift/CONTROL6
-rw-r--r--ports/fbthrift/portfile.cmake51
2 files changed, 57 insertions, 0 deletions
diff --git a/ports/fbthrift/CONTROL b/ports/fbthrift/CONTROL
new file mode 100644
index 000000000..75b69dc95
--- /dev/null
+++ b/ports/fbthrift/CONTROL
@@ -0,0 +1,6 @@
+Source: fbthrift
+Version: 2019.11.11.00
+Homepage: https://github.com/facebook/fbthrift
+Description: Facebook's branch of Apache Thrift, including a new C++ server.
+Build-Depends: openssl, zlib, fmt, gflags, glog, rsocket, fizz, folly, wangle, zstd, boost-context, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread
+Supports: x64
diff --git a/ports/fbthrift/portfile.cmake b/ports/fbthrift/portfile.cmake
new file mode 100644
index 000000000..ecd03825d
--- /dev/null
+++ b/ports/fbthrift/portfile.cmake
@@ -0,0 +1,51 @@
+vcpkg_fail_port_install(ON_ARCH "x86" "arm")
+
+vcpkg_find_acquire_program(FLEX)
+vcpkg_find_acquire_program(BISON)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO facebook/fbthrift
+ REF 3b56786f0822f78a408addffaf3a54b1b8c86dcd # v2019.11.11.00
+ SHA512 d892c6825345d2dc68abbe7a0eacb5ee0444fdea328d8d6bbcd512752058a2de715c03567120090a355115bb9d5d41f3f9c8dc2f82b8054d0b5a2fd1621bf473
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBISON_EXECUTABLE=${BISON}
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fbthrift)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# There should be no empty directories in vcpkg/packages/fbthrift_x64-linux
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/transport/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/util/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/server/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/common/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/core/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/inmemory/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/protocol/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/extensions/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/frozen/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/reflection/docs
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/util/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test
+ ${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test
+)
+
+vcpkg_copy_tools(TOOL_NAMES thrift1 AUTO_CLEAN)
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)