As discussed in https://developer.blender.org/D12034#412258, GLEW should be replaced by libepoxy to enable dynamic loading of OpenGL.
Build:
sh make lite debug ninja BUILD_CMAKE_ARGS="-DWITH_GHOST_X11=OFF -DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_LIBDECOR=ON -DPYTHON_VERSION=3.10" BUILD_DIR="../blender_build"
Verify that there are no X11 dependencies any more:
sh lddtree ./blender_build/bin/blender
and:
sh ./blender_build/bin/blender
should then start a pure Wayland client.
This also works with GLX (-DWITH_GHOST_X11=ON -DWITH_GHOST_WAYLAND=OFF).
This has not been tested on other systems (Windows, macOS) as I do not have access to those systems and the build bot does not allow me to trigger experimental builds any more (I get "you need to have role 'any-control'").