Skip to content

Commit

Permalink
separate out qtwayland5 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewb1 committed Oct 25, 2023
1 parent 2bca14d commit f8d5b63
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
11 changes: 7 additions & 4 deletions Dockerfile.agnos
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ FROM agnos-compiler as agnos-compiler-mapbox-gl-native
COPY ./userspace/compile-mapbox-gl-native.sh /tmp/agnos/
RUN /tmp/agnos/compile-mapbox-gl-native.sh

FROM agnos-compiler as agnos-compiler-qtwayland5
COPY ./userspace/compile-qtwayland5.sh /tmp/agnos/
COPY ./userspace/qtwayland/patch /tmp/agnos/
RUN /tmp/agnos/compile-qtwayland5.sh

# ################### #
# ###### AGNOS ###### #
# ################### #
Expand Down Expand Up @@ -109,10 +114,8 @@ RUN /tmp/agnos/install_extras.sh
COPY ./userspace/qtwayland/libffi.so.6 /lib/aarch64-linux-gnu/
COPY ./userspace/qtwayland/libwayland-client.so.0 /lib/aarch64-linux-gnu/libwayland-client.so.0

# Patched qtwayland that does not use EGL EXT, and outputs a fixed screen size
# Clone qtwayland submodule, checkout 5.12.9 (5.12.8 leaks timers, see https://bugreports.qt.io/browse/QTBUG-82914), apply patch, qmake, make
COPY ./userspace/qtwayland/libqwayland-egl.so /lib/aarch64-linux-gnu/qt5/plugins/platforms/libqwayland-egl.so
COPY ./userspace/qtwayland/libQt5WaylandClient.so.5.12.8 /lib/aarch64-linux-gnu/libQt5WaylandClient.so.5.12.8
COPY --from=agnos-compiler-qtwayland5 /tmp/qtwayland5.deb /tmp/qtwayland5.deb
RUN cd /tmp && apt-get -o Dpkg::Options::="--force-overwrite" install -yq --allow-downgrades ./qtwayland5.deb

# Patched libeglSubDriverWayland with fixed nullptr deref in CommitBuffer
COPY ./userspace/files/libeglSubDriverWayland.so.patched /lib/aarch64-linux-gnu/libeglSubDriverWayland.so
Expand Down
21 changes: 21 additions & 0 deletions userspace/compile-qtwayland5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -e

# Patched qtwayland that outputs a fixed screen size
# Clone qtwayland submodule, checkout 5.12.9 (5.12.8 leaks timers, see https://bugreports.qt.io/browse/QTBUG-82914), apply patch, qmake, make

apt update && apt install -y qt5-qmake qtbase5-dev qtbase5-dev-tools

cd /tmp
git clone --branch v5.12.9 https://github.com/qt/qtwayland.git
cd qtwayland

git apply /tmp/agnos/patch

mkdir /tmp/build && cd /tmp/build
qmake /tmp/qtwayland

export MAKEFLAGS="-j$(nproc)"
make

checkinstall -yD --install=no --pkgversion="5.12.8" --pkgname=qtwayland5 --pkgarch=arm64 --replaces=qtwayland5,libqt5waylandclient5,libqt5waylandcompositor5
mv qtwayland5*.deb /tmp/qtwayland5.deb
2 changes: 0 additions & 2 deletions userspace/qtwayland/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
libffi.so.6 filter=lfs diff=lfs merge=lfs -text
libqwayland-egl.so filter=lfs diff=lfs merge=lfs -text
libwayland-client.so.0 filter=lfs diff=lfs merge=lfs -text
libQt5WaylandClient.so.5.12.8 filter=lfs diff=lfs merge=lfs -text
3 changes: 0 additions & 3 deletions userspace/qtwayland/libQt5WaylandClient.so.5.12.8

This file was deleted.

3 changes: 0 additions & 3 deletions userspace/qtwayland/libqwayland-egl.so

This file was deleted.

0 comments on commit f8d5b63

Please sign in to comment.