This repository was archived by the owner on Apr 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_tarballs.jl
More file actions
54 lines (40 loc) · 1.51 KB
/
build_tarballs.jl
File metadata and controls
54 lines (40 loc) · 1.51 KB
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
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
version = v"1.8.5" # also change in raw script string
# Collection of sources required to build LibSpatialIndexBuilder
sources = [
"http://download.osgeo.org/libspatialindex/spatialindex-src-$version.tar.bz2" =>
"31ec0a9305c3bd6b4ad60a5261cba5402366dd7d1969a8846099717778e9a50a",
"./patches"
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
cd spatialindex-src-1.8.5/
patch < ${WORKSPACE}/srcdir/makefile.patch
rm Makefile.am.orig
if [ $target = "x86_64-w64-mingw32" ] || [ $target = "i686-w64-mingw32" ]; then
patch < ${WORKSPACE}/srcdir/header-check.patch
fi
aclocal
autoconf
automake --add-missing --foreign
# Show options in the log
./configure --help
./configure --prefix=$prefix --host=$target
make
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, "libspatialindex_c", :libspatialindex_c),
LibraryProduct(prefix, "libspatialindex", :libspatialindex)
]
# Dependencies that must be installed before this package can be built
dependencies = []
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, "SpatialIndex", version, sources, script, platforms, products, dependencies)