For now I included these patches in my Gentoo ebuild tree, but maybe
you're interested in upstreaming them. If not ddevault, maybe the next
maintainer.
Midgard (2):
Add option to enable or disable man explicitly
Honour DESTDIR for packagers
Makefile | 36 ++++++++++++++++++------------------
config.sh | 24 +++++++++++++++++++-----
2 files changed, 37 insertions(+), 23 deletions(-)
--
2.38.5
From: Midgard <midgard@git.sr.ht>
This is desired for packaging in Gentoo.
---
Rationale: for packaging, it's not desirable to rely on autodetection of
installed tools. We want the "man" USE flag to reliably control whether
man pages are built or not. The USE flag also controls whether the
package depends on scdoc at built-time or not.
config.sh | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/config.sh b/config.sh
index 8c3ac4b..a952ff1 100644
--- a/config.sh+++ b/config.sh
@@ -6,6 +6,7 @@ CC=${CC:-cc}
CFLAGS=${CFLAGS:-}
LD=${LD:-ld}
SCDOC=${SCDOC:-scdoc}
+man=autofor arg
do
@@ -22,6 +23,13 @@ do
--prefix=*)
PREFIX=${arg#*=}
;;
+ --man=enable|--man=disable|--man=auto)+ man=${arg#*=}+ ;;+ *)+ echo "Unrecognized argument '$arg'"+ exit 1+ ;; esac
done
@@ -121,7 +129,9 @@ run_configure() {
LIBS="$LIBS -lbearssl"
printf "Checking for scdoc... "
- if scdoc -v >/dev/null 2>&1+ if [ $man = disable ]; then+ echo disabled+ elif scdoc -v >/dev/null 2>&1 then
echo yes
all="$all docs"
@@ -131,6 +141,10 @@ run_configure() {
install -m644 doc/gmnlm.1 \$(MANDIR)/man1/gmnlm.1"
else
echo no
+ if [ $man = enable ]; then+ echo "--enable-man but scdoc not found"+ exit 1+ fi fi
printf "Creating $outdir/config.mk... "
--
2.38.5