-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wizard recipe: Fastjet-v3.3.3 (#354)
* New Recipe: Fastjet v3.3.3 * let's try MacOS also Couldn't try locally, since VM didn't install... * cxxstring abi expansion Similar to LCIO, we'll want to wrap this with CxxWrap, which needs C++17 support, but maybe other people want to use the binary on older systems. * [Fastjet] Build for all platforms * [Fastjet] Fix failure to build shared library for Windows Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# 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 = "Fastjet" | ||
version = v"3.3.3" | ||
|
||
# Collection of sources required to complete build | ||
sources = [ | ||
"http://fastjet.fr/repo/fastjet-$(version).tar.gz" => | ||
"30b0a0282ce5aeac9e45862314f5966f0be941ce118a83ee4805d39b827d732b", | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
cd $WORKSPACE/srcdir/fastjet-*/ | ||
if [[ "${target}" == *-freebsd* ]]; then | ||
# Needed to fix the following errors | ||
# undefined reference to `backtrace_symbols' | ||
# undefined reference to `backtrace' | ||
export LDFLAGS="-lexecinfo" | ||
fi | ||
FLAGS=() | ||
if [[ "${target}" == *-mingw* ]]; then | ||
# This is needed in order to build the shared library on Windows when we get | ||
# libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only | ||
FLAGS+=(LDFLAGS="-no-undefined") | ||
fi | ||
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} | ||
make -j ${nprocs} "${FLAGS[@]}" | ||
make install | ||
""" | ||
|
||
# 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()) | ||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
LibraryProduct("libsiscone", :libsiscone), | ||
LibraryProduct("libfastjetplugins", :libfastjetplugins), | ||
LibraryProduct("libfastjettools", :libfastjettools), | ||
LibraryProduct("libsiscone_spherical", :libsiscone_spherical), | ||
LibraryProduct("libfastjet", :libfastjet) | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) |