gentoo-ebuilds/app-crypt/yubihsm-shell/files/yubihsm-shell-2.6.0-pcsc-lite-pkgconfig.patch
Sam James 8f5b54c8a9
app-crypt/yubihsm-shell: add 2.6.0
Bug: https://bugs.gentoo.org/955141
Closes: https://bugs.gentoo.org/946066
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-01 05:00:00 +01:00

40 lines
1.4 KiB
Diff

https://bugs.gentoo.org/946066
https://github.com/Yubico/yubihsm-shell/issues/404
https://github.com/Yubico/yubihsm-shell/pull/411
From 440ba3ad140732ab51bc2df56ae0c82684d02922 Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen@redhat.com>
Date: Tue, 30 Jul 2024 10:18:02 +0200
Subject: [PATCH] cmake: Fix build against pcsc-lite >= 2.2
The pcsc-lite 2.2.0 switched from autotools to meson and reworked the
pkgconfig files. The new pkg config provides CFLAGS that work ok, but
the yubihsm-shell ignores them and hopes that all included files are in
the default include directory (with the PCSC prefix).
Note, the value ${LIBPCSC_CFLAGS} is a semicolon separated list which
we need to split to separate items here.
This solution works with both old and new versions.
Fixes: #404
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
---
CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index acbb3926..ecf3df85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,6 +194,8 @@ if(NOT BUILD_ONLY_LIB)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
pkg_search_module (LIBPCSC REQUIRED libpcsclite)
+ string (REPLACE ";" " " MY_LIBPCSC_CFLAGS "${LIBPCSC_CFLAGS}")
+ string (APPEND CMAKE_C_FLAGS " ${MY_LIBPCSC_CFLAGS}")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set (LIBPCSC_LDFLAGS "winscard.lib")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")