[thrift] Update to 0.13.0 and fix OSX build (#11981)

This commit is contained in:
Jack·Boos·Yu 2020-06-18 04:42:40 +08:00 committed by GitHub
parent 7bf7e816bd
commit f18e0b4387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 9 deletions

View File

@ -1,5 +1,5 @@
Source: thrift
Version: 2020-02-08
Version: 0.13.0
Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit
Homepage: https://github.com/apache/thrift
Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible.

View File

@ -1,10 +1,7 @@
include(vcpkg_common_functions)
# We currently insist on static only because:
# - Thrift doesn't yet support building as a DLL on Windows,
# - x64-linux only builds static anyway.
# From https://github.com/apache/thrift/blob/master/CHANGES.md
# it looks like it will be supported in v0.13.
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_find_acquire_program(FLEX)
@ -13,13 +10,18 @@ vcpkg_find_acquire_program(BISON)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/thrift
REF 286eee16b147a302ddc7b10740c5e5401ebbec17
SHA512 83aff3a51281ec43228e66b33d15b344710030ee59c1373c6cf33efae9d26db1896ae3518a23b641a7897724d496c38b5217bfc7c41ff538648ec4c571b924f5
REF cecee50308fc7e6f77f55b3fd906c1c6c471fa2f #0.13.0
SHA512 4097fd7951a4d47f2fadc520a54fd1b91b10769d65e899c6bab490dd7ac459e12bb2aa335df8fdfc61a32095033bfac928a54660abb1ee54ca14a144216c3339
HEAD_REF master
PATCHES
"correct-paths.patch"
)
if (VCPKG_TARGET_IS_OSX)
message(WARNING "${PORT} requires bison version greater than 2.5,\n\
please use command \`brew install bison\` to install bison")
endif()
# note we specify values for WITH_STATIC_LIB and WITH_SHARED_LIB because even though
# they're marked as deprecated, Thrift incorrectly hard-codes a value for BUILD_SHARED_LIBS.
vcpkg_configure_cmake(
@ -44,7 +46,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright)
vcpkg_copy_pdbs()
# Move CMake config files to the right place
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/thrift)
@ -68,4 +70,4 @@ if ("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -19,6 +19,7 @@ jobs:
brew list autoconf || brew install autoconf
brew list automake || brew install automake
brew list libtool || brew install libtool
brew list bison || brew install bison
brew list gfortran || brew cask install gfortran
displayName: 'Install brew dependencies'
- bash: |

View File

@ -1824,7 +1824,6 @@ theia:x64-windows-static = skip
theia:x86-windows = skip
thor:x64-linux=fail
thor:x64-osx=fail
thrift:x64-osx=fail
tidy-html5:arm-uwp=fail
tidy-html5:x64-uwp=fail
tinkerforge:arm-uwp=fail

View File

@ -267,6 +267,9 @@ function(vcpkg_find_acquire_program VAR)
set(PROGNAME bison)
set(APT_PACKAGE_NAME bison)
set(BREW_PACKAGE_NAME bison)
if (APPLE)
set(PATHS /usr/local/opt/bison/bin)
endif()
endif()
elseif(VAR MATCHES "GPERF")
set(PROGNAME gperf)