Xorg Protocol Headers

Introduction to Xorg Protocol Headers

The Xorg protocol headers provide the header files required to build the system, and to allow other applications to build against the installed X Window system.

This package is known to build and work properly using an LFS-7.4 platform.

Package Information

Xorg Protocol Headers Dependencies

Required

util-macros-1.17.1

Recommended

Sudo-1.8.7 and Wget-1.14

Optional

fop-1.1, xmlto-0.0.25 and AsciiDoc (to build additional documentation)

[Note]

Note

There is a reciprocal dependency with fop-1.1. If you wish to build the documentation, you'll need to re-install the Protocol Headers after the installation is complete and fop-1.1 has been installed.

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Xorg7ProtocolHeaders

Downloading Xorg Protocol Headers

First, create a list of files to be downloaded. This file will also be used to verify the integrity of the downloads when complete:

cat > proto-7.7.md5 << "EOF"
1a05fb01fa1d5198894c931cf925c025  bigreqsproto-1.1.2.tar.bz2
98482f65ba1e74a08bf5b056a4031ef0  compositeproto-0.4.2.tar.bz2
998e5904764b82642cc63d97b4ba9e95  damageproto-1.2.1.tar.bz2
4ee175bbd44d05c34d43bb129be5098a  dmxproto-2.3.1.tar.bz2
b2721d5d24c04d9980a0c6540cb5396a  dri2proto-2.8.tar.bz2
e7431ab84d37b2678af71e29355e101d  fixesproto-5.0.tar.bz2
c5f4f1fb4ba7766eedbc9489e81f3be2  fontsproto-2.1.2.tar.bz2
3847963c1b88fd04a030b932b0aece07  glproto-1.4.16.tar.bz2
94db391e60044e140c9854203d080654  inputproto-2.3.tar.bz2
677ea8523eec6caca86121ad2dca0b71  kbproto-1.0.6.tar.bz2
ce4d0b05675968e4c83e003cc809660d  randrproto-1.4.0.tar.bz2
1b4e5dede5ea51906f1530ca1e21d216  recordproto-1.14.2.tar.bz2
a914ccc1de66ddeb4b611c6b0686e274  renderproto-0.11.1.tar.bz2
cfdb57dae221b71b2703f8e2980eaaf4  resourceproto-1.2.0.tar.bz2
edd8a73775e8ece1d69515dd17767bfb  scrnsaverproto-1.2.2.tar.bz2
e658641595327d3990eab70fdb55ca8b  videoproto-2.3.2.tar.bz2
5f4847c78e41b801982c8a5e06365b24  xcmiscproto-1.2.2.tar.bz2
eaac343af094e6b608cf15cfba0f77c5  xextproto-7.2.1.tar.bz2
120e226ede5a4687b25dd357cc9b8efe  xf86bigfontproto-1.2.0.tar.bz2
a036dc2fcbf052ec10621fd48b68dbb1  xf86dgaproto-2.1.tar.bz2
1d716d0dac3b664e5ee20c69d34bc10e  xf86driproto-2.1.1.tar.bz2
e793ecefeaecfeabd1aed6a01095174e  xf86vidmodeproto-2.3.1.tar.bz2
9959fe0bfb22a0e7260433b8d199590a  xineramaproto-1.2.1.tar.bz2
9c0203c3bee4bac432ec504dc45712ed  xproto-7.0.24.tar.bz2
EOF

To download the needed files using wget, use the following commands:

mkdir proto &&
cd proto &&
grep -v '^#' ../proto-7.7.md5 | awk '{print $2}' | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/proto/ &&
md5sum -c ../proto-7.7.md5

Installation of Xorg Protocol Headers

[Note]

Note

When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

  1. Run the entire script as the root user (not recommended).

  2. Use the sudo command from the Sudo-1.8.7 package.

  3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

as_root()
{
  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"
  fi
}

export -f as_root

First, start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

for package in $(grep -v '^#' ../proto-7.7.md5 | awk '{print $2}')
do
  packagedir=${package%.tar.bz2}
  tar -xf $package
  pushd $packagedir
  ./configure $XORG_CONFIG
  as_root make install
  popd
  rm -rf $packagedir
done

Finally, exit the shell that was started earlier:

exit

Command Explanations

bash -e: This command starts a subshell that will exit if any command returns a value other than 0, causing the for loop to exit immediately if an error occurs. This also eliminates the need for the && construct used elsewhere in the book.

Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: $XORG_PREFIX/include/GL, $XORG_PREFIX/include/X11, $XORG_PREFIX/share/doc/bigreqsproto, $XORG_PREFIX/share/doc/compositeproto, $XORG_PREFIX/share/doc/damageproto, $XORG_PREFIX/share/doc/dri2proto, $XORG_PREFIX/share/doc/fixesproto, $XORG_PREFIX/share/doc/fontsproto, $XORG_PREFIX/share/doc/kbproto, $XORG_PREFIX/share/doc/randrproto, $XORG_PREFIX/share/doc/recordproto, $XORG_PREFIX/share/doc/renderproto, $XORG_PREFIX/share/doc/resourceproto, $XORG_PREFIX/share/doc/scrnsaverproto, $XORG_PREFIX/share/doc/videoproto, $XORG_PREFIX/share/doc/xcmiscproto, $XORG_PREFIX/share/doc/xextproto and $XORG_PREFIX/share/doc/xproto

Last updated on 2013-09-02 14:11:10 -0700