|
| 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, Pkg |
| 4 | + |
| 5 | +name = "MFEM_seq" |
| 6 | +version = v"4.4.0" |
| 7 | + |
| 8 | +# Collection of sources required to complete build |
| 9 | +sources = [ |
| 10 | + GitSource("https://github.com/mfem/mfem.git", |
| 11 | + "a1f6902ed72552f3e680d1489f1aa6ade2e0d3b2"), |
| 12 | + DirectorySource("./bundled"), |
| 13 | +] |
| 14 | + |
| 15 | +# Bash recipe for building across all platforms |
| 16 | +script = raw""" |
| 17 | +cd $WORKSPACE/srcdir/mfem* |
| 18 | +
|
| 19 | +# Backport https://github.com/mfem/mfem/pull/2995 to be able to compile with Musl |
| 20 | +atomic_patch -p1 ../patches/0001-use_overloaded_function_definitions_instead_of_unreliable_macros.diff |
| 21 | +
|
| 22 | +mkdir build; cd build |
| 23 | +cmake -DCMAKE_INSTALL_PREFIX=${prefix} \ |
| 24 | + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \ |
| 25 | + -DCMAKE_BUILD_TYPE=Release \ |
| 26 | + -DBUILD_SHARED_LIBS=1 \ |
| 27 | + .. |
| 28 | +make -j${nproc} |
| 29 | +make install |
| 30 | +""" |
| 31 | + |
| 32 | +# These are the platforms we will build for by default, unless further |
| 33 | +# platforms are passed in on the command line |
| 34 | +platforms = supported_platforms() |
| 35 | +platforms = expand_cxxstring_abis(platforms) |
| 36 | + |
| 37 | +# The products that we will ensure are always built |
| 38 | +products = [ |
| 39 | + LibraryProduct("libmfem", :libmfem) |
| 40 | +] |
| 41 | + |
| 42 | +# Dependencies that must be installed before this package can be built |
| 43 | +dependencies = Dependency[ |
| 44 | +] |
| 45 | + |
| 46 | +# Build the tarballs, and possibly a `build.jl` as well. |
| 47 | +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version=v"8") |
0 commit comments