From 21ec5756711485f60f81204b64e7fa5f421b5dfb Mon Sep 17 00:00:00 2001 From: Ankith <46915066+ankith26@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:56:47 +0530 Subject: [PATCH 1/5] Add libxml2 and update libffi (for wayland) --- .../docker_base/Dockerfile-aarch64 | 9 ++++++--- .../docker_base/Dockerfile-i686 | 11 +++++++---- .../docker_base/Dockerfile-x86_64 | 9 ++++++--- .../docker_base/libffi/build-libffi.sh | 3 ++- .../docker_base/libxml2/build-libxml2.sh | 18 ++++++++++++++++++ .../docker_base/libxml2/libxml2.sha512 | 1 + 6 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 buildconfig/manylinux-build/docker_base/libxml2/build-libxml2.sh create mode 100644 buildconfig/manylinux-build/docker_base/libxml2/libxml2.sha512 diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 index 05a06c2597..ce6b495b82 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 @@ -44,6 +44,12 @@ RUN ["bash", "/pkg-config_build/build-pkg-config.sh"] ADD buildtools /buildtools/ RUN ["bash", "/buildtools/install.sh"] +ADD libffi /libffi_build/ +RUN ["bash", "/libffi_build/build-libffi.sh"] + +ADD libxml2 /libxml2_build/ +RUN ["bash", "/libxml2_build/build-libxml2.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] @@ -94,9 +100,6 @@ RUN ["bash", "/pulseaudio_build/build-pulseaudio.sh"] ADD libxmp /libxmp_build/ RUN ["bash", "/libxmp_build/build-libxmp.sh"] -ADD libffi /libffi_build/ -RUN ["bash", "/libffi_build/build-libffi.sh"] - # explicit install not needed anymore # ADD gettext /gettext_build/ # RUN ["bash", "/gettext_build/build-gettext.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 index a1154a30cd..d979f0a1d7 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 @@ -44,6 +44,12 @@ RUN ["linux32", "bash", "/pkg-config_build/build-pkg-config.sh"] ADD buildtools /buildtools/ RUN ["linux32", "bash", "/buildtools/install.sh"] +ADD libffi /libffi_build/ +RUN ["linux32", "bash", "/libffi_build/build-libffi.sh"] + +ADD libxml2 /libxml2_build/ +RUN ["linux32", "bash", "/libxml2_build/build-libxml2.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["linux32", "bash", "/zlib-ng_build/build-zlib-ng.sh"] @@ -94,15 +100,12 @@ RUN ["linux32", "bash", "/pulseaudio_build/build-pulseaudio.sh"] ADD libxmp /libxmp_build/ RUN ["linux32", "bash", "/libxmp_build/build-libxmp.sh"] -ADD libffi /libffi_build/ -RUN ["bash", "/libffi_build/build-libffi.sh"] - # explicit install not needed anymore # ADD gettext /gettext_build/ # RUN ["bash", "/gettext_build/build-gettext.sh"] ADD glib /glib_build/ -RUN ["bash", "/glib_build/build-glib.sh"] +RUN ["linux32", "bash", "/glib_build/build-glib.sh"] ADD fluidsynth /fluidsynth_build/ RUN ["linux32", "bash", "/fluidsynth_build/build-fluidsynth.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 index 9b51b3bb6f..1e6fee8fe6 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 @@ -44,6 +44,12 @@ RUN ["bash", "/pkg-config_build/build-pkg-config.sh"] ADD buildtools /buildtools/ RUN ["bash", "/buildtools/install.sh"] +ADD libffi /libffi_build/ +RUN ["bash", "/libffi_build/build-libffi.sh"] + +ADD libxml2 /libxml2_build/ +RUN ["bash", "/libxml2_build/build-libxml2.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] @@ -94,9 +100,6 @@ RUN ["bash", "/pulseaudio_build/build-pulseaudio.sh"] ADD libxmp /libxmp_build/ RUN ["bash", "/libxmp_build/build-libxmp.sh"] -ADD libffi /libffi_build/ -RUN ["bash", "/libffi_build/build-libffi.sh"] - # explicit install not needed anymore # ADD gettext /gettext_build/ # RUN ["bash", "/gettext_build/build-gettext.sh"] diff --git a/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh b/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh index fb482dabb6..c4c887be75 100644 --- a/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh +++ b/buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh @@ -13,6 +13,7 @@ sha512sum -c libffi.sha512 tar xzf ${LIBFFI}.tar.gz cd $LIBFFI -./configure $PG_BASE_CONFIGURE_FLAGS +# --disable-multi-os-directory is passed so that /usr/local/lib is used +./configure $PG_BASE_CONFIGURE_FLAGS --disable-docs --disable-multi-os-directory make make install diff --git a/buildconfig/manylinux-build/docker_base/libxml2/build-libxml2.sh b/buildconfig/manylinux-build/docker_base/libxml2/build-libxml2.sh new file mode 100644 index 0000000000..c3a6c23372 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/libxml2/build-libxml2.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +LIBXML2_VER=2.11 +LIBXML2_PATCH=7 +LIBXML2="libxml2-$LIBXML2_VER.$LIBXML2_PATCH" + +curl -sL --retry 10 https://download.gnome.org/sources/libxml2/${LIBXML2_VER}/${LIBXML2}.tar.xz > ${LIBXML2}.tar.xz +sha512sum -c libxml2.sha512 + +tar xf ${LIBXML2}.tar.xz +cd $LIBXML2 + +./configure $PG_BASE_CONFIGURE_FLAGS --disable-static --with-python=no +make +make install diff --git a/buildconfig/manylinux-build/docker_base/libxml2/libxml2.sha512 b/buildconfig/manylinux-build/docker_base/libxml2/libxml2.sha512 new file mode 100644 index 0000000000..184db0686b --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/libxml2/libxml2.sha512 @@ -0,0 +1 @@ +202b0523d982eb5269dcb4644d8ab2ea31404771069462cdd6c5cd7e6672e0e50371ceb334133bb8f2c0a42f133e8f40c3f582bba5fc71ab168a2b18d4cfd81d libxml2-2.11.7.tar.xz From d7aa39bbef12f8bd3fb51541d389a9711eee3219 Mon Sep 17 00:00:00 2001 From: Ankith <46915066+ankith26@users.noreply.github.com> Date: Tue, 7 Mar 2023 11:02:12 +0530 Subject: [PATCH 2/5] Build wayland+protocols on manylinux --- buildconfig/manylinux-build/README.rst | 5 +--- .../docker_base/Dockerfile-aarch64 | 3 ++ .../docker_base/Dockerfile-i686 | 3 ++ .../docker_base/Dockerfile-x86_64 | 3 ++ .../pkg-config/build-pkg-config.sh | 2 +- .../docker_base/wayland/build-wayland.sh | 28 +++++++++++++++++++ .../docker_base/wayland/wayland.sha512sum | 2 ++ 7 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 buildconfig/manylinux-build/docker_base/wayland/build-wayland.sh create mode 100644 buildconfig/manylinux-build/docker_base/wayland/wayland.sha512sum diff --git a/buildconfig/manylinux-build/README.rst b/buildconfig/manylinux-build/README.rst index 5b49b43315..223a6d6634 100644 --- a/buildconfig/manylinux-build/README.rst +++ b/buildconfig/manylinux-build/README.rst @@ -172,8 +172,5 @@ TODO Maybe these need adding? -- wayland, https://wayland.freedesktop.org/building.html http://www.linuxfromscratch.org/blfs/view/svn/general/wayland-protocols.html +- audio resampling for SDL: libsamplerate (handles samplerate conversions better) - vulkan, via mesa? -- xinput, -- xrandr, - diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 index ce6b495b82..5c35201d25 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 @@ -50,6 +50,9 @@ RUN ["bash", "/libffi_build/build-libffi.sh"] ADD libxml2 /libxml2_build/ RUN ["bash", "/libxml2_build/build-libxml2.sh"] +ADD wayland /wayland_build/ +RUN ["bash", "/wayland_build/build-wayland.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 index d979f0a1d7..b5299b158e 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 @@ -50,6 +50,9 @@ RUN ["linux32", "bash", "/libffi_build/build-libffi.sh"] ADD libxml2 /libxml2_build/ RUN ["linux32", "bash", "/libxml2_build/build-libxml2.sh"] +ADD wayland /wayland_build/ +RUN ["linux32", "bash", "/wayland_build/build-wayland.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["linux32", "bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 index 1e6fee8fe6..1189fc3475 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 @@ -50,6 +50,9 @@ RUN ["bash", "/libffi_build/build-libffi.sh"] ADD libxml2 /libxml2_build/ RUN ["bash", "/libxml2_build/build-libxml2.sh"] +ADD wayland /wayland_build/ +RUN ["bash", "/wayland_build/build-wayland.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh b/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh index 13691e6fa0..c2764c1ba9 100644 --- a/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh +++ b/buildconfig/manylinux-build/docker_base/pkg-config/build-pkg-config.sh @@ -13,7 +13,7 @@ cd $(dirname `readlink -f "$0"`) COMPILED_PKGCONFIG_DIRS=$(pkg-config --variable pc_path pkg-config) # append path(s) where other installs put .pc files -COMPILED_PKGCONFIG_DIRS="$PG_DEP_PREFIX/lib/pkgconfig:${COMPILED_PKGCONFIG_DIRS}" +COMPILED_PKGCONFIG_DIRS="$PG_DEP_PREFIX/lib/pkgconfig:$PG_DEP_PREFIX/share/pkgconfig:${COMPILED_PKGCONFIG_DIRS}" PKGCONFIG=pkg-config-0.29.2 diff --git a/buildconfig/manylinux-build/docker_base/wayland/build-wayland.sh b/buildconfig/manylinux-build/docker_base/wayland/build-wayland.sh new file mode 100644 index 0000000000..a1ea050b0e --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/wayland/build-wayland.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +WAYLAND_VER=1.21.0 +WAYLAND_PROT_VER=1.31 + +WAYLAND="wayland-$WAYLAND_VER" +WAYLAND_PROT="wayland-protocols-$WAYLAND_PROT_VER" + +curl -sL --retry 10 https://gitlab.freedesktop.org/wayland/wayland/-/archive/$WAYLAND_VER/$WAYLAND.tar.gz > $WAYLAND.tar.gz +curl -sL --retry 10 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/$WAYLAND_PROT_VER/$WAYLAND_PROT.tar.gz > $WAYLAND_PROT.tar.gz + +sha512sum -c wayland.sha512sum + +tar xzf $WAYLAND.tar.gz +cd $WAYLAND + +meson build/ $PG_BASE_MESON_FLAGS -Ddocumentation=false -Dtests=false +ninja -C build/ install + +cd .. +tar xzf $WAYLAND_PROT.tar.gz +cd $WAYLAND_PROT + +meson build/ $PG_BASE_MESON_FLAGS -Dtests=false +ninja -C build/ install diff --git a/buildconfig/manylinux-build/docker_base/wayland/wayland.sha512sum b/buildconfig/manylinux-build/docker_base/wayland/wayland.sha512sum new file mode 100644 index 0000000000..7b2dcf77ba --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/wayland/wayland.sha512sum @@ -0,0 +1,2 @@ +856378c43c43c1a1ff2a047055ac6e8d7bb2b0bd44bd5a96c0ebd5c8b97a10482367b81d56ed49774ae1fffda0fa18cfb9110ffcb4da413ecf97d1fe6d7f35dd wayland-1.21.0.tar.gz +cb0d38fada64832f8f7c71c1fcdd16fc3013cd81ac7146edbc4361328c9e5f02e31e0ba3b5219e85103fdc35aee49d54f9be537594d3618c5fb27de7375f84e1 wayland-protocols-1.31.tar.gz From f6a8cbfc97bb1acb5c7c8b61e31181cd9b3ab7a4 Mon Sep 17 00:00:00 2001 From: Ankith <46915066+ankith26@users.noreply.github.com> Date: Tue, 7 Mar 2023 11:09:40 +0530 Subject: [PATCH 3/5] Build libdrm and its deps (for mesa) --- .../docker_base/Dockerfile-aarch64 | 9 +++++++++ .../docker_base/Dockerfile-i686 | 9 +++++++++ .../docker_base/Dockerfile-x86_64 | 9 +++++++++ .../docker_base/mesa/libdrm/build-libdrm.sh | 20 +++++++++++++++++++ .../docker_base/mesa/libdrm/libdrm.sha512sum | 1 + .../xorg/libpciaccess/build-libpciaccess.sh | 16 +++++++++++++++ .../xorg/libpciaccess/libpciaccess.sha512sum | 1 + .../docker_base/xorg/macros/build-macros.sh | 17 ++++++++++++++++ .../docker_base/xorg/macros/macros.sha512sum | 1 + 9 files changed, 83 insertions(+) create mode 100644 buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh create mode 100644 buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum create mode 100644 buildconfig/manylinux-build/docker_base/xorg/libpciaccess/build-libpciaccess.sh create mode 100644 buildconfig/manylinux-build/docker_base/xorg/libpciaccess/libpciaccess.sha512sum create mode 100644 buildconfig/manylinux-build/docker_base/xorg/macros/build-macros.sh create mode 100644 buildconfig/manylinux-build/docker_base/xorg/macros/macros.sha512sum diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 index 5c35201d25..c0debc0e65 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 @@ -53,6 +53,15 @@ RUN ["bash", "/libxml2_build/build-libxml2.sh"] ADD wayland /wayland_build/ RUN ["bash", "/wayland_build/build-wayland.sh"] +ADD xorg/macros /xorg_build/macros/ +RUN ["bash", "/xorg_build/macros/build-macros.sh"] + +ADD xorg/libpciaccess /xorg_build/libpciaccess/ +RUN ["bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"] + +ADD mesa/libdrm /mesa_build/libdrm/ +RUN ["bash", "/mesa_build/libdrm/build-libdrm.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 index b5299b158e..85c0d14277 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 @@ -53,6 +53,15 @@ RUN ["linux32", "bash", "/libxml2_build/build-libxml2.sh"] ADD wayland /wayland_build/ RUN ["linux32", "bash", "/wayland_build/build-wayland.sh"] +ADD xorg/macros /xorg_build/macros/ +RUN ["linux32", "bash", "/xorg_build/macros/build-macros.sh"] + +ADD xorg/libpciaccess /xorg_build/libpciaccess/ +RUN ["linux32", "bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"] + +ADD mesa/libdrm /mesa_build/libdrm/ +RUN ["linux32", "bash", "/mesa_build/libdrm/build-libdrm.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["linux32", "bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 index 1189fc3475..a6d4a14df7 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 @@ -53,6 +53,15 @@ RUN ["bash", "/libxml2_build/build-libxml2.sh"] ADD wayland /wayland_build/ RUN ["bash", "/wayland_build/build-wayland.sh"] +ADD xorg/macros /xorg_build/macros/ +RUN ["bash", "/xorg_build/macros/build-macros.sh"] + +ADD xorg/libpciaccess /xorg_build/libpciaccess/ +RUN ["bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"] + +ADD mesa/libdrm /mesa_build/libdrm/ +RUN ["bash", "/mesa_build/libdrm/build-libdrm.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh b/buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh new file mode 100644 index 0000000000..ab8655f61b --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +# The drm already available on manylinux docker images is too old for mesa, so +# we need to compile the latest from source + +DRM_VER="libdrm-2.4.120" +DRM="drm-$DRM_VER" + +curl -sL --retry 10 https://gitlab.freedesktop.org/mesa/drm/-/archive/$DRM_VER/$DRM.tar.gz > $DRM.tar.gz +sha512sum -c libdrm.sha512sum + +tar xzf $DRM.tar.gz +cd $DRM + +# build with meson+ninja +meson build/ $PG_BASE_MESON_FLAGS -Dman-pages=disabled -Dvalgrind=disabled -Dtests=false +ninja -C build/ install diff --git a/buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum b/buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum new file mode 100644 index 0000000000..f9ad9c96bc --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum @@ -0,0 +1 @@ +31428ec49476af3bb7acbe088ebb2411f2f69013af63afd0832546df1a45a7f45ebb472dce3f07946b9202e41deba7aae3590c2e721c56b6d64de908704ae308 drm-libdrm-2.4.120.tar.gz diff --git a/buildconfig/manylinux-build/docker_base/xorg/libpciaccess/build-libpciaccess.sh b/buildconfig/manylinux-build/docker_base/xorg/libpciaccess/build-libpciaccess.sh new file mode 100644 index 0000000000..63a76b0c60 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/xorg/libpciaccess/build-libpciaccess.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +PCIACCESS_VER="0.18" +PCIACCESS="libpciaccess-$PCIACCESS_VER" + +curl -sL --retry 10 https://www.x.org/releases/individual/lib/$PCIACCESS.tar.xz > $PCIACCESS.tar.xz +sha512sum -c libpciaccess.sha512sum + +tar xf $PCIACCESS.tar.xz +cd $PCIACCESS + +meson build/ $PG_BASE_MESON_FLAGS +ninja -C build/ install diff --git a/buildconfig/manylinux-build/docker_base/xorg/libpciaccess/libpciaccess.sha512sum b/buildconfig/manylinux-build/docker_base/xorg/libpciaccess/libpciaccess.sha512sum new file mode 100644 index 0000000000..9eb75aeb57 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/xorg/libpciaccess/libpciaccess.sha512sum @@ -0,0 +1 @@ +54dff9a493344586d072edf8c8eb8f7960c7dfd64aa5c51a8ec8d4e341f703fd39eb606ee41c4fdd9d5aad3372b7efe6e0fe96eadc575ea91de276320ebc3fbd libpciaccess-0.18.tar.xz diff --git a/buildconfig/manylinux-build/docker_base/xorg/macros/build-macros.sh b/buildconfig/manylinux-build/docker_base/xorg/macros/build-macros.sh new file mode 100644 index 0000000000..05c6f76991 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/xorg/macros/build-macros.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +MACROS_VER="1.20.0" +MACROS="util-macros-$MACROS_VER" + +curl -sL --retry 10 https://www.x.org/releases/individual/util/$MACROS.tar.gz > $MACROS.tar.gz +sha512sum -c macros.sha512sum + +tar xzf $MACROS.tar.gz +cd $MACROS + +./configure $PG_BASE_CONFIGURE_FLAGS +make +make install diff --git a/buildconfig/manylinux-build/docker_base/xorg/macros/macros.sha512sum b/buildconfig/manylinux-build/docker_base/xorg/macros/macros.sha512sum new file mode 100644 index 0000000000..2eb0534ddc --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/xorg/macros/macros.sha512sum @@ -0,0 +1 @@ +0724cf57cbf00fe115596457bf2031cdad5845bebdcc1ee4ff90b4f77b4ebc862b0f7d250272ef58c2929aedead3d18d11f23f067e50fcac22863a1fcd4f3d66 util-macros-1.20.0.tar.gz From d25185725552209e6d5354c8e8748834aa403aa3 Mon Sep 17 00:00:00 2001 From: Ankith <46915066+ankith26@users.noreply.github.com> Date: Tue, 7 Mar 2023 11:19:31 +0530 Subject: [PATCH 4/5] Build mesa and its deps --- .../docker_base/Dockerfile-aarch64 | 18 ++++++++++- .../docker_base/Dockerfile-i686 | 18 ++++++++++- .../docker_base/Dockerfile-x86_64 | 18 ++++++++++- .../docker_base/mesa/flex/build-flex.sh | 17 ++++++++++ .../docker_base/mesa/flex/flex.sha512sum | 1 + .../docker_base/mesa/glslang/build-glslang.sh | 19 +++++++++++ .../mesa/glslang/glslang.sha512sum | 1 + .../docker_base/mesa/mako/build-mako.sh | 7 ++++ .../docker_base/mesa/mesa/build-mesa.sh | 32 +++++++++++++++++++ .../docker_base/mesa/mesa/mesa.sha512sum | 1 + .../xorg/libxshmfence/build-libxshmfence.sh | 17 ++++++++++ .../xorg/libxshmfence/libxshmfence.sha512sum | 1 + 12 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 buildconfig/manylinux-build/docker_base/mesa/flex/build-flex.sh create mode 100644 buildconfig/manylinux-build/docker_base/mesa/flex/flex.sha512sum create mode 100644 buildconfig/manylinux-build/docker_base/mesa/glslang/build-glslang.sh create mode 100644 buildconfig/manylinux-build/docker_base/mesa/glslang/glslang.sha512sum create mode 100644 buildconfig/manylinux-build/docker_base/mesa/mako/build-mako.sh create mode 100644 buildconfig/manylinux-build/docker_base/mesa/mesa/build-mesa.sh create mode 100644 buildconfig/manylinux-build/docker_base/mesa/mesa/mesa.sha512sum create mode 100644 buildconfig/manylinux-build/docker_base/xorg/libxshmfence/build-libxshmfence.sh create mode 100644 buildconfig/manylinux-build/docker_base/xorg/libxshmfence/libxshmfence.sha512sum diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 index c0debc0e65..049a882630 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 @@ -11,10 +11,11 @@ RUN rpm --import /tmp/RPM-GPG-KEY.dag.txt #RUN rpm -i /tmp/${RPMFORGE_FILE} +# systemd is needed for udev (for SDL and pulse) # it's okay to install X11 and friends from outdated centos repos because newer # libs are dynamically loaded at runtime RUN yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \ - mesa-libGLU-devel libcap-devel libxkbcommon-devel \ + libcap-devel libxkbcommon-devel \ libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \ libXi-devel libXScrnSaver-devel @@ -62,6 +63,21 @@ RUN ["bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"] ADD mesa/libdrm /mesa_build/libdrm/ RUN ["bash", "/mesa_build/libdrm/build-libdrm.sh"] +ADD xorg/libxshmfence /xorg_build/libxshmfence/ +RUN ["bash", "/xorg_build/libxshmfence/build-libxshmfence.sh"] + +ADD mesa/glslang /mesa_build/glslang/ +RUN ["bash", "/mesa_build/glslang/build-glslang.sh"] + +ADD mesa/mako /mesa_build/mako/ +RUN ["bash", "/mesa_build/mako/build-mako.sh"] + +ADD mesa/flex /mesa_build/flex/ +RUN ["bash", "/mesa_build/flex/build-flex.sh"] + +ADD mesa/mesa /mesa_build/mesa/ +RUN ["bash", "/mesa_build/mesa/build-mesa.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 index 85c0d14277..271a8c3cc4 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 @@ -11,10 +11,11 @@ RUN rpm --import /tmp/RPM-GPG-KEY.dag.txt #RUN rpm -i /tmp/${RPMFORGE_FILE} +# systemd is needed for udev (for SDL and pulse) # it's okay to install X11 and friends from outdated centos repos because newer # libs are dynamically loaded at runtime RUN linux32 yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \ - mesa-libGLU-devel libcap-devel libxkbcommon-devel \ + libcap-devel libxkbcommon-devel \ libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \ libXi-devel libXScrnSaver-devel @@ -62,6 +63,21 @@ RUN ["linux32", "bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"] ADD mesa/libdrm /mesa_build/libdrm/ RUN ["linux32", "bash", "/mesa_build/libdrm/build-libdrm.sh"] +ADD xorg/libxshmfence /xorg_build/libxshmfence/ +RUN ["linux32", "bash", "/xorg_build/libxshmfence/build-libxshmfence.sh"] + +ADD mesa/glslang /mesa_build/glslang/ +RUN ["linux32", "bash", "/mesa_build/glslang/build-glslang.sh"] + +ADD mesa/mako /mesa_build/mako/ +RUN ["linux32", "bash", "/mesa_build/mako/build-mako.sh"] + +ADD mesa/flex /mesa_build/flex/ +RUN ["linux32", "bash", "/mesa_build/flex/build-flex.sh"] + +ADD mesa/mesa /mesa_build/mesa/ +RUN ["linux32", "bash", "/mesa_build/mesa/build-mesa.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["linux32", "bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 index a6d4a14df7..08c6c528bf 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 @@ -11,10 +11,11 @@ RUN rpm --import /tmp/RPM-GPG-KEY.dag.txt #RUN rpm -i /tmp/${RPMFORGE_FILE} +# systemd is needed for udev (for SDL and pulse) # it's okay to install X11 and friends from outdated centos repos because newer # libs are dynamically loaded at runtime RUN yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \ - mesa-libGLU-devel libcap-devel libxkbcommon-devel \ + libcap-devel libxkbcommon-devel \ libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \ libXi-devel libXScrnSaver-devel @@ -62,6 +63,21 @@ RUN ["bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"] ADD mesa/libdrm /mesa_build/libdrm/ RUN ["bash", "/mesa_build/libdrm/build-libdrm.sh"] +ADD xorg/libxshmfence /xorg_build/libxshmfence/ +RUN ["bash", "/xorg_build/libxshmfence/build-libxshmfence.sh"] + +ADD mesa/glslang /mesa_build/glslang/ +RUN ["bash", "/mesa_build/glslang/build-glslang.sh"] + +ADD mesa/mako /mesa_build/mako/ +RUN ["bash", "/mesa_build/mako/build-mako.sh"] + +ADD mesa/flex /mesa_build/flex/ +RUN ["bash", "/mesa_build/flex/build-flex.sh"] + +ADD mesa/mesa /mesa_build/mesa/ +RUN ["bash", "/mesa_build/mesa/build-mesa.sh"] + #ADD zlib-ng /zlib-ng_build/ #RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"] diff --git a/buildconfig/manylinux-build/docker_base/mesa/flex/build-flex.sh b/buildconfig/manylinux-build/docker_base/mesa/flex/build-flex.sh new file mode 100644 index 0000000000..0d6ffcfe43 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/flex/build-flex.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +FLEX_VER="2.6.4" +FLEX="flex-$FLEX_VER" + +curl -sL --retry 10 https://github.com/westes/flex/releases/download/v$FLEX_VER/$FLEX.tar.gz > $FLEX.tar.gz +sha512sum -c flex.sha512sum + +tar xzf $FLEX.tar.gz +cd $FLEX + +./configure $PG_BASE_CONFIGURE_FLAGS +make +make install diff --git a/buildconfig/manylinux-build/docker_base/mesa/flex/flex.sha512sum b/buildconfig/manylinux-build/docker_base/mesa/flex/flex.sha512sum new file mode 100644 index 0000000000..d2efadd36b --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/flex/flex.sha512sum @@ -0,0 +1 @@ +e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e flex-2.6.4.tar.gz diff --git a/buildconfig/manylinux-build/docker_base/mesa/glslang/build-glslang.sh b/buildconfig/manylinux-build/docker_base/mesa/glslang/build-glslang.sh new file mode 100644 index 0000000000..7e1eafc81a --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/glslang/build-glslang.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +GLSLANG_VER=14.0.0 +GLSLANG="glslang-$GLSLANG_VER" +curl -sL --retry 10 https://github.com/KhronosGroup/glslang/archive/refs/tags/${GLSLANG_VER}.tar.gz > ${GLSLANG}.tar.gz + +sha512sum -c glslang.sha512sum +tar xzf ${GLSLANG}.tar.gz +cd $GLSLANG + +mkdir build +cd build + +cmake .. $PG_BASE_CMAKE_FLAGS -DENABLE_OPT=0 -DGLSLANG_TESTS=0 +make +make install diff --git a/buildconfig/manylinux-build/docker_base/mesa/glslang/glslang.sha512sum b/buildconfig/manylinux-build/docker_base/mesa/glslang/glslang.sha512sum new file mode 100644 index 0000000000..7a89c41f40 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/glslang/glslang.sha512sum @@ -0,0 +1 @@ +45ec1a23a390319b9270761cf8befb832ac8b4bc215b211c41a543553a97e5ccf17c134c34d8fdbed6efe887a9a7c2f0a955d1bfe1add9e04cc3e95b12e1973a glslang-14.0.0.tar.gz diff --git a/buildconfig/manylinux-build/docker_base/mesa/mako/build-mako.sh b/buildconfig/manylinux-build/docker_base/mesa/mako/build-mako.sh new file mode 100644 index 0000000000..d74dd78ec9 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/mako/build-mako.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +# pin for build stability, remember to keep updated +python3 -m pip install mako==1.3.2 diff --git a/buildconfig/manylinux-build/docker_base/mesa/mesa/build-mesa.sh b/buildconfig/manylinux-build/docker_base/mesa/mesa/build-mesa.sh new file mode 100644 index 0000000000..308f4d459e --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/mesa/build-mesa.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +# We need mesa for opengl, gbm (SDL kmsdrm driver needs it), egl (SDL +# wayland driver needs this) and glx (SDL needs it) +# we don't support vulkan yet + +MESA_VER="mesa-24.0.1" +MESA="mesa-$MESA_VER" # yes mesa comes twice in the name + +curl -sL --retry 10 https://gitlab.freedesktop.org/mesa/mesa/-/archive/$MESA_VER/$MESA.tar.gz > $MESA.tar.gz +sha512sum -c mesa.sha512sum + +tar xzf $MESA.tar.gz +cd $MESA + +# For now, we don't compile in LLVM because of its weight. Because of this, we +# can't compile in support for the radeonsi driver +if [ `uname -m` == "aarch64" ]; then + # On aarch64 we allow mesa to use all drivers it wants to pick by default + # (because radeonsi is not used on arm platforms) + GALLIUM_DRIVERS="auto" +else + # all default except radeonsi + GALLIUM_DRIVERS="r300,r600,nouveau,virgl,svga,swrast,iris,crocus,i915" +fi + +# build with meson+ninja +meson build/ $PG_BASE_MESON_FLAGS -Dgallium-drivers=$GALLIUM_DRIVERS -Dvulkan-drivers=[] +ninja -C build/ install diff --git a/buildconfig/manylinux-build/docker_base/mesa/mesa/mesa.sha512sum b/buildconfig/manylinux-build/docker_base/mesa/mesa/mesa.sha512sum new file mode 100644 index 0000000000..bca5798299 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/mesa/mesa/mesa.sha512sum @@ -0,0 +1 @@ +66a6cea1712f3b20744c0865c10523313653be39fc5a75e8201dbf50188cad819bd52a6013d1bd7be3d622de948b750ceb41dc73649cdea2abbaa6bb016cc4a7 mesa-mesa-24.0.1.tar.gz diff --git a/buildconfig/manylinux-build/docker_base/xorg/libxshmfence/build-libxshmfence.sh b/buildconfig/manylinux-build/docker_base/xorg/libxshmfence/build-libxshmfence.sh new file mode 100644 index 0000000000..1acdc1a2b5 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/xorg/libxshmfence/build-libxshmfence.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +XSHMFENCE_VER="1.3.2" +XSHMFENCE="libxshmfence-$XSHMFENCE_VER" + +curl -sL --retry 10 https://www.x.org/releases/individual/lib/${XSHMFENCE}.tar.gz > $XSHMFENCE.tar.gz +sha512sum -c libxshmfence.sha512sum + +tar xzf $XSHMFENCE.tar.gz +cd $XSHMFENCE + +./configure $PG_BASE_CONFIGURE_FLAGS +make +make install diff --git a/buildconfig/manylinux-build/docker_base/xorg/libxshmfence/libxshmfence.sha512sum b/buildconfig/manylinux-build/docker_base/xorg/libxshmfence/libxshmfence.sha512sum new file mode 100644 index 0000000000..eaea5066cd --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/xorg/libxshmfence/libxshmfence.sha512sum @@ -0,0 +1 @@ +1c5d2d183c7a1c5c79efd6da21d3884325209a10f75809584fe2b5e9ab244c0a09bb8b0d5ffad72781665bd3141232343c567ccb58ad74c71883d6d996997a76 libxshmfence-1.3.2.tar.gz From 1d305b2406b13fcad5cbcdabf3070c313ea4415a Mon Sep 17 00:00:00 2001 From: Ankith <46915066+ankith26@users.noreply.github.com> Date: Tue, 7 Mar 2023 11:38:51 +0530 Subject: [PATCH 5/5] Build libdecor (for wayland) --- .../docker_base/Dockerfile-aarch64 | 3 +++ .../docker_base/Dockerfile-i686 | 3 +++ .../docker_base/Dockerfile-x86_64 | 3 +++ .../docker_base/libdecor/build-libdecor.sh | 25 +++++++++++++++++++ .../docker_base/libdecor/libdecor.sha512sum | 1 + 5 files changed, 35 insertions(+) create mode 100644 buildconfig/manylinux-build/docker_base/libdecor/build-libdecor.sh create mode 100644 buildconfig/manylinux-build/docker_base/libdecor/libdecor.sha512sum diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 index 049a882630..a47a5e937e 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 @@ -54,6 +54,9 @@ RUN ["bash", "/libxml2_build/build-libxml2.sh"] ADD wayland /wayland_build/ RUN ["bash", "/wayland_build/build-wayland.sh"] +ADD libdecor /libdecor_build/ +RUN ["bash", "/libdecor_build/build-libdecor.sh"] + ADD xorg/macros /xorg_build/macros/ RUN ["bash", "/xorg_build/macros/build-macros.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 index 271a8c3cc4..e85e73b7a1 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 @@ -54,6 +54,9 @@ RUN ["linux32", "bash", "/libxml2_build/build-libxml2.sh"] ADD wayland /wayland_build/ RUN ["linux32", "bash", "/wayland_build/build-wayland.sh"] +ADD libdecor /libdecor_build/ +RUN ["linux32", "bash", "/libdecor_build/build-libdecor.sh"] + ADD xorg/macros /xorg_build/macros/ RUN ["linux32", "bash", "/xorg_build/macros/build-macros.sh"] diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 index 08c6c528bf..01b77376a1 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 @@ -54,6 +54,9 @@ RUN ["bash", "/libxml2_build/build-libxml2.sh"] ADD wayland /wayland_build/ RUN ["bash", "/wayland_build/build-wayland.sh"] +ADD libdecor /libdecor_build/ +RUN ["bash", "/libdecor_build/build-libdecor.sh"] + ADD xorg/macros /xorg_build/macros/ RUN ["bash", "/xorg_build/macros/build-macros.sh"] diff --git a/buildconfig/manylinux-build/docker_base/libdecor/build-libdecor.sh b/buildconfig/manylinux-build/docker_base/libdecor/build-libdecor.sh new file mode 100644 index 0000000000..34d7801260 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/libdecor/build-libdecor.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e -x + +cd $(dirname `readlink -f "$0"`) + +LIBDECOR_VER=0.2.2 +LIBDECOR="libdecor-$LIBDECOR_VER" + +curl -sL --retry 10 https://gitlab.freedesktop.org/libdecor/libdecor/-/releases/${LIBDECOR_VER}/downloads/${LIBDECOR}.tar.xz > ${LIBDECOR}.tar.xz +sha512sum -c libdecor.sha512sum + +tar xf $LIBDECOR.tar.xz +cd $LIBDECOR + +# This is a hack because I'm lazy :) +# libdecor depends on cairo which is a kinda heavy dependency and need more +# scripting work. But libdecor shared lib is not actually present in the +# manylinux wheel and is dynamically loaded by SDL at runtime (if available on +# users system) +# So we override the plugin builds to skip cairo (and only build dummy plugin) +echo "plugin_include_path = include_directories('.')" > src/plugins/meson.build +echo "subdir('dummy')" > src/plugins/meson.build + +meson build/ $PG_BASE_MESON_FLAGS -Ddemo=false +ninja -C build/ install diff --git a/buildconfig/manylinux-build/docker_base/libdecor/libdecor.sha512sum b/buildconfig/manylinux-build/docker_base/libdecor/libdecor.sha512sum new file mode 100644 index 0000000000..98766deff1 --- /dev/null +++ b/buildconfig/manylinux-build/docker_base/libdecor/libdecor.sha512sum @@ -0,0 +1 @@ +ed1dfb86c28f0c84950ea5653e1ae6a83bf274e5ea51c0977ea134481536dffd31e65146c0a0aa8b67a6cad4fb8bc551b4266b04c93493547d43131dc04ea380 libdecor-0.2.2.tar.xz