Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recipe for CLFFT #5613

Merged
merged 8 commits into from
Oct 7, 2022
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions C/CLFFT/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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

name = "CLFFT"
version = v"2.12.2"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/clMathLibraries/clFFT.git", "1e4833f060976971c4df4b54b1b9ad1620aaf1fb"),
FileSource("https://patch-diff.githubusercontent.com/raw/clMathLibraries/clFFT/pull/245.patch",
"b78e80258bd5dd41572dfad8f4c8fe3b0192d7d4f3bdaa85aae2d59f61184a88")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir

install_license ./clFFT/LICENSE

patch ./clFFT/src/CMakeLists.txt 245.patch

cmake -DCMAKE_INSTALL_PREFIX=${prefix} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -S ./clFFT/src -B ./clFFT/build
cmake --build ./clFFT/build --target install -j${nproc}
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "linux"; libc = "glibc"),
Platform("aarch64", "linux"; libc = "glibc"),
Platform("powerpc64le", "linux"; libc = "glibc"),
Platform("x86_64", "linux"; libc = "musl"),
Platform("aarch64", "linux"; libc = "musl"),
Platform("aarch64", "macos"),
Platform("x86_64", "macos")
]

juliohm marked this conversation as resolved.
Show resolved Hide resolved
platforms = expand_cxxstring_abis(platforms)

# The products that we will ensure are always built
products = [
LibraryProduct("libclFFT", :libclfft)
]

# Dependencies that must be installed before this package can be built
dependencies = [
BuildDependency(PackageSpec(; name="OpenCL_Headers_jll", version=v"2022.09.23")),
BuildDependency(PackageSpec(; name="OpenCL_jll", version=v"2022.09.23")),
BuildDependency(PackageSpec(; name="FFTW_jll", version=v"3.3.10")),
BuildDependency(PackageSpec(; name="boost_jll", version=v"1.76.0"))
juliohm marked this conversation as resolved.
Show resolved Hide resolved
juliohm marked this conversation as resolved.
Show resolved Hide resolved
]

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