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

add builder for PROPACK #385

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions P/PROPACK/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using BinaryBuilder

name = "PROPACK"
version = v"0.1"

sources = [
"https://github.com/optimizers/PROPACK/archive/v1.0.tar.gz" =>
"0d029a4c2cdcdb9b18a4fae77593a562f79406c3f79839ee948782b37974a10e",
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/PROPACK-*/

OPENBLAS="-lopenblas"
FFLAGS=(-xf77-cpp-input)
if [[ ${nbits} == 64 ]] && [[ ${target} != aarch64* ]]; then
OPENBLAS="-lopenblas64_"
FFLAGS+=(-fdefault-integer-8 -fno-align-commons)

for sym in caxpy cdotc cdotu ccopy cgemv clarnv clascl cscal csscal daxpy dbdsdc dbdsqr dcopy ddot dgemm dgemv dlamch dlapy2 dlarnv dlartg dlascl dnrm2 dznrm2 drot dscal lsame saxpy sbdsdc sbdsqr scnrm2 scopy sdot sgemm sgemv slamch slapy2 slarnv slartg slascl snrm2 srot sscal zaxpy zcopy zdotc zdotu zdscal zgemv zlarnv zlascl zscal
do
FFLAGS+=("-D${sym}=${sym}_64")
done
fi

make SLIB=${dlext} FFLAG=\"${FFLAGS[*]}\" BLAS=${OPENBLAS}
cp complex8/libcpropack.${dlext} complex16/libzpropack.${dlext} single/libspropack.${dlext} double/libdpropack.${dlext} ${libdir}/
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()

platforms = expand_gfortran_versions(platforms)

products = [
LibraryProduct("libcpropack", :libcpropack),
LibraryProduct("libzpropack", :libzpropack),
LibraryProduct("libspropack", :libspropack),
LibraryProduct("libdpropack", :libdpropack),
]

dependencies = [
"OpenBLAS_jll",
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)