Skip to content

Commit

Permalink
[thrift] Update to 0.13.0 and fix OSX build (#11981)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBoosY authored Jun 17, 2020
1 parent 7bf7e81 commit f18e0b4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ports/thrift/CONTROL
Original file line number Diff line number Diff line change
@@ -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:/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.
16 changes: 9 additions & 7 deletions ports/thrift/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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:/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)
Expand All @@ -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(
Expand All @@ -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)
Expand All @@ -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)
1 change: 1 addition & 0 deletions scripts/azure-pipelines/osx/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
1 change: 0 additions & 1 deletion scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions scripts/cmake/vcpkg_find_acquire_program.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f18e0b4

Please sign in to comment.