It looks like non-x11 builds gained X11 dependency and mesa fails to
build in DISTROs without x11 in DISTRO_FEATURES:
mesa-11.1.1/src/loader/loader_dri3_helper.c:28:27: fatal error:
X11/xshmfence.h: No such file or directory
Just had a look at this. The dri3 packageconfig explicitly depends on xshmfence and if disabled then --disable-dri3 is passed. Can you replicate this, and if so can you share the configure log?