Bug 260268 - audio/alsa-utils: fix MANPAGES option (off still installs manpages, installed xmlto breaks 'build')
Summary: audio/alsa-utils: fix MANPAGES option (off still installs manpages, installed...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-07 20:29 UTC by John Hein
Modified: 2021-12-29 08:50 UTC (History)
3 users (show)

See Also:


Attachments
[patch] fix alsa-utils MANPAGES option (3.94 KB, patch)
2021-12-07 20:52 UTC, John Hein
jcfyecrayz: maintainer-approval? (vishwin)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2021-12-07 20:29:59 UTC
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)
Comment 1 John Hein 2021-12-07 20:49:10 UTC
See also the original bug 245321.  This update broke the way minixmlto was used because ac_cv_prog_xmlto was removed from the configure script.  More specifically, 1.2.2 changed to a different configure variable which did not set any xmlto variable (or, thus, allow a way to override any xmlto variable).

In other words, this has been broken since the 1.2.2 update.
Comment 2 John Hein 2021-12-07 20:52:22 UTC
Created attachment 229963 [details]
[patch] fix alsa-utils MANPAGES option

Add patch described in comment 1.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-12-29 08:49:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1996f8415cf47c9c7dd1ff3197d7fd0f57a23700

commit 1996f8415cf47c9c7dd1ff3197d7fd0f57a23700
Author:     John Hein <jcfyecrayz@liamekaens.com>
AuthorDate: 2021-12-29 08:45:45 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2021-12-29 08:47:29 +0000

    audio/alsa-utils: fix MANPAGES option

    * MANPAGES off still installed them
    * Installed xmlto broke build

    PR:     260268
    Reported by:    jcfyecrayz@liamekaens.com

 audio/alsa-utils/Makefile                          | 21 +++++-----
 .../files/patch-alsactl_Makefile.am (gone)         |  8 ----
 audio/alsa-utils/pkg-plist                         | 45 ++++++++++++----------
 3 files changed, 35 insertions(+), 39 deletions(-)
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2021-12-29 08:50:01 UTC
Committed,

Thanks!