Skip to content

Commit 9b293bc

Browse files
committed
1 parent 0cb1d97 commit 9b293bc

File tree

7 files changed

+40
-12
lines changed

7 files changed

+40
-12
lines changed

build.sh

+8
Original file line numberDiff line numberDiff line change
@@ -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
@@ -51,6 +52,7 @@ EOF
5152
# Default arguments
5253
git_commit=""
5354
git_ref=""
55+
tmpdir="/var/tmp/mxe"
5456
with_hevc=false
5557
with_debug=false
5658
with_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 ;;
@@ -159,6 +162,9 @@ else
159162
exit 1
160163
fi
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" \

build/build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ plugins+=" $work_dir/plugins/proxy-libintl"
126126
# Build pe-util, handy for copying DLL dependencies.
127127
make pe-util \
128128
IGNORE_SETTINGS=yes \
129+
MXE_TMP="/var/tmp" \
129130
MXE_TARGETS=`$mxe_dir/ext/config.guess` \
130131
MXE_USE_CCACHE=
131132

build/plugins/llvm-mingw/rust.mk

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ PKG := rust
22
$(PKG)_WEBSITE := https://www.rust-lang.org/
33
$(PKG)_DESCR := A systems programming language focused on safety, speed and concurrency.
44
$(PKG)_IGNORE :=
5-
# Temporarily pin to 2022-09-24 due to https://github.com/rust-lang/rust/pull/98483#issuecomment-1260975364
6-
# https://static.rust-lang.org/dist/2022-09-24/rustc-nightly-src.tar.xz.sha256
5+
# https://static.rust-lang.org/dist/2022-09-30/rustc-nightly-src.tar.xz.sha256
76
$(PKG)_VERSION := nightly
8-
$(PKG)_CHECKSUM := ccc2c11228b80d6a068846d0b9ee08765a85c8cd67a601d13e743c905b271f52
7+
$(PKG)_CHECKSUM := 5695ee6fa24a04766c3273bcd20f76806e8f2910b0a53817028840fa1ac43131
98
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch)))
109
$(PKG)_SUBDIR := $(PKG)c-$($(PKG)_VERSION)-src
1110
$(PKG)_FILE := $(PKG)c-$($(PKG)_VERSION)-src.tar.xz
12-
$(PKG)_URL := https://static.rust-lang.org/dist/2022-09-24/$($(PKG)_FILE)
11+
$(PKG)_URL := https://static.rust-lang.org/dist/2022-09-30/$($(PKG)_FILE)
1312
$(PKG)_DEPS := $(BUILD)~$(PKG)
1413
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
1514

build/settings/gcc-debug.mk

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# MXE will run as many parallel jobs as there are
2-
# available CPU cores. This variable can limit this.
1+
# MXE will run as many parallel jobs as there are available CPU
2+
# cores. This variable can limit this.
33
#JOBS := 4
44

5+
# MXE stores intermediate files in the current directory by
6+
# default. Store them in /var/tmp instead to ensure git commands
7+
# are no-op.
8+
MXE_TMP := /var/tmp
9+
510
# Turn on debugging
611
export CFLAGS := -g -Og -fPIC
712
export CXXFLAGS := -g -Og -fPIC

build/settings/gcc-release.mk

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# MXE will run as many parallel jobs as there are
2-
# available CPU cores. This variable can limit this.
1+
# MXE will run as many parallel jobs as there are available CPU
2+
# cores. This variable can limit this.
33
#JOBS := 4
44

5+
# MXE stores intermediate files in the current directory by
6+
# default. Store them in /var/tmp instead to ensure git commands
7+
# are no-op.
8+
MXE_TMP := /var/tmp
9+
510
# Special flags for compiler.
611
export CFLAGS := -s -O3 -fPIC
712
export CXXFLAGS := -s -O3 -fPIC

build/settings/llvm-debug.mk

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# MXE will run as many parallel jobs as there are
2-
# available CPU cores. This variable can limit this.
1+
# MXE will run as many parallel jobs as there are available CPU
2+
# cores. This variable can limit this.
33
#JOBS := 4
44

5+
# MXE stores intermediate files in the current directory by
6+
# default. Store them in /var/tmp instead to ensure git commands
7+
# are no-op.
8+
MXE_TMP := /var/tmp
9+
510
# Turn on debugging
611
export CFLAGS := -g -Og -fdata-sections -ffunction-sections
712
export CXXFLAGS := -g -Og -fdata-sections -ffunction-sections

build/settings/llvm-release.mk

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# MXE will run as many parallel jobs as there are
2-
# available CPU cores. This variable can limit this.
1+
# MXE will run as many parallel jobs as there are available CPU
2+
# cores. This variable can limit this.
33
#JOBS := 4
44

5+
# MXE stores intermediate files in the current directory by
6+
# default. Store them in /var/tmp instead to ensure git commands
7+
# are no-op.
8+
MXE_TMP := /var/tmp
9+
510
# Special flags for compiler.
611
export CFLAGS := -O3 -fdata-sections -ffunction-sections
712
export CXXFLAGS := -O3 -fdata-sections -ffunction-sections

0 commit comments

Comments
 (0)