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

Update glmnet to use latest source from R package #2028

Merged
merged 4 commits into from
Nov 1, 2020
Merged
Changes from 3 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
27 changes: 17 additions & 10 deletions G/glmnet/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,35 @@
using BinaryBuilder, Pkg

name = "glmnet"
version = v"5.0.0"
version = v"4.0.2"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/JuliaStats/GLMNet.jl.git", "d8cab55556a8c184a879446476efcc35e68a3eee"),
GitSource("https://github.com/cran/glmnet.git", "b1a4b50de01e0cd24343959d7cf86452bac17b26")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/GLMNet.jl/deps/
cd $WORKSPACE/srcdir/glmnet/src

# Add stub for `setpb`, which normally comes from `pb.c` to connect the
# progress meter to R, but we don't need that
echo "
subroutine setpb(val)
return
end
" > pb.f

flags="-fdefault-real-8 -ffixed-form -shared -O3"
if [[ ${target} != *mingw* ]]; then
flags="${flags} -fPIC"
flags="${flags} -fPIC";
fi
if [[ ${target} != aarch64* ]] && [[ ${target} != arm* ]]; then
flags="${flags} -m${nbits}"
flags="${flags} -m${nbits}";
Comment on lines +27 to +30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol I didn't see this, I think it must have been added when I pasted the old script into the wizard 😅

Can remove if you like

fi

${FC} ${LDFLAGS} ${flags} glmnet5.f90 -o libglmnet.${dlext}

mkdir -p $libdir
mv libglmnet.${dlext} $libdir/
mkdir -p ${libdir}
${FC} ${LDFLAGS} ${flags} glmnet5dpclean.f wls.f pb.f -o ${libdir}/libglmnet.${dlext}
install_license DESCRIPTION
JackDunnNZ marked this conversation as resolved.
Show resolved Hide resolved
"""

# These are the platforms we will build for by default, unless further
Expand All @@ -39,6 +45,7 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"))
]

# Build the tarballs, and possibly a `build.jl` as well.
Expand Down