weston install script
export WLD=~/usrfs # change this to another location if you prefer
export LD_LIBRARY_PATH=$WLD/lib
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig"
export PATH=$WLD/bin:$PATH
export ACLOCAL_PATH=$WLD/share/aclocal
export ACLOCAL="aclocal -I $ACLOCAL_PATH"
export XDG_RUNTIME_DIR=/tmp
#!/bin/bash
set -e // error があった場合中断
script_dir=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)
source $script_dir/weston_env
sudo -E apt-get install -y \
build-essential pkg-config cmake autoconf automake libtool bison debhelper dpkg-dev flex \
libudev-dev libx11-dev libx11-xcb-dev \
libxdamage-dev libxext-dev libxfixes-dev libxxf86vm-dev \
linux-libc-dev pkg-config python-libxml2 quilt x11proto-dri2-dev \
x11proto-gl-dev xutils-dev libpciaccess-dev \
libffi-dev libmtdev-dev libevdev-dev \
libomxil-bellagio-dev \
libxcb-composite0-dev libjpeg-dev libpam-dev libdrm-dev\
libxcb-glx0-dev libxcb-dri2-0-dev libxcursor-dev libxkbcommon-dev\
python-mako libcairo2-dev \
x11proto-dri3-dev x11proto-present-dev libxcb-dri3-dev libxcb-present-dev libxshmfence-dev \
libxml2-dev
function echo_blue() { echo -e "\e[2;34m$*\e[m"; }
# install directory
mkdir -p ~/usrfs/bin
mkdir -p ~/usrfs/share/aclocal # needed by autotools
# work directory
mkdir -p ~/work/weston
cd ~/work/weston
git clone git://git.sv.gnu.org/libunwind
git clone --depth 1 -b 1.1.5 git://anongit.freedesktop.org/wayland/libinput
git clone --depth 1 -b 1.10.0 git://anongit.freedesktop.org/wayland/wayland
git clone --depth 1 -b mesa-10.4.7 git://anongit.freedesktop.org/mesa/mesa
git clone --depth 1 -b 1.1 git://anongit.freedesktop.org/wayland/wayland-protocols
git clone --depth 1 -b 1.10.0 git://anongit.freedesktop.org/wayland/weston
git clone --depth 1 -b 1.5.0 https://github.com/GENIVI/wayland-ivi-extension.git
echo_blue "----libunwind"
cd libunwind
autoreconf -i
./configure --prefix=$WLD
make && make install
cd ..
echo_blue "----libinput"
cd libinput
./autogen.sh --prefix=$WLD
make && make install
cd ..
echo_blue "----wayland"
cd wayland
./autogen.sh --prefix=$WLD --disable-documentation
make && make install
cd ..
echo_blue "----mesa"
cd mesa
OPT="--enable-gles2 --disable-gallium-egl --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi -with-gallium-drivers=svga --with-dri-drivers= --disable-dri3"
case "${MESA_BACKEND}" in
"vmware" ) ;; # default
"native" ) OPT="--enable-gles2 --disable-gallium-egl --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi --with-gallium-drivers=r300,r600,swrast,nouveau" ;;
"docker" ) OPT="--enable-gles2 --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi --disable-llvm-shared-libs --disable-gallium-llvm --disable-dri3 --with-gallium-drivers=swrast,nouveau" ;;
esac
./autogen.sh --prefix=$WLD $OPT
make -j4 && make install
cd ..
echo_blue "----wayland-protocols"
cd wayland-protocols
./autogen.sh --prefix=$WLD
make && make install
cd ..
echo_blue "----weston-ivi-shell"
cd weston
./autogen.sh --prefix=$WLD --with-xserver-path=$WLD/bin/Xwayland
make && sudo make install
cd ..
echo_blue "----wayland-ivi-extension"
cd wayland-ivi-extension
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE="${script_dir}/setting.cmake" ../
cmake -DCMAKE_TOOLCHAIN_FILE="${script_dir}/setting.cmake" ../
make && sudo make install
cd ..
set (CMAKE_INSTALL_PREFIX "$ENV{HOME}/usrfs")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g3")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g3")