Skip to content

Commit

Permalink
Add OpenLibm v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Feb 8, 2019
1 parent 9f309ce commit b945292
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions OpenLibm/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit b945292

Please sign in to comment.