@@ -10,6 +10,7 @@ OPTIONS:
1010 --help Show the help and exit
1111 -c, --commit <COMMIT> The commit to build libvips from
1212 -r, --ref <REF> The branch or tag to build libvips from
13+ --tmpdir <DIR> Where intermediate files should be stored (default in /var/tmp/mxe)
1314 --nightly Build libvips from tip-of-tree (alias of -r master)
1415 --with-hevc Build libheif with the HEVC-related dependencies
1516 --with-debug Build binaires with debug symbols
5152# Default arguments
5253git_commit=" "
5354git_ref=" "
55+ tmpdir=" /var/tmp/mxe"
5456with_hevc=false
5557with_debug=false
5658with_llvm=true
@@ -65,6 +67,7 @@ while [ $# -gt 0 ]; do
6567 -h|--help) usage 0 ;;
6668 -c|--commit) git_commit=" $2 " ; shift ;;
6769 -r|--ref) git_ref=" $2 " ; shift ;;
70+ --tmpdir) tmpdir=" $2 " ; shift ;;
6871 --nightly) git_ref=" master" ;;
6972 --with-hevc) with_hevc=true ;;
7073 --with-debug) with_debug=true ;;
159162 exit 1
160163fi
161164
165+ # Ensure temporary dir exists
166+ mkdir -p $tmpdir
167+
162168# Ensure latest Debian stable base image
163169$oci_runtime pull buildpack-deps:bullseye
164170
@@ -168,9 +174,11 @@ $oci_runtime build -t libvips-build-win-mxe container
168174# Run build scripts inside a container with the:
169175# - current UID and GID inherited
170176# - build dir mounted at /data
177+ # - temporary dir mounted at /var/tmp
171178$oci_runtime run --rm -t \
172179 -u $( id -u) :$( id -g) \
173180 -v $PWD /build:/data \
181+ -v $tmpdir :/var/tmp:z \
174182 -e " GIT_COMMIT=$git_commit " \
175183 -e " HEVC=$with_hevc " \
176184 -e " DEBUG=$with_debug " \
0 commit comments