I have created a replacement for my kludge above called x11-devel.SlackBuild.
This was made from the existing x11.SlackBuild script.
It writes all output packages and modified configuration files to the /tmp/x11-devel/ directory.
It should leave the original x11 source files/scripts/configuration untouched.
It builds multiple x11-devel packages.
Use the script with Slackware 14.1 or newer by placing it in the source/x/x11 directory.
Then to build and install all available x11 static libraries, run these 3 commands:
#./x11-devel.SlackBuild app compiz
The created package files are put in the /tmp/x11-devel directory.
To create the packages without installation, run the scripts like this:
#UPGRADE_PACKAGES=no ./x11-devel.SlackBuild xcb
#UPGRADE_PACKAGES=no ./x11-devel.SlackBuild lib
#UPGRADE_PACKAGES=no ./x11-devel.SlackBuild app compiz