(Related forum topic: https://forums.gentoo.org/viewtopic-t-1034456.html) media-libs/mesa-11.0.6[gbm] (and I suspect other versions of the package) can use "sysfs" instead of virtual/libudev, but it is not reflected by its ebuild's RDEPENDS. This is a problem for users running alternatives to udev (mdev in my case). The naive solution of altering the ebuild's RDEPENDS to remove the dependency when the udev flag isn't enabled let me compile and run mesa successfully with mdev and the gbm flag enabled, so it's probably very easy to fix.
Created attachment 418462 [details, diff] A naive solution to the problem To summarize the new posts on the liked forum thread: another user came forward with a similar issue and ended up fixing their own problem by applying the same naive solution to another flag as well (dri3). It was suggested to me to post the ebuild resulting from applying both changes as a proposed fix, to encourage the issue to be looked at. I have my reservations about this "fix". To quote myself from https://forums.gentoo.org/viewtopic-p-7849442.html#7849442 : "Well, I'm not satisfied with my quick'n'dirty hack. Assuming that users have sysfs support because they didn't set the udev flag does not seem like a sane practice to me. I'm totally new to ebuilds (it's the first time I've edited one), but it seems to me like there should be a sysfs flag (to indicate support for sysfs, obviously), making the gbm RDEPEND rule be something like: gbm? ( || sysfs ( udev? ( >=virtual/libudev-215:=[${MULTILIB_USEDEP}] ) ) ) I also feel I have not looked into configure.ac enough to know what should actually be the dri3 RDEPEND rule (I just know it is not more constraining that the above gbm)." But here it is nonetheless.
(In reply to Nathanaël Sensfelder from comment #1) > I also feel I have not looked into configure.ac enough to know what should > actually be the dri3 RDEPEND rule (I just know it is not more constraining > that the above gbm)." > > But here it is nonetheless. Thank you. I think dropping the udev dependency with USE=gbm/dri3 is appropriate. BSDs, for instance, don't have sysfs or udev so I don't think it'll work in any case... commit 4bb9c9f5e13258d7bd16d36a0111f02ed0c8a312 Author: Matt Turner <mattst88@gentoo.org> Date: Fri Dec 18 23:15:17 2015 -0500 media-libs/mesa: Drop libudev dependency with USE=gbm/dri3.