libp11: backport fix for missing p11_ver.h in installed headers

The installed public header libp11.h includes "p11_ver.h", but that
header is generated by configure (from p11_ver.h.in, via AC_CONFIG_FILES)
and was never listed in include_HEADERS, so it never gets installed.

Any consumer including <libp11.h> therefore fails to build. For example
rng-tools with PACKAGECONFIG "libp11" enabled:

| In file included from rngd_pkcs11.c:28:
| recipe-sysroot/usr/include/libp11.h:28:10: fatal error: p11_ver.h: No such file or directory
|    28 | #include "p11_ver.h"
|       |          ^~~~~~~~~~~
| compilation terminated.

Backport the upstream fix, which adds p11_ver.h to include_HEADERS. It
landed after the libp11-0.4.19 tag and is not part of any release yet,
so it cannot be picked up by a version upgrade.

Signed-off-by: Daiane Angolini <daiane.angolini@oss.qualcomm.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Daiane Angolini
2026-08-05 07:55:54 -03:00
committed by Khem Raj
parent 5f6c8eb030
commit 37bd33a8e2
2 changed files with 35 additions and 1 deletions
@@ -0,0 +1,32 @@
From 007043d355a9f7f1cd3cb6e80d16cad609fdf2a1 Mon Sep 17 00:00:00 2001
From: botantony <antonsm21@gmail.com>
Date: Wed, 22 Jul 2026 02:50:28 +0200
Subject: [PATCH] Add missing `p11_ver.h` file to installed headers
Running `make install` does not install `p11_ver.h` header which is used
by `p11_err.h`. This PR fixes it
Found in https://github.com/Homebrew/homebrew-core/pull/294427
Signed-off-by: botantony <antonsm21@gmail.com>
Upstream-Status: Backport [https://github.com/OpenSC/libp11/commit/007043d355a9f7f1cd3cb6e80d16cad609fdf2a1]
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 92d3fdb..549ac67 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,7 +9,7 @@ EXTRA_DIST = Makefile.mak libp11.rc.in pkcs11.rc.in
# Headers
noinst_HEADERS= libp11-int.h pkcs11.h p11_pthread.h provider_helpers.h util.h
-include_HEADERS= libp11.h p11_err.h
+include_HEADERS= libp11.h p11_err.h p11_ver.h
lib_LTLIBRARIES = libp11.la
enginesexec_LTLIBRARIES =
--
2.43.0
@@ -9,7 +9,9 @@ LICENSE = "LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29"
DEPENDS = "libtool openssl"
SRC_URI = "git://github.com/OpenSC/libp11.git;branch=master;protocol=https;tag=${BPN}-${PV}"
SRC_URI = "git://github.com/OpenSC/libp11.git;branch=master;protocol=https;tag=${BPN}-${PV} \
file://0001-Add-missing-p11_ver.h-file-to-installed-headers.patch \
"
SRCREV = "ae5756ccf5cb7929bb8edc986a9e6a65584406bd"