Skip to content

Commit

Permalink
Wizard recipe: Fastjet-v3.3.3 (#354)
Browse files Browse the repository at this point in the history
* 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
jstrube and giordano committed Jan 1, 2020
1 parent 8f6ce09 commit 9a1ae80
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions F/Fastjet/build_tarballs.jl
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)

0 comments on commit 9a1ae80

Please sign in to comment.