It currently does nothing but pull in qtopengl, an automagic dependency.
plasma-workspace also can't find GL/gl.h but requires qtopengl to be installed so there is no workaround :(
These packages should support gles without opengl though it seems to require GL/gl.h and arm devices sometimes don't support opengl with hw acceleration.
We need to add an opengl and gles2 use flag to qtopengl and for the -opengl flag to depend on the opengl USE flag and for gles2 to do -opengl es2.
Created attachment 372340 [details] build.log of plasma-workspace (same error)
I don't think the effort of trying to figure this out is worth it, especially considering KDE4 support is really winding down.
Turns out I was bored enough, dropped no-op WITH_OPENGL option and fixed QtOpengl automagic in git commit 02bc077693ac56742bb355bc787f006606c7f6fb