Attempting to install a headless version of Minetest (USE="-client server") pulls in X despite no need for graphical display. This occurs since Minetest unconditionally depends on dev-games/irrlicht, which in turn requires virtual/opengl. Minetest only requires Irrlicht headers for headless builds. There's two ways we could resolve it. Ideally, this should be resolved upstream by the removal of the Irrlicht dependency for headless server builds. I've opened an upstream Github issue before: <https://github.com/minetest/minetest/issues/8625>. I believe the Irrlicht headers dependency was originally added to support fixed-width data types. However, C++ supports fixed-width data types with the standard <cstdint> header. I initially tried to write a patch to replace all the Irrlicht fixed-width data types to the <cstdint> fixed-width data types, but I ultimately abandoned the effort due to the drudgery entailed in changing so many files. Alternatively, we could create a new dev-games/irrlicht-headers Gentoo package that will only install the Irrlicht headers. This will require us to find someone to maintain such a package.
I think it should be a separate package and one should depend on the other so they should be maintained together. However, I find it very odd that Minetest would only require the headers of a 3D engine, even when headless. Something smells off here.
(In reply to James Le Cuirot from comment #1) > I think it should be a separate package and one should depend on the other > so they should be maintained together. However, I find it very odd that > Minetest would only require the headers of a 3D engine, even when headless. > Something smells off here. I provide bit more in-depth investigation in the Minetest Github issue linked. My suspicion is that the original authors used the fixed-width data types in the Irrlicht headers out of convenience since they were already available due to the Irrlicht calls for the client code. Over the years, more and more of the code made use of these Irrlicht data types, so now it's become entrenched in the server code even though it's not necessary on a technical level. I believe it's possible to remove the Irrlicht headers dependency, but it'll take someone with enough patience to go through the files and manually make the changes to clean them up. For now, I'll create an dev-games/irrlicht-headers package and have the dev-games/irrlicht package depend on it. The games-action/minetest package can then have dev-games/irrlicht-headers be a dependency for the "server" USE flag, and dev-games/irrlicht be a dependency for the "client" USE flag.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc29277a58895bda30cc956e5bd69e724df6c260 commit bc29277a58895bda30cc956e5bd69e724df6c260 Author: William Breathitt Gray <vilhelm.gray@gmail.com> AuthorDate: 2020-01-26 21:47:12 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2020-02-22 21:08:21 +0000 dev-games/irrlicht-headers: New package Bug: https://bugs.gentoo.org/706372 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14464 Signed-off-by: James Le Cuirot <chewi@gentoo.org> dev-games/irrlicht-headers/Manifest | 2 + .../irrlicht-headers/irrlicht-headers-1.8.4.ebuild | 43 ++++++++++++++++++++++ dev-games/irrlicht-headers/metadata.xml | 11 ++++++ 3 files changed, 56 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67e48324452090097bc8217613960376de657945 commit 67e48324452090097bc8217613960376de657945 Author: William Breathitt Gray <vilhelm.gray@gmail.com> AuthorDate: 2020-01-17 21:56:38 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2020-02-22 22:09:40 +0000 games-action/minetest: Version bump to 5.1.1 Closes: https://bugs.gentoo.org/706372 Closes: https://bugs.gentoo.org/705696 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/14370 Signed-off-by: James Le Cuirot <chewi@gentoo.org> games-action/minetest/Manifest | 1 + games-action/minetest/minetest-5.1.1.ebuild | 139 ++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a53fe6c1af5bc45544030d77fa3b577013237ad commit 7a53fe6c1af5bc45544030d77fa3b577013237ad Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2022-02-10 11:55:52 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2022-02-10 12:19:37 +0000 dev-games/irrlicht-mt-headers: initial import Split off from dev-games/irrlicht-mt so that packages which require Irrlicht headers but not libraries, games-action/minetest[-client] for instance, do not have to unnecessarily pull in X libraries. Bug: https://bugs.gentoo.org/706372 Signed-off-by: Marek Szuba <marecki@gentoo.org> dev-games/irrlicht-mt-headers/Manifest | 1 + .../irrlicht-mt-headers-1.9.0.4.ebuild | 30 ++++++++++++++++++++++ dev-games/irrlicht-mt-headers/metadata.xml | 11 ++++++++ 3 files changed, 42 insertions(+)