tk-8.5.7 doesn't include a library path option for '-lX11 -lXss -lXext', which results in the system libraries rather than the prefix libraries being used. On one system this passed unnoticed, as the (now ancient) system versions of these libraries were used. On another machine which doesn't have system XScreenSaver installed (although does have the libXScrnSaver package installed) the build fails because the linker can't find a library for -lXss. I have a simple fix, but I'm not sure of its correctness: $(XFT_LIBS) includes the correct -L path for portage, and so placing this first fixes the problem. A better solution would be t prepend this path onto X11_LIB_SWITCHES - but I'm not sure how this should best be done.
Created attachment 209132 [details, diff] Patch for tk-8.5.7 to place XFT_LIBS before X11_LIBS, so that the X11 library search path is correct The only other values in Makefile.in which contain the library search path but not libraries is $(LDFLAGS), so swapping the -lX* directives and $(XFT_LIBS) seemed the most sensible option...
That's a fix that actually relies on some little coincidence. Can't we just somehow inject the -L${EPREFIX}/usr/$(get_libdir) path somewhere so we know it's proper?
That'd certainly make sense - but CFLAGS et al. are only included after these libraries, and so wouldn't affect the outcome. I'm not aware of another good method (other than patching the Makefile in some other way, which may well be the best solution - the above patch was just the minimal set of changes to get the thing working) to inject the library path...
Still a problem with tk-8.5.8 :(
Created attachment 237289 [details, diff] tk-8.5.8.ebuild.patch Having said that, it does look as if the tk ebuild could do with a bit of eprefix-ifying. How's this?
Actually, ignore that last one - tk-8.5.8-r1.ebuild (which I'd somehow missed) includes all of these changes :o
Wotks for me.