[PATCH wayland-web 2/7] Simple updates to Weston build instructions

Bill Spitzak spitzak at gmail.com
Fri May 23 18:54:34 PDT 2014


From: Bill Spitzak <wspitzak at oblong.com>

- $WLD/bin must be on the path

- Put info about system-wide install in one place

- Removed drm, libxkbcommon, pixman, cairo as distributed versions
  are usable nowadays.

- Added libinput
---
 building.html |  162 +++++++++++++++++++++++++++------------------------------
 1 file changed, 76 insertions(+), 86 deletions(-)

diff --git a/building.html b/building.html
index 04c2c8b..6e28935 100644
--- a/building.html
+++ b/building.html
@@ -4,7 +4,7 @@
 <head> 
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
 <link href="wayland.css" rel="stylesheet" type="text/css">
-<title>Wayland</title> 
+<title>Building Weston</title> 
 </head>
 
 <body>
@@ -14,10 +14,7 @@
 building and running experimental software.  Also, be prepared for the fact that this
 project is still very much a prototype.  When the instructions suggest to clone a git repo, you can
 of course just add a remote and fetch instead, if you have a clone of
-that repo around already.  By default the software is installed in $HOME/install
-but you can change it by altering $WLD (explained later). You can also install
-everything system-wide by setting WLD to /usr and passing --sysconfdir=/etc
-to autogen.sh.</p>
+that repo around already.</p>
 
 <h2>Hardware / Drivers</h2>
 
@@ -49,13 +46,15 @@ Pi</a>, see <a href="raspberrypi.html">Raspberry Pi build guide</a>.</p>
 the following environment variables to get various libraries to link
 appropriately:</p>
 
-<pre>WLD=$HOME/install   # change this to another location if you prefer
-LD_LIBRARY_PATH=$WLD/lib
-PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
-ACLOCAL_PATH="$WLD/share/aclocal"
-ACLOCAL="aclocal -I $ACLOCAL_PATH"
-
-export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL ACLOCAL_PATH
+<pre>
+export WLD=$HOME/install   <font color=#800># change this to another location if you prefer</font>
+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 $WLD/share/aclocal <font color=#800># needed by autotools</font>
 </pre>
 
 <p>Do not set LD_LIBRARY_PATH as your default, it will break things.</p>
@@ -63,11 +62,18 @@ export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL ACLOCAL_PATH
 you wish to build the packages.</p>
 
 <h3>Installing system wide</h3>
-<p>To install system wide, you'll need to set this variable, and possibly
-build with --libdir=/usr/lib64 :</p>
 
-<pre>WLD=/usr
-export WLD
+<p>To install system wide, you'll need to set WLD differently, and add
+some switches to the autogen.sh lines, and use sudo to make
+install:</p>
+
+<pre>
+export WLD=/usr
+...
+./autogen.sh --prefix=$WLD --libdir=/usr/lib64 --sysconfdir=/etc
+make
+sudo make install
+...
 </pre>
 
 <h2>Wayland libraries</h2>
@@ -75,11 +81,12 @@ export WLD
 <p>This is required in order to be able to build Mesa with
 --with-egl-platforms=x11,wayland,drm.</p>
 
-<pre>    $ git clone git://anongit.freedesktop.org/wayland/wayland
-    $ cd wayland
-    $ ./autogen.sh --prefix=$WLD
-    $ make
-    $ make install
+<pre>
+$ git clone git://anongit.freedesktop.org/wayland/wayland
+$ cd wayland
+$ ./autogen.sh --prefix=$WLD
+$ make && make install
+$ cd ..
 </pre>
 
 <h2>Mesa</h2>
@@ -93,17 +100,14 @@ optimization will only be available in more recent releases.</p>
 Other dependencies are development packages of xcb-dri2 and
 xcb-xfixes.</p>
 
-<pre>    $ git clone git://anongit.freedesktop.org/git/mesa/drm
-    $ cd drm
-    $ ./autogen.sh --prefix=$WLD
-    $ make && make install
-
-    $ git clone git://anongit.freedesktop.org/mesa/mesa
-    $ cd mesa
-    $ ./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
-      --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \
-      --with-gallium-drivers=r300,r600,swrast,nouveau
-    $ make && make install
+<pre>
+$ git clone git://anongit.freedesktop.org/mesa/mesa
+$ cd mesa
+$ ./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
+  --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \
+  --with-gallium-drivers=r300,r600,swrast,nouveau
+$ make && make install
+$ cd ..
 </pre>
 
 <p>We disable Gallium for Intel 915 and 965, which just means that libEGL
@@ -113,50 +117,35 @@ be built as DRI drivers, which the EGL loader will load just fine.</p>
 <p><a href="mesa-configure.html">Example mesa configure output.</a></p>
 
 <p>Note on Mesa build failures:  If you're not building in your Mesa git
-repo for the first time, the first thing to try is always "git clean
--xfd", and possibly deleting your $WLD directory, as Mesa requires
+repo for the first time, the first thing to try is always "<code>git clean&nbps;-xfd</code>", and possibly deleting your $WLD directory, as Mesa requires
 this often.</p>
 
-<h2>libxkbcommon</h2>
-
-<p>Wayland needs libxkbcommon >= 0.3.0 for translating evdev keycodes to keysyms.</p>
-
-<pre>    $ git clone git://github.com/xkbcommon/libxkbcommon
-    $ cd libxkbcommon/
-    $ ./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb
-    $ make && make install
-</pre>
-
-<h2>cairo-gl</h2>
-
-<p>The Wayland clients can render using cairo-gl, but fall back to
-software when cairo-gl is not available.  For cairo-gl, cairo 1.11.3
-or newer is needed.  For this you'll need a development package for
-pixman.</p>
-
-<pre>    $ git clone git://anongit.freedesktop.org/pixman
-    $ cd pixman
-    $ ./autogen.sh --prefix=$WLD
-    $ make && make install
-
-    $ git clone git://anongit.freedesktop.org/cairo
-    $ cd cairo
-    $ ./autogen.sh --prefix=$WLD --enable-gl --enable-xcb
-    $ make && make install
-</pre>
-
 <h2>libunwind</h2>
 
 <p>Weston requires libunwind v1.1 if you don't configure with
 --disable-libunwind .</p>
 
-<pre>    $ git clone git://git.sv.gnu.org/libunwind
-    $ cd libunwind
-    $ autoreconf -i
-    $ ./configure --prefix=$WLD
-    $ make && make install
+<pre>
+$ git clone git://git.sv.gnu.org/libunwind
+$ cd libunwind
+$ autoreconf -i
+$ ./configure --prefix=$WLD
+$ make && make install
+$ cd ..
 </pre>
 
+<h2>libinput</h2>
+
+<p>Libinput translates evdev events into Wayland events. It has been split
+from Weston as the code is reusable by any Wayland compositor on Linux.</p>
+
+<pre>
+$ git clone git://anongit.freedesktop.org/wayland/libinput
+$ cd libinput
+$ ./autogen.sh --prefix=$WLD
+$ make && make install
+$ cd ..
+</pre>
 
 <h2><code>$XDG_RUNTIME_DIR</code></h2>
 
@@ -223,15 +212,14 @@ pixman-1,
 cairo-gl 1.11.3,
 glib-2.0, and
 gobject-2.0.  
-And optionally, for the pdf viewer:
-poppler-glib and
-gio-2.0.</p>
-
-<pre>    $ git clone git://anongit.freedesktop.org/wayland/weston
-    $ cd weston
-    $ ./autogen.sh --prefix=$WLD
-    $ make
-    $ make install
+</p>
+
+<pre>
+$ git clone git://anongit.freedesktop.org/wayland/weston
+$ cd weston
+$ ./autogen.sh --prefix=$WLD --enable-libinput-backend --disable-setuid-install
+$ make && make install
+$ cd ..
 </pre>
 
 <p>If DISPLAY is set, the weston will run under X in a window and take
@@ -240,27 +228,29 @@ from evdev devices.  Copy the weston.ini config file to ~/.config and
 edit it to set a background image that you like.  Then run the compositor
 by typing:</p>
 
-<pre>    $ ./weston
+<pre>
+$ weston
 </pre>
 
 <p>For KMS/DRM output (outside of X) use weston-launch, which needs
-root permissions, which are set if "make install" is run as root,
-but some distributions disable it.  It also requires that you enable
+root permissions.  It also requires that you enable
 systemd session support for weston-launch (by using systemd and having
 the systemd-login devel headers at configure time) or add yourself to the
 "weston-launch" group:</p>
 
-<pre>    $ sudo groupadd weston-launch
-    $ sudo usermod -a -G weston-launch $USER
-    $ # Log all the way out (of X, etc.)
-    $ sudo chown root weston-launch
-    $ sudo chmod +s weston-launch
-    $ weston-launch
+<pre>
+$ sudo groupadd weston-launch
+$ sudo usermod -a -G $WLD/bin/weston-launch $USER
+$ <font color=#800># Log all the way out (of X, etc.)</font>
+$ sudo chown root $WLD/bin/weston-launch
+$ sudo chmod +s $WLD/bin/weston-launch
+$ weston-launch
 </pre>
 
 <p>To run clients, switch to a different VT and run the client from
 there.  Or run it under X and start up the clients from a terminal
-window.  There are a few demo clients available, but they are all
+window.  There are a few demo clients available in the weston build
+directory, but they are all
 pretty simple and mostly for testing specific features in the wayland
 protocol: </p>
 
-- 
1.7.9.5



More information about the wayland-devel mailing list