Created attachment 429646 [details]
Building with mingw32 in a crossdev prefix fails due to newbin not handling exe's. The ebuild line is:
newbin .libs/showimage showimage2
When compiled with mingw32, the binary is instead named .libs/showimage.exe
I imagine there's quite a lot of packages that fail for this reason. There's 616 ebuilds in the tree that call newbin. This probably affects dobin, doexe, and newexe too.
You could add * to the end of the first argument but the second argument should have .exe too and the wildcard may match other stuff. It would be handy if the profile had a variable for the executable extension, though judging by this table, the only one you're likely to find is .exe.
That being the case, another way to do it could be an eclass helper like this:
use kernel_Winnt && echo .exe
Maybe the helpers should handle this automatically? There are very few instances of .exe being explicitly specified right now.
It's worth noting that the winnt profile automatically creates symlinks in post_src_install() without extensions to .exe files that don't appear to be Windows GUI executables.
I'll assign this to the toolchain project for the lack of a cross build project. Perhaps this is a discussion for gentoo-dev but does anyone care enough about Windows to take decisive action on it? I can't say I do.
sdl2-image is kind of bad form by installing out of .libs/, but the upstream code needs a bit of love so it isn't using noinst_PROGRAMS.
*** This bug has been marked as a duplicate of bug 432620 ***