@@ -10,6 +10,7 @@ OPTIONS:
10
10
--help Show the help and exit
11
11
-c, --commit <COMMIT> The commit to build libvips from
12
12
-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)
13
14
--nightly Build libvips from tip-of-tree (alias of -r master)
14
15
--with-hevc Build libheif with the HEVC-related dependencies
15
16
--with-debug Build binaires with debug symbols
51
52
# Default arguments
52
53
git_commit=" "
53
54
git_ref=" "
55
+ tmpdir=" /var/tmp/mxe"
54
56
with_hevc=false
55
57
with_debug=false
56
58
with_llvm=true
@@ -65,6 +67,7 @@ while [ $# -gt 0 ]; do
65
67
-h|--help) usage 0 ;;
66
68
-c|--commit) git_commit=" $2 " ; shift ;;
67
69
-r|--ref) git_ref=" $2 " ; shift ;;
70
+ --tmpdir) tmpdir=" $2 " ; shift ;;
68
71
--nightly) git_ref=" master" ;;
69
72
--with-hevc) with_hevc=true ;;
70
73
--with-debug) with_debug=true ;;
159
162
exit 1
160
163
fi
161
164
165
+ # Ensure temporary dir exists
166
+ mkdir -p $tmpdir
167
+
162
168
# Ensure latest Debian stable base image
163
169
$oci_runtime pull buildpack-deps:bullseye
164
170
@@ -168,9 +174,11 @@ $oci_runtime build -t libvips-build-win-mxe container
168
174
# Run build scripts inside a container with the:
169
175
# - current UID and GID inherited
170
176
# - build dir mounted at /data
177
+ # - temporary dir mounted at /var/tmp
171
178
$oci_runtime run --rm -t \
172
179
-u $( id -u) :$( id -g) \
173
180
-v $PWD /build:/data \
181
+ -v $tmpdir :/var/tmp:z \
174
182
-e " GIT_COMMIT=$git_commit " \
175
183
-e " HEVC=$with_hevc " \
176
184
-e " DEBUG=$with_debug " \
0 commit comments