2021-05-12 17:50:12 +00:00
|
|
|
FROM alpine:edge
|
|
|
|
|
|
|
|
ENV CARGO_HOME="/opt/cargo" PATH="/opt/cargo/bin:${PATH}"
|
|
|
|
RUN \
|
2021-05-13 11:36:16 +00:00
|
|
|
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
2021-05-12 17:50:12 +00:00
|
|
|
apk add --no-cache \
|
2021-05-13 11:41:26 +00:00
|
|
|
yasm nasm diffutils xxd pkgconf git ca-certificates curl wget unzip subversion autoconf automake libtool perl make cmake clang texinfo gperf gettext gettext-dev gettext-static itstool ragel musl-dev libc6-compat openssl-dev zlib-dev bzip2-static gtk-doc gobject-introspection gawk meson samurai p7zip python3 \
|
2021-05-12 17:50:12 +00:00
|
|
|
binutils gcc g++ gfortran \
|
2021-05-13 11:36:16 +00:00
|
|
|
rust cargo cargo-c@testing && \
|
2021-05-12 17:50:12 +00:00
|
|
|
ln -s python3 /usr/bin/python && \
|
|
|
|
git config --global user.email "builder@localhost" && \
|
|
|
|
git config --global user.name "Builder" && \
|
|
|
|
mkdir /opt/ffbuild
|
|
|
|
|
2021-05-13 12:36:08 +00:00
|
|
|
# Work around cmake bug
|
|
|
|
RUN sed -i 's/.*__SUNPRO_C.*/ FALSE )/' /usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake
|
|
|
|
|
2021-05-12 17:50:12 +00:00
|
|
|
ADD run_stage.sh /usr/bin/run_stage
|
|
|
|
ADD git-mini-clone.sh /usr/bin/git-mini-clone
|
|
|
|
ADD check-wget.sh /usr/bin/check-wget
|
|
|
|
|
|
|
|
ADD toolchain.cmake /toolchain.cmake
|
|
|
|
ADD cross.meson /cross.meson
|
|
|
|
|
|
|
|
ENV FFBUILD_TARGET_FLAGS="" \
|
|
|
|
FFBUILD_TOOLCHAIN=x86_64-alpine-linux-musl \
|
|
|
|
FFBUILD_CROSS_PREFIX="" \
|
|
|
|
FFBUILD_RUST_TARGET="" \
|
|
|
|
FFBUILD_PREFIX=/opt/ffbuild \
|
|
|
|
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
|
|
|
|
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig \
|
|
|
|
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" \
|
|
|
|
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong"
|