-
Notifications
You must be signed in to change notification settings - Fork 569
/
Copy pathbuild_tarballs.jl
72 lines (63 loc) · 2.38 KB
/
build_tarballs.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
name = "ImageMagick"
upstream_version = v"6.9.13-16"
version = VersionNumber(upstream_version.major, upstream_version.minor, upstream_version.patch)
# Collection of sources required to build imagemagick
sources = [
GitSource("https://github.com/ImageMagick/ImageMagick6",
"d2fdaa61f1acf130a58381ffa09171b514db69ad"),
DirectorySource("./bundled"),
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/ImageMagick6*/
if [[ "${target}" == *86*-linux-gnu ]]; then
# For `clock_gettime`
atomic_patch -p1 ../patches/utilities-link-rt.patch
elif [[ "${target}" == *-mingw* ]]; then
# For `clock_gettime`
atomic_patch -p1 ../patches/check-have-clock-realtime.patch
# otherwise autotools looks in ${prefix}/lib
export LDFLAGS=-L${libdir}
fi
./configure --prefix=${prefix} \
--build=${MACHTYPE} \
--host=${target} \
--without-x \
--disable-openmp \
--disable-installed \
--disable-dependency-tracking \
--without-frozenpaths \
--without-perl \
--disable-docs \
--disable-static \
--with-gslib
make -j${nproc}
make install
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = expand_cxxstring_abis(supported_platforms(;experimental=true))
# The products that we will ensure are always built
products = [
LibraryProduct(["libMagickWand", "libMagickWand-6.Q16"], :libwand),
ExecutableProduct("convert", :imagemagick_convert),
ExecutableProduct("identify", :identify),
ExecutableProduct("montage", :montage),
ExecutableProduct("mogrify", :mogrify),
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("Zlib_jll"),
Dependency("libpng_jll"),
Dependency("JpegTurbo_jll"),
Dependency("Libtiff_jll"; compat="~4.5.1"),
Dependency("Ghostscript_jll"),
Dependency("OpenJpeg_jll"),
]
# Build the tarballs, and possibly a `build.jl` as well.
# Using GCC 6 to get a newer libc, required by OpenJpeg that is pulled in by Libtiff
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
clang_use_lld=false, julia_compat="1.6", preferred_gcc_version=v"6")