-
Notifications
You must be signed in to change notification settings - Fork 567
/
Copy pathbuild_tarballs.jl
67 lines (57 loc) · 1.96 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
# 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 = "Cairo"
version = v"1.16.0"
sources = [
"https://www.cairographics.org/releases/cairo-$(version).tar.xz" =>
"5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331",
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/cairo-*/
# Because `zlib` doesn't have a proper `.pc` file, configure fails to find.
export CPPFLAGS="-I${prefix}/include"
if [[ "${target}" == *-apple-* ]]; then
BACKEND_OPTIONS="--enable-quartz --enable-quartz-image --disable-xcb --disable-xlib"
elif [[ "${target}" == *-mingw* ]]; then
BACKEND_OPTIONS="--enable-win32 --disable-xcb --disable-xlib"
elif [[ "${target}" == *-linux-* ]] || [[ "${target}" == *freebsd* ]]; then
BACKEND_OPTIONS="--enable-xlib --enable-xcb --enable-xlib-xcb"
fi
./configure --prefix=${prefix} --host=${target} \
--disable-static \
--enable-ft \
--enable-tee \
--enable-svg \
--enable-ps \
--enable-pdf \
--enable-gobject \
--disable-dependency-tracking \
${BACKEND_OPTIONS}
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 = supported_platforms()
# The products that we will ensure are always built
products = [
LibraryProduct("libcairo", :libcairo),
LibraryProduct("libcairo-gobject", :libcairo_gobject),
]
# Dependencies that must be installed before this package can be built
dependencies = [
"Glib_jll",
"Pixman_jll",
"libpng_jll",
"Fontconfig_jll",
"FreeType2_jll",
"Bzip2_jll",
"Xorg_libXext_jll",
"Xorg_libXrender_jll",
"LZO_jll",
"Zlib_jll",
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"8")