[thrift] Update to 0.16 (#24810)

* update thrift

* remove version-string

* v db
This commit is contained in:
Alexander Neumann 2022-05-20 23:35:37 +02:00 committed by GitHub
parent 9eff776b7d
commit 083e55eb96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 111 additions and 35 deletions

View File

@ -0,0 +1,44 @@
diff --git a/lib/cpp/thrift-nb.pc.in b/lib/cpp/thrift-nb.pc.in
index 2c6a96973..e99eff2bc 100644
--- a/lib/cpp/thrift-nb.pc.in
+++ b/lib/cpp/thrift-nb.pc.in
@@ -26,5 +26,5 @@ Name: Thrift
Description: Thrift Nonblocking API
Version: @VERSION@
Requires: thrift = @VERSION@
-Libs: -L${libdir} -lthriftnb
+Libs: -L${libdir} -lthriftnb@THRIFT_RUNTIME_POSTFIX@
Cflags: -I${includedir}
diff --git a/lib/cpp/thrift-qt5.pc.in b/lib/cpp/thrift-qt5.pc.in
index a8b16663e..2720bea79 100644
--- a/lib/cpp/thrift-qt5.pc.in
+++ b/lib/cpp/thrift-qt5.pc.in
@@ -26,5 +26,5 @@ Name: Thrift
Description: Thrift Qt5 API
Version: @VERSION@
Requires: thrift = @VERSION@
-Libs: -L${libdir} -lthriftqt5
+Libs: -L${libdir} -lthriftqt5@THRIFT_RUNTIME_POSTFIX@
Cflags: -I${includedir}
diff --git a/lib/cpp/thrift-z.pc.in b/lib/cpp/thrift-z.pc.in
index 467d2e11c..cde44158a 100644
--- a/lib/cpp/thrift-z.pc.in
+++ b/lib/cpp/thrift-z.pc.in
@@ -26,5 +26,5 @@ Name: Thrift
Description: Thrift Zlib API
Version: @VERSION@
Requires: thrift = @VERSION@
-Libs: -L${libdir} -lthriftz
+Libs: -L${libdir} -lthriftz@THRIFT_RUNTIME_POSTFIX@
Cflags: -I${includedir}
diff --git a/lib/cpp/thrift.pc.in b/lib/cpp/thrift.pc.in
index d11e6db29..77da61c3e 100644
--- a/lib/cpp/thrift.pc.in
+++ b/lib/cpp/thrift.pc.in
@@ -25,5 +25,5 @@ includedir=@includedir@
Name: Thrift
Description: Thrift C++ API
Version: @VERSION@
-Libs: -L${libdir} -lthrift
+Libs: -L${libdir} -lthrift@THRIFT_RUNTIME_POSTFIX@
Cflags: -I${includedir}

View File

@ -2,7 +2,9 @@
# - 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
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_find_acquire_program(FLEX)
vcpkg_find_acquire_program(BISON)
@ -10,11 +12,12 @@ vcpkg_find_acquire_program(BISON)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/thrift
REF cecee50308fc7e6f77f55b3fd906c1c6c471fa2f #0.13.0
SHA512 4097fd7951a4d47f2fadc520a54fd1b91b10769d65e899c6bab490dd7ac459e12bb2aa335df8fdfc61a32095033bfac928a54660abb1ee54ca14a144216c3339
REF 2a93df80f27739ccabb5b885cb12a8dc7595ecdf #0.16.0
SHA512 aed4f60b8a4eca5b4bce26f6f29d1178684d2b4e6de290ab1e696ac78a9f85d941afe5dca99d1d22d640371ad538b930cf445f9f899a2e322f39b0cceec307a3
HEAD_REF master
PATCHES
"correct-paths.patch"
"pc-suffix.patch"
)
if (VCPKG_TARGET_IS_OSX)
@ -22,53 +25,69 @@ if (VCPKG_TARGET_IS_OSX)
please use command \`brew install bison\` to install bison")
endif()
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" shared_lib)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" static_lib)
# 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(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
NO_CHARSET_FLAG
OPTIONS
-DWITH_SHARED_LIB=off
-DWITH_STATIC_LIB=on
-DWITH_STDTHREADS=ON
-DBUILD_TESTING=off
-DBUILD_JAVA=off
-DBUILD_C_GLIB=off
-DBUILD_PYTHON=off
-DBUILD_CPP=on
-DBUILD_HASKELL=off
-DBUILD_TUTORIALS=off
--trace-expand
-DLIB_INSTALL_DIR:PATH=lib
-DWITH_SHARED_LIB=${shared_lib}
-DWITH_STATIC_LIB=${static_lib}
-DBUILD_TESTING=OFF
-DBUILD_JAVA=OFF
-DWITH_C_GLIB=OFF
-DBUILD_C_GLIB=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_GLIB=TRUE
-DBUILD_PYTHON=OFF
-DBUILD_CPP=ON
-DWITH_CPP=ON
-DWITH_ZLIB=ON
-DCMAKE_FIND_PACKAGE_REQUIRE_ZLIB=TRUE
-DWITH_LIBEVENT=ON
-DCMAKE_FIND_PACKAGE_REQUIRE_Libevent=TRUE
-DWITH_OPENSSL=ON
-DCMAKE_FIND_PACKAGE_REQUIRE_OpenSSL=TRUE
-DBUILD_TUTORIALS=OFF
-DFLEX_EXECUTABLE=${FLEX}
-DWITH_QT5=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_Gradle=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_Java=TRUE
-DBUILD_JAVASCRIPT=OFF
-DBUILD_NODEJS=OFF
-DBISON_EXECUTABLE=${BISON}
MAYBE_UNUSED_VARIABLES
CMAKE_DISABLE_FIND_PACKAGE_GLIB
CMAKE_DISABLE_FIND_PACKAGE_Gradle
CMAKE_FIND_PACKAGE_REQUIRE_Libevent
CMAKE_FIND_PACKAGE_REQUIRE_OpenSSL
CMAKE_FIND_PACKAGE_REQUIRE_ZLIB
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
# Move CMake config files to the right place
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/thrift)
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_fixup_pkgconfig()
file(GLOB COMPILER "${CURRENT_PACKAGES_DIR}/bin/thrift" "${CURRENT_PACKAGES_DIR}/bin/thrift.exe")
if(COMPILER)
file(COPY ${COMPILER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift)
file(REMOVE ${COMPILER})
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift)
vcpkg_copy_tools(TOOL_NAMES thrift AUTO_CLEAN)
endif()
file(GLOB COMPILERD "${CURRENT_PACKAGES_DIR}/debug/bin/thrift" "${CURRENT_PACKAGES_DIR}/debug/bin/thrift.exe")
if(COMPILERD)
file(REMOVE ${COMPILERD})
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if ("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
endif()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_fixup_pkgconfig()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,9 +1,9 @@
{
"name": "thrift",
"version-string": "0.13.0",
"port-version": 2,
"version": "0.16.0",
"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.",
"homepage": "https://github.com/apache/thrift",
"license": "Apache-2.0",
"dependencies": [
"boost-date-time",
"boost-locale",
@ -12,6 +12,14 @@
"boost-smart-ptr",
"libevent",
"openssl",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
]
}

View File

@ -6965,8 +6965,8 @@
"port-version": 2
},
"thrift": {
"baseline": "0.13.0",
"port-version": 2
"baseline": "0.16.0",
"port-version": 0
},
"tidy-html5": {
"baseline": "5.7.28",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "075afb4c9f18e75caa0eb4b07609324fa35b5ca5",
"version": "0.16.0",
"port-version": 0
},
{
"git-tree": "5db8f1e2a1a482177c2ff99e74d34e25b60fb7f4",
"version-string": "0.13.0",