mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[bond]Upgrade version to 8.1.0 and add Linux/OSX support. (#6954)
This commit is contained in:
parent
321540a82a
commit
5f72d97b6e
@ -1,12 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index fe0f629e..54b6d8ec 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -49,7 +49,6 @@ install (DIRECTORY
|
|
||||||
cpp/inc/bond
|
|
||||||
cpp/generated/bond
|
|
||||||
python/inc/bond
|
|
||||||
- thirdparty/rapidjson/include/rapidjson
|
|
||||||
DESTINATION include
|
|
||||||
PATTERN *.cpp EXCLUDE)
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Source: bond
|
Source: bond
|
||||||
Maintainer: bond@microsoft.com
|
Maintainer: bond@microsoft.com
|
||||||
Version: 7.0.2-2
|
Version: 8.1.0
|
||||||
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
|
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
|
||||||
Homepage: https://github.com/Microsoft/bond
|
Homepage: https://github.com/Microsoft/bond
|
||||||
Build-Depends: rapidjson, boost-config, boost-utility, boost-assign
|
Build-Depends: rapidjson, boost-config, boost-utility, boost-assign
|
||||||
|
56
ports/bond/fix-install-path.patch
Normal file
56
ports/bond/fix-install-path.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index f2f8eaa..1b0c01c 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -18,7 +18,7 @@ set (BOND_FIND_RAPIDJSON
|
||||||
|
# settings so that we don't apply our settings to third-party code.
|
||||||
|
add_subdirectory (thirdparty)
|
||||||
|
|
||||||
|
-enable_testing()
|
||||||
|
+#enable_testing()
|
||||||
|
|
||||||
|
set (BOND_IDL ${CMAKE_CURRENT_SOURCE_DIR}/idl)
|
||||||
|
set (BOND_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/cpp/inc)
|
||||||
|
@@ -80,6 +80,6 @@ if (BOND_GBC_PATH)
|
||||||
|
|
||||||
|
install (
|
||||||
|
FILES ${BOND_GBC_PATH}
|
||||||
|
- DESTINATION bin
|
||||||
|
+ DESTINATION tools
|
||||||
|
RENAME ${INSTALLED_GBC_NAME})
|
||||||
|
endif()
|
||||||
|
diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt
|
||||||
|
index 1dff9d0..9a11575 100644
|
||||||
|
--- a/compiler/CMakeLists.txt
|
||||||
|
+++ b/compiler/CMakeLists.txt
|
||||||
|
@@ -108,7 +108,7 @@ set (test_sources
|
||||||
|
tests/TestMain.hs
|
||||||
|
${tests})
|
||||||
|
|
||||||
|
-set (completion_dir etc/bash_completion.d)
|
||||||
|
+set (completion_dir tools/bond)
|
||||||
|
set (completion ${CMAKE_CURRENT_BINARY_DIR}/gbc.comp)
|
||||||
|
set (output ${CMAKE_CURRENT_BINARY_DIR}/build/gbc/gbc${CMAKE_EXECUTABLE_SUFFIX})
|
||||||
|
set (GBC_EXECUTABLE ${output} PARENT_SCOPE)
|
||||||
|
@@ -130,7 +130,7 @@ endif()
|
||||||
|
|
||||||
|
install (FILES ${output}
|
||||||
|
PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
|
||||||
|
- DESTINATION bin)
|
||||||
|
+ DESTINATION ${completion_dir})
|
||||||
|
|
||||||
|
install (FILES ${completion}
|
||||||
|
RENAME gbc
|
||||||
|
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
|
||||||
|
index b45078e..1eebe9c 100644
|
||||||
|
--- a/cpp/CMakeLists.txt
|
||||||
|
+++ b/cpp/CMakeLists.txt
|
||||||
|
@@ -110,7 +110,7 @@ target_include_directories (bond_apply BEFORE PRIVATE
|
||||||
|
|
||||||
|
install (TARGETS bond bond_apply
|
||||||
|
EXPORT bond
|
||||||
|
- ARCHIVE DESTINATION lib/bond
|
||||||
|
+ ARCHIVE DESTINATION lib
|
||||||
|
INCLUDES DESTINATION include)
|
||||||
|
|
||||||
|
install (DIRECTORY ${BOND_IDL}/bond/core DESTINATION include/bond)
|
@ -4,34 +4,48 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|||||||
|
|
||||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-7.0.2)
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-7.0.2)
|
||||||
|
|
||||||
vcpkg_download_distfile(ARCHIVE
|
vcpkg_from_github(
|
||||||
URLS "https://github.com/Microsoft/bond/archive/7.0.2.zip"
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
FILENAME "bond-7.0.2.zip"
|
REPO microsoft/bond
|
||||||
SHA512 4ae3b88fafbede6c1433d171713bdbfcbed61a3d2a983d7df4e33af893a50f233be0e95c1ea8e5f30dafb017b2a8100a23721292b04184159e5fd796b1a43398
|
REF 8.1.0
|
||||||
)
|
SHA512 287a2d299036b57e0576903b1f5372bf8071243ada57153c4bf231cdc660faab1e70c60ddde57ac759d941b74af4ba25d81a5d58e8dbf391032b7b226c4cd18c
|
||||||
vcpkg_download_distfile(GBC_ARCHIVE
|
HEAD_REF master
|
||||||
URLS "https://github.com/Microsoft/bond/releases/download/7.0.2/gbc-7.0.2-amd64.exe.zip"
|
PATCHES fix-install-path.patch
|
||||||
FILENAME "gbc-7.0.2-amd64.exe.zip"
|
|
||||||
SHA512 069eafd7641ebd719425037cb8249d2d214eb09c6ce38fbf1d1811c01d1839b0a0987c55217075b6ae9f477f750d582250134387a530edb2aee407b21d973915
|
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_extract_source_archive(${ARCHIVE})
|
if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||||
|
vcpkg_download_distfile(GBC_ARCHIVE
|
||||||
|
URLS "https://github.com/microsoft/bond/releases/download/8.1.0/gbc-8.1.0-amd64.zip"
|
||||||
|
FILENAME "gbc-8.1.0-amd64.zip"
|
||||||
|
SHA512 896c9a78fc714e0ea44c37ed36400ec8e5f52d495a8d81aa80834ff6cd6303c7c94e06129f7b2269416a9e0ffb61423e87406db798fb5be7ff00f14981530089
|
||||||
|
)
|
||||||
|
|
||||||
# Extract the precompiled gbc
|
# Extract the precompiled gbc
|
||||||
vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/)
|
vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/)
|
||||||
set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-7.0.2-amd64.exe)
|
set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc.exe)
|
||||||
|
|
||||||
if (NOT EXISTS "${FETCHED_GBC_PATH}")
|
if (NOT EXISTS "${FETCHED_GBC_PATH}")
|
||||||
message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.")
|
message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_apply_patches(
|
else()
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
message(STATUS "Installing stack...")
|
||||||
PATCHES
|
vcpkg_download_distfile(
|
||||||
# Don't install rapidjson from the (empty) submodule. With vcpkg, we get
|
ARCHIVE
|
||||||
# rapidjson from vcpkg
|
URLS "https://get.haskellstack.org/"
|
||||||
${CMAKE_CURRENT_LIST_DIR}/0002_omit_rapidjson.patch
|
FILENAME "stack-install.sh"
|
||||||
)
|
SHA512 6db2008297416ad856aa498908bf695737cf3cc466440397720a458358e9661d07abdba762662080ee8bbd8171cdcb05eec6d3696382575c099adfb8427e05fd
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BASH /bin/bash)
|
||||||
|
|
||||||
|
vcpkg_execute_required_process(
|
||||||
|
COMMAND ${BASH} --noprofile --norc "${ARCHIVE}" -f
|
||||||
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}
|
||||||
|
LOGNAME install-stack
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
@ -39,42 +53,23 @@ vcpkg_configure_cmake(
|
|||||||
OPTIONS
|
OPTIONS
|
||||||
-DBOND_LIBRARIES_ONLY=TRUE
|
-DBOND_LIBRARIES_ONLY=TRUE
|
||||||
-DBOND_GBC_PATH=${FETCHED_GBC_PATH}
|
-DBOND_GBC_PATH=${FETCHED_GBC_PATH}
|
||||||
|
-DBOND_SKIP_GBC_TESTS=TRUE
|
||||||
-DBOND_ENABLE_COMM=FALSE
|
-DBOND_ENABLE_COMM=FALSE
|
||||||
-DBOND_ENABLE_GRPC=FALSE
|
-DBOND_ENABLE_GRPC=FALSE
|
||||||
|
-DBOND_FIND_RAPIDJSON=TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/bond TARGET_PATH share/bond)
|
||||||
|
|
||||||
# Put the license file where vcpkg expects it
|
# Put the license file where vcpkg expects it
|
||||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bond)
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bond)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/bond/LICENSE ${CURRENT_PACKAGES_DIR}/share/bond/copyright)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/bond/LICENSE ${CURRENT_PACKAGES_DIR}/share/bond/copyright)
|
||||||
|
|
||||||
# Drop a copy of gbc in tools/ so that it can be used
|
|
||||||
file(COPY ${CURRENT_PACKAGES_DIR}/bin/gbc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/)
|
|
||||||
|
|
||||||
# vcpkg doesn't--as of version 0.0.30--like executables such as gbc.exe in
|
|
||||||
# the output. Just delete the bin/ directories for now.
|
|
||||||
file(REMOVE_RECURSE
|
|
||||||
${CURRENT_PACKAGES_DIR}/bin/
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/bin/)
|
|
||||||
|
|
||||||
# There's no way to supress installation of the headers in the debug build,
|
# There's no way to supress installation of the headers in the debug build,
|
||||||
# so we just delete them.
|
# so we just delete them.
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||||
# Bond's install target installs to lib/bond, but vcpkg expects the lib
|
|
||||||
# files to end up in lib/, so move them up a directory.
|
|
||||||
file(RENAME
|
|
||||||
${CURRENT_PACKAGES_DIR}/lib/bond/bond.lib
|
|
||||||
${CURRENT_PACKAGES_DIR}/lib/bond.lib)
|
|
||||||
file(RENAME
|
|
||||||
${CURRENT_PACKAGES_DIR}/lib/bond/bond_apply.lib
|
|
||||||
${CURRENT_PACKAGES_DIR}/lib/bond_apply.lib)
|
|
||||||
file(RENAME
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/lib/bond/bond.lib
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/lib/bond.lib)
|
|
||||||
file(RENAME
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/lib/bond/bond_apply.lib
|
|
||||||
${CURRENT_PACKAGES_DIR}/debug/lib/bond_apply.lib)
|
|
||||||
|
|
||||||
vcpkg_copy_pdbs()
|
vcpkg_copy_pdbs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user