-
Notifications
You must be signed in to change notification settings - Fork 550
/
build_tarballs.jl
45 lines (36 loc) · 1.43 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
using BinaryBuilder
name = "JpegTurbo"
version = v"3.0.4"
# Collection of sources required to build Ogg
sources = [
# The release notes say that this is the official source tarball for this release
ArchiveSource("https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$(version)/libjpeg-turbo-$(version).tar.gz",
"99130559e7d62e8d695f2c0eaeef912c5828d5b84a0537dcb24c9678c9d5b76b"),
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/libjpeg-turbo*/
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" -DCMAKE_POSITION_INDEPENDENT_CODE=ON
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("libjpeg", :libjpeg),
LibraryProduct("libturbojpeg", :libturbojpeg),
ExecutableProduct("cjpeg", :cjpeg),
ExecutableProduct("djpeg", :djpeg),
ExecutableProduct("jpegtran", :jpegtran),
]
# Dependencies that must be installed before this package can be built
dependencies = [
# Avengers; ASSEMBLE!
HostBuildDependency("YASM_jll"),
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")