composefs/227.patch
Yaakov Selkowitz ce23e6b14c Use go-md2man for building manpages
go-md2man is already used by other containers components, and is
therefore available in the RHEL buildroot, where pandoc (due to its
build dependency on the GHC stack) is not.

https://github.com/containers/composefs/pull/227
2023-11-09 15:30:31 -05:00

55 lines
1.6 KiB
Diff

From 297fdf109a28d0b35a38659ce6a8962c15975a7f Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Thu, 9 Nov 2023 15:13:12 -0500
Subject: [PATCH] Use go-md2man for building manpages
go-md2man is already used by other containers components, and is
therefore available in the RHEL buildroot, where pandoc (due to its
build dependency on the GHC stack) is not.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
Removed conflicting composefs.spec.in hunk which is not useful here.
Makefile.am | 4 ++--
composefs.spec.in | 2 +-
configure.ac | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 753a5a8..2b456cb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,11 +28,11 @@ if ENABLE_MAN
man/%.1: man/%.md
mkdir -p man
- ${PANDOC} $+ -s -t man > $@
+ ${MD2MAN} -in $^ -out $@
man/%.5: man/%.md
mkdir -p man
- ${PANDOC} $+ -s -t man > $@
+ ${MD2MAN} -in $^ -out $@
man1_MANS = $(MAN1PAGES:.md=.1)
man5_MANS = $(MAN5PAGES:.md=.5)
diff --git a/configure.ac b/configure.ac
index 29f86af..40ea60d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,10 +104,10 @@ AC_ARG_ENABLE(man,
enable_man=maybe)
AS_IF([test "$enable_man" != no], [
- AC_PATH_PROG([PANDOC], [pandoc])
- AS_IF([test -z "$PANDOC"], [
+ AC_PATH_PROG([MD2MAN], [go-md2man])
+ AS_IF([test -z "$MD2MAN"], [
AS_IF([test "$enable_man" = yes], [
- AC_MSG_ERROR([pandoc is required for --enable-man])
+ AC_MSG_ERROR([go-md2man is required for --enable-man])
])
enable_man=no
],[