forked from lovell/sharp-libvips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (47 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM debian:buster
LABEL maintainer="Lovell Fuller <[email protected]>"
# Create Debian-based container suitable for cross-compiling Linux ARMv7-A binaries
# Path settings
ENV \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:$PATH"
# Build dependencies
RUN \
apt-get update && \
apt-get install -y curl && \
dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y \
advancecomp \
autoconf \
autopoint \
brotli \
cmake \
crossbuild-essential-armhf \
gettext \
git \
gperf \
jq \
libtool \
nasm \
ninja-build \
pkg-config \
python3-pip \
&& \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
&& \
rustup target add arm-unknown-linux-gnueabihf && \
pip3 install meson
# Compiler settings
ENV \
PKG_CONFIG="arm-linux-gnueabihf-pkg-config --static" \
PLATFORM="linux-armv7" \
CHOST="arm-linux-gnueabihf" \
RUST_TARGET="arm-unknown-linux-gnueabihf" \
FLAGS="-marm -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard" \
MESON="--cross-file=/root/meson.ini"
COPY Toolchain.cmake /root/
COPY meson.ini /root/