Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73527 - Scorched3d ebuild with the new wxwidgets.eclass to solve wxGTK problems
Summary: Scorched3d ebuild with the new wxwidgets.eclass to solve wxGTK problems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-06 00:01 UTC by Kristiaan Lenaerts
Modified: 2004-12-09 01:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modified ebuild (scorched3d-38.ebuild,1.16 KB, text/plain)
2004-12-06 00:02 UTC, Kristiaan Lenaerts
Details
patch (scorched3d-38.patch,264 bytes, patch)
2004-12-08 00:29 UTC, basic
Details | Diff
patch alt (scorched3d-38.alt.patch,565 bytes, patch)
2004-12-08 00:32 UTC, basic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kristiaan Lenaerts 2004-12-06 00:01:41 UTC
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:
Comment 1 Kristiaan Lenaerts 2004-12-06 00:02:26 UTC
Created attachment 45365 [details]
modified ebuild
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2004-12-06 00:42:23 UTC
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.
Comment 3 Kristiaan Lenaerts 2004-12-06 02:03:06 UTC
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.
Comment 4 basic 2004-12-08 00:29:00 UTC
Created attachment 45497 [details, diff]
patch

here's a patch, just call pkg_setup or ... (another patch coming up)
Comment 5 basic 2004-12-08 00:32:36 UTC
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
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2004-12-08 00:38:09 UTC
both of those look nasty to me.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2004-12-08 00:49:12 UTC
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.
Comment 8 basic 2004-12-08 01:19:18 UTC
> 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.

Comment 9 Mr. Bones. (RETIRED) gentoo-dev 2004-12-08 22:16:50 UTC
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.
Comment 10 Kristiaan Lenaerts 2004-12-09 01:32:16 UTC
Just emerged it, it works fine for me, thanks :-)