From 19d5cf3f657bb42168c82b1d29f524ac325161a0 Mon Sep 17 00:00:00 2001 From: IvanSpirandelli Date: Mon, 2 Oct 2023 18:12:35 +0200 Subject: [PATCH] [AlphaMolWrapper] add recipe (#7436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Including build recipe for AlphaMolWrapper * Updated readme in source repository * Updated SOurce code to not duplicate numerical constants on windows machines. * changing rad2 to rad2_ in another function call * Updating branch of build recipe * Update A/AlphaMolWrapper/build_tarballs.jl Co-authored-by: Mosè Giordano * Update A/AlphaMolWrapper/build_tarballs.jl Co-authored-by: Mosè Giordano * [AlphaMolWrapper] lowering preferred gcc version. specifying needed gmp version * [AlphaMolWrapper] trying GMP_jll v6.2.0 * [AlphaMolWrapper] setting GMP_jll to required v6.2.1 * [AlphaMolWrapper] trying to use GMP_jll v6.1.2 for backward compatability * [AlphaMolWrapper] setting GMP_jll to v6.2.1 again. Seems necessary. * [AlphaMolWrapper] Updating preferred gcc version * [AlphaMolWrapper] Increasing gcc version due to error in previous attempt. * [AlphaMolWrapper] 9 seems to be the lowest we can go in terms of gcc level. * [AlphaMolWrapper] Removing compat for julia 1.6.3, as it would require GMP_jll < 6.2.1 which does not work. --------- Co-authored-by: Mosè Giordano --- A/AlphaMolWrapper/build_tarballs.jl | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 A/AlphaMolWrapper/build_tarballs.jl diff --git a/A/AlphaMolWrapper/build_tarballs.jl b/A/AlphaMolWrapper/build_tarballs.jl new file mode 100644 index 00000000000..65720397322 --- /dev/null +++ b/A/AlphaMolWrapper/build_tarballs.jl @@ -0,0 +1,35 @@ +using BinaryBuilder, Pkg + +name = "AlphaMolWrapper" +version = v"0.1" +julia_versions = [v"1.7", v"1.8", v"1.9", v"1.10"] +julia_compat = join("~" .* string.(getfield.(julia_versions, :major)) .* "." .* string.(getfield.(julia_versions, :minor)), ", ") + +sources = [ + GitSource("https://github.com/IvanSpirandelli/AlphaMolWrapper", "7d27ba6c26eed686a2d82e6e2956dd0ef4a85fd3"), +] + +script = raw""" +cd ${WORKSPACE}/srcdir/AlphaMolWrapper +mkdir build && cd build +cmake .. \ + -DCMAKE_INSTALL_PREFIX=${prefix} \ + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \ + -DJulia_PREFIX=${prefix} +VERBOSE=ON cmake --build . --config Release --target install -- -j${nproc} +""" +include("../../L/libjulia/common.jl") +platforms = expand_cxxstring_abis(vcat(libjulia_platforms.(julia_versions)...)) + +products = [ + LibraryProduct("libalphamolwrapper", :libalphamolwrapper), +] + +dependencies = [ + BuildDependency("libjulia_jll"), + Dependency("libcxxwrap_julia_jll"), + Dependency("GMP_jll"; compat="6.2.1"), +] + +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; + preferred_gcc_version=v"9", julia_compat=julia_compat)