mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 21:18:59 +08:00
[libfido2] New port (#16965)
* [libfido2] New port * [libfido2] Update versions * [libfido2] Fixed invalid dll rename in static library versions * [libfido2] Update versions * [libfido2] Exclude UWP from supported platforms * [libfido2] Update versions * [libfido2] Bump version to new upstream 1.7 release * [libfido2] Update versions * Fix indenting Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * [libfido2] Implement multiple issues/suggestions from PR * [libfido2] Update versions * [libfido2] Removed surplus option from vcpkg_from_github * [libfido2] Update versions * [libfido2] Apply suggested changes to use the new vcpkg-cmake port * [libfido2] Update versions * [libfido2] Reapply formatting * [libfido2] Update versions * [libfido2] Changed dependency entry for vcpkg-cmake * [libfido2] Update versions * [libfido2] New port * [libfido2] Update versions * [libfido2] Fixed invalid dll rename in static library versions * [libfido2] Update versions * [libfido2] Exclude UWP from supported platforms * [libfido2] Update versions * [libfido2] Bump version to new upstream 1.7 release * [libfido2] Update versions * Fix indenting Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * [libfido2] Implement multiple issues/suggestions from PR * [libfido2] Update versions * [libfido2] Removed surplus option from vcpkg_from_github * [libfido2] Update versions * [libfido2] Apply suggested changes to use the new vcpkg-cmake port * [libfido2] Update versions * [libfido2] Reapply formatting * [libfido2] Update versions * [libfido2] Changed dependency entry for vcpkg-cmake * [libfido2] Update versions Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
parent
ac9da2cd77
commit
09ff6245de
48
ports/libfido2/fix_cmakelists.patch
Normal file
48
ports/libfido2/fix_cmakelists.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1eb8726..b308597 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -161,16 +161,20 @@ if(UNIX)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
- if((NOT CBOR_INCLUDE_DIRS) OR (NOT CBOR_LIBRARY_DIRS) OR
|
||||
- (NOT CRYPTO_INCLUDE_DIRS) OR (NOT CRYPTO_LIBRARY_DIRS) OR
|
||||
- (NOT ZLIB_INCLUDE_DIRS) OR (NOT ZLIB_LIBRARY_DIRS))
|
||||
- message(FATAL_ERROR "please provide definitions for "
|
||||
- "{CBOR,CRYPTO,ZLIB}_{INCLUDE,LIBRARY}_DIRS when building "
|
||||
- "under msvc")
|
||||
- endif()
|
||||
- set(CBOR_LIBRARIES cbor)
|
||||
- set(ZLIB_LIBRARIES zlib)
|
||||
- set(CRYPTO_LIBRARIES crypto-46)
|
||||
+ include(FindPkgConfig)
|
||||
+
|
||||
+ find_package(LIBCBOR REQUIRED)
|
||||
+ find_package(OpenSSL REQUIRED)
|
||||
+ find_package(ZLIB REQUIRED)
|
||||
+
|
||||
+ # Handling of different Packagenames in VCPKG
|
||||
+ set(CBOR_INCLUDE_DIRS ${LIBCBOR_INCLUDE_DIR})
|
||||
+ set(CRYPTO_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIRS})
|
||||
+ set(CBOR_LIBRARY_DIRS ${LIBCBOR_LIBRARY_DIRS})
|
||||
+ set(CRYPTO_LIBRARY_DIRS ${OPENSSL_LIBRARY_DIRS})
|
||||
+ set(CBOR_LIBRARIES ${LIBCBOR_LIBRARIES})
|
||||
+ set(CRYPTO_LIBRARIES ${OPENSSL_LIBRARIES})
|
||||
+ add_definitions("-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_DEPRECATE")
|
||||
set(MSVC_DISABLED_WARNINGS_LIST
|
||||
"C4200" # nonstandard extension used: zero-sized array in
|
||||
# struct/union;
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 11b0bb5..d820ff3 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -120,7 +120,7 @@ if(BUILD_SHARED_LIBS)
|
||||
install(TARGETS fido2_shared
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
install(FILES fido.h DESTINATION include)
|
29
ports/libfido2/portfile.cmake
Normal file
29
ports/libfido2/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Yubico/libfido2
|
||||
REF 1.7.0
|
||||
SHA512 f40d394883d909e9e3ea3308b32f7ca31a882c709e11b3b143ed5734d16b0c244d4932effe06965d566776b03d152b1fc280e73cdfeeb81b65d8414042af19fe
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"fix_cmakelists.patch"
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBFIDO2_BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBFIDO2_BUILD_SHARED)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_MANPAGES=OFF
|
||||
-DBUILD_STATIC_LIBS=${LIBFIDO2_BUILD_STATIC}
|
||||
-DBUILD_SHARED_LIBS=${LIBFIDO2_BUILD_SHARED}
|
||||
-DBUILD_TOOLS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
16
ports/libfido2/vcpkg.json
Normal file
16
ports/libfido2/vcpkg.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "libfido2",
|
||||
"version": "1.7.0",
|
||||
"description": "Provides library functionality to communicate with a FIDO device over USB, and to verify attestation and assertion signatures.",
|
||||
"homepage": "https://developers.yubico.com/libfido2/",
|
||||
"supports": "!uwp & (x86 | x64) & windows",
|
||||
"dependencies": [
|
||||
"libcbor",
|
||||
"openssl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
]
|
||||
}
|
@ -3080,6 +3080,10 @@
|
||||
"baseline": "3.3",
|
||||
"port-version": 8
|
||||
},
|
||||
"libfido2": {
|
||||
"baseline": "1.7.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libflac": {
|
||||
"baseline": "1.3.3",
|
||||
"port-version": 5
|
||||
|
9
versions/l-/libfido2.json
Normal file
9
versions/l-/libfido2.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "170a0bcbc2f58e140205858db504ecfe7ade1a9f",
|
||||
"version": "1.7.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user