Skip to content

Commit

Permalink
Update libcgal_julia to new libcxxwrap / libjulia
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Dec 29, 2020
1 parent 95e9c06 commit 32ca8ac
Showing 1 changed file with 23 additions and 31 deletions.
54 changes: 23 additions & 31 deletions L/libcgal_julia/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
import Pkg: PackageSpec
using BinaryBuilder, Pkg

julia_version = v"1.5.3"

name = "libcgal_julia"
version = v"0.15"
version = v"0.15.1"

isyggdrasil = get(ENV, "YGGDRASIL", "") == "true"
rname = "libcgal-julia"
Expand All @@ -17,14 +18,6 @@ sources = [
DirectorySource(joinpath(ENV["HOME"], "src/github/rgcv/$rname"))
]

# Dependencies that must be installed before this package can be built
dependencies = [
BuildDependency(PackageSpec(name="Julia_jll", version="v1.4.1")),

Dependency("CGAL_jll"),
Dependency("libcxxwrap_julia_jll"),
]

# Bash recipe for building across all platforms
jlcgaldir = ifelse(isyggdrasil, rname, ".")
script = raw"""
Expand All @@ -42,15 +35,14 @@ case $target in
esac
""" * """
## configure build
cmake $jlcgaldir -B /tmp/build """ * raw"""\
`# cmake specific` \
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TARGET_TOOLCHAIN \
cmake $jlcgaldir """ * raw"""\
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_ROOT_PATH=$prefix \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_FIND_ROOT_PATH=${prefix} \
-DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TARGET_TOOLCHAIN \
-DJulia_PREFIX=${prefix} \
$macosflags \
`# tell jlcxx where julia is` \
-DJulia_PREFIX=$prefix
-B /tmp/build
## and away we go..
VERBOSE=ON cmake --build /tmp/build --config Release --target install -- -j$nproc
Expand All @@ -60,24 +52,24 @@ install_license $jlcgaldir/LICENSE

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "freebsd"; cxxstring_abi = "cxx11"),
Platform("aarch64", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
# generates plentiful warnings about parameter passing ABI changes, better
# safe than sorry
# Platform("armv7l", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
Platform("i686", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
Platform("x86_64", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
Platform("x86_64", "macos"; cxxstring_abi = "cxx11"),
Platform("i686", "windows"; cxxstring_abi = "cxx11"),
Platform("x86_64", "windows"; cxxstring_abi = "cxx11"),
]
include("../../L/libjulia/common.jl")
platforms = libjulia_platforms(julia_version)
platforms = expand_cxxstring_abis(platforms)

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

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("CGAL_jll"),
Dependency("libcxxwrap_julia_jll"),
BuildDependency(PackageSpec(name="libjulia_jll", version=julia_version)),
]

# 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;
preferred_gcc_version=v"8",
julia_compat = "$(julia_version.major).$(julia_version.minor)")

0 comments on commit 32ca8ac

Please sign in to comment.