Skip to content

Commit

Permalink
manylinux: Add libxml2, wayland, wayland-protocols
Browse files Browse the repository at this point in the history
SDL2 dependencies
  • Loading branch information
illume committed Mar 20, 2023
1 parent 03a40db commit 0d78b4a
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 0 deletions.
6 changes: 6 additions & 0 deletions buildconfig/manylinux-build/docker_base/Dockerfile-aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ RUN ["bash", "/glib_build/build-glib.sh"]
ADD fluidsynth /fluidsynth_build/
RUN ["bash", "/fluidsynth_build/build-fluidsynth.sh"]

ADD libxml2 /libxml2_build/
RUN ["bash", "/libxml2_build/build-libxml2.sh"]

ADD wayland_libs /wayland_build/
RUN ["bash", "/wayland_build/build-wayland-libs.sh"]

ADD sdl_libs /sdl_build/
RUN ["bash", "/sdl_build/build-sdl2-libs.sh"]

Expand Down
6 changes: 6 additions & 0 deletions buildconfig/manylinux-build/docker_base/Dockerfile-i686
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ RUN ["bash", "/glib_build/build-glib.sh"]
ADD fluidsynth /fluidsynth_build/
RUN ["linux32", "bash", "/fluidsynth_build/build-fluidsynth.sh"]

ADD libxml2 /libxml2_build/
RUN ["bash", "/libxml2_build/build-libxml2.sh"]

ADD wayland_libs /wayland_build/
RUN ["bash", "/wayland_build/build-wayland-libs.sh"]

# Build and install SDL
ADD sdl_libs /sdl_build/
RUN ["linux32", "bash", "/sdl_build/build-sdl2-libs.sh"]
Expand Down
6 changes: 6 additions & 0 deletions buildconfig/manylinux-build/docker_base/Dockerfile-ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ RUN ["bash", "/glib_build/build-glib.sh"]
ADD fluidsynth /fluidsynth_build/
RUN ["bash", "/fluidsynth_build/build-fluidsynth.sh"]

ADD libxml2 /libxml2_build/
RUN ["bash", "/libxml2_build/build-libxml2.sh"]

ADD wayland_libs /wayland_build/
RUN ["bash", "/wayland_build/build-wayland-libs.sh"]

ADD sdl_libs /sdl_build/
RUN ["bash", "/sdl_build/build-sdl2-libs.sh"]

Expand Down
6 changes: 6 additions & 0 deletions buildconfig/manylinux-build/docker_base/Dockerfile-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ RUN ["bash", "/glib_build/build-glib.sh"]
ADD fluidsynth /fluidsynth_build/
RUN ["bash", "/fluidsynth_build/build-fluidsynth.sh"]

ADD libxml2 /libxml2_build/
RUN ["bash", "/libxml2_build/build-libxml2.sh"]

ADD wayland_libs /wayland_build/
RUN ["bash", "/wayland_build/build-wayland-libs.sh"]

ADD sdl_libs /sdl_build/
RUN ["bash", "/sdl_build/build-sdl2-libs.sh"]

Expand Down
33 changes: 33 additions & 0 deletions buildconfig/manylinux-build/docker_base/libxml2/build-libxml2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
set -e -x

# wayland requirement
# https://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html

cd $(dirname `readlink -f "$0"`)

LIBXML2_VER="2.10.3"
LIBXML2="libxml2-${LIBXML2_VER}"
curl -sL --retry 10 https://download.gnome.org/sources/libxml2/2.10/${LIBXML2}.tar.xz > ${LIBXML2}.xz

sha512sum -c libxml2.sha512

tar xf ${LIBXML2}.xz
cd $LIBXML2
./configure \
--sysconfdir=/etc \
--disable-static \
--with-history \
--with-python=no \
# --prefix=/usr \
# PYTHON=/usr/bin/python3 \
# --docdir=/usr/share/doc/libxml2-2.10.3 &&
make
make install

if [[ "$OSTYPE" == "darwin"* ]]; then
# Install to mac deps cache dir as well
make install DESTDIR=${MACDEP_CACHE_PREFIX_PATH}
fi

cd ..
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
33bb87ae9a45c475c3de09477e5d94840d8f687f893ef7839408bc7267e57611c4f2b863ed8ec819a4b5f1ebd6a122db9f6054c73bceed427d37f3e67f62620c libxml2-2.10.3.xz
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash
set -e -x

# https://wayland.freedesktop.org/building.html
# https://www.linuxfromscratch.org/blfs/view/svn/general/wayland.html
# https://www.linuxfromscratch.org/blfs/view/svn/general/wayland-protocols.html

cd $(dirname `readlink -f "$0"`)

WAYLAND_VER="1.21.0"
WAYLAND_PROTOCOLS_VER="1.31"
WAYLAND="wayland-${WAYLAND_VER}"
WAYLAND_PROTOCOLS="wayland-protocols-${WAYLAND_PROTOCOLS_VER}"

curl -sL --retry 10 https://gitlab.freedesktop.org/wayland/wayland/-/releases/${WAYLAND_VER}/downloads/${WAYLAND}.tar.xz > ${WAYLAND}.tar.xz
curl -sL --retry 10 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/${WAYLAND_PROTOCOLS_VER}/downloads/${WAYLAND_PROTOCOLS}.tar.xz > ${WAYLAND_PROTOCOLS}.tar.xz

sha512sum -c wayland.sha512

tar xf ${WAYLAND}.tar.xz
tar xf ${WAYLAND_PROTOCOLS}.tar.xz


cd $WAYLAND
mkdir build
cd build
meson setup .. \
--buildtype=release \
-Dtests=false \
-Dlibdir=lib \
-Ddocumentation=false
ninja
ninja install

cd ../..


cd $WAYLAND_PROTOCOLS
mkdir build
cd build
meson setup .. \
--buildtype=release \
-Dtests=false
ninja
ninja install

cd ../..

# pkg-config --exists 'wayland-client >= 1.18'
# pkg-config --exists wayland-scanner
# pkg-config --exists wayland-egl
# pkg-config --exists wayland-cursor
# pkg-config --exists egl
# pkg-config --exists 'xkbcommon >= 0.5.0'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fa0681fd9a63235c342444943053dfa0b0a1aded69c735d1a6895e48cfd06d6aee6fb53cae4cce3e7d557f830c562b10d6557b455979f34fc4009963a897efbc wayland-1.31.tar.gz
fa0681fd9a63235c342444943053dfa0b0a1aded69c735d1a6895e48cfd06d6aee6fb53cae4cce3e7d557f830c562b10d6557b455979f34fc4009963a897efbc wayland-protocols-1.31.tar.gz

0 comments on commit 0d78b4a

Please sign in to comment.