The ebuild for scorched3d uses a crude way to check if the right version of wxGTK is available, and if the right version is installed. If the unicode version is installed, the installation will not complete. However, the new wxwidgets eclass makes it possible to use all three versions side by side. The bug report in the link describes the solution, and how to adapt ebuilds to using it. I adapted the 38 ebuild to use this. Reproducible: Always Steps to Reproduce:
Created attachment 45365 [details] modified ebuild
modified the ebuild in CVS. Thanks for pointing that out. The checking still needs to be in pkg_setup though. Check the current ebuild in CVS and make sure I didn't mess something up. Thanks.
When testing the new ebuild, I noticed that the test does nothing. I have all 3 versions of wxGTK installed (gtk, gkt2 and gtk2u). Although I get the comment "* Using /usr/bin/wxgtk2-2.4-config", it is the gtk2u version that is included while compiling (the default version?). Apparantly the options that "need-wxwidgets gtk2" sets are not used when set in pkg_setup. Maybe it is a bug in in wxwidgets.eclass, but it only works when that section is right before the configure. It looks like the eclass only sets an environment variable (WX_CONFIG), and it stays local to pkg_setup, but egamesconf is done in src_compile... I'm not sure what the right way is for solving this.
Created attachment 45497 [details, diff] patch here's a patch, just call pkg_setup or ... (another patch coming up)
Created attachment 45498 [details, diff] patch alt move the check to global ... or if you don't like this or the earlier patch, make a copy of the check in src_compile
both of those look nasty to me.
Just so we're clear. The claim is, if I put the check in the src_compile function, it works. If it's in the pkg_setup, then things don't work. Is that correct? I think I see the problem but I want to make sure I'm understanding the failure condition.
> both of those look nasty to me. another alternative is to have the code checking for wxWidget in a seperate function and have both pkg_setup and src_compile call it > Just so we're clear. The claim is, if I put the check in the src_compile function, it works. If it's in the pkg_setup, then things don't work. Is that correct? > I think I see the problem but I want to make sure I'm understanding the failure condition. yes, the problem seems to be that enviroment variables declared in pkg_setup is not preserved.
ok, it's ugly but it's in there. Give the latest ebuild a shot and reopen if it's still a problem. This is a bug with portage where portage doesn't export the variables that need to be exported when carrying variables over from one function to another.
Just emerged it, it works fine for me, thanks :-)