p11kit: switch to dlopen()

This commit is contained in:
Luca Boccassi
2022-12-19 14:49:01 +01:00
parent 5ac1e0eff3
commit da035a3a24
7 changed files with 202 additions and 60 deletions
+5 -1
View File
@@ -1287,7 +1287,7 @@ install_missing_libraries() {
local lib path
# A number of dependencies is now optional via dlopen, so the install
# script will not pick them up, since it looks at linkage.
for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu tss2-tcti-device libfido2 libbpf libelf libdw xkbcommon; do
for lib in libcryptsetup libidn libidn2 pwquality libqrencode tss2-esys tss2-rc tss2-mu tss2-tcti-device libfido2 libbpf libelf libdw xkbcommon p11-kit-1; do
ddebug "Searching for $lib via pkg-config"
if pkg-config --exists "$lib"; then
path="$(pkg-config --variable=libdir "$lib")"
@@ -1299,6 +1299,10 @@ install_missing_libraries() {
if ! [[ ${lib} =~ ^lib ]]; then
lib="lib${lib}"
fi
# p11-kit-1's .so doesn't have the API level in the name
if [[ ${lib} =~ p11-kit-1$ ]]; then
lib="libp11-kit"
fi
# Some pkg-config files are broken and give out the wrong paths
# (eg: libcryptsetup), so just ignore them
inst_libs "${path}/${lib}.so" || true