[botan] Fix android and emscripten (#35318)

* [botan] Fix android and emscripten

* CI
This commit is contained in:
Kai Pastor 2023-11-29 09:38:04 +01:00 committed by GitHub
parent 56db7a786e
commit e347008886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 9 deletions

View File

@ -1,4 +1,3 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO randombit/botan
@ -53,7 +52,9 @@ if("zlib" IN_LIST FEATURES)
x_vcpkg_pkgconfig_get_modules(LIBS PREFIX "ZLIB" MODULES "zlib" ${pkgconfig_syntax})
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
if(VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_list(APPEND configure_arguments --cpu=wasm)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
vcpkg_list(APPEND configure_arguments --cpu=x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
vcpkg_list(APPEND configure_arguments --cpu=x86_64)
@ -109,11 +110,17 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_copy_tools(TOOL_NAMES botan-cli AUTO_CLEAN)
vcpkg_copy_pdbs()
else()
if(VCPKG_TARGET_IS_MINGW)
if(VCPKG_TARGET_IS_ANDROID)
vcpkg_list(APPEND configure_arguments --os=android)
elseif(VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_list(APPEND configure_arguments --os=emscripten)
elseif(VCPKG_TARGET_IS_MINGW)
vcpkg_list(APPEND configure_arguments --os=mingw)
endif()
if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_list(APPEND configure_arguments --cc=emcc)
elseif(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
vcpkg_list(APPEND configure_arguments --cc=gcc)
elseif(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID MATCHES "Clang")
vcpkg_list(APPEND configure_arguments --cc=clang)
@ -141,7 +148,9 @@ else()
"ZLIB_LIBS_RELEASE=${ZLIB_LIBS_RELEASE}"
"ZLIB_LIBS_DEBUG=${ZLIB_LIBS_DEBUG}"
)
vcpkg_copy_tools(TOOL_NAMES botan AUTO_CLEAN)
if(NOT VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_copy_tools(TOOL_NAMES botan AUTO_CLEAN)
endif()
endif()
file(RENAME "${CURRENT_PACKAGES_DIR}/include/botan-3/botan" "${CURRENT_PACKAGES_DIR}/include/botan")

View File

@ -1,6 +1,7 @@
{
"name": "botan",
"version": "3.1.1",
"port-version": 1,
"description": "A cryptography library written in C++11",
"homepage": "https://botan.randombit.net",
"license": "BSD-2-Clause",

View File

@ -100,9 +100,6 @@ boringssl:x64-windows=skip
boringssl:x64-windows-static=skip
boringssl:x64-windows-static-md=skip
boringssl:x86-windows=skip
botan:arm-neon-android=fail
botan:arm64-android=fail
botan:x64-android=fail
brpc:x64-android=fail
buck-yeh-bux:x64-android=fail
c4core:arm-neon-android=fail

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c031a70866fae7751496d7edfd01caad2773dd08",
"version": "3.1.1",
"port-version": 1
},
{
"git-tree": "d66e60d97a7a4e77df4e559fed1926a45dac3f52",
"version": "3.1.1",

View File

@ -1302,7 +1302,7 @@
},
"botan": {
"baseline": "3.1.1",
"port-version": 0
"port-version": 1
},
"box2d": {
"baseline": "2.4.1",