[Bug 260268] audio/alsa-utils: fix MANPAGES option (off still installs manpages, installed xmlto breaks 'build')

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 07 Dec 2021 20:29:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260268

            Bug ID: 260268
           Summary: audio/alsa-utils: fix MANPAGES option (off still
                    installs manpages, installed xmlto breaks 'build')
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: jcfyecrayz@liamekaens.com

If you have 'textproc/xmlto' installed, 'make -C audio/alsa-utils build' fails:

.
.
man alsactl_init.xml
No manual entry for alsactl_init.xml
gmake[4]: *** [Makefile:1113: alsactl_init.7] Error 1

When the MANPAGES option was added (May 2021 with update to 1.2.2), the attempt
to use xmlto was flawed a few ways:

 - configure does not heed ac_cv_prog_xmlto at all, so the attempt to force the
build to use minixmlto does nothing.

 - the configure process never sets 'xmlto', so the patch to use $(xmlto)
results in an empty expansion and the 'No manual entry' failure, but only if
xmlto is detected - i.e., only if textproc/xmlto is installed.  This is not
installed in a poudriere environment, so xmlto support is disabled during 'make
configure' (thus hiding the bug, but also causing one of the man pages to not
be generated).

 - if the MANPAGES option is off, man pages are still installed.

 - if rst2man is installed (py-docutils), a couple other man pages are
generated which break 'make check-plist'.  If rst2man is not installed, that is
detected and two man pages are not generated.


The attached patch uses BINARY_ALIAS to use minixmlto instead of the incorrect
Makefile.am (or Makefile.in) patch attempt.  It also adds the missed dependency
on rst2man.

It also shuffles some lines to make portclippy / portlint happy.

QA using attached patch:
 - poudriere testport (ok WITH=MANPAGES and WITHOUT=MANPAGES)
 - portclippy (ok)
 - portlint (ok)

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