-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.sh
54 lines (47 loc) · 1.48 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
export C_INCLUDE_PATH=${PREFIX}/include
export LD_LIBRARY_PATH=${PREFIX}/lib
export LIBRARY_PATH=${PREFIX}/lib
export CMAKE_PREFIX_PATH=${PREFIX}
export PATH="${PREFIX}/bin:${PATH}"
# Hack to suppress building docs
cat > doc/Makefile << EOF
html :
mkdir -p _build/html
EOF
# Julia sets this to unix makefiles later on in its build process
export CMAKE_GENERATOR="make"
NO_GIT=1 make -C base version_git.jl.phony CC=$CC CXX=$CXX FC=$FC
export EXTRA_MAKEFLAGS=""
if [ "$(uname)" == "Darwin" ]
then
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBUNWIND=1"
elif [ "$(uname)" == "Linux" ]
then
# On linux the released version of libunwind has issues building julia
# See: https://github.com/JuliaLang/julia/issues/23615
export EXTRA_MAKEFLAGS="USE_SYSTEM_LIBUNWIND=0"
fi
make -j 4 prefix=${PREFIX} MARCH=core2 sysconfigdir=${PREFIX}/etc NO_GIT=1 \
LIBBLAS=-lblas LIBBLASNAME=libblas LIBLAPACK=-llapack LIBLAPACKNAME=liblapack \
USE_SYSTEM_ARPACK=1 \
USE_SYSTEM_BLAS=1 \
USE_SYSTEM_CURL=1 \
USE_SYSTEM_FFTW=1 \
USE_SYSTEM_GMP=1 \
USE_SYSTEM_LAPACK=1 \
USE_SYSTEM_LIBGIT2=1 \
USE_SYSTEM_LIBSSH2=1 \
USE_SYSTEM_LLVM=0 \
USE_SYSTEM_MPFR=1 \
USE_SYSTEM_OPENLIBM=1 \
USE_SYSTEM_OPENSPECFUN=1 \
USE_SYSTEM_PATCHELF=1 \
USE_SYSTEM_PCRE=1 \
USE_SYSTEM_SUITESPARSE=1 \
${EXTRA_MAKEFLAGS} \
TAGGED_RELEASE_BANNER="conda-forge-julia release" \
CC=$CC CXX=$CXX FC=$FC \
install
# Configure juliarc to use conda environment
cat "${RECIPE_DIR}/juliarc.jl" >> "${PREFIX}/etc/julia/juliarc.jl"