|
| 1 | +# Note that this script can accept some limited command-line arguments, run |
| 2 | +# `julia build_tarballs.jl --help` to see a usage message. |
| 3 | +using BinaryBuilder |
| 4 | + |
| 5 | +name = "LibSpatialIndexBuilder" |
| 6 | +version = v"0.0.0" |
| 7 | + |
| 8 | +# Collection of sources required to build LibSpatialIndexBuilder |
| 9 | +sources = [ |
| 10 | + "http://download.osgeo.org/libspatialindex/spatialindex-src-1.8.5.tar.bz2" => |
| 11 | + "31ec0a9305c3bd6b4ad60a5261cba5402366dd7d1969a8846099717778e9a50a", |
| 12 | + |
| 13 | +] |
| 14 | + |
| 15 | +# Bash recipe for building across all platforms |
| 16 | +script = raw""" |
| 17 | +cd $WORKSPACE/srcdir |
| 18 | +cd spatialindex-src-1.8.5/ |
| 19 | +./configure --prefix=$prefix --host=$target |
| 20 | +make |
| 21 | +make install |
| 22 | +
|
| 23 | +if [ $target = "x86_64-w64-mingw32" ]; then |
| 24 | +cd $WORKSPACE/srcdir |
| 25 | +ls |
| 26 | +cd .. |
| 27 | +ls |
| 28 | +cd destdir/ |
| 29 | +ls |
| 30 | +cd bin/ |
| 31 | +ls |
| 32 | +cd .. |
| 33 | +cd .. |
| 34 | +cd metadir/ |
| 35 | +ls |
| 36 | +cd ../srcdir/ |
| 37 | +ls |
| 38 | +cd spatialindex-src-1.8.5/ |
| 39 | +ls |
| 40 | +exit |
| 41 | +
|
| 42 | +fi |
| 43 | +
|
| 44 | +""" |
| 45 | + |
| 46 | +# These are the platforms we will build for by default, unless further |
| 47 | +# platforms are passed in on the command line |
| 48 | +platforms = [ |
| 49 | + Linux(:i686, libc=:glibc), |
| 50 | + Linux(:x86_64, libc=:glibc), |
| 51 | + Linux(:aarch64, libc=:glibc), |
| 52 | + Linux(:armv7l, libc=:glibc, call_abi=:eabihf), |
| 53 | + Linux(:powerpc64le, libc=:glibc), |
| 54 | + Linux(:i686, libc=:musl), |
| 55 | + Linux(:x86_64, libc=:musl), |
| 56 | + Linux(:aarch64, libc=:musl), |
| 57 | + Linux(:armv7l, libc=:musl, call_abi=:eabihf), |
| 58 | + FreeBSD(:x86_64) |
| 59 | +] |
| 60 | + |
| 61 | +# The products that we will ensure are always built |
| 62 | +products(prefix) = [ |
| 63 | + LibraryProduct(prefix, "libspatialindex_c", :libspatialindex_c), |
| 64 | + LibraryProduct(prefix, "libspatialindex", :libspatialindex) |
| 65 | +] |
| 66 | + |
| 67 | +# Dependencies that must be installed before this package can be built |
| 68 | +dependencies = [ |
| 69 | + |
| 70 | +] |
| 71 | + |
| 72 | +# Build the tarballs, and possibly a `build.jl` as well. |
| 73 | +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) |
| 74 | + |
0 commit comments