Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 60fa0ea

Browse files
Update steam-runtime to build static libraries correctly and remove pre-installed OpenAL in favour of our own newer build
1 parent 3e51182 commit 60fa0ea

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

naev-steamruntime/Dockerfile

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ RUN luarocks install luacheck
3737
RUN curl -L -O https://github.com/adah1972/libunibreak/releases/download/libunibreak_6_1/libunibreak-6.1.tar.gz && \
3838
tar zxpf libunibreak-6.1.tar.gz && \
3939
cd libunibreak-6.1 && \
40-
./configure --prefix=/opt/libs && \
40+
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/ --disable-shared --enable-static && \
4141
make -j"$(nproc --all)" && \
42-
make install
42+
DESTDIR=/opt/libs make install
4343

4444
# Install ffmpeg build requirements
4545
RUN apt-get -y install \
@@ -89,21 +89,30 @@ RUN apt-get -y install \
8989
RUN curl -L -O https://github.com/icculus/physfs/archive/refs/tags/release-3.2.0.tar.gz && \
9090
tar zxpf release-3.2.0.tar.gz && \
9191
cd physfs-release-3.2.0 && \
92-
cmake . -DCMAKE_INSTALL_PREFIX=/opt/libs && \
92+
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu/ -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON && \
9393
make -j"$(nproc --all)" && \
94-
make install
94+
DESTDIR=/opt/libs make install
9595

9696
# Debian's libenet-dev package doesn't provide static versions of enet, build libenet from source..
9797
RUN curl -L -O http://enet.bespin.org/download/enet-1.3.17.tar.gz && \
9898
tar zxpf enet-1.3.17.tar.gz && \
9999
cd enet-1.3.17 && \
100-
./configure --prefix=/opt/libs && \
100+
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/ --disable-shared --enable-static && \
101+
make -j"$(nproc --all)" && \
102+
DESTDIR=/opt/libs make install
103+
104+
# Due to age of the packaged version of openal, build libopenal from source..
105+
RUN curl -L -O https://github.com/kcat/openal-soft/archive/refs/tags/1.24.2.tar.gz && \
106+
tar zxpf 1.24.2.tar.gz && \
107+
cd openal-soft-1.24.2 && \
108+
cd build && \
109+
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu/ -DALSOFT_UTILS=OFF -DALSOFT_EXAMPLES=OFF && \
101110
make -j"$(nproc --all)" && \
102-
make PREFIX=/opt install
111+
DESTDIR=/opt/libs make install
103112

104113
FROM registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest
105114

106-
COPY --from=build /opt/libs /usr
115+
# Copy over the built dependencies from the build container
107116
COPY --from=build /opt/luarocks /opt/luarocks
108117
COPY --from=build /opt/ffmpeg /opt/ffmpeg
109118
COPY setup-devenv.sh /usr/bin
@@ -118,6 +127,11 @@ LABEL org.opencontainers.image.description "Used for testing linux steam builds
118127
# Allows for determining what container scripts are run in.
119128
ENV IMAGE_NAME "naev-steamruntime"
120129

130+
# Remove libopenal-dev and libopenal1, as we want to use our own built version.
131+
RUN DEBIAN_FRONTEND=noninteractive apt-get remove -y libopenal*
132+
COPY --from=build /opt/libs/usr/ /usr
133+
134+
121135
# Install pip from steam/debian repositories.
122136
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip \
123137
# Install LLVM and LLD for clang and friends

0 commit comments

Comments
 (0)