diff options
| author | Sönke Schau <xgcssch@users.noreply.github.com> | 2021-05-07 02:41:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-06 17:41:20 -0700 |
| commit | 09ff6245de56c192b5f196cd07b9bf4f036bffd3 (patch) | |
| tree | 2e826a6aeb1d14f37c6adc876309f25b04094b2b | |
| parent | ac9da2cd777fa2a8c54fbdf8837e289f1e7751aa (diff) | |
| download | vcpkg-09ff6245de56c192b5f196cd07b9bf4f036bffd3.tar.gz vcpkg-09ff6245de56c192b5f196cd07b9bf4f036bffd3.zip | |
[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>
| -rw-r--r-- | ports/libfido2/fix_cmakelists.patch | 48 | ||||
| -rw-r--r-- | ports/libfido2/portfile.cmake | 29 | ||||
| -rw-r--r-- | ports/libfido2/vcpkg.json | 16 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/libfido2.json | 9 |
5 files changed, 106 insertions, 0 deletions
diff --git a/ports/libfido2/fix_cmakelists.patch b/ports/libfido2/fix_cmakelists.patch new file mode 100644 index 000000000..d5c363706 --- /dev/null +++ b/ports/libfido2/fix_cmakelists.patch @@ -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)
diff --git a/ports/libfido2/portfile.cmake b/ports/libfido2/portfile.cmake new file mode 100644 index 000000000..9cc2b4cd2 --- /dev/null +++ b/ports/libfido2/portfile.cmake @@ -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)
diff --git a/ports/libfido2/vcpkg.json b/ports/libfido2/vcpkg.json new file mode 100644 index 000000000..5604af16f --- /dev/null +++ b/ports/libfido2/vcpkg.json @@ -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" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 0b1d076ae..420d19a44 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/l-/libfido2.json b/versions/l-/libfido2.json new file mode 100644 index 000000000..df4a488ab --- /dev/null +++ b/versions/l-/libfido2.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "170a0bcbc2f58e140205858db504ecfe7ade1a9f", + "version": "1.7.0", + "port-version": 0 + } + ] +} |
