initial zefie commit
Builds / prepare (push) Canceled after 0s
Builds / linux-stage1 (push) Canceled after 0s
Builds / linux-profile (push) Canceled after 0s
Builds / linux (push) Canceled after 0s
Builds / linux-cross-aarch64 (push) Canceled after 0s
Builds / linux-asserts (push) Canceled after 0s
Builds / macos-stage1 (push) Canceled after 0s
Builds / macos (push) Canceled after 0s
Builds / msys2 (clang64) (push) Canceled after 0s
Builds / linux-cross-windows (aarch64, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (armv7, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (i686, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (x86_64, ucrt) (push) Canceled after 0s
Builds / test-toolchain (aarch64) (push) Canceled after 0s
Builds / test-toolchain (i686) (push) Canceled after 0s
Builds / test-toolchain (x86_64) (push) Canceled after 0s
Builds / test-libcxx (aarch64, aarch64) (push) Canceled after 0s
Builds / test-libcxx (x86_64, i686) (push) Canceled after 0s
Builds / test-libcxx (x86_64, x86_64) (push) Canceled after 0s
Builds / test-openmp (aarch64) (push) Canceled after 0s
Builds / test-openmp (arm64ec) (push) Canceled after 0s
Builds / test-openmp (i686, <nil>) (push) Canceled after 0s
Builds / test-openmp (x86_64, -m64) (push) Canceled after 0s
Builds / test-compiler-rt (aarch64) (push) Canceled after 0s
Builds / test-compiler-rt (i686) (push) Canceled after 0s
Builds / test-compiler-rt (x86_64) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (aarch64) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (armv7) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (i686) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (x86_64) (push) Canceled after 0s
Builds / test-ffmpeg (push) Canceled after 0s
Builds / upload-nightly (push) Canceled after 0s
Builds / prepare (push) Canceled after 0s
Builds / linux-stage1 (push) Canceled after 0s
Builds / linux-profile (push) Canceled after 0s
Builds / linux (push) Canceled after 0s
Builds / linux-cross-aarch64 (push) Canceled after 0s
Builds / linux-asserts (push) Canceled after 0s
Builds / macos-stage1 (push) Canceled after 0s
Builds / macos (push) Canceled after 0s
Builds / msys2 (clang64) (push) Canceled after 0s
Builds / linux-cross-windows (aarch64, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (armv7, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (i686, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (x86_64, ucrt) (push) Canceled after 0s
Builds / test-toolchain (aarch64) (push) Canceled after 0s
Builds / test-toolchain (i686) (push) Canceled after 0s
Builds / test-toolchain (x86_64) (push) Canceled after 0s
Builds / test-libcxx (aarch64, aarch64) (push) Canceled after 0s
Builds / test-libcxx (x86_64, i686) (push) Canceled after 0s
Builds / test-libcxx (x86_64, x86_64) (push) Canceled after 0s
Builds / test-openmp (aarch64) (push) Canceled after 0s
Builds / test-openmp (arm64ec) (push) Canceled after 0s
Builds / test-openmp (i686, <nil>) (push) Canceled after 0s
Builds / test-openmp (x86_64, -m64) (push) Canceled after 0s
Builds / test-compiler-rt (aarch64) (push) Canceled after 0s
Builds / test-compiler-rt (i686) (push) Canceled after 0s
Builds / test-compiler-rt (x86_64) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (aarch64) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (armv7) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (i686) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (x86_64) (push) Canceled after 0s
Builds / test-ffmpeg (push) Canceled after 0s
Builds / upload-nightly (push) Canceled after 0s
This commit is contained in:
1 parent
70bc9a60ee
commit
dc8b55b2b7
11 files changed
+810
No files matched your search
@@ -0,0 +1,476 @@
|
|||||||
|
# ==============================================================================
|
||||||
|
# Base Setup & Package Dependencies
|
||||||
|
# ==============================================================================
|
||||||
|
FROM ubuntu:26.04
|
||||||
|
|
||||||
|
RUN apt-get update -qq && \
|
||||||
|
DEBIAN_FRONTEND="noninteractive" apt-get install -qqy --no-install-recommends \
|
||||||
|
automake \
|
||||||
|
autopoint \
|
||||||
|
build-essential \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
file \
|
||||||
|
gettext \
|
||||||
|
git \
|
||||||
|
less \
|
||||||
|
libtool \
|
||||||
|
meson \
|
||||||
|
nasm \
|
||||||
|
ninja-build \
|
||||||
|
pkg-config \
|
||||||
|
python3 \
|
||||||
|
qt6-base-dev \
|
||||||
|
sudo \
|
||||||
|
unzip \
|
||||||
|
vim-tiny \
|
||||||
|
wget \
|
||||||
|
zip && \
|
||||||
|
apt-get clean -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ubuntu && \
|
||||||
|
chmod 0440 /etc/sudoers.d/ubuntu
|
||||||
|
|
||||||
|
RUN git config --global user.name "LLVM MinGW" && \
|
||||||
|
git config --global user.email root@localhost
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# LLVM-MinGW Core Toolchain Build
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw \
|
||||||
|
TARGET_TRIPLETS="aarch64-w64-mingw32 armv7-w64-mingw32 i686-w64-mingw32 x86_64-w64-mingw32"
|
||||||
|
|
||||||
|
ARG TOOLCHAIN_ARCHS="i686 x86_64 armv7 aarch64"
|
||||||
|
ARG DEFAULT_CRT="ucrt"
|
||||||
|
ARG CFGUARD_ARGS="--enable-cfguard"
|
||||||
|
|
||||||
|
COPY build-llvm.sh \
|
||||||
|
build-lldb-mi.sh \
|
||||||
|
strip-llvm.sh \
|
||||||
|
install-wrappers.sh \
|
||||||
|
build-mingw-w64.sh \
|
||||||
|
build-mingw-w64-tools.sh \
|
||||||
|
build-compiler-rt.sh \
|
||||||
|
build-libcxx.sh \
|
||||||
|
build-mingw-w64-libraries.sh \
|
||||||
|
build-openmp.sh \
|
||||||
|
./
|
||||||
|
|
||||||
|
COPY wrappers/*.sh wrappers/*.c wrappers/*.h wrappers/*.cfg ./wrappers/
|
||||||
|
|
||||||
|
RUN ./build-llvm.sh "$TOOLCHAIN_PREFIX" && \
|
||||||
|
./build-lldb-mi.sh "$TOOLCHAIN_PREFIX" && \
|
||||||
|
./strip-llvm.sh "$TOOLCHAIN_PREFIX" && \
|
||||||
|
./install-wrappers.sh "$TOOLCHAIN_PREFIX" && \
|
||||||
|
./build-mingw-w64.sh "$TOOLCHAIN_PREFIX" --with-default-msvcrt=$DEFAULT_CRT $CFGUARD_ARGS && \
|
||||||
|
./build-mingw-w64-tools.sh "$TOOLCHAIN_PREFIX" && \
|
||||||
|
./build-compiler-rt.sh "$TOOLCHAIN_PREFIX" $CFGUARD_ARGS && \
|
||||||
|
./build-libcxx.sh "$TOOLCHAIN_PREFIX" $CFGUARD_ARGS && \
|
||||||
|
./build-mingw-w64-libraries.sh "$TOOLCHAIN_PREFIX" $CFGUARD_ARGS && \
|
||||||
|
./build-compiler-rt.sh "$TOOLCHAIN_PREFIX" --build-sanitizers && \
|
||||||
|
./build-openmp.sh "$TOOLCHAIN_PREFIX" $CFGUARD_ARGS && \
|
||||||
|
rm -rf /build/*
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# Environment & Cross-Toolchain Wrappers Setup
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
ENV PATH="/opt/llvm-mingw/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
COPY --chmod=0644 cmake/aarch64-w64-mingw32.cmake /opt/llvm-mingw/aarch64-w64-mingw32/llvm-mingw.cmake
|
||||||
|
COPY --chmod=0644 cmake/armv7-w64-mingw32.cmake /opt/llvm-mingw/armv7-w64-mingw32/llvm-mingw.cmake
|
||||||
|
COPY --chmod=0644 cmake/i686-w64-mingw32.cmake /opt/llvm-mingw/i686-w64-mingw32/llvm-mingw.cmake
|
||||||
|
COPY --chmod=0644 cmake/x86_64-w64-mingw32.cmake /opt/llvm-mingw/x86_64-w64-mingw32/llvm-mingw.cmake
|
||||||
|
COPY --chmod=0755 custom/wrapper.sh /opt/llvm-mingw/wrapper.sh
|
||||||
|
COPY --chmod=0644 custom/bzip2.pc /src/bzip2.pc
|
||||||
|
COPY --chmod=0644 patches/bzip2.patch /src/bzip2.patch
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# Third-Party Libraries (MinGW Target Builds)
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# --- bzip2 ---
|
||||||
|
ENV BZIP2_VERSION=1.0.8
|
||||||
|
RUN wget "https://github.com/libarchive/bzip2/archive/refs/tags/bzip2-${BZIP2_VERSION}.tar.gz" -O "bzip2-${BZIP2_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "bzip2-${BZIP2_VERSION}.tar.gz" && \
|
||||||
|
rm -f "bzip2-${BZIP2_VERSION}.tar.gz" && \
|
||||||
|
mv "bzip2-bzip2-${BZIP2_VERSION}" "bzip2-${BZIP2_VERSION}" && \
|
||||||
|
cd "bzip2-${BZIP2_VERSION}" && \
|
||||||
|
patch -p1 < /src/bzip2.patch && \
|
||||||
|
for t in $TARGET_TRIPLETS; do \
|
||||||
|
mkdir -p "${TOOLCHAIN_PREFIX}/${t}/lib/pkgconfig" && \
|
||||||
|
make clean && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target "${t}" make libbz2.a -j$(nproc) && \
|
||||||
|
cp -fv libbz2.a "${TOOLCHAIN_PREFIX}/${t}/lib/" && \
|
||||||
|
chmod a+r "${TOOLCHAIN_PREFIX}/${t}/lib/libbz2.a" && \
|
||||||
|
cp -fv /src/bzip2.pc "${TOOLCHAIN_PREFIX}/${t}/lib/pkgconfig/" && \
|
||||||
|
sed -i "s|/opt/mingw32-xp/i686-w64-mingw32|${TOOLCHAIN_PREFIX}/${t}|" "${TOOLCHAIN_PREFIX}/${t}/lib/pkgconfig/bzip2.pc"; \
|
||||||
|
done && \
|
||||||
|
cd /src && \
|
||||||
|
rm -f bzip2.pc bzip2.patch && \
|
||||||
|
rm -rf "bzip2-${BZIP2_VERSION}" && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- zlib ---
|
||||||
|
ENV ZLIB_VERSION=1.3.2
|
||||||
|
RUN wget "https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "zlib-${ZLIB_VERSION}.tar.gz" && \
|
||||||
|
rm -f "zlib-${ZLIB_VERSION}.tar.gz" && \
|
||||||
|
cd "zlib-${ZLIB_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh -DZLIB_BUILD_TESTING=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "zlib-${ZLIB_VERSION}" && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- openssl ---
|
||||||
|
COPY patches/openssl4.patch /src/openssl4.patch
|
||||||
|
ENV OPENSSL_VERSION=4.0.3
|
||||||
|
RUN wget "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz" -O "openssl-${OPENSSL_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "openssl-${OPENSSL_VERSION}.tar.gz" && \
|
||||||
|
rm -f "openssl-${OPENSSL_VERSION}.tar.gz" && \
|
||||||
|
cd "openssl-${OPENSSL_VERSION}" && \
|
||||||
|
patch -p1 < /src/openssl4.patch && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target armv7-w64-mingw32 ./Configure --prefix="${TOOLCHAIN_PREFIX}/armv7-w64-mingw32" -static mingwarm no-asm -march=armv7-a -D__ARM_MAX_ARCH__=8 && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target armv7-w64-mingw32 make -j$(nproc) && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target armv7-w64-mingw32 make install_sw install_dev && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target armv7-w64-mingw32 make clean && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target aarch64-w64-mingw32 ./Configure --prefix="${TOOLCHAIN_PREFIX}/aarch64-w64-mingw32" -static mingwarm64 && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target aarch64-w64-mingw32 make -j$(nproc) && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target aarch64-w64-mingw32 make install_sw install_dev && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target aarch64-w64-mingw32 make clean && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target i686-w64-mingw32 ./Configure --prefix="${TOOLCHAIN_PREFIX}/i686-w64-mingw32" -static no-asm mingw && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target i686-w64-mingw32 make -j$(nproc) && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target i686-w64-mingw32 make install_sw install_dev && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target i686-w64-mingw32 make clean && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target x86_64-w64-mingw32 ./Configure --prefix="${TOOLCHAIN_PREFIX}/x86_64-w64-mingw32" -static mingw64 && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target x86_64-w64-mingw32 make -j$(nproc) && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target x86_64-w64-mingw32 make install_sw install_dev && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target x86_64-w64-mingw32 make clean && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "openssl-${OPENSSL_VERSION}" openssl4.patch && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- ncurses ---
|
||||||
|
ENV NCURSES_VERSION=6.6
|
||||||
|
RUN wget "https://ftp.gnu.org/gnu/ncurses/ncurses-${NCURSES_VERSION}.tar.gz" -O "ncurses-${NCURSES_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "ncurses-${NCURSES_VERSION}.tar.gz" && \
|
||||||
|
rm -f "ncurses-${NCURSES_VERSION}.tar.gz" && \
|
||||||
|
cd "ncurses-${NCURSES_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh \
|
||||||
|
--with-fallbacks=ansi,xterm,xterm-256color \
|
||||||
|
--disable-database \
|
||||||
|
--enable-term-driver \
|
||||||
|
--with-term-driver=win32con \
|
||||||
|
--enable-widec \
|
||||||
|
--enable-termcap \
|
||||||
|
--disable-ext-colors \
|
||||||
|
--disable-ext-mouse \
|
||||||
|
--disable-reentrant \
|
||||||
|
--disable-manpages \
|
||||||
|
--without-ada \
|
||||||
|
--without-cxx \
|
||||||
|
--without-cxx-binding \
|
||||||
|
--without-progs \
|
||||||
|
--without-tests \
|
||||||
|
--disable-stripping \
|
||||||
|
--disable-db-install \
|
||||||
|
--disable-shared \
|
||||||
|
--enable-static \
|
||||||
|
--with-normal \
|
||||||
|
--without-manpages \
|
||||||
|
CFLAGS="-DNCURSES_STATIC" && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "ncurses-${NCURSES_VERSION}" && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- libpng ---
|
||||||
|
ENV LIBPNG_VERSION=1.6.58
|
||||||
|
RUN wget "https://sourceforge.net/projects/libpng/files/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz/download" -O "libpng-${LIBPNG_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "libpng-${LIBPNG_VERSION}.tar.xz" && \
|
||||||
|
rm -f "libpng-${LIBPNG_VERSION}.tar.xz" && \
|
||||||
|
cd "libpng-${LIBPNG_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --autotools --enable-static --disable-shared && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "libpng-${LIBPNG_VERSION}" && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- brotli ---
|
||||||
|
ENV BROTLI_VERSION=1.2.1
|
||||||
|
RUN wget "https://github.com/google/brotli/archive/refs/tags/v${BROTLI_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "v${BROTLI_VERSION}.tar.gz" && \
|
||||||
|
rm -f "v${BROTLI_VERSION}.tar.gz" && \
|
||||||
|
cd "brotli-${BROTLI_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "brotli-${BROTLI_VERSION}" && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- freetype ---
|
||||||
|
ENV FREETYPE_VERSION=2.15.0
|
||||||
|
RUN wget "https://sourceforge.net/projects/freetype/files/freetype2/${FREETYPE_VERSION}/freetype-${FREETYPE_VERSION}.tar.xz/download" -O "freetype-${FREETYPE_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "freetype-${FREETYPE_VERSION}.tar.xz" && \
|
||||||
|
rm -f "freetype-${FREETYPE_VERSION}.tar.xz" && \
|
||||||
|
cd "freetype-${FREETYPE_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "freetype-${FREETYPE_VERSION}" build-freetype && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- harfbuzz ---
|
||||||
|
ENV HB_VERSION=15.0.0
|
||||||
|
RUN wget "https://github.com/harfbuzz/harfbuzz/releases/download/${HB_VERSION}/harfbuzz-${HB_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "harfbuzz-${HB_VERSION}.tar.xz" && \
|
||||||
|
rm -f "harfbuzz-${HB_VERSION}.tar.xz" && \
|
||||||
|
cd "harfbuzz-${HB_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh \
|
||||||
|
-Dfreetype=enabled \
|
||||||
|
-Ddefault_library=static \
|
||||||
|
-Dcpp_std=c++17 \
|
||||||
|
-Dtests=disabled \
|
||||||
|
-Ddocs=disabled \
|
||||||
|
-Dutilities=disabled && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "harfbuzz-${HB_VERSION}" build-hb hb.patch && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- rebuild freetype (with harfbuzz support enabled) ---
|
||||||
|
RUN wget "https://sourceforge.net/projects/freetype/files/freetype2/${FREETYPE_VERSION}/freetype-${FREETYPE_VERSION}.tar.xz/download" -O "freetype-${FREETYPE_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "freetype-${FREETYPE_VERSION}.tar.xz" && \
|
||||||
|
rm -f "freetype-${FREETYPE_VERSION}.tar.xz" && \
|
||||||
|
cd "freetype-${FREETYPE_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "freetype-${FREETYPE_VERSION}" build-freetype && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- SDL3 ---
|
||||||
|
ENV SDL_VERSION=3.4.20
|
||||||
|
RUN wget "https://github.com/libsdl-org/SDL/releases/download/release-${SDL_VERSION}/SDL3-${SDL_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "SDL3-${SDL_VERSION}.tar.gz" && \
|
||||||
|
rm -f "SDL3-${SDL_VERSION}.tar.gz" && \
|
||||||
|
cd "SDL3-${SDL_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DSDL_TESTS=OFF \
|
||||||
|
-DSDL_EXAMPLES=OFF \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "SDL3-${SDL_VERSION}" build-sdl && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- SDL3_ttf ---
|
||||||
|
ENV SDL_TTF_VERSION=3.2.2
|
||||||
|
RUN wget "https://github.com/libsdl-org/SDL_ttf/releases/download/release-${SDL_TTF_VERSION}/SDL3_ttf-${SDL_TTF_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "SDL3_ttf-${SDL_TTF_VERSION}.tar.gz" && \
|
||||||
|
rm -f "SDL3_ttf-${SDL_TTF_VERSION}.tar.gz" && \
|
||||||
|
cd "SDL3_ttf-${SDL_TTF_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DSDLTTF_SAMPLES=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "SDL3_ttf-${SDL_TTF_VERSION}" build-sdl_ttf && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- libogg ---
|
||||||
|
ENV LIBOGG_VERSION=1.3.6
|
||||||
|
RUN wget "https://downloads.xiph.org/releases/ogg/libogg-${LIBOGG_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "libogg-${LIBOGG_VERSION}.tar.xz" && \
|
||||||
|
rm -f "libogg-${LIBOGG_VERSION}.tar.xz" && \
|
||||||
|
cd "libogg-${LIBOGG_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "libogg-${LIBOGG_VERSION}" build-libogg && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- libvorbis ---
|
||||||
|
ENV LIBVORBIS_VERSION=1.3.7
|
||||||
|
RUN wget "https://downloads.xiph.org/releases/vorbis/libvorbis-${LIBVORBIS_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "libvorbis-${LIBVORBIS_VERSION}.tar.xz" && \
|
||||||
|
rm -f "libvorbis-${LIBVORBIS_VERSION}.tar.xz" && \
|
||||||
|
cd "libvorbis-${LIBVORBIS_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "libvorbis-${LIBVORBIS_VERSION}" build-libvorbis && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- mpg123 ---
|
||||||
|
ENV MPG123_VERSION=1.33.7
|
||||||
|
RUN wget "https://www.mpg123.de/download/mpg123-${MPG123_VERSION}.tar.bz2" && \
|
||||||
|
tar -jxf "mpg123-${MPG123_VERSION}.tar.bz2" && \
|
||||||
|
rm -f "mpg123-${MPG123_VERSION}.tar.bz2" && \
|
||||||
|
cd "mpg123-${MPG123_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --enable-static --with-audio=dummy,win32 && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "mpg123-${MPG123_VERSION}" build-mpg123 && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- lame ---
|
||||||
|
COPY patches/lame-3.100.patch /src/lame.patch
|
||||||
|
ENV LAME_VERSION=3.100
|
||||||
|
RUN wget "https://sourceforge.net/projects/lame/files/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz/download" -O "lame-${LAME_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "lame-${LAME_VERSION}.tar.gz" && \
|
||||||
|
rm -f "lame-${LAME_VERSION}.tar.gz" && \
|
||||||
|
cd "lame-${LAME_VERSION}" && \
|
||||||
|
patch -p1 < /src/lame.patch && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --enable-static && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "lame-${LAME_VERSION}" build-lame /src/lame.patch && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- opus ---
|
||||||
|
ENV OPUS_VERSION=1.6.1
|
||||||
|
RUN wget "https://downloads.xiph.org/releases/opus/opus-${OPUS_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "opus-${OPUS_VERSION}.tar.gz" && \
|
||||||
|
rm -f "opus-${OPUS_VERSION}.tar.gz" && \
|
||||||
|
cd "opus-${OPUS_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target armv7-w64-mingw32 build_cmake -DOPUS_DISABLE_INTRINSICS=1 -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target aarch64-w64-mingw32 build_cmake -DOPUS_DISABLE_INTRINSICS=1 -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target i686-w64-mingw32 build_cmake -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target x86_64-w64-mingw32 build_cmake -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "opus-${OPUS_VERSION}" build-opus && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- opusfile ---
|
||||||
|
COPY patches/opusfile.patch /src/opusfile.patch
|
||||||
|
ENV OPUSFILE_PACKAGE_VERSION=master
|
||||||
|
RUN git clone --depth=1 --branch="${OPUSFILE_PACKAGE_VERSION}" https://github.com/xiph/opusfile.git && \
|
||||||
|
cd opusfile && \
|
||||||
|
patch -p1 < /src/opusfile.patch && \
|
||||||
|
for t in $TARGET_TRIPLETS; do \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --target "${t}" build_cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DOP_DISABLE_EXAMPLES=ON \
|
||||||
|
-DOP_DISABLE_DOCS=ON \
|
||||||
|
-DOP_DISABLE_HTTP=ON; \
|
||||||
|
done && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf opusfile build-opusfile /src/opusfile.patch && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- flac ---
|
||||||
|
ENV FLAC_VERSION=1.5.0
|
||||||
|
RUN wget "https://github.com/xiph/flac/releases/download/${FLAC_VERSION}/flac-${FLAC_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "flac-${FLAC_VERSION}.tar.xz" && \
|
||||||
|
rm -f "flac-${FLAC_VERSION}.tar.xz" && \
|
||||||
|
cd "flac-${FLAC_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DINSTALL_MANPAGES=OFF \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
|
-DBUILD_EXAMPLES=OFF \
|
||||||
|
-DCMAKE_C_FLAGS="-DFLAC__NO_DLL=1" && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "flac-${FLAC_VERSION}" build-flac && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- libsndfile ---
|
||||||
|
ENV LIBSNDFILE_VERSION=1.2.2
|
||||||
|
RUN wget "https://github.com/libsndfile/libsndfile/releases/download/${LIBSNDFILE_VERSION}/libsndfile-${LIBSNDFILE_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "libsndfile-${LIBSNDFILE_VERSION}.tar.xz" && \
|
||||||
|
rm -f "libsndfile-${LIBSNDFILE_VERSION}.tar.xz" && \
|
||||||
|
cd "libsndfile-${LIBSNDFILE_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
|
-DBUILD_PROGRAMS=OFF \
|
||||||
|
-DBUILD_EXAMPLES=OFF \
|
||||||
|
-DCMAKE_C_FLAGS="-DFLAC__NO_DLL=1" && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "libsndfile-${LIBSNDFILE_VERSION}" build-sndfile && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- libsamplerate ---
|
||||||
|
ENV LIBSAMPLERATE_VERSION=0.2.2
|
||||||
|
RUN wget "https://github.com/libsndfile/libsamplerate/releases/download/${LIBSAMPLERATE_VERSION}/libsamplerate-${LIBSAMPLERATE_VERSION}.tar.xz" && \
|
||||||
|
tar -Jxf "libsamplerate-${LIBSAMPLERATE_VERSION}.tar.xz" && \
|
||||||
|
rm -f "libsamplerate-${LIBSAMPLERATE_VERSION}.tar.xz" && \
|
||||||
|
cd "libsamplerate-${LIBSAMPLERATE_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
|
-DLIBSAMPLERATE_EXAMPLES=OFF \
|
||||||
|
-DCMAKE_C_FLAGS="-DFLAC__NO_DLL=1" && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "libsamplerate-${LIBSAMPLERATE_VERSION}" build-samplerate && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- wxWidgets ---
|
||||||
|
ENV WXWIDGETS_VERSION=3.3.4
|
||||||
|
RUN wget "https://github.com/wxWidgets/wxWidgets/releases/download/v${WXWIDGETS_VERSION}/wxWidgets-${WXWIDGETS_VERSION}.tar.bz2" && \
|
||||||
|
tar -jxf "wxWidgets-${WXWIDGETS_VERSION}.tar.bz2" && \
|
||||||
|
rm -f "wxWidgets-${WXWIDGETS_VERSION}.tar.bz2" && \
|
||||||
|
cd "wxWidgets-${WXWIDGETS_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DwxUSE_DYNLIB_CLASS=OFF \
|
||||||
|
-DwxBUILD_OPTIMISE=ON \
|
||||||
|
-DwxBUILD_USE_STATIC_RUNTIME=ON \
|
||||||
|
-DwxBUILD_MONOLITHIC=ON && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "wxWidgets-${WXWIDGETS_VERSION}" build-wxwidgets && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- raylib ---
|
||||||
|
ENV RAYLIB_VERSION=6.0
|
||||||
|
RUN wget "https://github.com/raysan5/raylib/archive/refs/tags/${RAYLIB_VERSION}.zip" -O "raylib-${RAYLIB_VERSION}.zip" && \
|
||||||
|
unzip "raylib-${RAYLIB_VERSION}.zip" && \
|
||||||
|
rm -f "raylib-${RAYLIB_VERSION}.zip" && \
|
||||||
|
cd "raylib-${RAYLIB_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "raylib-${RAYLIB_VERSION}" && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- SDL2 ---
|
||||||
|
ENV SDL2_VERSION=2.32.10
|
||||||
|
RUN wget "https://github.com/libsdl-org/SDL/releases/download/release-${SDL2_VERSION}/SDL2-${SDL2_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "SDL2-${SDL2_VERSION}.tar.gz" && \
|
||||||
|
rm -f "SDL2-${SDL2_VERSION}.tar.gz" && \
|
||||||
|
cd "SDL2-${SDL2_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DSDL_TESTS=OFF \
|
||||||
|
-DSDL_EXAMPLES=OFF \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "SDL2-${SDL2_VERSION}" build-sdl && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- SDL2_ttf ---
|
||||||
|
ENV SDL2_TTF_VERSION=2.24.0
|
||||||
|
RUN wget "https://github.com/libsdl-org/SDL_ttf/releases/download/release-${SDL2_TTF_VERSION}/SDL2_ttf-${SDL2_TTF_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "SDL2_ttf-${SDL2_TTF_VERSION}.tar.gz" && \
|
||||||
|
rm -f "SDL2_ttf-${SDL2_TTF_VERSION}.tar.gz" && \
|
||||||
|
cd "SDL2_ttf-${SDL2_TTF_VERSION}" && \
|
||||||
|
echo "target_link_libraries(SDL2_ttf PRIVATE brotlidec brotlicommon brotlienc png z)" >> CMakeLists.txt && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DSDL2TTF_SAMPLES=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "SDL2_ttf-${SDL2_TTF_VERSION}" build-sdl_ttf && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# --- freeglut ---
|
||||||
|
ENV FREEGLUT_VERSION=3.8.0
|
||||||
|
RUN wget "https://sourceforge.net/projects/freeglut/files/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz/download" -O "freeglut-${FREEGLUT_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "freeglut-${FREEGLUT_VERSION}.tar.gz" && \
|
||||||
|
rm -f "freeglut-${FREEGLUT_VERSION}.tar.gz" && \
|
||||||
|
cd "freeglut-${FREEGLUT_VERSION}" && \
|
||||||
|
${TOOLCHAIN_PREFIX}/wrapper.sh --cmake -DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cd /src && \
|
||||||
|
rm -rf "freeglut-${FREEGLUT_VERSION}" build-freeglut && \
|
||||||
|
for f in $TARGET_TRIPLETS; do rm -rf "${TOOLCHAIN_PREFIX}/${f}/share/"{doc,man,info,examples}; done
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# Final Runtime Configuration
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
USER ubuntu
|
||||||
|
WORKDIR /src
|
||||||
|
CMD ["/bin/bash"]
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||||
|
|
||||||
|
# Define the target triple for llvm-mingw
|
||||||
|
set(TARGET_TRIPLE aarch64-w64-mingw32)
|
||||||
|
|
||||||
|
# Specify the cross-compilers inside the Docker container
|
||||||
|
set(CMAKE_C_COMPILER ${TARGET_TRIPLE}-clang)
|
||||||
|
set(CMAKE_CXX_COMPILER ${TARGET_TRIPLE}-clang++)
|
||||||
|
set(CMAKE_RC_COMPILER ${TARGET_TRIPLE}-windres)
|
||||||
|
|
||||||
|
# Force CMake to look for dependencies only within the cross-compiler paths
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||||
|
|
||||||
|
# Define the target triple for llvm-mingw
|
||||||
|
set(TARGET_TRIPLE armv7-w64-mingw32)
|
||||||
|
|
||||||
|
# Specify the cross-compilers inside the Docker container
|
||||||
|
set(CMAKE_C_COMPILER ${TARGET_TRIPLE}-clang)
|
||||||
|
set(CMAKE_CXX_COMPILER ${TARGET_TRIPLE}-clang++)
|
||||||
|
set(CMAKE_RC_COMPILER ${TARGET_TRIPLE}-windres)
|
||||||
|
|
||||||
|
# Force CMake to look for dependencies only within the cross-compiler paths
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||||
|
|
||||||
|
# Define the target triple for llvm-mingw
|
||||||
|
set(TARGET_TRIPLE i686-w64-mingw32)
|
||||||
|
|
||||||
|
# Specify the cross-compilers inside the Docker container
|
||||||
|
set(CMAKE_C_COMPILER ${TARGET_TRIPLE}-clang)
|
||||||
|
set(CMAKE_CXX_COMPILER ${TARGET_TRIPLE}-clang++)
|
||||||
|
set(CMAKE_RC_COMPILER ${TARGET_TRIPLE}-windres)
|
||||||
|
|
||||||
|
# Force CMake to look for dependencies only within the cross-compiler paths
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||||
|
|
||||||
|
# Define the target triple for llvm-mingw
|
||||||
|
set(TARGET_TRIPLE x86_64-w64-mingw32)
|
||||||
|
|
||||||
|
# Specify the cross-compilers inside the Docker container
|
||||||
|
set(CMAKE_C_COMPILER ${TARGET_TRIPLE}-clang)
|
||||||
|
set(CMAKE_CXX_COMPILER ${TARGET_TRIPLE}-clang++)
|
||||||
|
set(CMAKE_RC_COMPILER ${TARGET_TRIPLE}-windres)
|
||||||
|
|
||||||
|
# Force CMake to look for dependencies only within the cross-compiler paths
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
prefix=/opt/mingw32-xp/i686-w64-mingw32
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
bindir=${exec_prefix}/bin
|
||||||
|
libdir=${exec_prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: bzip2
|
||||||
|
Description: Lossless, block-sorting data compression
|
||||||
|
Version: 1.0.8
|
||||||
|
Libs: -L${libdir} -lbz2
|
||||||
|
Cflags: -I${includedir}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# All LLVM-mingw targets you want to build for
|
||||||
|
TARGETS=(
|
||||||
|
aarch64-w64-mingw32
|
||||||
|
armv7-w64-mingw32
|
||||||
|
i686-w64-mingw32
|
||||||
|
x86_64-w64-mingw32
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ "${1}" == "--noinstall" ]]; then
|
||||||
|
export NOINSTALL=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect build system, preferring CMake
|
||||||
|
detect_build_system() {
|
||||||
|
if [[ -f meson.build ]]; then
|
||||||
|
echo "meson"
|
||||||
|
elif [[ -f CMakeLists.txt ]]; then
|
||||||
|
echo "cmake"
|
||||||
|
elif [[ -f configure ]]; then
|
||||||
|
echo "autotools"
|
||||||
|
else
|
||||||
|
echo "unknown"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Configure environment for a given target
|
||||||
|
setup_env() {
|
||||||
|
export TARGET="${1}"
|
||||||
|
export CC="${TARGET}-clang"
|
||||||
|
export CXX="${TARGET}-clang++"
|
||||||
|
export RC="${TARGET}-windres"
|
||||||
|
export AR="${TARGET}-ar"
|
||||||
|
export RANLIB="${TARGET}-ranlib"
|
||||||
|
export STRIP="${TARGET}-strip"
|
||||||
|
export OBJCOPY="${TARGET}-objcopy"
|
||||||
|
export OBJDUMP="${TARGET}-objdump"
|
||||||
|
export PKG_CONFIG="/usr/bin/pkgconf"
|
||||||
|
export PKG_CONFIG_LIBDIR="${TOOLCHAIN_PREFIX}/${TARGET}/lib/pkgconfig:${TOOLCHAIN_PREFIX}/${TARGET}/share/pkgconfig"
|
||||||
|
export PKG_CONFIG_SYSROOT_DIR="${TOOLCHAIN_PREFIX}/${TARGET}"
|
||||||
|
export RCFLAGS="--target=${TARGET} -D_WIN32=1 -I/opt/llvm-mingw/${TARGET}/include"
|
||||||
|
export CFLAGS="--target=${TARGET}"
|
||||||
|
case "$TARGET" in
|
||||||
|
i686-w64-mingw32)
|
||||||
|
export CFLAGS="${CFLAGS} -march=pentium4"
|
||||||
|
export CXXFLAGS="${CFLAGS}"
|
||||||
|
;;
|
||||||
|
armv7-w64-mingw32)
|
||||||
|
export CFLAGS="${CFLAGS} -mfpu=neon"
|
||||||
|
export CXXFLAGS="${CFLAGS}"
|
||||||
|
;;
|
||||||
|
x86_64-w64-mingw32)
|
||||||
|
export CFLAGS="${CFLAGS} -march=x86-64 -mtune=znver4"
|
||||||
|
export CXXFLAGS="${CFLAGS}"
|
||||||
|
;;
|
||||||
|
aarch64-w64-mingw32)
|
||||||
|
export CXXFLAGS="${CFLAGS}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
unset CFLAGS
|
||||||
|
unset CXXFLAGS
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build using Autotools
|
||||||
|
build_autotools() {
|
||||||
|
mkdir -p build-$TARGET
|
||||||
|
pushd build-$TARGET
|
||||||
|
|
||||||
|
../configure \
|
||||||
|
--host="$TARGET" \
|
||||||
|
--build="$(../config.guess)" \
|
||||||
|
--prefix="${TOOLCHAIN_PREFIX}/${TARGET}" \
|
||||||
|
CC="${CC}" CXX="${CXX}" RC="$RC" \
|
||||||
|
"${@}" || exit 1
|
||||||
|
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
if [ -z ${NOINSTALL} ]; then
|
||||||
|
make install || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build using CMake
|
||||||
|
build_cmake() {
|
||||||
|
mkdir -p build-$TARGET
|
||||||
|
pushd build-$TARGET
|
||||||
|
|
||||||
|
cmake .. \
|
||||||
|
-DCMAKE_SYSTEM_NAME=Windows \
|
||||||
|
-DCMAKE_C_COMPILER="${CC}" \
|
||||||
|
-DCMAKE_CXX_COMPILER="${CXX}" \
|
||||||
|
-DCMAKE_RC_COMPILER="${RC}" \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="${TOOLCHAIN_PREFIX}/${TARGET}" \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_PREFIX}/${TARGET}/llvm-mingw.cmake" \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release "${@}" || exit 1
|
||||||
|
|
||||||
|
cmake --build . --config Release -- -j$(nproc) || exit 1
|
||||||
|
if [ -z ${NOINSTALL} ]; then
|
||||||
|
cmake --install . || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
# Meson
|
||||||
|
build_meson() {
|
||||||
|
mkdir -p build-$TARGET
|
||||||
|
pushd build-$TARGET
|
||||||
|
|
||||||
|
meson setup .. \
|
||||||
|
--cross-file <(cat <<EOF
|
||||||
|
[binaries]
|
||||||
|
c = '$TARGET-clang'
|
||||||
|
cpp = '$TARGET-clang++'
|
||||||
|
ar = '$TARGET-ar'
|
||||||
|
ld = '$TARGET-ld'
|
||||||
|
strip = '$TARGET-strip'
|
||||||
|
windres = '$TARGET-windres'
|
||||||
|
pkgconfig = '/usr/bin/pkgconf'
|
||||||
|
|
||||||
|
[host_machine]
|
||||||
|
system = 'windows'
|
||||||
|
cpu_family = '$(echo $TARGET | cut -d- -f1)'
|
||||||
|
cpu = '$(echo $TARGET | cut -d- -f1)'
|
||||||
|
endian = 'little'
|
||||||
|
EOF
|
||||||
|
) \
|
||||||
|
--prefix="${TOOLCHAIN_PREFIX}/${TARGET}" \
|
||||||
|
--buildtype=release "${@}"
|
||||||
|
|
||||||
|
ninja -j$(nproc)
|
||||||
|
if [ -z ${NOINSTALL} ]; then
|
||||||
|
ninja install
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main loop
|
||||||
|
if [ "${1}" == "--autotools" ]; then
|
||||||
|
BUILD_SYSTEM=autotools
|
||||||
|
shift
|
||||||
|
elif [ "${1}" == "--cmake" ]; then
|
||||||
|
BUILD_SYSTEM=cmake
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
BUILD_SYSTEM=$(detect_build_system)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${1}" == "--target" ]] && [[ -n "${2}" ]]; then
|
||||||
|
shift
|
||||||
|
TARGET="${1}"
|
||||||
|
shift
|
||||||
|
setup_env "${TARGET}"
|
||||||
|
"${@}"
|
||||||
|
exit $?
|
||||||
|
else
|
||||||
|
if [[ "$BUILD_SYSTEM" == "unknown" ]]; then
|
||||||
|
echo "Error: No configure script or CMakeLists.txt found. Use --target to execute custom commands."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
for TARGET in "${TARGETS[@]}"; do
|
||||||
|
echo "=============================="
|
||||||
|
echo " Building for ${TARGET}"
|
||||||
|
echo "=============================="
|
||||||
|
|
||||||
|
setup_env "${TARGET}"
|
||||||
|
|
||||||
|
case "$BUILD_SYSTEM" in
|
||||||
|
autotools) build_autotools "${@}" ;;
|
||||||
|
cmake) build_cmake "${@}" ;;
|
||||||
|
meson) build_meson "${@}" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rm -rf "${WRAPDIR}"
|
||||||
|
done
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
diff -Naur a/Makefile b/Makefile
|
||||||
|
--- a/Makefile 2026-04-10 18:13:03.378434059 -0400
|
||||||
|
+++ b/Makefile 2026-04-10 18:20:02.948754764 -0400
|
||||||
|
@@ -15,13 +15,13 @@
|
||||||
|
SHELL=/bin/sh
|
||||||
|
|
||||||
|
# To assist in cross-compiling
|
||||||
|
-CC=gcc
|
||||||
|
-AR=ar
|
||||||
|
-RANLIB=ranlib
|
||||||
|
-LDFLAGS=
|
||||||
|
+CC ?= gcc
|
||||||
|
+AR ?= ar
|
||||||
|
+RANLIB ?= ranlib
|
||||||
|
+#LDFLAGS=
|
||||||
|
|
||||||
|
BIGFILES=-D_FILE_OFFSET_BITS=64
|
||||||
|
-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
|
||||||
|
+CFLAGS+=-Wall -Winline -O2 -g $(BIGFILES)
|
||||||
|
|
||||||
|
# Where you want it installed when you do 'make install'
|
||||||
|
PREFIX=/usr/local
|
||||||
|
@@ -61,7 +61,7 @@
|
||||||
|
./bzip2 -d < sample1.bz2 > sample1.tst
|
||||||
|
./bzip2 -d < sample2.bz2 > sample2.tst
|
||||||
|
./bzip2 -ds < sample3.bz2 > sample3.tst
|
||||||
|
- cmp sample1.bz2 sample1.rb2
|
||||||
|
+ cmp sample1.bz2 sample1.rb2
|
||||||
|
cmp sample2.bz2 sample2.rb2
|
||||||
|
cmp sample3.bz2 sample3.rb2
|
||||||
|
cmp sample1.tst sample1.ref
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
diff -Naur lame-3.100/include/libmp3lame.sym lame-3.100-custom/include/libmp3lame.sym
|
||||||
|
--- lame-3.100/include/libmp3lame.sym 2017-09-06 15:33:35.000000000 -0400
|
||||||
|
+++ lame-3.100-custom/include/libmp3lame.sym 2026-03-02 16:48:03.411943300 -0500
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
lame_init
|
||||||
|
-lame_init_old
|
||||||
|
lame_set_num_samples
|
||||||
|
lame_get_num_samples
|
||||||
|
lame_set_in_samplerate
|
||||||
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
diff -Naur a/Configurations/10-main.conf b/Configurations/10-main.conf
|
||||||
|
--- a/Configurations/10-main.conf 2026-06-20 17:53:45.312585579 -0400
|
||||||
|
+++ b/Configurations/10-main.conf 2026-06-20 17:54:45.569851574 -0400
|
||||||
|
@@ -1724,6 +1724,18 @@
|
||||||
|
shared_rcflag => "--target=pe-i386",
|
||||||
|
multilib => "",
|
||||||
|
},
|
||||||
|
+ "mingwarm" => {
|
||||||
|
+ inherit_from => [ "mingw-common" ],
|
||||||
|
+ CFLAGS => add(picker(release => "-fomit-frame-pointer")),
|
||||||
|
+ cflags => "-m32",
|
||||||
|
+ sys_id => "MINGW32",
|
||||||
|
+ bn_ops => add("BN_LLONG"),
|
||||||
|
+ asm_arch => 'armv4',
|
||||||
|
+ uplink_arch => 'armv4',
|
||||||
|
+ perlasm_scheme => "coff",
|
||||||
|
+ shared_rcflag => "--target=armv7-w64-mingw32",
|
||||||
|
+ multilib => "",
|
||||||
|
+ },
|
||||||
|
"mingw64" => {
|
||||||
|
# As for uplink_arch. Applink makes it possible to use
|
||||||
|
# .dll compiled with one compiler with application compiled with
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
diff -Naur a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
--- a/CMakeLists.txt 2026-04-10 19:07:42.691899204 -0400
|
||||||
|
+++ b/CMakeLists.txt 2026-04-10 19:09:14.515652979 -0400
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
get_package_version(PACKAGE_VERSION PROJECT_VERSION)
|
||||||
|
string(REPLACE "." ";" PROJECT_VERSION_LIST ${PROJECT_VERSION})
|
||||||
|
list(GET PROJECT_VERSION_LIST 0 PROJECT_VERSION_MAJOR)
|
||||||
|
-list(GET PROJECT_VERSION_LIST 1 PROJECT_VERSION_MINOR)
|
||||||
|
+#list(GET PROJECT_VERSION_LIST 1 PROJECT_VERSION_MINOR)
|
||||||
|
|
||||||
|
project(OpusFile
|
||||||
|
VERSION ${PROJECT_VERSION}
|
||||||
Reference in new issue
Block a user