-
Notifications
You must be signed in to change notification settings - Fork 567
/
Copy pathbuild_tarballs.jl
60 lines (53 loc) · 1.89 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
# 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 = "libwebp"
version = v"1.0.3"
# Collection of sources required to build libwebp
sources = [
"https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$(version).tar.gz" =>
"e20a07865c8697bba00aebccc6f54912d6bc333bb4d604e6b07491c1a226b34f",
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/libwebp-*/
export CFLAGS="-std=c99"
export CPPFLAGS="-I${prefix}/include"
if [[ "${target}" == *-freebsd* ]]; then
export LDFLAGS="-L${libdir}"
fi
./configure --prefix=$prefix --host=$target \
--enable-swap-16bit-csp \
--enable-experimental \
--enable-libwebp{mux,demux,decoder,extras} \
--disable-static
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("libwebp", :libwebp),
LibraryProduct("libwebpdemux", :libwebpdemux),
LibraryProduct("libwebpmux", :libwebpmux),
LibraryProduct("libwebpdecoder", :libwebpdecoder),
LibraryProduct("libwebpmux", :libwebpmux),
ExecutableProduct("cwebp", :cwebp),
ExecutableProduct("dwebp", :dwebp),
ExecutableProduct("gif2webp", :gif2webp),
ExecutableProduct("img2webp", :img2webp),
ExecutableProduct("webpinfo", :webpinfo),
ExecutableProduct("webpmux", :webpmux),
]
# Dependencies that must be installed before this package can be built
dependencies = [
"Giflib_jll",
"JpegTurbo_jll",
"libpng_jll",
"Libtiff_jll",
"Libglvnd_jll",
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)