-(opengl ? media-libs/mesa[egl]) +(egl ? media-libs/mesa[egl])
Why is this the right thing to do?
because it depends on a EGL library not opengl. whether EGL uses opengl or not is besides the point. I have opengl as a global flag and my system does not use mesa(or egl). Besides that there will be nvidia EGL libraries out soon so it should depend on a virtual/egl package not mesa[egl] but lets wait to see if nvidia will fully support egl first(its only 32bit as of now).
It depends on both. I think you're somewhat confused. Take a look at cairo's configure.ac.
not confused. Thanks for confirming.