diff --git a/build.sh b/build.sh index 7b9065a6..5a2655f6 100755 --- a/build.sh +++ b/build.sh @@ -10,6 +10,7 @@ OPTIONS: --help Show the help and exit -c, --commit The commit to build libvips from -r, --ref The branch or tag to build libvips from + --tmpdir Where intermediate files should be stored (default in /var/tmp/mxe) --nightly Build libvips from tip-of-tree (alias of -r master) --with-hevc Build libheif with the HEVC-related dependencies --with-debug Build binaires with debug symbols @@ -51,6 +52,7 @@ EOF # Default arguments git_commit="" git_ref="" +tmpdir="/var/tmp/mxe" with_hevc=false with_debug=false with_llvm=true @@ -65,6 +67,7 @@ while [ $# -gt 0 ]; do -h|--help) usage 0 ;; -c|--commit) git_commit="$2"; shift ;; -r|--ref) git_ref="$2"; shift ;; + --tmpdir) tmpdir="$2"; shift ;; --nightly) git_ref="master" ;; --with-hevc) with_hevc=true ;; --with-debug) with_debug=true ;; @@ -159,6 +162,9 @@ else exit 1 fi +# Ensure temporary dir exists +mkdir -p $tmpdir + # Ensure latest Debian stable base image $oci_runtime pull buildpack-deps:bullseye @@ -168,9 +174,11 @@ $oci_runtime build -t libvips-build-win-mxe container # Run build scripts inside a container with the: # - current UID and GID inherited # - build dir mounted at /data +# - temporary dir mounted at /var/tmp $oci_runtime run --rm -t \ -u $(id -u):$(id -g) \ -v $PWD/build:/data \ + -v $tmpdir:/var/tmp:z \ -e "GIT_COMMIT=$git_commit" \ -e "HEVC=$with_hevc" \ -e "DEBUG=$with_debug" \ diff --git a/build/build.sh b/build/build.sh index 5fea541e..b6d8adb3 100755 --- a/build/build.sh +++ b/build/build.sh @@ -126,6 +126,7 @@ plugins+=" $work_dir/plugins/proxy-libintl" # Build pe-util, handy for copying DLL dependencies. make pe-util \ IGNORE_SETTINGS=yes \ + MXE_TMP="/var/tmp" \ MXE_TARGETS=`$mxe_dir/ext/config.guess` \ MXE_USE_CCACHE= diff --git a/build/plugins/llvm-mingw/rust.mk b/build/plugins/llvm-mingw/rust.mk index a87a4501..a1f4780c 100644 --- a/build/plugins/llvm-mingw/rust.mk +++ b/build/plugins/llvm-mingw/rust.mk @@ -2,14 +2,13 @@ PKG := rust $(PKG)_WEBSITE := https://www.rust-lang.org/ $(PKG)_DESCR := A systems programming language focused on safety, speed and concurrency. $(PKG)_IGNORE := -# Temporarily pin to 2022-09-24 due to https://github.com/rust-lang/rust/pull/98483#issuecomment-1260975364 -# https://static.rust-lang.org/dist/2022-09-24/rustc-nightly-src.tar.xz.sha256 +# https://static.rust-lang.org/dist/2022-09-30/rustc-nightly-src.tar.xz.sha256 $(PKG)_VERSION := nightly -$(PKG)_CHECKSUM := ccc2c11228b80d6a068846d0b9ee08765a85c8cd67a601d13e743c905b271f52 +$(PKG)_CHECKSUM := 5695ee6fa24a04766c3273bcd20f76806e8f2910b0a53817028840fa1ac43131 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) $(PKG)_SUBDIR := $(PKG)c-$($(PKG)_VERSION)-src $(PKG)_FILE := $(PKG)c-$($(PKG)_VERSION)-src.tar.xz -$(PKG)_URL := https://static.rust-lang.org/dist/2022-09-24/$($(PKG)_FILE) +$(PKG)_URL := https://static.rust-lang.org/dist/2022-09-30/$($(PKG)_FILE) $(PKG)_DEPS := $(BUILD)~$(PKG) $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) diff --git a/build/settings/gcc-debug.mk b/build/settings/gcc-debug.mk index f560a07d..2b7f2638 100644 --- a/build/settings/gcc-debug.mk +++ b/build/settings/gcc-debug.mk @@ -1,7 +1,12 @@ -# MXE will run as many parallel jobs as there are -# available CPU cores. This variable can limit this. +# MXE will run as many parallel jobs as there are available CPU +# cores. This variable can limit this. #JOBS := 4 +# MXE stores intermediate files in the current directory by +# default. Store them in /var/tmp instead to ensure git commands +# are no-op. +MXE_TMP := /var/tmp + # Turn on debugging export CFLAGS := -g -Og -fPIC export CXXFLAGS := -g -Og -fPIC diff --git a/build/settings/gcc-release.mk b/build/settings/gcc-release.mk index 34d26ea7..ecb21cdd 100644 --- a/build/settings/gcc-release.mk +++ b/build/settings/gcc-release.mk @@ -1,7 +1,12 @@ -# MXE will run as many parallel jobs as there are -# available CPU cores. This variable can limit this. +# MXE will run as many parallel jobs as there are available CPU +# cores. This variable can limit this. #JOBS := 4 +# MXE stores intermediate files in the current directory by +# default. Store them in /var/tmp instead to ensure git commands +# are no-op. +MXE_TMP := /var/tmp + # Special flags for compiler. export CFLAGS := -s -O3 -fPIC export CXXFLAGS := -s -O3 -fPIC diff --git a/build/settings/llvm-debug.mk b/build/settings/llvm-debug.mk index f4b40477..23bdebaf 100644 --- a/build/settings/llvm-debug.mk +++ b/build/settings/llvm-debug.mk @@ -1,7 +1,12 @@ -# MXE will run as many parallel jobs as there are -# available CPU cores. This variable can limit this. +# MXE will run as many parallel jobs as there are available CPU +# cores. This variable can limit this. #JOBS := 4 +# MXE stores intermediate files in the current directory by +# default. Store them in /var/tmp instead to ensure git commands +# are no-op. +MXE_TMP := /var/tmp + # Turn on debugging export CFLAGS := -g -Og -fdata-sections -ffunction-sections export CXXFLAGS := -g -Og -fdata-sections -ffunction-sections diff --git a/build/settings/llvm-release.mk b/build/settings/llvm-release.mk index c45c7794..61c85a7d 100644 --- a/build/settings/llvm-release.mk +++ b/build/settings/llvm-release.mk @@ -1,7 +1,12 @@ -# MXE will run as many parallel jobs as there are -# available CPU cores. This variable can limit this. +# MXE will run as many parallel jobs as there are available CPU +# cores. This variable can limit this. #JOBS := 4 +# MXE stores intermediate files in the current directory by +# default. Store them in /var/tmp instead to ensure git commands +# are no-op. +MXE_TMP := /var/tmp + # Special flags for compiler. export CFLAGS := -O3 -fdata-sections -ffunction-sections export CXXFLAGS := -O3 -fdata-sections -ffunction-sections