tested a bit on gentoo-dev, thanks to Per Wigren for valuable comments and feedback!
Created attachment 2015 [details] the ebuild itself.
Created attachment 2016 [details] the ChangeLog for the uae ebuild
The DEPEND language is currently not powerful to handle what this ebuild tries to do. I suggest this bug gets assigned to drobbins so he may have a real example to test updates to the DEPEND system on.
Portage 2.0.11 can handle this. Change DEPEND to: DEPEND="X? ( virtual/x11 gtk? x11-libs/gtk+ ) : ( sys-libs/ncurses svgalib? media-libs/svgalib )"
added CC: I'm happy to help, I was about to write my own but why duplicate effort? :)
I can add this ebuild once the new release of portage is released. It includes new patches to the dependency code
Ryan, is that Portage 2.0.22 ? The other thought I had (after failing to make drobbin's suggestion work - (me=!programmer)) was to make 2 separate ebuilds, one for x11 and one for console/svgalib.. some people may prefer the console version to be built even if they have x11 installed (although I can't see why). I know this isn't scripting school so I won't ask how to make drobbins DEPEND code snippet work. :)
Resolving this bug in favor of bug 5893. Chris: the nested depend statement is used well in the other ebuild... I, however, cannot get the package to compile correctly... Explained in #5893 *** This bug has been marked as a duplicate of 5893 ***