From bf58564f394d082e469553d895be03fea2465c4c Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Sun, 26 Mar 2023 19:40:33 -0700 Subject: [PATCH] [WolframAppDisovery] Initial commit, to be used for MathLink.jl --- W/WolframAppDiscovery/build_tarballs.jl | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 W/WolframAppDiscovery/build_tarballs.jl diff --git a/W/WolframAppDiscovery/build_tarballs.jl b/W/WolframAppDiscovery/build_tarballs.jl new file mode 100644 index 00000000000..5e5c3c0d6b1 --- /dev/null +++ b/W/WolframAppDiscovery/build_tarballs.jl @@ -0,0 +1,32 @@ +using BinaryBuilder + +name = "WolframAppDiscovery" +version = v"0.4.3" + +sources = [ + GitSource("https://github.com/WolframResearch/wolfram-app-discovery-rs.git", "aa6feb10261593d7c6f13062f7f68b47a8b130b8") +] + +# Bash recipe for building across all platforms +script = raw""" +cd ${WORKSPACE}/srcdir/wolfram-app-discovery-rs/ +cargo build --release +install -D -m 755 "target/${rust_target}/release/wolfram-app-discovery${exeext}" "${bindir}/wolfram-app-discovery${exeext}" +install_license LICENCE-MIT LICENCE-APACHE +""" + +platforms = supported_platforms() +# Our Rust toolchain for i686 Windows is unusable +filter!(p -> !Sys.iswindows(p) || arch(p) != "i686", platforms) + +# The products that we will ensure are always built +products = [ + ExecutableProduct("wolfram-app-discovery", :wolfram_app_discovery), +] + +# Dependencies that must be installed before this package can be built +dependencies = Dependency[ +] + +# Build the tarballs, and possibly a `build.jl` as well. +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; compilers=[:c, :rust], julia_compat="1.6")