[boost-context] support android (#16930)

This commit is contained in:
huangqinjin 2021-05-01 02:43:39 +08:00 committed by GitHub
parent b7057d1ade
commit 8badb231a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 47 additions and 11 deletions

View File

@ -4,13 +4,13 @@ if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME
return()
endif()
set(BOOST_VERSION 1.75.0.beta1)
set(BOOST_VERSION 1.75.0)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/build
REF boost-${BOOST_VERSION}
SHA512 e5dd73ef41d341e2bce25677389502d22ca7f328e7fdbb91d95aac415f7b490008d75ff0a63f8e4bd9427215f863c161ec9573c29b663b727df4b60e25a3aac2
SHA512 dc5784cdcc908591a8c8814dac32849fb00b5f5b2d48de963d51a0571fd9f5a0419d6bb569f3375bf8fbfae28d680db4ce869604667b717023e76869836534f4
HEAD_REF master
PATCHES
fix_options.patch
@ -28,8 +28,13 @@ vcpkg_download_distfile(BOOSTCPP_ARCHIVE
SHA512 8cf929fa4a602342c859a6bbd5f9dda783ac29431d951bcf6cae4cb14377c1b3aed90bacd902b0f7d1807591cf5e1a244cf8fc3c6cc6e0a4056db145b58f51df
)
# https://github.com/boostorg/boost/pull/206
# do not add version suffix for android
file(READ "${BOOSTCPP_ARCHIVE}" _contents)
string(REPLACE "aix &&" "aix android &&" _contents "${_contents}")
file(WRITE "${SOURCE_PATH}/boostcpp.jam" "${_contents}")
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright)
file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam)
# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation
string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}")

View File

@ -1,7 +1,6 @@
{
"name": "boost-build",
"version-string": "1.75.0.beta1",
"port-version": 1,
"version-string": "1.75.0",
"description": "Boost.Build",
"homepage": "https://github.com/boostorg/build",
"dependencies": [

View File

@ -12,3 +12,18 @@ if(@VCPKG_TARGET_IS_OSX@)
binary-format=mach-o
)
endif()
if(@VCPKG_TARGET_IS_ANDROID@)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
list(APPEND B2_OPTIONS
abi=aapcs
)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
list(APPEND B2_OPTIONS
abi=sysv
)
endif()
list(APPEND B2_OPTIONS
binary-format=elf
)
endif()

View File

@ -1,7 +1,7 @@
{
"name": "boost-context",
"version-string": "1.75.0",
"port-version": 3,
"port-version": 4,
"description": "Boost context module",
"homepage": "https://github.com/boostorg/context",
"supports": "!uwp & !emscripten",

View File

@ -49,6 +49,8 @@ if(APPLE)
list(APPEND B2_OPTIONS target-os=darwin toolset=clang)
elseif(WIN32)
list(APPEND B2_OPTIONS target-os=windows toolset=gcc)
elseif(ANDROID)
list(APPEND B2_OPTIONS target-os=android toolset=gcc)
else()
list(APPEND B2_OPTIONS target-os=linux toolset=gcc)
endif()

View File

@ -1,7 +1,7 @@
{
"name": "boost-modular-build-helper",
"version-string": "1.75.0",
"port-version": 8,
"port-version": 9,
"dependencies": [
"boost-build",
"boost-uninstall"

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8e84097fbdf78eb6220bb0bb7c63addefb6301d9",
"version-string": "1.75.0",
"port-version": 0
},
{
"git-tree": "f6c7fe38fdff5e1a5d4ffe9e9fbc7efe0f7e01d3",
"version-string": "1.75.0.beta1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "73ede4d1c06f12b1162f39e0b03935cc429c763a",
"version-string": "1.75.0",
"port-version": 4
},
{
"git-tree": "7545171af99470b6486fdb0bc42a0d9fd93d0f6e",
"version-string": "1.75.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c475b268ac42e886acfdc783944e1e3a988b0ac8",
"version-string": "1.75.0",
"port-version": 9
},
{
"git-tree": "dd4c0cc6612065f35f4feba1cd5616ed4e249f1e",
"version-string": "1.75.0",

View File

@ -469,8 +469,8 @@
"port-version": 0
},
"boost-build": {
"baseline": "1.75.0.beta1",
"port-version": 1
"baseline": "1.75.0",
"port-version": 0
},
"boost-callable-traits": {
"baseline": "1.75.0",
@ -510,7 +510,7 @@
},
"boost-context": {
"baseline": "1.75.0",
"port-version": 3
"port-version": 4
},
"boost-contract": {
"baseline": "1.75.0",
@ -714,7 +714,7 @@
},
"boost-modular-build-helper": {
"baseline": "1.75.0",
"port-version": 8
"port-version": 9
},
"boost-move": {
"baseline": "1.75.0",