Hi there, Honest question from the maintainer: is the nox11 variant really necessary? If --with-x is supplied, we will use X11 headers during build time, but at runtime X11 libraries will be dlopen'ed if available, but if not, mc will start anyways with X11 support disabled. The same applies to aspell support. The reason why I'm asking is that some distros didn't know about this and thought that building mc with X11 will cause a runtime dependency, hence useless nox11 variants not having runtime dependency that wasn't there in the first place... not sure whether FreeBSD has its own reasons to have a separate port (e.g. allow building on systems without X11 headers?). All the best, Yury
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a5ade24bb0d77d5ca30a27dc33748ff644a09588 commit a5ade24bb0d77d5ca30a27dc33748ff644a09588 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2024-01-15 10:38:18 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2024-01-15 10:38:18 +0000 misc/mc: drop needless run-time dependencies on Aspell and Xlib Yury V. Zaytsev points out that for X11 and Aspell support, header files <X11/Xlib.h> and <aspell.h> are only needed during the build, while their corresponding libraries would be loaded dynamically if available; if not, mc(1) would still work fine, just without those features. The source code and ldd(1) output confirm his findings: % cd $WRKDIR/mc-4.8.30 && grep -R -A1 g_module_build_path * lib/tty/x11conn.c: x11_module_fname = g_module_build_path (NULL, "X11"); lib/tty/x11conn.c- x11_module = g_module_open (x11_module_fname, G_MODULE_BIND_LAZY); -- src/editor/spell.c: spell_module_fname = g_module_build_path (NULL, "libaspell"); src/editor/spell.c- spell_module = g_module_open (spell_module_fname, G_MODULE_BIND_LAZY); This allows to enable Aspell support by default and drop X11-less slave port now that both of these dependencies are build-time only yet still can be completely disabled via options. PR: 269120 MOVED | 1 + misc/Makefile | 1 - misc/mc-nox11/Makefile (gone) | 4 ---- misc/mc/Makefile | 11 +++++------ 4 files changed, 6 insertions(+), 11 deletions(-)
(In reply to Yury V. Zaytsev from comment #0) > [...] useless nox11 variants not having runtime dependency that wasn't > there in the first place... not sure whether FreeBSD has its own reasons > to have a separate port (e.g. allow building on systems without X11 > headers?) Yes, that was the original intention and also because USE_XORG components register both build- and run-time dependencies. I've now converted both to build-time only as you correctly describe, and `mc-nox11' port is not longer needed (those who build from ports can easily disable the option and package users won't even notice it).
Hey Alexey, thanks for looking into this!