Currently piglit requires libx11 and this makes it impossible to be used in x11-less distros.
Filed https://bugs.freedesktop.org/show_bug.cgi?id=91492 upstream. For now, respecting DISTRO_FEATURES and only adding the x11 dependencies in x11 builds *should* work, albeit as a hack.
I've got a patch but I keep finding ways to break the build... I think it's time to admit this is not making 2.1. Otavio: for reference, can you describe your use case in a little more detail? Are you thinking of running piglit on a non-mesa opengl or with just mesa gles or something else? Quick tests with various combos of the PACKAGECONFIGs I've added seem to suggest that piglit on mesa without X11 is not a very useful thing: it looks like only a handful of tests get included (even if gles tests are enabled).
Moving to 2.3. I'd still be interested in the details of the non-x11 use case as mentioned in comment 2.
I think this is possible but still not convinced it's a good use of my time: Piglit with mesa without X11 is not very useful. Someone working on non-mesa GL might have other priorities so I'm leaving it open: feel free to take the bug, someone.
I suspect a EGL-only no-X11 build of Piglit will be more useful these days.
I'll start to look into this one in 2.7 development cycle.
https://git.openembedded.org/openembedded-core/commit/?id=2edf7a19598e10326603603dfa00ab91c9327e2d