[Bug 272995] dns/bind-tools: fails to build with MANPAGES=off if sphinx is installed

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 07 Aug 2023 10:47:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272995

            Bug ID: 272995
           Summary: dns/bind-tools: fails to build with MANPAGES=off if
                    sphinx is installed
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: mat@FreeBSD.org
          Reporter: michael.osipov@siemens.com
          Assignee: mat@FreeBSD.org
             Flags: maintainer-feedback?(mat@FreeBSD.org)

9.18.16 fails for me to build when MANPAGES and DOCS are disabled:
==============================
/usr/bin/make  all-am
Making all in man
echo ""

/usr/local/bin/sphinx-build -b man -d ./_build/.doctrees/man -W                
 -c .                   -a                               -n                    
 -D version="@""PACKAGE_VERSION@"        -D today="@""RELEASE_DATE@"           
 -D release="@""PACKAGE_VERSION@"        -D rst_epilog="$(printf
"${man_RST_EPILOG}")"                                   . ./_build/man
Running Sphinx v5.3.0
making output directory... done
building [mo]: all of 0 po files
building [man]: all source files
updating environment: [new config] 34 added, 0 changed, 0 removed
reading sources... [100%] tsig-keygen

Warning, treated as error:
../../bin/delv/delv.rst:105:Undefined substitution referenced: "bind_keys".
*** Error code 2

Stop.
make[5]: stopped in /usr/ports/dns/bind-tools/work/bind-9.18.16/doc/man
==============================

By reading Bug 270286 and
https://gitlab.isc.org/isc-projects/bind9/-/issues/3681#note_359741 the problem
is that sphinx is implicitly found (installed by other means) and used, but the
Makefile processing requires gmake, BSD make fails here. Read also how
Restructured Text substitutions work and they are passed through the Makefile.

I see two ways to solve this problem:
(a) always say: USES=gmake
(b) apply the following patch for 9.18.14+:
==============
diff --git a/dns/bind918/Makefile b/dns/bind918/Makefile
index 5410e2297e31..92cd005bf74f 100644
--- a/dns/bind918/Makefile
+++ b/dns/bind918/Makefile
@@ -179,0 +180,4 @@ BUILD_DEPENDS+=     cmocka>0:sysutils/cmocka
+.if !${PORT_OPTIONS:MMANPAGES} && !${PORT_OPTIONS:MDOCS}
+CONFIGURE_ENV+=        ac_cv_path_SPHINX_BUILD=
+.endif
+
==============
which basically reverts
https://cgit.freebsd.org/ports/commit/?id=0612249ceafda613efff5c03ab08cb4023fe4836
except for the value.

-- 
You are receiving this mail because:
You are the assignee for the bug.