https://wayland.freedesktop.org/building.html
https://wayland.freedesktop.org/ubuntu12.04.html
1. source wayland.conf
2. cd wayland
./autogen.sh --prefix=$WLD
[err] package requirement: libffi
[fix] 确保os中已经安装libffi-dev的前提下,把 /usr/lib/i386-linux-gnu/pkgconfig 加入到 PKG_CONFIG_PATH 中去;
3. git clone wayland-protocal
./configure --prefix=$WLD
make & make install
4. install Mesa
wayland use Mesa_EGL stack.
https://mesa.freedesktop.org/archive/
$ git clone git://anongit.freedesktop.org/mesa/mesa
$ cd mesa
$ ./autogen.sh --prefix=$WLD --enable-gles2 \
--with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \
--with-gallium-drivers=r300,r600,swrast,nouveau
$ make && make install
[err] rendering requires libdrm >= 2.4.60
[fix] https://dri.freedesktop.org/libdrm/ install
[err] pciaccess >= 0.10
[fix] apt-get install libpciaccess-dev
[err] dri3proto >= 1.0
[fix] --disable-dri3
[err] no package libomxil-bellagio
[fix] apt-get install libomxil-bellagio-dev
[err] LLVM is required to build Gallium R300 on x86 and x86_64
[fix] apt-get install llvm-3.0-dev llvm-dev
[err] LLVM 3.3 or newer is required
[fix] http://llvm.org/releases/download.html#3.8.0
or set [--with-gallium-drivers=""] to ignore it. (not used yet)
[final] using: --with-gallium-drivers=""
$ 换用 mesa-10.2.0
./autogen.sh --prefix=$WLD
./configure --prefix=$WLD
[err] dri3proto >= 1.0
[fix] --disable-dri3
[err] llvm
[fix] ./configure --prefix=$WLD --disable-dri3 --with-llvm-prefix=/usr/lib/llvm-3.1/lib/
[err] need LLVM
[fix] ./configure --prefix=$WLD --disable-dri3 --with-llvm-prefix=/usr/lib/llvm-3.1/lib/ --with-gallium-drivers=""
$ make & sudo make install
done
4. install Weston
git clone git://anongit.freedesktop.org/wayland/weston
$cd weston
$./configure --prefix=$WLD --disable-setuid-install
4.1 libinput
[err] libinput >= 0.8.0
[fix] https://wayland.freedesktop.org/libinput/doc/0.9/
http://cgit.freedesktop.org/wayland/libinput
git://anongit.freedesktop.org/wayland/libinput
ssh://git.freedesktop.org/git/wayland/libinput
https://anongit.freedesktop.org/git/wayland/libinput.git
git clone https://anongit.freedesktop.org/git/wayland/libinput.git
git checkout 0.9.0 (tag)
[err] http request refused
[fix] git config --global http.sslVerify false
$./autogen.sh --prefix=$WLD --disable-libwacom
4.1.1 need libevdev >= 0.4
git clone git://anongit.freedesktop.org/libevdev
cd libevdev
./autogen.sh --prefix=$WLD
https://anongit.freedesktop.org/git/libevdev.git
git checkout libevdev-0.6
4.2 need [wayland-server >= 1.10.0 pixman-1 >= 0.25.2 xkbcommon >= 0.3.0]
4.2.1 wayland-server
重新下载weston.git & git checkout 1.6.0
$./autogen.sh --prefix=$WLD --disable-setuid-install
4.2.2 xkbcommon
git clone git://github.com/xkbcommon/libxkbcommon
cd libxkbcommon
./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb
$git clone https://github.com/xkbcommon/libxkbcommon
$git checkout xkbcommon-0.3.2
4.2.2.1 need xorg-macros 1.16
git clone git://anongit.freedesktop.org/xorg/util/macros
cd macros
./autogen.sh --prefix=$WLD
4.3 need pam
sudo apt-get install libpam0g-dev
4.4 src/libinput-device.c:137:2: error: too few arguments to function ‘libinput_event_pointer_get_axis_value’
原因: weston版本太低,与 libinput 不匹配 (或者libinput版本太高)
查看./configure, weston 1.6.0 匹配的libinput版本为 0.6.0
重新编译安装libinput 0.6.0