Skip to content

Commit 9597f81

Browse files
authored
Merge pull request #1997 from pygame-community/ankith26-manylinux-wayland
Add wayland and kmsdrm support to manylinux wheels
2 parents ec62643 + 1d305b2 commit 9597f81

27 files changed

+346
-19
lines changed

buildconfig/manylinux-build/README.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,5 @@ TODO
172172

173173
Maybe these need adding?
174174

175-
- wayland, https://wayland.freedesktop.org/building.html http://www.linuxfromscratch.org/blfs/view/svn/general/wayland-protocols.html
175+
- audio resampling for SDL: libsamplerate (handles samplerate conversions better)
176176
- vulkan, via mesa?
177-
- xinput,
178-
- xrandr,
179-

buildconfig/manylinux-build/docker_base/Dockerfile-aarch64

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ RUN rpm --import /tmp/RPM-GPG-KEY.dag.txt
1111

1212
#RUN rpm -i /tmp/${RPMFORGE_FILE}
1313

14+
# systemd is needed for udev (for SDL and pulse)
1415
# it's okay to install X11 and friends from outdated centos repos because newer
1516
# libs are dynamically loaded at runtime
1617
RUN yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \
17-
mesa-libGLU-devel libcap-devel libxkbcommon-devel \
18+
libcap-devel libxkbcommon-devel \
1819
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
1920
libXi-devel libXScrnSaver-devel
2021

@@ -44,6 +45,42 @@ RUN ["bash", "/pkg-config_build/build-pkg-config.sh"]
4445
ADD buildtools /buildtools/
4546
RUN ["bash", "/buildtools/install.sh"]
4647

48+
ADD libffi /libffi_build/
49+
RUN ["bash", "/libffi_build/build-libffi.sh"]
50+
51+
ADD libxml2 /libxml2_build/
52+
RUN ["bash", "/libxml2_build/build-libxml2.sh"]
53+
54+
ADD wayland /wayland_build/
55+
RUN ["bash", "/wayland_build/build-wayland.sh"]
56+
57+
ADD libdecor /libdecor_build/
58+
RUN ["bash", "/libdecor_build/build-libdecor.sh"]
59+
60+
ADD xorg/macros /xorg_build/macros/
61+
RUN ["bash", "/xorg_build/macros/build-macros.sh"]
62+
63+
ADD xorg/libpciaccess /xorg_build/libpciaccess/
64+
RUN ["bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"]
65+
66+
ADD mesa/libdrm /mesa_build/libdrm/
67+
RUN ["bash", "/mesa_build/libdrm/build-libdrm.sh"]
68+
69+
ADD xorg/libxshmfence /xorg_build/libxshmfence/
70+
RUN ["bash", "/xorg_build/libxshmfence/build-libxshmfence.sh"]
71+
72+
ADD mesa/glslang /mesa_build/glslang/
73+
RUN ["bash", "/mesa_build/glslang/build-glslang.sh"]
74+
75+
ADD mesa/mako /mesa_build/mako/
76+
RUN ["bash", "/mesa_build/mako/build-mako.sh"]
77+
78+
ADD mesa/flex /mesa_build/flex/
79+
RUN ["bash", "/mesa_build/flex/build-flex.sh"]
80+
81+
ADD mesa/mesa /mesa_build/mesa/
82+
RUN ["bash", "/mesa_build/mesa/build-mesa.sh"]
83+
4784
#ADD zlib-ng /zlib-ng_build/
4885
#RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"]
4986

@@ -94,9 +131,6 @@ RUN ["bash", "/pulseaudio_build/build-pulseaudio.sh"]
94131
ADD libxmp /libxmp_build/
95132
RUN ["bash", "/libxmp_build/build-libxmp.sh"]
96133

97-
ADD libffi /libffi_build/
98-
RUN ["bash", "/libffi_build/build-libffi.sh"]
99-
100134
# explicit install not needed anymore
101135
# ADD gettext /gettext_build/
102136
# RUN ["bash", "/gettext_build/build-gettext.sh"]

buildconfig/manylinux-build/docker_base/Dockerfile-i686

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ RUN rpm --import /tmp/RPM-GPG-KEY.dag.txt
1111

1212
#RUN rpm -i /tmp/${RPMFORGE_FILE}
1313

14+
# systemd is needed for udev (for SDL and pulse)
1415
# it's okay to install X11 and friends from outdated centos repos because newer
1516
# libs are dynamically loaded at runtime
1617
RUN linux32 yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \
17-
mesa-libGLU-devel libcap-devel libxkbcommon-devel \
18+
libcap-devel libxkbcommon-devel \
1819
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
1920
libXi-devel libXScrnSaver-devel
2021

@@ -44,6 +45,42 @@ RUN ["linux32", "bash", "/pkg-config_build/build-pkg-config.sh"]
4445
ADD buildtools /buildtools/
4546
RUN ["linux32", "bash", "/buildtools/install.sh"]
4647

48+
ADD libffi /libffi_build/
49+
RUN ["linux32", "bash", "/libffi_build/build-libffi.sh"]
50+
51+
ADD libxml2 /libxml2_build/
52+
RUN ["linux32", "bash", "/libxml2_build/build-libxml2.sh"]
53+
54+
ADD wayland /wayland_build/
55+
RUN ["linux32", "bash", "/wayland_build/build-wayland.sh"]
56+
57+
ADD libdecor /libdecor_build/
58+
RUN ["linux32", "bash", "/libdecor_build/build-libdecor.sh"]
59+
60+
ADD xorg/macros /xorg_build/macros/
61+
RUN ["linux32", "bash", "/xorg_build/macros/build-macros.sh"]
62+
63+
ADD xorg/libpciaccess /xorg_build/libpciaccess/
64+
RUN ["linux32", "bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"]
65+
66+
ADD mesa/libdrm /mesa_build/libdrm/
67+
RUN ["linux32", "bash", "/mesa_build/libdrm/build-libdrm.sh"]
68+
69+
ADD xorg/libxshmfence /xorg_build/libxshmfence/
70+
RUN ["linux32", "bash", "/xorg_build/libxshmfence/build-libxshmfence.sh"]
71+
72+
ADD mesa/glslang /mesa_build/glslang/
73+
RUN ["linux32", "bash", "/mesa_build/glslang/build-glslang.sh"]
74+
75+
ADD mesa/mako /mesa_build/mako/
76+
RUN ["linux32", "bash", "/mesa_build/mako/build-mako.sh"]
77+
78+
ADD mesa/flex /mesa_build/flex/
79+
RUN ["linux32", "bash", "/mesa_build/flex/build-flex.sh"]
80+
81+
ADD mesa/mesa /mesa_build/mesa/
82+
RUN ["linux32", "bash", "/mesa_build/mesa/build-mesa.sh"]
83+
4784
#ADD zlib-ng /zlib-ng_build/
4885
#RUN ["linux32", "bash", "/zlib-ng_build/build-zlib-ng.sh"]
4986

@@ -94,15 +131,12 @@ RUN ["linux32", "bash", "/pulseaudio_build/build-pulseaudio.sh"]
94131
ADD libxmp /libxmp_build/
95132
RUN ["linux32", "bash", "/libxmp_build/build-libxmp.sh"]
96133

97-
ADD libffi /libffi_build/
98-
RUN ["bash", "/libffi_build/build-libffi.sh"]
99-
100134
# explicit install not needed anymore
101135
# ADD gettext /gettext_build/
102136
# RUN ["bash", "/gettext_build/build-gettext.sh"]
103137

104138
ADD glib /glib_build/
105-
RUN ["bash", "/glib_build/build-glib.sh"]
139+
RUN ["linux32", "bash", "/glib_build/build-glib.sh"]
106140

107141
ADD fluidsynth /fluidsynth_build/
108142
RUN ["linux32", "bash", "/fluidsynth_build/build-fluidsynth.sh"]

buildconfig/manylinux-build/docker_base/Dockerfile-x86_64

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ RUN rpm --import /tmp/RPM-GPG-KEY.dag.txt
1111

1212
#RUN rpm -i /tmp/${RPMFORGE_FILE}
1313

14+
# systemd is needed for udev (for SDL and pulse)
1415
# it's okay to install X11 and friends from outdated centos repos because newer
1516
# libs are dynamically loaded at runtime
1617
RUN yum install -y zlib-devel dbus-devel fontconfig xz systemd-devel \
17-
mesa-libGLU-devel libcap-devel libxkbcommon-devel \
18+
libcap-devel libxkbcommon-devel \
1819
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
1920
libXi-devel libXScrnSaver-devel
2021

@@ -44,6 +45,42 @@ RUN ["bash", "/pkg-config_build/build-pkg-config.sh"]
4445
ADD buildtools /buildtools/
4546
RUN ["bash", "/buildtools/install.sh"]
4647

48+
ADD libffi /libffi_build/
49+
RUN ["bash", "/libffi_build/build-libffi.sh"]
50+
51+
ADD libxml2 /libxml2_build/
52+
RUN ["bash", "/libxml2_build/build-libxml2.sh"]
53+
54+
ADD wayland /wayland_build/
55+
RUN ["bash", "/wayland_build/build-wayland.sh"]
56+
57+
ADD libdecor /libdecor_build/
58+
RUN ["bash", "/libdecor_build/build-libdecor.sh"]
59+
60+
ADD xorg/macros /xorg_build/macros/
61+
RUN ["bash", "/xorg_build/macros/build-macros.sh"]
62+
63+
ADD xorg/libpciaccess /xorg_build/libpciaccess/
64+
RUN ["bash", "/xorg_build/libpciaccess/build-libpciaccess.sh"]
65+
66+
ADD mesa/libdrm /mesa_build/libdrm/
67+
RUN ["bash", "/mesa_build/libdrm/build-libdrm.sh"]
68+
69+
ADD xorg/libxshmfence /xorg_build/libxshmfence/
70+
RUN ["bash", "/xorg_build/libxshmfence/build-libxshmfence.sh"]
71+
72+
ADD mesa/glslang /mesa_build/glslang/
73+
RUN ["bash", "/mesa_build/glslang/build-glslang.sh"]
74+
75+
ADD mesa/mako /mesa_build/mako/
76+
RUN ["bash", "/mesa_build/mako/build-mako.sh"]
77+
78+
ADD mesa/flex /mesa_build/flex/
79+
RUN ["bash", "/mesa_build/flex/build-flex.sh"]
80+
81+
ADD mesa/mesa /mesa_build/mesa/
82+
RUN ["bash", "/mesa_build/mesa/build-mesa.sh"]
83+
4784
#ADD zlib-ng /zlib-ng_build/
4885
#RUN ["bash", "/zlib-ng_build/build-zlib-ng.sh"]
4986

@@ -94,9 +131,6 @@ RUN ["bash", "/pulseaudio_build/build-pulseaudio.sh"]
94131
ADD libxmp /libxmp_build/
95132
RUN ["bash", "/libxmp_build/build-libxmp.sh"]
96133

97-
ADD libffi /libffi_build/
98-
RUN ["bash", "/libffi_build/build-libffi.sh"]
99-
100134
# explicit install not needed anymore
101135
# ADD gettext /gettext_build/
102136
# RUN ["bash", "/gettext_build/build-gettext.sh"]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
cd $(dirname `readlink -f "$0"`)
5+
6+
LIBDECOR_VER=0.2.2
7+
LIBDECOR="libdecor-$LIBDECOR_VER"
8+
9+
curl -sL --retry 10 https://gitlab.freedesktop.org/libdecor/libdecor/-/releases/${LIBDECOR_VER}/downloads/${LIBDECOR}.tar.xz > ${LIBDECOR}.tar.xz
10+
sha512sum -c libdecor.sha512sum
11+
12+
tar xf $LIBDECOR.tar.xz
13+
cd $LIBDECOR
14+
15+
# This is a hack because I'm lazy :)
16+
# libdecor depends on cairo which is a kinda heavy dependency and need more
17+
# scripting work. But libdecor shared lib is not actually present in the
18+
# manylinux wheel and is dynamically loaded by SDL at runtime (if available on
19+
# users system)
20+
# So we override the plugin builds to skip cairo (and only build dummy plugin)
21+
echo "plugin_include_path = include_directories('.')" > src/plugins/meson.build
22+
echo "subdir('dummy')" > src/plugins/meson.build
23+
24+
meson build/ $PG_BASE_MESON_FLAGS -Ddemo=false
25+
ninja -C build/ install
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ed1dfb86c28f0c84950ea5653e1ae6a83bf274e5ea51c0977ea134481536dffd31e65146c0a0aa8b67a6cad4fb8bc551b4266b04c93493547d43131dc04ea380 libdecor-0.2.2.tar.xz

buildconfig/manylinux-build/docker_base/libffi/build-libffi.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ sha512sum -c libffi.sha512
1313
tar xzf ${LIBFFI}.tar.gz
1414
cd $LIBFFI
1515

16-
./configure $PG_BASE_CONFIGURE_FLAGS
16+
# --disable-multi-os-directory is passed so that /usr/local/lib is used
17+
./configure $PG_BASE_CONFIGURE_FLAGS --disable-docs --disable-multi-os-directory
1718
make
1819
make install
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
cd $(dirname `readlink -f "$0"`)
5+
6+
LIBXML2_VER=2.11
7+
LIBXML2_PATCH=7
8+
LIBXML2="libxml2-$LIBXML2_VER.$LIBXML2_PATCH"
9+
10+
curl -sL --retry 10 https://download.gnome.org/sources/libxml2/${LIBXML2_VER}/${LIBXML2}.tar.xz > ${LIBXML2}.tar.xz
11+
sha512sum -c libxml2.sha512
12+
13+
tar xf ${LIBXML2}.tar.xz
14+
cd $LIBXML2
15+
16+
./configure $PG_BASE_CONFIGURE_FLAGS --disable-static --with-python=no
17+
make
18+
make install
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
202b0523d982eb5269dcb4644d8ab2ea31404771069462cdd6c5cd7e6672e0e50371ceb334133bb8f2c0a42f133e8f40c3f582bba5fc71ab168a2b18d4cfd81d libxml2-2.11.7.tar.xz
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
cd $(dirname `readlink -f "$0"`)
5+
6+
FLEX_VER="2.6.4"
7+
FLEX="flex-$FLEX_VER"
8+
9+
curl -sL --retry 10 https://github.com/westes/flex/releases/download/v$FLEX_VER/$FLEX.tar.gz > $FLEX.tar.gz
10+
sha512sum -c flex.sha512sum
11+
12+
tar xzf $FLEX.tar.gz
13+
cd $FLEX
14+
15+
./configure $PG_BASE_CONFIGURE_FLAGS
16+
make
17+
make install

0 commit comments

Comments
 (0)