This is my first time trying to hack a ebuild, hopefully everything is working alright. The patch makes the ebuild build epiphany with xulrunner if the xulrunner useflag is set, falling back on firefox otherwise(it should propably be the other way around as xulrunner is what should be used, but i didnt want to change to much) Reproducible: Always Steps to Reproduce:
Created attachment 113364 [details, diff] the patch
Worth noting is that the epiphany-2.18.0 ebuild in the gnome-experimental overlay already supports xulrunner. This will be moved to portage as soon as we get around to that in our GNOME-2.18 introduction to the tree. However your patch has a couple things different, such as the minimum xulrunner version and such. We should doublecheck that we aren't missing by accident a minimum version on xulrunner in the overlay ebuild. 2.16 epiphany didn't have xulrunner support because at the time it was problematic - quite new support for epiphany iirc, plus the xulrunner versions in tree at the time weren't all that mature
the minimum xulrunner version was added becouse it was the only version i tested with (it was also the only version available in my portage tree).
This will get into portage with 2.18.0. I've been using it for the whole 2.17.x dev cycle, and it works fine. If you need it now, feel free to try the overlay, which has most of 2.18.0 in it at this point.
2.18.0 is in the tree, although masked at the moment for testing.
I tried epiphany 2.18 and it builds just fine.