X11 r7.7 build fixes

The fixes make sure that the required libs and packages are build in the right order. This is required in order to link against the self build and not the system libraries (in case they are installed).