-
Notifications
You must be signed in to change notification settings - Fork 568
/
Copy pathbuild_tarballs.jl
62 lines (51 loc) · 1.95 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
# 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 = "gdk_pixbuf"
version = v"2.38.2" # we are actually on master
# Collection of sources required to build gdk-pixbuf
sources = [
"https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/archive/3c7740498fd31b6746dd7e04601886766a6644b7/gdk-pixbuf-3c7740498fd31b6746dd7e04601886766a6644b7.tar.bz2" =>
"9fad057e8c51bc4373948a02c8ee7d8afe254b361fb4abc43767fce43982dd25"
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/gdk-pixbuf-*/
mkdir build && cd build
# Get a local gettext for msgfmt cross-building
apk add gettext
FLAGS=()
if [[ "${target}" == *-apple-* ]] || [[ "${target}" == *-mingw* ]]; then
FLAGS+=(-Dx11=false)
fi
meson .. \
-Dgir=false \
-Dman=false \
-Dinstalled_tests=false \
-Dgio_sniffing=false \
"${FLAGS[@]}" \
--cross-file="${MESON_TARGET_TOOLCHAIN}"
ninja -j${nproc}
ninja install
# Cleanup `loaders.cache` file, we're going to generate a new one on the user's machine
rm -f ${prefix}/lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache
"""
# 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(["libgdk_pixbuf-2", "libgdk_pixbuf-2.0"], :libgdkpixbuf),
ExecutableProduct("gdk-pixbuf-query-loaders", :gdk_pixbuf_query_loaders),
FileProduct("lib/gdk-pixbuf-2.0/2.10.0/loaders", :gdk_pixbuf_loaders_dir),
]
# Dependencies that must be installed before this package can be built
dependencies = [
"Glib_jll",
"JpegTurbo_jll",
"libpng_jll",
"Libtiff_jll",
"Xorg_libX11_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")