Created attachment 766257 [details]
When xscreensaver is emerged with USE= gtk -gdk-pixbuf, the build fails in the configure phase even though in the log it just shows a warning because GTK is being used but there is no GDK-Pixbuf.
I think gtk is a USE-Flag that should depend on USE-flag gdk-pixbuf instead of being independent from each other.
Created attachment 766258 [details]
Created attachment 766259 [details]
This issue is a bit more tangled (I'm looking at 6.04). If you set -gdk-pixbuf then in theory you should be able to get everything to build if you add -gtk and -png. However the ebuild has an incorrect use flag dependency stating that opengl requires png to be enabled, which is false.
I filed a bug upstream because this is a just a warning, which is kind of confusing.
This IS really tangled.
So, as far as I can tell the problem here is, that you have to have either --with-gtk or --with-motif, otherwise make install will fail. Since we do --without-motif in the ebuild, there is not much sense in having gtk as a use-flag.
Then on the other hand, the build is fine as long as I do things manually. (So ./configure, make, make install) but it's not when I do it in portage. I think that is a problem of the configure.ac script. This one exits with status 1 as soon as there is a warning. Portage interprets this as an error end exits.
Just for future reference on how this works:
As I initially thought --with-gtk and --with-motif controls which kind of toolkit is used to display the xscreensaver-settings menu.
BUT: Motif is unmaintained and we therefore do --without-motif in the ebuild.
Now this would render the USE-flag --with-gtk obsolete, it it weren't for the non-gtk install patch (https://github.com/gentoo/gentoo/blob/master/x11-misc/xscreensaver/files/xscreensaver-6.01-non-gtk-install.patch)
So, it is possible to build with --without-gtk and --without-motif now. One just don't get the xscreensaver-settings program.
Now coming to this bug. --without-gtk and --without-motif fails in because upstream does not support building it without both anymore. (I guess, could be a mistake as well rather than a conscious decision.) Therefore we need to disable some exit codes of the configure.ac script. This (among other things) is what I am doing with the new patch for version 6.05 (https://github.com/gentoo/gentoo/pull/27807/files#diff-c0b4ea605f12bf14d09ac50a40ac7f24e8f9dbb915e8ddbf3c9a9c651ea53adc, line 12 in the patch)
This will give us the ability back to build with USE="-gtk -gdk-pixbuf -png". (line 20 and 28 in the patch)
This patch also alters the exit code for when gtk is found but gdk-pixbuf is not. (I think this is a mistake by upstream, because the script even mentions that it should be possible to use the png library when gdk-pixbuf is not found.
I wrote upstream a bug report via email for both problems. I think at least the latter should be fixed.
The bug has been closed via the following commit(s):
Author: Pascal Jäger <email@example.com>
AuthorDate: 2022-10-16 17:14:35 +0000
Commit: Sam James <firstname.lastname@example.org>
CommitDate: 2022-10-30 09:37:56 +0000
x11-misc/xscreensaver: version bump to 6.05
* New patch for handsys manners
* Building with USE="-opengl" is not supported anymore
* Also added a patch for -gtk builds, set GTK_SHAREDIR because when build
with USE="-gtk" it is not set and then installs .service file into /
* Building with USE="-xft" is not supported anymore
* Delete .service file when USE="-systemd"
Signed-off-by: Pascal Jäger <email@example.com>
Signed-off-by: Sam James <firstname.lastname@example.org>
x11-misc/xscreensaver/Manifest | 1 +
.../xscreensaver-6.05-configure-exit-codes.patch | 29 +++
...screensaver-6.05-remove-update-icon-cache.patch | 13 ++
...creensaver-6.05-teach-handsy-some-manners.patch | 42 ++++
x11-misc/xscreensaver/metadata.xml | 9 +-
x11-misc/xscreensaver/xscreensaver-6.05.ebuild | 243 +++++++++++++++++++++
6 files changed, 336 insertions(+), 1 deletion(-)