@@ -37,9 +37,9 @@ RUN luarocks install luacheck
3737RUN 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
4545RUN apt-get -y install \
@@ -89,21 +89,30 @@ RUN apt-get -y install \
8989RUN 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..
9797RUN 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
104113FROM 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
107116COPY --from=build /opt/luarocks /opt/luarocks
108117COPY --from=build /opt/ffmpeg /opt/ffmpeg
109118COPY 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.
119128ENV 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.
122136RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip \
123137# Install LLVM and LLD for clang and friends
0 commit comments