Skip to content

Commit

Permalink
recipes-tpm2/tpm2-tss-engine: fix building without pandoc
Browse files Browse the repository at this point in the history
This fixes failed attempts to build the man pages even tough pandoc is not
present.

Fixes tpm2-software/tpm2-tss-engine#284, with
patch from tpm2-software/tpm2-tss-engine#285.

Signed-off-by: Moritz Barsnick <[email protected]>
  • Loading branch information
barsnick committed Sep 19, 2024
1 parent 5eb1531 commit e7612f5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From d5b9b970e3873007e26861d377751a4b36198bf2 Mon Sep 17 00:00:00 2001
From: Moritz Barsnick <[email protected]>
Date: Thu, 19 Sep 2024 12:47:50 +0200
Subject: [PATCH] Makefile.am: Fix build without pandoc

When building from a tarball, pre-created man pages are preset. Yet `make
clean` clobbers them, leaving their target directory intact. Therefore, the
next configure call will try to build man pages even if pandoc isn't
available.

Fix this by cleaning the man pages only if they can be recreated by the
presence of pandoc.

Fixes https://github.com/tpm2-software/tpm2-tss-engine/issues/284

Signed-off-by: Moritz Barsnick <[email protected]>
---
Makefile.am | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index bda32b4..29c34e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -217,8 +217,10 @@ EXTRA_DIST += \
man/tpm2tss_ecc_genkey.3.md \
man/tpm2tss_ecc_getappdata.3.md

+if HAVE_PANDOC
CLEANFILES += \
$(dist_man_MANS)
+endif

### Bash Completion
bash_completiondir = $(completionsdir)
--
2.46.0

8 changes: 8 additions & 0 deletions recipes-tpm2/tpm2-tss-engine/tpm2-tss-engine_1.1.0.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# fix build without pandoc
# Issue: https://github.com/tpm2-software/tpm2-tss-engine/issues/284
# PR: https://github.com/tpm2-software/tpm2-tss-engine/pull/285
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
file://0001-Makefile.am-Fix-build-without-pandoc.patch \
"

0 comments on commit e7612f5

Please sign in to comment.