From 394c81385294cbc4fa9d450d03533499084af235 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Sun, 19 Mar 2023 15:46:44 +0000 Subject: [PATCH] Add support for building on Apple Silicon --- 24/alpine/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/24/alpine/Dockerfile b/24/alpine/Dockerfile index 1d47dd1..866e61c 100644 --- a/24/alpine/Dockerfile +++ b/24/alpine/Dockerfile @@ -17,7 +17,11 @@ RUN mkdir -p ${BERKELEYDB_PREFIX} WORKDIR /${BERKELEYDB_VERSION}/build_unix -RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} +RUN set -ex \ + && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-unknown-linux-gnu; fi \ + && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-unknown-linux-gnu; fi \ + && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-unknown-linux-gnueabihf; fi \ + && ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} --build=${TARGETPLATFORM} RUN make -j4 RUN make install RUN rm -rf ${BERKELEYDB_PREFIX}/docs