Skip to content

Commit 4ff5114

Browse files
marcomgiordano
andauthored
[AquaCrop] Add version v7.1 (#8854)
* [AquaCrop] Add version v7.1 * Try and fix build on macos and windows * Disable build for i686-linux-gnu-libgfortran3 * Try to fix build on i686-w64-mingw32-libgfortran5 * Disable build for all libgfortran3 platforms * Fix build * Rename package to FAOAquaCrop * Rename package back to AquaCrop * Fix package name in build script too * Add CompilerSupportLibraries_jll as dependency * Set executable and library file name when calling make Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com> * Update A/AquaCrop/build_tarballs.jl Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com> * Update A/AquaCrop/build_tarballs.jl Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com> * Remove unnecessary code --------- Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
1 parent 49b44e8 commit 4ff5114

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

A/AquaCrop/build_tarballs.jl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using BinaryBuilder, Pkg
2+
3+
name = "AquaCrop"
4+
version = v"7.1"
5+
6+
# url = "https://github.com/KUL-RSDA/AquaCrop"
7+
# description = "FAO AquaCrop model of plant growth"
8+
9+
sources = [
10+
GitSource("https://github.com/KUL-RSDA/AquaCrop",
11+
"33ae89706ff82c2c119930e47899cd3fad519d6f"),
12+
]
13+
14+
script = raw"""
15+
cd $WORKSPACE/srcdir/AquaCrop*/src/
16+
17+
sed -i -e 's/-march=native//g' Makefile
18+
19+
make -j${nproc} EXECUTABLE="aquacrop${exeext}" SHARED_LIBRARY="libaquacrop.${dlext}"
20+
21+
install -Dvm 755 "aquacrop${exeext}" -t "${bindir}"
22+
install -Dvm 755 "libaquacrop.${dlext}" -t "${libdir}"
23+
24+
install_license ../LICENSE
25+
"""
26+
27+
# we link against libgfortran
28+
# build fails for all libgfortran3 platforms (except freebsd)
29+
platforms = filter(p -> !(libgfortran_version(p) == v"3.0.0"),
30+
expand_gfortran_versions(supported_platforms()))
31+
32+
products = [
33+
ExecutableProduct("aquacrop", :aquacrop),
34+
LibraryProduct("libaquacrop", :libaquacrop),
35+
]
36+
37+
dependencies = [
38+
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
39+
]
40+
41+
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
42+
julia_compat="1.6")

0 commit comments

Comments
 (0)