Skip to content

Commit

Permalink
15: copy from 14, drop focal
Browse files Browse the repository at this point in the history
  • Loading branch information
janisozaur committed May 9, 2024
1 parent ab7684b commit 7238829
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 0 deletions.
49 changes: 49 additions & 0 deletions 15/android/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Default image that can build OpenRCT2 for Android.
FROM ubuntu:22.04
RUN apt-get update && \
apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# System
ca-certificates curl unzip \
# Build tools
git cmake pkg-config ninja-build ccache g++ \
# Sprite builder libraries for the host
libpng-dev \
openjdk-19-jdk

ENV ANDROID_HOME=/android-dev
ENV ANDROID_NDK_HOME="$ANDROID_HOME/ndk"
ENV JAVA_HOME=/usr/lib/jvm/java-19-openjdk-amd64

# Grab the Android SDK
WORKDIR /tmp/setup
RUN curl -Lo sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \
&& unzip -qo sdk.zip \
&& mkdir -p $ANDROID_HOME/cmdline-tools \
&& mv cmdline-tools $ANDROID_HOME/cmdline-tools/latest \
&& rm sdk.zip

# Need nlohmann/json, needs to live outside system libraries, so it doesn't
# confuse toolchain to include other host headers
RUN curl -Lo json.zip https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip \
&& unzip -qo json.zip -d json \
&& mkdir -p /opt/openrct2/include/ \
&& mv json/include/nlohmann /opt/openrct2/include/nlohmann \
&& rm json.zip

# Clean up
RUN rm -rf /tmp/setup
WORKDIR /

# Accept SDK licenses
RUN yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null

# Install NDK
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;26.2.11394342"
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "cmake;3.22.1"
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "build-tools;34.0.0"
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-34"
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platform-tools"

# Bash is required for OpenRCT2 CI
SHELL ["/bin/bash", "-c"]
22 changes: 22 additions & 0 deletions 15/bullseye/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Supplementart image that can build OpenRCT2 for Linux (amd64).
# Provides building with cmake+ninja using either gcc or clang.
FROM debian:bullseye
RUN apt-get update && \
apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# System
ca-certificates curl file libcairo2 patchelf unzip \
# Build tools
git cmake pkg-config ninja-build ccache g++ clang \
# Build libraries
libsdl2-dev libspeex-dev libspeexdsp-dev \
libflac-dev libogg-dev libvorbis-dev libopenal-dev \
libcrypto++-dev libcurl4-openssl-dev libssl-dev \
libfontconfig1-dev libfreetype6-dev \
libicu-dev libpng-dev libzip-dev \
nlohmann-json3-dev \
# Testing libraries
libgtest-dev

# Bash is required for OpenRCT2 CI
SHELL ["/bin/bash", "-c"]
3 changes: 3 additions & 0 deletions 15/format/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Image specifically designed to run clang-format on OpenRCT2 source files.
FROM alpine
RUN apk add --no-cache python3 clang-extra-tools
22 changes: 22 additions & 0 deletions 15/jammy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Default image that can build OpenRCT2 for Linux (amd64).
# Provides building with cmake+ninja using either gcc or clang.
FROM ubuntu:22.04
RUN apt-get update && \
apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# System
ca-certificates curl file libcairo2 patchelf unzip \
# Build tools
git cmake pkg-config ninja-build ccache g++ clang clang-tidy llvm \
# Build libraries
libsdl2-dev libspeex-dev libspeexdsp-dev xz-utils \
libflac-dev libogg-dev libvorbis-dev libopenal-dev \
libcrypto++-dev libcurl4-openssl-dev libssl-dev \
libfontconfig1-dev libfreetype6-dev \
libicu-dev libpng-dev libzip-dev \
nlohmann-json3-dev \
# Testing libraries
libgtest-dev

# Bash is required for OpenRCT2 CI
SHELL ["/bin/bash", "-c"]
27 changes: 27 additions & 0 deletions 15/jammy32/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Default image that can build OpenRCT2 for Linux (i686).
# Provides building with cmake+ninja using gcc.
FROM ubuntu:22.04
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y g++-multilib \
# && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 \
&& apt-get update \
&& apt-get -y upgrade \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# System
ca-certificates curl unzip \
# Build tools
git cmake ninja-build ccache \
pkg-config:i386 \
# Build libraries
libsdl2-dev:i386 libspeex-dev:i386 libspeexdsp-dev:i386 \
libflac-dev:i386 libogg-dev:i386 libvorbis-dev:i386 libopenal-dev:i386 \
libcurl4-openssl-dev:i386 libssl-dev:i386 \
libfontconfig1-dev:i386 libfreetype6-dev:i386 \
libpng-dev:i386 libzip-dev:i386 libicu-dev:i386 \
nlohmann-json3-dev \
# Testing libraries
libgtest-dev

# Bash is required for OpenRCT2 CI
SHELL ["/bin/bash", "-c"]
112 changes: 112 additions & 0 deletions 15/mingw/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
FROM archlinux:latest

# Based on https://github.com/haffmans/docker-mingw-qt5/blob/master/Dockerfile

# Update base system
#RUN pacman -Sy --noconfirm --noprogressbar archlinux-keyring \
# && pacman-key --populate \
RUN pacman -Syu --noconfirm --noprogressbar pacman \
&& pacman-db-upgrade \
&& pacman -Su --noconfirm --noprogressbar ca-certificates \
&& trust extract-compat \
&& pacman -Su --noconfirm --noprogressbar git pyalpm base-devel libffi \
&& pacman -Syyu --noconfirm --noprogressbar \
&& (echo -e "y\ny\n" | pacman -Scc)

# Install pikaur
RUN useradd --create-home --comment "Arch Build User" build && \
groupadd sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; \
echo 'Defaults:nobody !requiretty' >> /etc/sudoers; \
gpasswd -a build sudo

RUN chown -R build /home/build

USER build
# Overrides from arch-base
ENV HOME /home/build

WORKDIR /home/build/
RUN git clone https://aur.archlinux.org/pikaur.git

WORKDIR /home/build/pikaur
RUN makepkg -sr --noconfirm

USER root
RUN pacman -U pikaur-*.zst --noconfirm && pacman -Scc --noconfirm && rm -r /home/build/*

# Add some useful packages to the base system
RUN pacman -S --noconfirm --noprogressbar \
make \
git \
sudo \
wget \
awk \
sudo \
fakeroot \
file \
patch \
ninja \
ccache \
unzip \
&& (echo -e "y\ny\n" | pacman -Scc)

# Add ownstuff repo
# See https://wiki.archlinux.org/index.php/unofficial_user_repositories#ownstuff and https://martchus.no-ip.biz/repoindex/#packages
RUN echo "[ownstuff]" >> /etc/pacman.conf \
&& echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf \
&& echo "Server = https://ftp.f3l.de/~martchus/\$repo/os/\$arch" >> /etc/pacman.conf \
&& echo "Server = https://martchus.no-ip.biz/repo/arch/\$repo/os/\$arch" >> /etc/pacman.conf \
&& pacman -Sy

USER build
# Install MingW packages
RUN pikaur -S --noconfirm --noprogressbar \
mingw-w64-binutils \
mingw-w64-bzip2 \
mingw-w64-boost \
mingw-w64-cmake \
mingw-w64-crt \
mingw-w64-curl \
mingw-w64-flac \
mingw-w64-fontconfig \
mingw-w64-freetype2 \
mingw-w64-gcc \
mingw-w64-gnutls \
mingw-w64-headers \
mingw-w64-libiconv \
mingw-w64-libogg \
mingw-w64-libpng \
mingw-w64-libvorbis \
mingw-w64-nettle \
mingw-w64-openal \
mingw-w64-openssl \
mingw-w64-pkg-config \
mingw-w64-sdl2 \
mingw-w64-speexdsp \
mingw-w64-tools \
mingw-w64-winpthreads \
mingw-w64-xz \
mingw-w64-zlib \
pkgconf \
&& (echo -e "y\ny\n" | sudo pacman -Scc)

WORKDIR /home/build/
COPY mingw-w64-libzip mingw-w64-libzip
USER root
# GMP and Nettle seem to have their mingw libraries misnamed. pkg-config
# points to .a, not .dll.a files; additionally cmake removes any such
# extensions, so symlink the files to their expected places
RUN ln -s /usr/i686-w64-mingw32/lib/libp11-kit.dll.a /usr/i686-w64-mingw32/lib/libp11-kit.a \
&& ln -s /usr/i686-w64-mingw32/lib/libgmp.dll.a /usr/i686-w64-mingw32/lib/libgmp.a
RUN chown -R build /home/build
USER build
WORKDIR /home/build/mingw-w64-libzip
RUN makepkg -sr --noconfirm
USER root
RUN pacman -U mingw-w64-libzip-*.zst --noconfirm && pacman -Scc --noconfirm && rm -r /home/build/*

RUN wget https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip -O /usr/i686-w64-mingw32/json.zip && unzip /usr/i686-w64-mingw32/json.zip -d /usr/i686-w64-mingw32/ && unzip /usr/i686-w64-mingw32/json.zip -d /usr/x86_64-w64-mingw32/

# Bash is required for OpenRCT2 CI
SHELL ["/bin/bash", "-c"]
48 changes: 48 additions & 0 deletions 15/mingw/mingw-w64-libzip/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Maintainer: Vaporeon <[email protected]>
# Contributor: xantares

pkgname=mingw-w64-libzip
pkgver=1.10.1
pkgrel=1
pkgdesc="A C library for reading, creating, and modifying zip archives (mingw-w64)"
url="http://www.nih.at/libzip/index.html"
license=('BSD')
arch=(any)
depends=('mingw-w64-xz' 'mingw-w64-zlib' 'mingw-w64-bzip2' 'mingw-w64-openssl' 'mingw-w64-gnutls')
makedepends=('mingw-w64-cmake' 'ninja')
options=('staticlibs' '!buildflags' '!strip')
source=("http://www.nih.at/libzip/libzip-${pkgver}.tar.xz")
sha256sums=('dc3c8d5b4c8bbd09626864f6bcf93de701540f761d76b85d7c7d710f4bd90318')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
_pkgname="libzip"

build() {
for _arch in ${_architectures}; do
${_arch}-cmake -S ${_pkgname}-${pkgver} -B build/${_arch}-static -G Ninja \
-DBUILD_DOC=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_REGRESS=OFF \
-DBUILD_TOOLS=OFF \
-DBUILD_SHARED_LIBS=OFF

${_arch}-cmake -S ${_pkgname}-${pkgver} -B build/${_arch} -G Ninja \
-DBUILD_DOC=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_REGRESS=OFF \
-DBUILD_TOOLS=OFF

cmake --build build/${_arch}-static
cmake --build build/${_arch}
done
}

package() {
for _arch in ${_architectures}; do
DESTDIR="${pkgdir}" cmake --install build/${_arch}-static
DESTDIR="${pkgdir}" cmake --install build/${_arch}
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
done
}

22 changes: 22 additions & 0 deletions 15/noble/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Default image that can build OpenRCT2 for Linux (amd64).
# Provides building with cmake+ninja using either gcc or clang.
FROM ubuntu:24.04
RUN apt-get update && \
apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# System
ca-certificates curl file libcairo2 patchelf unzip \
# Build tools
git cmake pkg-config ninja-build ccache g++ clang clang-tidy llvm \
# Build libraries
libsdl2-dev libspeex-dev libspeexdsp-dev xz-utils \
libflac-dev libogg-dev libvorbis-dev libopenal-dev \
libcrypto++-dev libcurl4-openssl-dev libssl-dev \
libfontconfig1-dev libfreetype6-dev \
libicu-dev libpng-dev libzip-dev \
nlohmann-json3-dev \
# Testing libraries
libgtest-dev

# Bash is required for OpenRCT2 CI
SHELL ["/bin/bash", "-c"]

0 comments on commit 7238829

Please sign in to comment.