Skip to content

Commit

Permalink
CryptoMiniSat: Support MPItrampoline (#5140)
Browse files Browse the repository at this point in the history
* CryptoMiniSat: Support MPItrampoline

* CryptoMiniSat: Expand gfortran versions

* CryptoMiniSat: Exclude platforms where Boost is not available

* CryptoMiniSat: Use newer Boost

* CryptoMiniSat: Don't expand gfortran versions
  • Loading branch information
eschnett authored Jul 13, 2022
1 parent a19e308 commit 4582302
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions C/CryptoMiniSat/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg
using Base.BinaryPlatforms
const YGGDRASIL_DIR = "../.."
include(joinpath(YGGDRASIL_DIR, "platforms", "mpi.jl"))

name = "CryptoMiniSat"
version = v"5.8.0"
version = v"5.8.1"
cryptominisat_version = v"5.8.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/msoos/cryptominisat.git", "e7079937ed2bfe9160a104378e5a344028e4ab78"),
DirectorySource("./bundled")
DirectorySource("./bundled"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/cryptominisat
atomic_patch -p1 ../Yalsatpatch.patch
atomic_patch -p1 ../feenablepatch.patch
Expand All @@ -31,6 +34,12 @@ make install
install_license ${WORKSPACE}/srcdir/cryptominisat/LICENSE.txt
"""

augment_platform_block = """
using Base.BinaryPlatforms
$(MPI.augment)
augment_platform!(platform::Platform) = augment_mpi!(platform)
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = expand_cxxstring_abis(supported_platforms())
Expand All @@ -45,11 +54,20 @@ products = Product[

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("boost_jll"; compat="=1.71.0"),
Dependency("boost_jll"; compat="=1.76.0"),
Dependency("Zlib_jll"),
Dependency("SQLite_jll"),
Dependency("MPICH_jll")
]

platforms, platform_dependencies = MPI.augment_platforms(platforms)
# Avoid platforms where the MPI implementation isn't supported
# OpenMPI
platforms = filter(p -> !(p["mpi"] == "openmpi" && arch(p) == "armv6l" && libc(p) == "glibc"), platforms)
# MPItrampoline
platforms = filter(p -> !(p["mpi"] == "mpitrampoline" && libc(p) == "musl"), platforms)
platforms = filter(p -> !(p["mpi"] == "mpitrampoline" && Sys.isfreebsd(p)), platforms)
append!(dependencies, platform_dependencies)

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"7")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
augment_platform_block, julia_compat="1.6", preferred_gcc_version=v"8")

0 comments on commit 4582302

Please sign in to comment.