From b9452926cd06d0af4544d35c14b3c1c404ce62fa Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 7 Feb 2019 23:40:10 -0500 Subject: [PATCH] Add `OpenLibm v0.6.0` --- OpenLibm/build_tarballs.jl | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 OpenLibm/build_tarballs.jl diff --git a/OpenLibm/build_tarballs.jl b/OpenLibm/build_tarballs.jl new file mode 100644 index 00000000000..757ce693b55 --- /dev/null +++ b/OpenLibm/build_tarballs.jl @@ -0,0 +1,48 @@ +using BinaryBuilder + +name = "Openlibm" +version = v"0.6.0" +sources = [ + "https://github.com/JuliaMath/openlibm/archive/v$(version).tar.gz" => + "d45439093d1fd15e2ac3acf69955e462401c7a160d3330256cb4a86c51bdae28", +] + +script = raw""" +# Enter the funzone +cd ${WORKSPACE}/srcdir/openlibm-* + +# Install into output +flags=("prefix=${prefix}") + +# Build ARCH from ${target} +flags+=("ARCH=${target%-*-*}") + +# Openlibm build system doesn't recognize our windows cross compilers properly +if [[ ${target} == *mingw* ]]; then + flags+=("OS=WINNT") +fi + +# Add `CC` override, since Openlibm seems to think it knows best: +flags+=("CC=$CC") + +# Build the library +make "${flags[@]}" -j${nproc} + +# Install the library +make "${flags[@]}" install +""" + +# These are the platforms we will build for by default, unless further +# platforms are passed in on the command line. +platforms = supported_platforms() +platforms = expand_gcc_versions(platforms) + +products = prefix -> [ + LibraryProduct(prefix, "libopenlibm", :libopenlibm) +] + +dependencies = [ +] + +# Build the tarballs, and possibly a `build.jl` as well. +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)