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

Wizard recipe: libRadtran-v2.0.4 #5480

Merged
72 changes: 72 additions & 0 deletions L/libRadtran/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 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 = "libRadtran"
version = v"2.0.4"

# Collection of sources required to complete build
sources = [
ArchiveSource("http://www.libradtran.org/download/libRadtran-$(version).tar.gz", "eb840e00f2b59648e77775df83d8ae2337880cec155d145228cd65365e3c816f")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/libRadtran-2.0.4/
lucifer1004 marked this conversation as resolved.
Show resolved Hide resolved
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
touch lib/libRadtran.so
lucifer1004 marked this conversation as resolved.
Show resolved Hide resolved
make clean
lucifer1004 marked this conversation as resolved.
Show resolved Hide resolved
make
make install
mv lib/libRadtran.so ${prefix}/lib/libRadtran.${dlext}
lucifer1004 marked this conversation as resolved.
Show resolved Hide resolved
install_license COPYING
"""

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

# The products that we will ensure are always built
products = [
ExecutableProduct("make_angresfunc", :make_angresfunc),
ExecutableProduct("ssradar", :ssradar),
ExecutableProduct("uvspec_mpi", :uvspec_mpi),
ExecutableProduct("read_Stamnes_tab", :read_Stamnes_tab),
ExecutableProduct("zenith", :zenith),
ExecutableProduct("noon", :noon),
ExecutableProduct("sza2time", :sza2time),
ExecutableProduct("angres", :angres),
ExecutableProduct("uvspec", :uvspec),
ExecutableProduct("vac2air", :vac2air),
ExecutableProduct("vrs_ocean_albedo", :vrs_ocean_albedo),
ExecutableProduct("make_slitfunction", :make_slitfunction),
ExecutableProduct("pmom", :pmom),
ExecutableProduct("phase", :phase),
ExecutableProduct("sofi", :sofi),
ExecutableProduct("conv", :conv),
ExecutableProduct("mie", :mie),
ExecutableProduct("integrate", :integrate),
ExecutableProduct("snowalbedo", :snowalbedo),
ExecutableProduct("spline", :spline),
ExecutableProduct("cldprp", :cldprp),
ExecutableProduct("plkavg", :plkavg),
ExecutableProduct("time2sza", :time2sza),
ExecutableProduct("uvspecfunction", :uvspecfunction),
LibraryProduct("libRadtran", :libRadtran),
]

# Dependencies that must be installed before this package can be built
dependencies = [
lucifer1004 marked this conversation as resolved.
Show resolved Hide resolved
Dependency(PackageSpec(name="GSL_jll", uuid="1b77fbbe-d8ee-58f0-85f9-836ddc23a7a4"))
lucifer1004 marked this conversation as resolved.
Show resolved Hide resolved
Dependency(PackageSpec(name="Perl_jll", uuid="83958c19-0796-5285-893e-a1267f8ec499"))
lucifer1004 marked this conversation as resolved.
Show resolved Hide resolved
Dependency(PackageSpec(name="NetCDF_jll", uuid="7243133f-43d8-5620-bbf4-c2c921802cf3"))
Dependency(PackageSpec(name="flex_jll", uuid="48a596b8-cc7a-5e48-b182-65f75e8595d0"))
lucifer1004 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")