Skip to content

Commit 752a66c

Browse files
committed
Dependency version bumps
- Update ImageMagick to 6.9.12-50. - Add --commit and --ref build option (#44). MXE Updates: - Update HarfBuzz to 4.3.0.
1 parent 4ddf96c commit 752a66c

File tree

8 files changed

+50
-31
lines changed

8 files changed

+50
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Run the top-level [build script](build.sh) with the `--help` parameter for help.
2626
| [fribidi] | 1.0.12 | LGPLv3 |
2727
| [gdk-pixbuf] | 2.42.8 | LGPLv3 |
2828
| [glib] | 2.72.1 | LGPLv3 |
29-
| [harfbuzz] | 4.2.1 | MIT Licence |
29+
| [harfbuzz] | 4.3.0 | MIT Licence |
3030
| [lcms] | 2.13.1 | MIT Licence |
3131
| [libexif] | 0.6.24 | LGPLv3 |
3232
| [libffi] | 3.4.2 | MIT Licence |
@@ -97,7 +97,7 @@ Same as libvips-web + these extra dependencies:
9797
| [cfitsio] | 4.1.0 | BSD-like |
9898
| [fftw] | 3.3.10 | GPLv2 |
9999
| [highway] | 0.16.0 | Apache-2.0 License |
100-
| [imagemagick] | 6.9.12-48 | [ImageMagick License] (Apache-2.0-like) |
100+
| [imagemagick] | 6.9.12-50 | [ImageMagick License] (Apache-2.0-like) |
101101
| [imath] | 3.1.5 | BSD 3-Clause |
102102
| [libjxl] | 0.6.1 | BSD 3-Clause |
103103
| [matio] | 1.5.23 | BSD 2-Clause |

build.sh

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ Usage: $(basename "$0") [OPTIONS] [DEPS] [ARCH] [TYPE]
77
Build Windows binaries for libvips in a container
88
99
OPTIONS:
10-
--help Show the help and exit
11-
--nightly Build libvips from tip-of-tree
12-
--with-hevc Build libheif with the HEVC-related dependencies
13-
--with-debug Build binaires with debug symbols
14-
--without-llvm Build binaires with GCC
15-
--without-mozjpeg Build binaires with libjpeg-turbo
16-
--without-zlib-ng Build binaires with vanilla zlib
10+
--help Show the help and exit
11+
-c, --commit <COMMIT> The commit to build libvips from
12+
-r, --ref <REF> The branch or tag to build libvips from
13+
--nightly Build libvips from tip-of-tree (alias of -r master)
14+
--with-hevc Build libheif with the HEVC-related dependencies
15+
--with-debug Build binaires with debug symbols
16+
--without-llvm Build binaires with GCC
17+
--without-mozjpeg Build binaires with libjpeg-turbo
18+
--without-zlib-ng Build binaires with vanilla zlib
1719
1820
DEPS:
1921
The group of dependencies to build libvips with,
@@ -47,7 +49,8 @@ EOF
4749
. $PWD/build/variables.sh
4850

4951
# Default arguments
50-
nightly=false
52+
git_commit=""
53+
git_ref=""
5154
with_hevc=false
5255
with_debug=false
5356
with_llvm=true
@@ -60,7 +63,9 @@ POSITIONAL=()
6063
while [ $# -gt 0 ]; do
6164
case $1 in
6265
-h|--help) usage 0 ;;
63-
--nightly) nightly=true ;;
66+
-c|--commit) git_commit="$2"; shift ;;
67+
-r|--ref) git_ref="$2"; shift ;;
68+
--nightly) git_ref="master" ;;
6469
--with-hevc) with_hevc=true ;;
6570
--with-debug) with_debug=true ;;
6671
--without-llvm) with_llvm=false ;;
@@ -122,6 +127,22 @@ if [ "$type" = "static" ] && [ "$deps" = "all" ]; then
122127
exit 1
123128
fi
124129

130+
if [ -n "$git_commit" ] && [ -n "$git_ref" ]; then
131+
echo "ERROR: The --commit and --ref options are mutually exclusive." >&2
132+
exit 1
133+
fi
134+
135+
if [ -n "$git_ref" ]; then
136+
git_commit=$(git ls-remote --heads --tags --refs https://github.com/libvips/libvips.git $git_ref | awk '{print $1}')
137+
if [ -z "$git_commit" ]; then
138+
echo "ERROR: Couldn't find remote ref $git_ref in the libvips repository." >&2
139+
exit 1
140+
fi
141+
fi
142+
143+
# GitHub's tarball API requires the short SHA commit as the directory name
144+
git_commit="${git_commit:0:7}"
145+
125146
target="$arch-w64-mingw32.$type.$threads${unwind:+.$unwind}"
126147

127148
if [ "$with_debug" = "true" ]; then
@@ -150,7 +171,7 @@ $oci_runtime build -t libvips-build-win-mxe container
150171
$oci_runtime run --rm -t \
151172
-u $(id -u):$(id -g) \
152173
-v $PWD/build:/data \
153-
-e "NIGHTLY=$nightly" \
174+
-e "GIT_COMMIT=$git_commit" \
154175
-e "HEVC=$with_hevc" \
155176
-e "DEBUG=$with_debug" \
156177
-e "LLVM=$with_llvm" \

build/build.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fi
5151
# Always checkout a particular revision which will successfully build.
5252
# This ensures that it will not suddenly break a build.
5353
# Note: Must be regularly updated.
54-
revision="c3ac37bc7e09a55219c4671fd856edb1973a9c42"
54+
revision="23cb13d8aec6bbd51ef3671b0e975c61d7dbd0ad"
5555
initialize=false
5656

5757
if [ -f "$mxe_dir/Makefile" ]; then
@@ -92,7 +92,7 @@ fi
9292
# The 'plugins' variable controls which plugins are in use
9393
plugins="$work_dir"
9494

95-
if [ "$NIGHTLY" = "true" ]; then
95+
if [ -n "$GIT_COMMIT" ]; then
9696
plugins+=" $work_dir/plugins/nightly"
9797
fi
9898

@@ -129,9 +129,7 @@ make pe-util \
129129
MXE_TARGETS=`$mxe_dir/ext/config.guess` \
130130
MXE_USE_CCACHE=
131131

132-
if [ "$NIGHTLY" = "true" ]; then
133-
nightly_version=$(wget -q -O- 'https://api.github.com/repos/libvips/libvips/git/refs/heads/master' | sed -n 's#.*"sha": "\([^"]\{7\}\).*#\1#p' | head -1)
134-
132+
if [ -n "$GIT_COMMIT" ]; then
135133
# Invalidate build cache, if exits
136134
rm -f $mxe_dir/usr/$target.$deps/installed/vips-$deps
137135
fi
@@ -141,7 +139,7 @@ fi
141139
make gendef vips-$deps \
142140
MXE_PLUGIN_DIRS="$plugins" \
143141
MXE_TARGETS=$target.$deps \
144-
NIGHTLY_VERSION=$nightly_version
142+
GIT_COMMIT=$GIT_COMMIT
145143

146144
# Build and bundle llvm-mingw tests when debugging
147145
if [ "$LLVM" = "true" ] && [ "$DEBUG" = "true" ]; then

build/overrides.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ $(info == General overrides: $(lastword $(MAKEFILE_LIST)))
22

33
## Update dependencies
44

5-
# upstream version is 3.2.1
5+
# upstream version is 3.3
66
libffi_VERSION := 3.4.2
77
libffi_CHECKSUM := 540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620
88
libffi_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/libffi-[0-9]*.patch)))
@@ -39,8 +39,8 @@ matio_FILE := matio-$(matio_VERSION).tar.gz
3939
matio_URL := https://github.com/tbeu/matio/releases/download/v$(matio_VERSION)/$(matio_FILE)
4040

4141
# upstream version is 7, we want ImageMagick 6
42-
imagemagick_VERSION := 6.9.12-48
43-
imagemagick_CHECKSUM := af46e8caa8fc871f77e6cd55713fdc660d80d8803feb3bb5991bd82e18bddd15
42+
imagemagick_VERSION := 6.9.12-50
43+
imagemagick_CHECKSUM := 36c9be90f6158e36e5496bed6d539aa7bd1fe2509c9a911e01edb5283f6a0db2
4444
imagemagick_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/imagemagick-[0-9]*.patch)))
4545
imagemagick_GH_CONF := ImageMagick/ImageMagick6/tags
4646

build/package-vipsdev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ install_dir=$mxe_prefix/$target.$deps
9494
bin_dir=$install_dir/bin
9595

9696
# Ensure module_dir is set correctly when building nightly versions
97-
if [ "$NIGHTLY" = "true" ]; then
97+
if [ -n "$GIT_COMMIT" ]; then
9898
module_dir=$(printf '%s\n' $install_dir/lib/vips-modules-* | sort -n | tail -1)
9999
else
100100
module_dir=$install_dir/lib/vips-modules-$vips_version

build/plugins/nightly/overrides.mk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ $(PLUGIN_HEADER)
33
# Nightly build, skip checksum verification
44
SKIP_CHECKSUM := $(true)
55

6-
vips-web_VERSION := $(NIGHTLY_VERSION)
6+
vips-web_VERSION := $(GIT_COMMIT)
77
vips-web_GH_CONF := libvips/libvips/branches/master
8-
vips-web_SUBDIR := libvips-libvips-$(NIGHTLY_VERSION)
9-
vips-web_FILE := vips-web-$(NIGHTLY_VERSION).tar.gz
8+
vips-web_SUBDIR := libvips-libvips-$(GIT_COMMIT)
9+
vips-web_FILE := vips-web-$(GIT_COMMIT).tar.gz
1010

1111
vips-web_BUILD_x86_64-w64-mingw32 = $(subst configure,autogen.sh,$(vips-web_BUILD))
1212
vips-web_BUILD_i686-w64-mingw32 = $(subst configure,autogen.sh,$(vips-web_BUILD))
1313
vips-web_BUILD_aarch64-w64-mingw32 = $(subst configure,autogen.sh,$(vips-web_BUILD))
1414
vips-web_BUILD_armv7-w64-mingw32 = $(subst configure,autogen.sh,$(vips-web_BUILD))
1515

16-
vips-all_VERSION := $(NIGHTLY_VERSION)
16+
vips-all_VERSION := $(GIT_COMMIT)
1717
vips-all_GH_CONF := libvips/libvips/branches/master
18-
vips-all_SUBDIR := libvips-libvips-$(NIGHTLY_VERSION)
19-
vips-all_FILE := vips-all-$(NIGHTLY_VERSION).tar.gz
18+
vips-all_SUBDIR := libvips-libvips-$(GIT_COMMIT)
19+
vips-all_FILE := vips-all-$(GIT_COMMIT).tar.gz
2020

2121
vips-all_BUILD_x86_64-w64-mingw32 = $(subst configure,autogen.sh,$(vips-all_BUILD))
2222
vips-all_BUILD_i686-w64-mingw32 = $(subst configure,autogen.sh,$(vips-all_BUILD))

build/variables.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ vips_version=8.12
55
vips_patch_version=2
66
#vips_pre_version=rc1
77

8-
if [ "$NIGHTLY" = "true" ]; then
9-
vips_version=nightly
8+
if [ -n "$GIT_COMMIT" ]; then
9+
vips_version=$GIT_COMMIT
1010
vips_patch_version=
1111
vips_pre_version=
1212
fi

container/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN apt-get update \
55
# http://mxe.cc/#requirements-debian
66
autopoint bison flex gettext gperf g++-multilib \
77
intltool libc6-dev-i386 libtool-bin libxml-parser-perl \
8-
lzip p7zip-full python-is-python3 python3-mako ruby texinfo \
8+
lzip p7zip-full python-is-python3 python3-mako ruby \
99
# needed when building libvips from git
1010
gobject-introspection gtk-doc-tools
1111

0 commit comments

Comments
 (0)