Skip to content

Instantly share code, notes, and snippets.

@colesnicov
Forked from tmpvar/wayland-build.sh
Created September 1, 2024 10:00
Show Gist options
  • Save colesnicov/e882e565b29e710463eb6827aecd25b6 to your computer and use it in GitHub Desktop.
Save colesnicov/e882e565b29e710463eb6827aecd25b6 to your computer and use it in GitHub Desktop.
#!/bin/sh
PREFIX=$HOME/wayland-install
aptitude update
aptitude install build-essential autoconf automake libtool libpthread-stubs0-dev git-core libx11-dev x11proto-dri2-dev x11proto-gl-dev libxext-dev libxxf86vm-dev libxdamage-dev libxfixes-dev libexpat1-dev libxt-dev libxi-dev libxmu-dev libudev-dev libgl1-mesa-dev libx11-xcb-dev libxcb-render0-dev libpng-dev libpixman-1-dev python libffi-dev libgdk-pixbuf-dev libglib2.0-dev libpoppler-glib-dev
aptitude build-dep mesa
wget http://cgit.freedesktop.org/mesa/drm/snapshot/drm-2.4.15.tar.gz
tar -xzf drm-2.4.15.tar.gz
cd drm-2.4.15
wget http://sources.openelec.tv/patches/libdrm/2.4.15/libdrm-page-flip.diff
patch -p1 < libdrm-page-flip.diff
./autogen.sh
./configure --prefix=$PREFIX
if "$?" -ne "0" ]; then
exit 1
fi
make
if [ "$?" -ne "0" ]; then
exit 1
fi
make install
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
cd ..
git clone git://anongit.freedesktop.org/git/xorg/util/macros
touch macros.fetched
cd macros
./autogen.sh
./configure --prefix=$PREFIX
if [ "$?" -ne "0" ]; then
exit 1
fi
make
if [ "$?" -ne "0" ]; then
exit 1
fi
make install
cd ..
git clone git://anongit.freedesktop.org/git/xorg/proto/dri2proto
mkdir $PREFIX/include/X11
mkdir $PREFIX/include/X11/extensions
cp dri2proto/dri2proto.h $PREFIX/include/X11/extensions/dri2proto.h
git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa
git clone git://people.freedesktop.org/~krh/eagle
./autogen.sh
./configure --prefix=$PREFIX
if [ "$?" -ne "0" ]; then
exit 1
fi
make
if [ "$?" -ne "0" ]; then
exit 1
fi
make install
cd eagle
autoreconf
./configure --prefix=$PREFIX
if [ "$?" -ne "0" ]; then
exit 1
fi
make
make install
cd ../..
wget http://cairographics.org/releases/pixman-0.17.8.tar.gz
tar xzf pixman-0.17.8.tar.gz
cd pixman-0.17.8
./configure --prefix=$PREFIX
make
make install
cd ..
git clone git://anongit.freedesktop.org/git/cairo
cd cairo
./autogen.sh --prefix=$PREFIX --sysconfdir=/etc --localstatedir=/var --enable-xcb --disable-static --enable-drm
if [ "$?" -ne "0" ]; then
exit 1
fi
make
if [ "$?" -ne "0" ]; then
exit 1
fi
make install
cd ..
export LD_LIBRARY_PATH=$PREFIX/lib
export EAGLE_DRIVER_PATH=$PREFIX/lib/dri
git clone git://people.freedesktop.org/~krh/wayland
cd wayland
autoreconf
./configure --prefix=$PREFIX
make
if [ "$?" -ne "0" ]; then
exit 1
fi
make install
mv $PREFIX/etc/udev/rules.d/70-wayland.rules /etc/udev/rules.d/70-wayland.rules
/sbin/udevadm trigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment