Skip to content

Commit

Permalink
Add pipewire and libsamplerate+fftw3
Browse files Browse the repository at this point in the history
  • Loading branch information
ankith26 committed Mar 2, 2024
1 parent 1d305b2 commit 3c44d31
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 1 deletion.
1 change: 0 additions & 1 deletion buildconfig/manylinux-build/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,4 @@ TODO

Maybe these need adding?

- audio resampling for SDL: libsamplerate (handles samplerate conversions better)
- vulkan, via mesa?
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 @@ -128,6 +128,9 @@ RUN ["bash", "/sndfile_build/build-sndfile.sh"]
ADD pulseaudio /pulseaudio_build/
RUN ["bash", "/pulseaudio_build/build-pulseaudio.sh"]

ADD libpipewire /libpipewire_build/
RUN ["bash", "/libpipewire_build/build-libpipewire.sh"]

ADD libxmp /libxmp_build/
RUN ["bash", "/libxmp_build/build-libxmp.sh"]

Expand All @@ -144,6 +147,9 @@ RUN ["bash", "/fluidsynth_build/build-fluidsynth.sh"]
ADD wavpack /wavpack_build/
RUN ["bash", "/wavpack_build/build-wavpack.sh"]

ADD libsamplerate /libsamplerate_build/
RUN ["bash", "/libsamplerate_build/build-samplerate.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 @@ -128,6 +128,9 @@ RUN ["linux32", "bash", "/sndfile_build/build-sndfile.sh"]
ADD pulseaudio /pulseaudio_build/
RUN ["linux32", "bash", "/pulseaudio_build/build-pulseaudio.sh"]

ADD libpipewire /libpipewire_build/
RUN ["linux32", "bash", "/libpipewire_build/build-libpipewire.sh"]

ADD libxmp /libxmp_build/
RUN ["linux32", "bash", "/libxmp_build/build-libxmp.sh"]

Expand All @@ -144,6 +147,9 @@ RUN ["linux32", "bash", "/fluidsynth_build/build-fluidsynth.sh"]
ADD wavpack /wavpack_build/
RUN ["linux32", "bash", "/wavpack_build/build-wavpack.sh"]

ADD libsamplerate /libsamplerate_build/
RUN ["linux32", "bash", "/libsamplerate_build/build-samplerate.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-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ RUN ["bash", "/sndfile_build/build-sndfile.sh"]
ADD pulseaudio /pulseaudio_build/
RUN ["bash", "/pulseaudio_build/build-pulseaudio.sh"]

ADD libpipewire /libpipewire_build/
RUN ["bash", "/libpipewire_build/build-libpipewire.sh"]

ADD libxmp /libxmp_build/
RUN ["bash", "/libxmp_build/build-libxmp.sh"]

Expand All @@ -144,6 +147,9 @@ RUN ["bash", "/fluidsynth_build/build-fluidsynth.sh"]
ADD wavpack /wavpack_build/
RUN ["bash", "/wavpack_build/build-wavpack.sh"]

ADD libsamplerate /libsamplerate_build/
RUN ["bash", "/libsamplerate_build/build-samplerate.sh"]

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e -x

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

# use pinned commit (latest at the time of this comment) as 1.0.3 has compilation issues
PIPEWIRE_VER="0cfe57f33d4a6e511577614e97c7491e6450f0eb" # 1.0.3
PIPEWIRE="pipewire-$PIPEWIRE_VER"

curl -sL --retry 10 https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${PIPEWIRE_VER}/${PIPEWIRE}.tar.gz > ${PIPEWIRE}.tar.gz
sha512sum -c libpipewire.sha512

tar xzf ${PIPEWIRE}.tar.gz
cd $PIPEWIRE

# a minimal pipewire install will do for us (as SDL loads it dynamically)
meson setup _build $PG_BASE_MESON_FLAGS -Dsession-managers=[] \
-Dexamples=disabled -Dtests=disabled -Dsystemd=disabled -Dselinux=disabled \
-Dpipewire-alsa=disabled -Dpipewire-jack=disabled -Dspa-plugins=disabled \
-Ddbus=disabled -Dudev=disabled -Dsndfile=disabled -Dx11=disabled \
-Dlibpulse=disabled -Davb=disabled

meson compile -C _build
meson install -C _build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6ed0a6a140963a6c7b2bb53c8060ecbf5ede9514212d81f71bcbcc1edf685a7bb8f4bc57f43f8bef3590db392bd0bfb97b0670f2e365590c311f77d6ed8396b9 pipewire-0cfe57f33d4a6e511577614e97c7491e6450f0eb.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
set -e -x

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

# This is a libsamplerate dependency
FFTW_VER="3.3.10"
FFTW="fftw-3.3.10"

LIBSAMPLERATE_VER="0.2.2"
LIBSAMPLERATE="libsamplerate-$LIBSAMPLERATE_VER"

curl -sL --retry 10 https://www.fftw.org/${FFTW}.tar.gz > ${FFTW}.tar.gz
curl -sL --retry 10 https://github.com/libsndfile/libsamplerate/releases/download/${LIBSAMPLERATE_VER}/${LIBSAMPLERATE}.tar.xz > ${LIBSAMPLERATE}.tar.xz
sha512sum -c libsamplerate.sha512

tar xzf ${FFTW}.tar.gz
cd ${FFTW}

mkdir build
cd build

cmake .. $PG_BASE_CMAKE_FLAGS
make
make install

cd ../..

tar xf ${LIBSAMPLERATE}.tar.xz
cd $LIBSAMPLERATE

mkdir build
cd build

cmake .. $PG_BASE_CMAKE_FLAGS
make
make install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40 fftw-3.3.10.tar.gz
d23ae54d23209ba22baae9e5fd178dd8e0e99205dada7e7c3a7b3a3d8cf816ed427a411bfeb008427f64da7767d645edce40811f238af11c8c386f5ef25a9f0c libsamplerate-0.2.2.tar.xz

0 comments on commit 3c44d31

Please sign in to comment.