Wayland logo Building Weston on Linux Mint 17

The following sequence of commands successfully built Weston and XWayland on a Linux Mint 17.3 Cinnamon system, on March 2, 2016. These commands will probably work on any system based on Ubuntu 14.04.

This is considerably easier than earlier systems as the distributed version of Mesa (10.1.3) can be used and it does not need to be compiled.

apt install git autoconf automake libtool

# setup environment for local install:
export WLD=$HOME/install
export LD_LIBRARY_PATH=$WLD/lib
export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
export PATH=$WLD/bin:$PATH
export ACLOCAL_PATH=$WLD/share/aclocal
export ACLOCAL="aclocal -I $ACLOCAL_PATH"
mkdir -p $ACLOCAL_PATH
export MAKEFLAGS="j9" # or use your own flags

# libwayland:

apt install libffi-dev libexpat-dev libxml2-dev
apt install doxygen xmlto # or use --disable-documentation

git clone git://anongit.freedesktop.org/wayland/wayland
cd wayland
./autogen.sh --prefix=$WLD
make && make install
cd ..

# wayland-protocols:

git clone git://anongit.freedesktop.org/wayland/wayland-protocols
cd wayland-protocols
./autogen.sh --prefix=$WLD
make && make install
cd ..

# libinput:

apt install libmtdev-dev libudev-dev libevdev-dev

# newer version of libwacom is needed than in apt
apt install libgudev-1.0-dev
git clone git://git.code.sf.net/p/linuxwacom/libwacom
cd libwacom
make && make install
cd ..

git clone git://anongit.freedesktop.org/wayland/libinput
cd libinput
./autogen.sh --prefix=$WLD
make && make install
cd ..

# weston:

apt install libegl1-mesa-dev libgles2-mesa-dev libxcursor-dev libcairo2-dev \
  libxcb-composite0-dev libgbm-dev libxkbcommon-dev libjpeg8-dev \
  libpam0g-dev

git clone git://anongit.freedesktop.org/wayland/weston
cd weston
./autogen.sh --prefix=$WLD --disable-setuid-install
make && make install
cd ..

# X Server:

apt install libgl1-mesa-dri-dev libgcrypt11-dev libxkbfile-dev libxfont-dev \
  libepoxy-dev

git clone git://anongit.freedesktop.org/xorg/util/macros
cd macros
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/xcmiscproto
cd xcmiscproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/lib/libxtrans
cd libxtrans
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/bigreqsproto
cd bigreqsproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/xproto
cd xproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/randrproto
cd randrproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/fontsproto
cd fontsproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/videoproto
cd videoproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/compositeproto
cd compositeproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/recordproto
cd recordproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/scrnsaverproto
cd scrnsaverproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/resourceproto
cd resourceproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/xf86driproto
cd xf86driproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/presentproto
cd presentproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/proto/xineramaproto
cd xineramaproto
./autogen.sh --prefix=$WLD
make && make install
cd ..

git clone git://anongit.freedesktop.org/xorg/xserver
cd xserver
./autogen.sh --prefix=$WLD --disable-docs --disable-devel-docs \
  --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest \
  --disable-xquartz --disable-xwin
make && make install
cd ..

# Links needed so XWayland works:
mkdir -p $WLD/share/X11/xkb/rules
ln -s /usr/share/X11/xkb/rules/evdev $WLD/share/X11/xkb/rules/
ln -s /usr/bin/xkbcomp $WLD/bin/

# Weston configuration:
mkdir -p ~/.config
cp weston/weston.ini ~/.config
nano ~/.config/weston.ini # edit to set background and turn on xwayland.so module

# Run it in an X11 window:
weston