2020-09-20 13:46:29 +00:00
|
|
|
ARG GH_REPO=btbn/ffmpeg-builds
|
2021-04-05 17:51:41 +00:00
|
|
|
FROM ghcr.io/$GH_REPO/base:latest
|
2020-09-01 21:17:10 +00:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
RUN \
|
2021-04-26 09:42:34 +00:00
|
|
|
apt-get -y install binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gfortran-mingw-w64-x86-64 && \
|
2020-09-03 20:49:43 +00:00
|
|
|
apt-get -y clean && \
|
|
|
|
rm /usr/lib/gcc/*-w64-mingw32/*/libstdc++*.dll* && \
|
|
|
|
rm /usr/lib/gcc/*-w64-mingw32/*/libgcc_s* && \
|
2020-09-05 21:58:44 +00:00
|
|
|
rm /usr/lib/gcc/*-w64-mingw32/*/*.dll.a && \
|
2020-09-04 17:19:43 +00:00
|
|
|
rm /usr/*-w64-mingw32/lib/*.dll.a && \
|
2020-09-03 20:49:43 +00:00
|
|
|
mkdir /opt/ffbuild
|
2020-09-02 16:07:59 +00:00
|
|
|
|
2020-11-07 20:35:21 +00:00
|
|
|
RUN rustup target add x86_64-pc-windows-gnu
|
|
|
|
|
2020-09-03 20:49:43 +00:00
|
|
|
ADD toolchain.cmake /toolchain.cmake
|
2020-09-06 14:34:09 +00:00
|
|
|
ADD cross.meson /cross.meson
|
2020-09-03 20:49:43 +00:00
|
|
|
|
2020-09-03 21:54:05 +00:00
|
|
|
ENV FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32" \
|
2020-09-03 20:49:43 +00:00
|
|
|
FFBUILD_TOOLCHAIN=x86_64-w64-mingw32 \
|
|
|
|
FFBUILD_CROSS_PREFIX=x86_64-w64-mingw32- \
|
2021-04-04 02:08:20 +00:00
|
|
|
FFBUILD_RUST_TARGET=x86_64-pc-windows-gnu \
|
2020-09-03 20:49:43 +00:00
|
|
|
FFBUILD_PREFIX=/opt/ffbuild \
|
|
|
|
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
|
2021-07-13 21:51:33 +00:00
|
|
|
PKG_CONFIG=pkg-config \
|
2021-07-14 19:37:48 +00:00
|
|
|
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \
|
2020-09-05 21:58:44 +00:00
|
|
|
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
|
|
|
|
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
|
2021-04-04 02:08:20 +00:00
|
|
|
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong" \
|
|
|
|
DLLTOOL="x86_64-w64-mingw32-dlltool"
|