aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgienah <gienah@gentoo.org>2014-09-13 14:10:58 +1000
committergienah <gienah@gentoo.org>2014-09-27 21:40:42 +1000
commit014553d7ae962484f4a71db928cc5b0a2df007ce (patch)
tree544d92ec6a05f9dfe252298a707a850e89c67f47 /dev-lang/julia
parentRemove the setting of the FC and F77 environment variables, instead sed the C... (diff)
downloadsci-014553d7ae962484f4a71db928cc5b0a2df007ce.tar.gz
sci-014553d7ae962484f4a71db928cc5b0a2df007ce.tar.bz2
sci-014553d7ae962484f4a71db928cc5b0a2df007ce.zip
Add int64 use flag to julia-9999.ebuild. Depend on >=virtual/blas-2.1-r2[int64?] and >=virtual/lapack-3.5-r2[int64?]. Fixes dev-lang/julia wont compile against openblas #102.
Diffstat (limited to 'dev-lang/julia')
-rw-r--r--dev-lang/julia/ChangeLog5
-rw-r--r--dev-lang/julia/julia-9999.ebuild59
-rw-r--r--dev-lang/julia/metadata.xml8
3 files changed, 55 insertions, 17 deletions
diff --git a/dev-lang/julia/ChangeLog b/dev-lang/julia/ChangeLog
index c53e175ac..347e2fb03 100644
--- a/dev-lang/julia/ChangeLog
+++ b/dev-lang/julia/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 13 Sep 2014; Mark Wright <gienah@gentoo.org> julia-9999.ebuild:
+ Add int64 use flag to julia-9999.ebuild. Depend on
+ >=virtual/blas-2.1-r2[int64?] and >=virtual/lapack-3.5-r2[int64?]. Fixes
+ dev-lang/julia wont compile against openblas -int64 #102.
+
27 Aug 2014; Fran├žois Bissey <francois.bissey@canterbury.ac.nz>
julia-9999.ebuild:
Bump dependency on llvm as in 0.3
diff --git a/dev-lang/julia/julia-9999.ebuild b/dev-lang/julia/julia-9999.ebuild
index 69bff7927..b54ecfaed 100644
--- a/dev-lang/julia/julia-9999.ebuild
+++ b/dev-lang/julia/julia-9999.ebuild
@@ -14,7 +14,7 @@ EGIT_REPO_URI="git://github.com/JuliaLang/julia.git"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
-IUSE="doc emacs"
+IUSE="doc emacs int64"
RDEPEND="
dev-lang/R:0=
@@ -26,6 +26,7 @@ RDEPEND="
sci-libs/arpack:0=
sci-libs/camd:0=
sci-libs/cholmod:0=
+ sci-libs/fdlibm:0=
sci-libs/fftw:3.0=[threads]
sci-libs/openlibm:0=
sci-libs/spqr:0=
@@ -35,10 +36,9 @@ RDEPEND="
>=sys-libs/libunwind-1.1:7=
sys-libs/readline:0=
sys-libs/zlib:0=
- virtual/blas
- virtual/lapack
+ >=virtual/blas-2.1-r2[int64?]
+ >=virtual/lapack-3.5-r2[int64?]
emacs? ( app-emacs/ess )"
-
DEPEND="${RDEPEND}
dev-util/patchelf
virtual/pkgconfig
@@ -55,35 +55,64 @@ src_prepare() {
-e "s|/usr/include|${EPREFIX%/}/usr/include|g" \
deps/Makefile || die
+ local blasprofname=$(usex int64 "blas-int64" "blas")
+ local lapackprofname=$(usex int64 "lapack-int64" "lapack")
+ local blasname=$($(tc-getPKG_CONFIG) --libs-only-l "${blasprofname}" | \
+ sed -e "s/-l\([^ \t]*\).*/lib\1/")
+ local lapackname=$($(tc-getPKG_CONFIG) --libs-only-l "${lapackprofname}" | \
+ sed -e "s/-l\([^ \t]*\).*/lib\1/")
sed -i \
- -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \
-e "s|-O3|${CFLAGS}|g" \
-e "s|libdir = \$(prefix)/lib|libdir = \$(prefix)/$(get_libdir)|" \
+ -e "s|build_libdir = \$(build_prefix)/lib|build_libdir = \$(build_prefix)/$(get_libdir)|" \
+ -e "s|build_private_libdir = \$(build_prefix)/lib/julia|build_private_libdir = \$(build_prefix)/$(get_libdir)/julia|" \
-e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \
-e "s|/usr/include|${EPREFIX}/usr/include|" \
- -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \
-e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \
+ -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs-only-l ${blasprofname})|" \
+ -e "s|-llapack|$($(tc-getPKG_CONFIG) --libs-only-l ${lapackprofname})|" \
+ -e "s|liblapack|${lapackname}|g" \
+ -e "s|libblas|${blasname}|g" \
+ -e "s|-O3|${CFLAGS}|g" \
+ -e "s|JCFLAGS = |JCFLAGS = $($(tc-getPKG_CONFIG) --cflags "${lapackprofname}") ${CFLAGS} |g" \
+ -e "s|JCXXCFLAGS = |JCXXFLAGS = $($(tc-getPKG_CONFIG) --cflags "${lapackprofname}") ${CXXFLAGS} |g" \
+ -e "s|JFFLAGS = |JFFLAGS = ${FFLAGS} |g" \
-e '/MARCH = /d' \
Make.inc || die
sed -i \
-e "s|,lib)|,$(get_libdir))|g" \
-e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \
+ -e "s|\$(JL_LIBDIR),lib|\$(JL_LIBDIR),$(get_libdir)|" \
+ -e "s|\$(JL_PRIVATE_LIBDIR),lib|\$(JL_PRIVATE_LIBDIR),$(get_libdir)|" \
Makefile || die
sed -i \
-e "s|ar -rcs|$(tc-getAR) -rcs|g" \
+ -e "s|LLVMLINK = -lLLVM-\$(LLVM_VER)|LLVMLINK = $(llvm-config --libs) $(llvm-config --ldflags)|" \
src/Makefile || die
+
+ sed -e "s|libopenblas|${blasname}|g" \
+ -i base/util.jl \
+ -i test/perf/micro/Makefile || die
+
+ # Occasional test suite failure due to ARPACK #6162 https://github.com/JuliaLang/julia/issues/6162
+ sed -e 's|"arpack", ||' \
+ -i test/runtests.jl || die
}
src_configure() {
# libuv is an incompatible fork from upstream, so don't use system one
+ local blasprofname=$(usex int64 "blas-int64" "blas")
+ local lapackprofname=$(usex int64 "lapack-int64" "lapack")
cat <<-EOF > Make.user
- LIBBLAS=$($(tc-getPKG_CONFIG) --libs blas)
- LIBBLASNAME=$($(tc-getPKG_CONFIG) --libs blas | sed -e "s/-l\([a-z0-9]*\).*/lib\1/")
- LIBLAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
- LIBLAPACKNAME=$($(tc-getPKG_CONFIG) --libs lapack | sed -e "s/-l\([a-z0-9]*\).*/lib\1/")
- USE_BLAS64=0
+ LIBBLAS=$($(tc-getPKG_CONFIG) --libs ${blasprofname})
+ LIBBLASNAME=$($(tc-getPKG_CONFIG) --libs-only-l ${blasprofname} | sed -e "s/-l\([a-z0-9_]*\).*/lib\1/")
+ LIBLAPACK=$($(tc-getPKG_CONFIG) --libs-only-l ${lapackprofname})
+ LIBLAPACKNAME=$($(tc-getPKG_CONFIG) --libs-only-l ${lapackprofname} | sed -e "s/-l\([a-z0-9_]*\).*/lib\1/")
+ LIBM=-lfdlibm
+ LIBMNAME=libfdlibm
+ USE_BLAS64=$(usex int64 "1" "0")
USE_LLVM_SHLIB=1
USE_SYSTEM_ARPACK=1
USE_SYSTEM_BLAS=1
@@ -91,7 +120,7 @@ src_configure() {
USE_SYSTEM_GMP=1
USE_SYSTEM_GRISU=1
USE_SYSTEM_LAPACK=1
- USE_SYSTEM_LIBM=1
+ USE_SYSTEM_LIBM=0
USE_SYSTEM_LIBUNWIND=1
USE_SYSTEM_LIBUV=0
USE_SYSTEM_LLVM=1
@@ -114,9 +143,9 @@ src_configure() {
}
src_compile() {
- emake -j1 julia-release
- pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')
- emake -j1
+ emake julia-release
+ pax-mark m $(file usr/bin/julia* | awk -F : '/ELF/ {print $1}')
+ emake
use doc && emake -C doc html
use emacs && elisp-compile contrib/julia-mode.el
}
diff --git a/dev-lang/julia/metadata.xml b/dev-lang/julia/metadata.xml
index 523edd596..095766014 100644
--- a/dev-lang/julia/metadata.xml
+++ b/dev-lang/julia/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>sci</herd>
-<longdescription>
+ <herd>sci</herd>
+ <longdescription>
Julia is a high-level, high-performance dynamic programming language for
technical computing, with syntax that is familiar to users of other
technical computing environments. It provides a sophisticated compiler,
@@ -14,4 +14,8 @@
around defining functions, and overloading them for different combinations
of argument types (which can also be user-defined).
</longdescription>
+<use>
+ <flag name="int64">Build with 64 bits integer blas and lapack (needs
+ <pkg>sci-libs/openblas</pkg> and <pkg>sci-libs/lapack-reference</pkg>)</flag>
+</use>
</pkgmetadata>