From ae79ce0c9fdac7446da9c346f6544c7e0ef4e5d3 Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Wed, 15 Nov 2023 11:38:16 +0100 Subject: [PATCH 1/2] libfido2: change it to use shared libraries --- gvsbuild/projects/libfido2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/libfido2.py b/gvsbuild/projects/libfido2.py index 665b12229..ca6a5638d 100644 --- a/gvsbuild/projects/libfido2.py +++ b/gvsbuild/projects/libfido2.py @@ -48,8 +48,8 @@ def build(self): include_dirs = os.path.join(self.builder.gtk_dir, "inc") lib_dirs = os.path.join(self.builder.gtk_dir, "lib") bin_dirs = lib_dirs = os.path.join(self.builder.gtk_dir, "bin") - # Build static libs only for libfido2 - build_params = '-DBUILD_EXAMPLES=OFF -DBUILD_MANPAGES=OFF -DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS_DEBUG="/MTd /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE" -DCMAKE_C_FLAGS_RELEASE="/MT /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE"' + + build_params = "-DBUILD_EXAMPLES=OFF -DBUILD_MANPAGES=OFF -DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF -DBUILD_STATIC_LIBS=OFF" cmake_params = f"-DWITH_ZLIB=ON -DCBOR_INCLUDE_DIRS={include_dirs} -DCRYPTO_INCLUDE_DIRS={include_dirs} -DZLIB_INCLUDE_DIRS={include_dirs} -DCBOR_LIBRARY_DIRS={lib_dirs} -DCRYPTO_LIBRARY_DIRS={lib_dirs} -DZLIB_LIBRARY_DIRS={lib_dirs} -DCBOR_BIN_DIRS={bin_dirs} -DCRYPTO_BIN_DIRS={bin_dirs} -DZLIB_BIN_DIRS={bin_dirs} {build_params}" CmakeProject.build(self, cmake_params=cmake_params, use_ninja=True) From 53674fdbfcbdc0cc4601e19bf65cbb763572e975 Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Wed, 15 Nov 2023 11:43:40 +0100 Subject: [PATCH 2/2] libfido2: add patch to install the pkgconfig files --- ...Install-pkgconfig-files-also-on-msvc.patch | 28 +++++++++++++++++++ gvsbuild/projects/libfido2.py | 5 +++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gvsbuild/patches/libfido2/0001-Install-pkgconfig-files-also-on-msvc.patch diff --git a/gvsbuild/patches/libfido2/0001-Install-pkgconfig-files-also-on-msvc.patch b/gvsbuild/patches/libfido2/0001-Install-pkgconfig-files-also-on-msvc.patch new file mode 100644 index 000000000..ce75f0b8d --- /dev/null +++ b/gvsbuild/patches/libfido2/0001-Install-pkgconfig-files-also-on-msvc.patch @@ -0,0 +1,28 @@ +From dd8f6403dd58e67b3f62fa7d41f8d16ac3cdfd40 Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro +Date: Wed, 15 Nov 2023 11:39:36 +0100 +Subject: [PATCH] Install pkgconfig files also on msvc + +--- + src/CMakeLists.txt | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 73493b1..4c54198 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -151,8 +151,6 @@ endif() + install(FILES fido.h DESTINATION include) + install(DIRECTORY fido DESTINATION include) + +-if(NOT MSVC) +- configure_file(libfido2.pc.in libfido2.pc @ONLY) +- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libfido2.pc" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +-endif() ++configure_file(libfido2.pc.in libfido2.pc @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libfido2.pc" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +-- +2.34.1 + diff --git a/gvsbuild/projects/libfido2.py b/gvsbuild/projects/libfido2.py index ca6a5638d..1ec76b71a 100644 --- a/gvsbuild/projects/libfido2.py +++ b/gvsbuild/projects/libfido2.py @@ -36,7 +36,10 @@ def __init__(self): "openssl", "libcbor", ], - patches=["0001-libfido2-update-cmake-script-to-have-sdl-flag-before.patch"], + patches=[ + "0001-libfido2-update-cmake-script-to-have-sdl-flag-before.patch", + "0001-Install-pkgconfig-files-also-on-msvc.patch", + ], ) def build(self):