Skip to content

Commit

Permalink
Compile enet, physfs and libunibreak from source for `naev-steamrunti…
Browse files Browse the repository at this point in the history
…me`.
  • Loading branch information
ProjectSynchro committed Apr 25, 2023
1 parent d28d3b4 commit c888678
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
- `naev-steamfrankenruntime` (Used for building linux builds in the steamruntime (scout) environment with tools and extra dependencies installed.)
- `naev-windows` (Used to cross compile for Windows.)

### v1.7.3
- Compile enet, physfs, libunibreak from source for `naev-steamruntime`.
- This is because the packages for physfs, libunibreak are too old to build Naev with.
- Debian's libenet-dev package doesn't include static libraries which are needed to ship Steam builds.

### v1.7.2
- Add `file` to `naev-release`.
- This is apparently the one utility that we do not have that appimagetool (A self contained tool) needs.
Expand Down
36 changes: 34 additions & 2 deletions naev-steamruntime/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Build dependencies in build container to save space.
FROM registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest AS build

WORKDIR /tmp
RUN mkdir -p /opt

# 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 && \
make -j"$(nproc --all)" && \
make PREFIX=/opt install

# Due to age of the packaged version of physfs, build libphyfsfs from source..
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 && \
make -j"$(nproc --all)" && \
make install

# Debian's libenet-dev package doesn't provide static versions of enet, build libenet from source..
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 && \
make -j"$(nproc --all)" && \
make PREFIX=/opt install

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

COPY --from=build /opt /usr

LABEL org.opencontainers.image.authors "Naev Dev Team"
LABEL org.opencontainers.image.source "https://github.com/naev/naev-infrastructure"
LABEL org.opencontainers.image.description "Used for testing linux steam builds in the steamruntime (sniper) environment"
Expand All @@ -9,8 +41,8 @@ ENV IMAGE_NAME "naev-steamruntime"

# Install pip from steam/debian repositories.
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
# Naughty: we need libenet-dev, libphysfs-dev, 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.
libenet-dev libphysfs-dev libluajit-5.1-dev libglpk-dev libsuitesparse-dev texinfo && \
# 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 && \
apt-get clean && \
# Verify meson and python.
echo "Verifying python install" && \
Expand Down

0 comments on commit c888678

Please sign in to comment.