#!/bin/bash . ~/bin/wl_defines.sh if [ ! -e $WLROOT ]; then exit 1 fi # Bail if errors set -e gen() { pkg=$1 shift echo echo $pkg cd $WLROOT/$pkg echo "./autogen.sh --prefix=$WLD $*" ./autogen.sh --prefix=$WLD $* } compile() { make -j32 && make install if [ $? != 0 ]; then echo "Build Error. Terminating" exit fi } distcheck() { make distcheck } # TODO: Check if tree doesn't exist # TODO: Log output # TODO: If it's been a while since we last ran successfully, then # delete $WLD mkdir -p $WLD/share/aclocal gen wayland compile gen drm --disable-libkms compile gen proto compile gen macros compile gen libxcb compile gen presentproto compile gen dri3proto compile gen libxshmfence compile gen libxkbcommon \ --with-xkb-config-root=/usr/share/X11/xkb \ --disable-x11 compile echo echo "mesa" cd $WLROOT/mesa git clean -xfd ./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \ --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \ --disable-llvm-shared-libs \ --disable-dri3 \ --with-gallium-drivers=swrast,nouveau,r300,r600 # --disable-opencl \ compile gen pixman compile gen cairo --enable-xcb --enable-gl compile echo echo "libunwind" cd $WLROOT/libunwind autoreconf -i ./configure --prefix=$WLD compile gen libevdev compile gen libinput compile if [ ${INCLUDE_XWAYLAND} ]; then if [ ${WL_BITS} = 32 ]; then gen libxtrans compile fi gen xproto compile gen libepoxy compile gen glproto compile gen xcmiscproto compile gen libxtrans compile gen bigreqsproto compile gen xextproto compile gen fontsproto compile gen videoproto compile gen recordproto compile gen resourceproto compile gen xf86driproto compile gen randrproto compile gen libxkbfile compile echo echo "xserver" cd $WLROOT/xserver ./autogen.sh --prefix=$WLD --disable-docs --disable-devel-docs \ --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest \ --disable-xquartz --disable-xwin compile echo echo "Paths" mkdir -p $WLD/share/X11/xkb/rules if [ ! -e $WLD/share/X11/xkb/rules/evdev ]; then ln -s /usr/share/X11/xkb/rules/evdev $WLD/share/X11/xkb/rules/ fi if [ ! -e $WLD/bin/xkbcomp ]; then ln -s /usr/bin/xkbcomp $WLD/bin/ fi fi echo echo "weston" cd $WLROOT/weston git clean -xfd ./autogen.sh --prefix=$WLD \ --with-cairo=image \ --with-xserver-path=$WLD/bin/Xwayland \ --enable-setuid-install=no \ --enable-clients \ --enable-headless-compositor \ --enable-demo-clients-install compile #distcheck cd $WLROOT