From c71097cef8f93698c9345cb87181e7a7f8c69351 Mon Sep 17 00:00:00 2001 From: Jack Greiner Date: Sun, 28 Apr 2024 04:18:38 -0400 Subject: [PATCH] Add ffmpeg, luarocks, luacheck, and mutagen module to naev-steamruntime --- CHANGELOG.md | 3 +++ naev-steamruntime/Dockerfile | 44 ++++++++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de9b3bc..539ff59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - `naev-steamruntime` (Used for testing linux steam builds in the steamruntime (sniper) environment with extra dependencies installed.) - `naev-windows` (Used to cross compile for Windows.) +### v1.10.4 +- Add ffmpeg, luarocks, luacheck, and mutagen module to `naev-steamruntime` + ### v1.10.3 - It's naev-steamruntime that needs the Meson bump. diff --git a/naev-steamruntime/Dockerfile b/naev-steamruntime/Dockerfile index 7327c21..e12e6d4 100644 --- a/naev-steamruntime/Dockerfile +++ b/naev-steamruntime/Dockerfile @@ -4,11 +4,25 @@ FROM registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest AS build WORKDIR /tmp RUN mkdir -p /opt +# Install luarocks deps +RUN apt-get -y install lua5.4 liblua5.4-dev make libncurses-dev libevent-dev libreadline-dev && \ +# Build luarocks + curl -L -O https://luarocks.org/releases/luarocks-3.8.0.tar.gz && \ + tar zxpf luarocks-3.8.0.tar.gz && \ + cd luarocks-3.8.0 && \ + ./configure --prefix=/opt/luarocks && \ + make -j"$(nproc --all)" && \ + make install + +# Add luarocks to PATH and install luacheck +ENV PATH "$PATH:/opt/luarocks/bin" +RUN luarocks install luacheck + # Due to Debian packaging shenanigans, build libunibreak from source.. RUN curl -L -O https://github.com/adah1972/libunibreak/releases/download/libunibreak_5_0/libunibreak-5.0.tar.gz && \ tar zxpf libunibreak-5.0.tar.gz && \ cd libunibreak-5.0 && \ - ./configure --prefix=/opt && \ + ./configure --prefix=/opt/libs && \ make -j"$(nproc --all)" && \ make PREFIX=/opt install @@ -16,7 +30,7 @@ RUN curl -L -O https://github.com/adah1972/libunibreak/releases/download/libunib RUN curl -L -O https://github.com/icculus/physfs/archive/refs/tags/release-3.2.0.tar.gz && \ tar zxpf release-3.2.0.tar.gz && \ cd physfs-release-3.2.0 && \ - cmake . -DCMAKE_INSTALL_PREFIX=/opt && \ + cmake . -DCMAKE_INSTALL_PREFIX=/opt/libs && \ make -j"$(nproc --all)" && \ make install @@ -24,13 +38,17 @@ RUN curl -L -O https://github.com/icculus/physfs/archive/refs/tags/release-3.2.0 RUN curl -L -O http://enet.bespin.org/download/enet-1.3.17.tar.gz && \ tar zxpf enet-1.3.17.tar.gz && \ cd enet-1.3.17 && \ - ./configure --prefix=/opt && \ + ./configure --prefix=/opt/libs && \ make -j"$(nproc --all)" && \ make PREFIX=/opt install FROM registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest -COPY --from=build /opt /usr +COPY --from=build /opt/libs /usr +COPY --from=build /opt/luarocks /opt/luarocks + +# Add luarocks and friends to PATH +ENV PATH "$PATH:/opt/luarocks/bin" LABEL org.opencontainers.image.authors "Naev Dev Team" LABEL org.opencontainers.image.source "https://github.com/naev/naev-infrastructure" @@ -40,10 +58,16 @@ LABEL org.opencontainers.image.description "Used for testing linux steam builds ENV IMAGE_NAME "naev-steamruntime" # Install pip from steam/debian repositories. -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip \ +# Install runtime dependencies for luarocks + lua5.4 \ +# Install ffmpeg and python mutagen module for soundtrack generation + ffmpeg \ # Naughty: we need libluajit-5.1-dev, libglpk-dev and libsuitesparse-dev, not in the SDK.... All are statically linked when building with the steamruntime option in meson set to true. Also, texinfo is an accidental build dependency for libbfd. - libluajit-5.1-dev libglpk-dev libsuitesparse-dev texinfo python3-pip && \ + libluajit-5.1-dev libglpk-dev libsuitesparse-dev texinfo && \ apt-get clean && \ +# Install mutagen module for soundtrack generation + python3 -m pip install mutagen && \ # Need Meson >=1.2.0 for fancy wrap files. python3 -m pip install meson --upgrade && \ # Verify meson and python. @@ -52,7 +76,13 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ python3 --version && \ echo "Verifying meson install" && \ command -v meson && \ - meson --version + meson --version && \ + echo "Verifying luacheck install" && \ + command -v luacheck && \ + luacheck --version && \ + echo "Verifying ffmpeg install" && \ + command -v ffmpeg && \ + ffmpeg -version # Force appimages to run in extract mode since FUSE is not available ENV APPIMAGE_EXTRACT_AND_RUN 1