Skip to content

Commit 98da22f

Browse files
Gnimucgiordano
authored andcommitted
Add recipe for LBFGSB (#344)
* Add recipe for LBFGSB * [LBFGSB] Simplify build script, remove custom Makefile * Change project name Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
1 parent ce2e9ef commit 98da22f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

L/L-BFGS-B/build_tarballs.jl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Note that this script can accept some limited command-line arguments, run
2+
# `julia build_tarballs.jl --help` to see a usage message.
3+
using BinaryBuilder
4+
5+
name = "L_BFGS_B"
6+
version = v"3.0.0"
7+
8+
# Collection of sources required to build LBFGSB
9+
sources = [
10+
"http://users.iems.northwestern.edu/~nocedal/Software/Lbfgsb.3.0.tar.gz" =>
11+
"f5b9a1c8c30ff6bcc8df9b5d5738145f4cbe4c7eadec629220e808dcf0e54720",
12+
]
13+
14+
# Bash recipe for building across all platforms
15+
script = raw"""
16+
cd $WORKSPACE/srcdir/Lbfgsb.*/
17+
mkdir -p "${libdir}"
18+
FFLAGS="-O3 -fPIC -shared -Wall -fbounds-check -Wno-uninitialized"
19+
${FC} ${LDFLAGS} ${FFLAGS} lbfgsb.f linpack.f blas.f timer.f -o "${libdir}/liblbfgsb.${dlext}"
20+
install_license License.txt
21+
"""
22+
23+
# These are the platforms we will build for by default, unless further
24+
# platforms are passed in on the command line
25+
platforms = expand_gfortran_versions(supported_platforms())
26+
27+
# The products that we will ensure are always built
28+
products = [
29+
LibraryProduct("liblbfgsb", :liblbfgsb)
30+
]
31+
32+
# Dependencies that must be installed before this package can be built
33+
dependencies = [
34+
]
35+
36+
# Build the tarballs, and possibly a `build.jl` as well.
37+
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)

0 commit comments

Comments
 (0)