Skip to content

Commit

Permalink
Update wayland build script
Browse files Browse the repository at this point in the history
  • Loading branch information
elParaguayo committed May 19, 2024
1 parent 47c74ba commit d4cb435
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 31 deletions.
94 changes: 67 additions & 27 deletions scripts/ubuntu_wayland_setup
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,45 @@
set -e

# The versions we want
WAYLAND=1.21.0
WAYLAND_PROTOCOLS=1.31
WLROOTS=0.16.2
SEATD=0.7.0
WAYLAND=1.22.0
WAYLAND_PROTOCOLS=1.32
WLROOTS=0.17.3
SEATD=0.6.4
LIBDRM=2.4.114
PIXMAN=0.42.0
XWAYLAND=22.1.9
HWDATA=0.364

# Packaged dependencies
sudo apt update
sudo apt install --no-install-recommends \
ninja-build libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libinput-dev libxkbcommon-dev \
libpixman-1-dev libpciaccess-dev xwayland hwdata
sudo apt-get install -y --no-install-recommends \
libepoxy-dev \
libegl1-mesa-dev \
libgbm-dev \
libgles2-mesa-dev \
libinput-dev \
libpciaccess-dev \
libxcb-composite0-dev \
libxcb-dri3-dev \
libxcb-ewmh-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-present-dev \
libxcb-render0-dev \
libxcb-res0-dev \
libxcb-xfixes0-dev \
libxcb-xinput-dev \
libxcb1-dev \
libxfont-dev \
libxkbcommon-dev \
libxshmfence-dev \
xfonts-utils \
xserver-xorg-dev \
ninja-build
sudo pip install meson

# Build wayland
wget --no-check-certificate \
https://gitlab.freedesktop.org/wayland/wayland/-/releases/$WAYLAND/downloads/wayland-$WAYLAND.tar.xz
wget https://gitlab.freedesktop.org/wayland/wayland/-/releases/$WAYLAND/downloads/wayland-$WAYLAND.tar.xz
tar -xJf wayland-$WAYLAND.tar.xz
cd wayland-$WAYLAND
meson build -Ddocumentation=false --prefix=/usr
Expand All @@ -31,47 +55,63 @@ sudo ninja -C build install
cd ../

# Build wayland-protocols
wget --no-check-certificate \
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/$WAYLAND_PROTOCOLS/downloads/wayland-protocols-$WAYLAND_PROTOCOLS.tar.xz
wget https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/$WAYLAND_PROTOCOLS/downloads/wayland-protocols-$WAYLAND_PROTOCOLS.tar.xz
tar -xJf wayland-protocols-$WAYLAND_PROTOCOLS.tar.xz
cd wayland-protocols-$WAYLAND_PROTOCOLS
meson build -Dtests=false --prefix=/usr
ninja -C build
sudo ninja -C build install
cd ../

# Build libdrm
wget https://gitlab.freedesktop.org/mesa/drm/-/archive/libdrm-$LIBDRM/drm-libdrm-$LIBDRM.tar.gz
tar -xzf drm-libdrm-$LIBDRM.tar.gz
cd drm-libdrm-$LIBDRM
meson build --prefix=/usr
ninja -C build
sudo ninja -C build install
cd ../

# Build seatd
wget --no-check-certificate https://git.sr.ht/~kennylevinsen/seatd/archive/$SEATD.tar.gz
wget https://git.sr.ht/~kennylevinsen/seatd/archive/$SEATD.tar.gz
tar -xzf $SEATD.tar.gz
cd seatd-$SEATD
meson build --prefix=/usr
ninja -C build
sudo ninja -C build install
cd ../

# Build libdrm
wget --no-check-certificate \
https://gitlab.freedesktop.org/mesa/drm/-/archive/libdrm-$LIBDRM/drm-libdrm-$LIBDRM.tar.gz
tar -xzf drm-libdrm-$LIBDRM.tar.gz
cd drm-libdrm-$LIBDRM
# Build pixman
wget https://gitlab.freedesktop.org/pixman/pixman/-/archive/pixman-$PIXMAN/pixman-pixman-$PIXMAN.tar.gz
tar -xzf pixman-pixman-$PIXMAN.tar.gz
cd pixman-pixman-$PIXMAN
meson build --prefix=/usr
ninja -C build
sudo ninja -C build install
cd ../

# Build hwdata
wget https://github.com/vcrhonek/hwdata/archive/refs/tags/v$HWDATA.tar.gz
tar -xzf v$HWDATA.tar.gz
cd hwdata-$HWDATA
./configure --prefix=/usr --libdir=/lib --datadir=/usr/share
make
sudo make install
cd ../

# Build xwayland
wget https://gitlab.freedesktop.org/xorg/xserver/-/archive/xwayland-$XWAYLAND/xserver-xwayland-$XWAYLAND.tar.gz
tar -xzf xserver-xwayland-$XWAYLAND.tar.gz
cd xserver-xwayland-$XWAYLAND
meson build --prefix=/usr
ninja -C build
sudo ninja -C build install
cd ../

# Build wlroots
wget --no-check-certificate \
https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/$WLROOTS/wlroots-$WLROOTS.tar.gz
wget https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/$WLROOTS/wlroots-$WLROOTS.tar.gz
tar -xzf wlroots-$WLROOTS.tar.gz
cd wlroots-$WLROOTS

# Temporary hack for wlroots 0.16.0 - 0.16.2 which uses a workaround script at
# backend/drm/gen_pnpids.sh to generate a case statement, which doesn't compile
# on ubuntu due to duplicate conditions (acronyms in
# /usr/share/hwdata/pnp.ids). The case statement is only needed for getting the
# string representation of an output's manufacturer, which is fine for CI.
sudo truncate -s 0 /usr/share/hwdata/pnp.ids

meson build -Dexamples=false --prefix=/usr -Dxwayland=enabled
ninja -C build
sudo ninja -C build install
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ deps =
mypy
bowler
xkbcommon >= 0.3
pywayland == 0.4.15
pywayland == 0.4.17
dbus-next
PyGObject
requests
Expand All @@ -38,7 +38,7 @@ deps =
# pywayland has to be installed before pywlroots
commands =
pip install --force-reinstall --no-binary :all: cffi
pip install pywlroots==0.16.4
pip install pywlroots==0.17.0
pip install xcffib>=1.4.0 wheel
pip install cairocffi>=1.6.0
pip install --no-build-isolation --config-setting backend=wayland git+https://github.com/qtile/qtile.git
Expand Down Expand Up @@ -74,14 +74,14 @@ deps =
setuptools >= 40.5.0
xcffib >= 0.10.1
xkbcommon >= 0.3
pywayland == 0.4.15
pywayland == 0.4.17
dbus_next
requests
pint
stravalib <= 1.1.0
commands =
pip install --force-reinstall --no-binary :all: cffi
pip install pywlroots==0.16.4
pip install pywlroots==0.17.0
pip install xcffib>=1.4.0 wheel
pip install cairocffi>=1.6.0
pip install --no-build-isolation --config-setting backend=wayland git+https://github.com/qtile/qtile.git
Expand Down

0 comments on commit d4cb435

Please sign in to comment.