This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build_tarballs.jl
45 lines (38 loc) · 1.77 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
# 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.12.12"
#
# function url2hash(url)
# path = download(url)
# open(io-> bytes2hex(BinaryProvider.sha256(io)), path)
# end
# url2hash("https://www.cairographics.org/releases/cairo-1.14.12.tar.xz") |> println
sources = [
"https://www.cairographics.org/releases/cairo-1.14.12.tar.xz" =>
"8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16",
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/cairo-*/
LDFLAGS="-L$prefix/lib -L/opt/${target}/${target}/lib" CPPFLAGS="-I$prefix/include" ./configure --prefix=$prefix --host=$target --disable-static --disable-xlib --disable-ft --disable-dependency-tracking
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(prefix) = [
LibraryProduct(prefix, "libcairo", :libcairo),
]
# Dependencies that must be installed before this package can be built
dependencies = [
"https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/build_Zlib.v1.2.11.jl",
"https://github.com/JuliaIO/LibpngBuilder/releases/download/v1.0.3/build_libpng.v1.6.37.jl",
"https://github.com/JuliaPackaging/Yggdrasil/releases/download/Pixman-v0.36.0-0/build_Pixman.v0.36.0.jl",
"https://github.com/JuliaGraphics/FreeTypeBuilder/releases/download/v2.9.1-4/build_FreeType2.v2.10.0.jl"
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)