summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanusz Andrzejewski <janusz.andrzejewski@gmail.com>2021-12-27 19:42:35 +0100
committerMatthias Maier <tamiko@gentoo.org>2022-01-03 15:37:28 -0600
commit87441e688cb184fac2487554d07ddd970f7df3df (patch)
treedf9c8e2a1f571b728418dbd72aeb058750c0a010 /dev-lang/julia
parentdev-lang/julia: version bump to 1.7.0 (diff)
downloadgentoo-87441e688cb184fac2487554d07ddd970f7df3df.tar.gz
gentoo-87441e688cb184fac2487554d07ddd970f7df3df.tar.bz2
gentoo-87441e688cb184fac2487554d07ddd970f7df3df.zip
dev-lang/julia: julia-1.6.5 ebuild
- version bump to 1.6.5 - patches for llvm 13 compatiblity - misc patches and compilation fixes Closes: https://github.com/gentoo/gentoo/pull/23542 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Janusz Andrzejewski <janusz.andrzejewski@gmail.com> Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'dev-lang/julia')
-rw-r--r--dev-lang/julia/Manifest1
-rw-r--r--dev-lang/julia/files/julia-1.6.5-do_not_set_rpath.patch20
-rw-r--r--dev-lang/julia/files/julia-1.6.5-hardcoded-libs.patch76
-rw-r--r--dev-lang/julia/files/julia-1.6.5-lazy_artifacts_fix.patch30
-rw-r--r--dev-lang/julia/files/julia-1.6.5-llvm_13_compat_part_4.patch35
-rw-r--r--dev-lang/julia/files/julia-1.6.5-llvm_bad_perf_fix.patch33
-rw-r--r--dev-lang/julia/julia-1.6.5.ebuild183
7 files changed, 378 insertions, 0 deletions
diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest
index 35b63a65c103..00544099f430 100644
--- a/dev-lang/julia/Manifest
+++ b/dev-lang/julia/Manifest
@@ -1,6 +1,7 @@
DIST julia-1.5.3.tar.gz 6949901 BLAKE2B 08f8496980a9bbb9effc0c72cb6b7a5ce1dbd1774735caa366ddc1bb5404117111c624a639f6eb48360061f9fc597a7b37dff24f8555f03ebc4a22524cbeb3b8 SHA512 9e644a64fd6e2caf0390a2bc470084406c078244e65b70a2e3b031d5806c1dff780273ccccfe4bccfd8c03778b7d3a44de7a84bd13f3512afe6864efa5a730fc
DIST julia-1.6.0.tar.gz 7711314 BLAKE2B 135862347a7f3a954acb8d8e17350fbdda84b4813d8498b862e107836a0d29d6e70a26c39c0c29655e6348a5a3afd5b4d7e9824cb88c9e8d31c4515468f46d5b SHA512 41dea60c08882a8f8f9024eb2285c30dbbc68e2256ed6afd5bf956a1828239128b2f39b4ce733a438eafe3b2324ff06dec5c1eb7c9b0f838b2daa972f587d909
DIST julia-1.6.3.tar.gz 7734900 BLAKE2B 679851ee159ac83f49e54f1d71068d4abde919a0da39475dccaecc97e705b87db70c38a55fbc7a0cfacc774291013b189fb516817d6c6e67ca5ccfbb515c3f90 SHA512 a622fddc9e9f3f47037053a1e722153a567c065723f99a97912f8c5a6c2a22c3be0be674325361dd1b04601bbe6c6f204c66004ce887f3f7822e8204fd6855de
+DIST julia-1.6.5-full.tar.gz 153795029 BLAKE2B b86d3ad8dbc4ce486cc0d5e3c25f40c0bedf38cab5b29f1aac4dd527650e78c2e0e462f4eb13fde787adf48a2de9f8eee9cfb8f4aaafbae6ee5e76d7d9608995 SHA512 f057a913f4579280d757c0a97a7cd800fb335be8ec83a27a577d2bee0c9736d49715c7861f7bc1e6461966634bd82890f1f69fd0167f21903ad614e8f70e0dcc
DIST julia-1.7.0-full.tar.gz 255670801 BLAKE2B e7c5be50ab9e7014f028cf7d0530b269e78dd798dc3d4a88af2ed9fa1331694e39fbcae26d2cae6f15aaf1087656384c9872f344f99121406abdf2902a200176 SHA512 00e1bfe354010f5d900476e46b471c4425b711fff5a2aa0ac9e5dbe6ff02245011d4297e4703f2d46f7d4e7b6d97ffaf1bc63170edbfec440196c5ec75c984ce
DIST julia-Pkg-49908bffe83790bc7cf3c5d46faf3667f8902ad4.tar.gz 389738 BLAKE2B 1ed9201badf0a1db5142e0566bfe085b364e4681670937ac5fa53c15312ff8eb29d5e783b75fe3f4f379b041ba38c66ce94962fa7d98fcfd0b7b49acd1749d69 SHA512 a85aa80b3080794a8e3ae5ce54856e63457c461659c12fde5dde1b5ec33176ea06af49ee516d01ccd7b78d8358de2fe0ffcd5c6a6d5a5088cdcd76a0133780eb
DIST julia-UnicodeData-13.0.0.txt 1851767 BLAKE2B 72bbcf352f2f6a004abb3f351fe5da160e83644feea8de0ca154b5a1aa78f36cb04b252d0c7b64a5eeca388e600b2875bb76bc2746ee799a1a6eff97c1fe8b06 SHA512 1a4a662e2ab33469976bf5f91aa6933ed9b73f6d4179a2daffb349e1869d7d6cfa885b164e82d15dcdad7458cd451c81add58d875eb0c70de854589dc97b2055
diff --git a/dev-lang/julia/files/julia-1.6.5-do_not_set_rpath.patch b/dev-lang/julia/files/julia-1.6.5-do_not_set_rpath.patch
new file mode 100644
index 000000000000..c0c05cc649a0
--- /dev/null
+++ b/dev-lang/julia/files/julia-1.6.5-do_not_set_rpath.patch
@@ -0,0 +1,20 @@
+--- a/Makefile 2021-12-21 09:38:26.782829864 +0100
++++ b/Makefile 2021-12-21 10:52:40.760565902 +0100
+@@ -336,7 +336,7 @@
+ install_name_tool -add_rpath @executable_path/$(build_libdir_rel) @executable_path/$(libdir_rel) $(DESTDIR)$(bindir)/$$j; \
+ done
+ endif
+-else ifneq (,$(findstring $(OS),Linux FreeBSD))
++else ifneq (,$(findstring $(OS),FreeBSD))
+ for j in $(JL_TARGETS) ; do \
+ $(PATCHELF) --set-rpath '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $(DESTDIR)$(bindir)/$$j; \
+ done
+@@ -357,7 +357,7 @@
+ endif
+
+ # Set rpath for libjulia-internal, which is moving from `../lib` to `../lib/julia`. We only need to do this for Linux/FreeBSD
+-ifneq (,$(findstring $(OS),Linux FreeBSD))
++ifneq (,$(findstring $(OS),FreeBSD))
+ $(PATCHELF) --set-rpath '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-internal.$(SHLIB_EXT)
+ ifeq ($(BUNDLE_DEBUG_LIBS),1)
+ $(PATCHELF) --set-rpath '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-internal-debug.$(SHLIB_EXT)
diff --git a/dev-lang/julia/files/julia-1.6.5-hardcoded-libs.patch b/dev-lang/julia/files/julia-1.6.5-hardcoded-libs.patch
new file mode 100644
index 000000000000..fcbc42cd18e6
--- /dev/null
+++ b/dev-lang/julia/files/julia-1.6.5-hardcoded-libs.patch
@@ -0,0 +1,76 @@
+This pacth is very similar to julia-hardcoded-libs-1.7.0.patch,
+ https://raw.githubusercontent.com/archlinux/svntogit-community/packages/julia/trunk/julia-hardcoded-libs.patch
+with changed line
+ const libLLVM = "libLLVM-11jl.so"
+to the line
+ const libLLVM = "libLLVM-12jl.so"
+
+diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
+index a7ca666b23..b84a42f4e7 100644
+--- a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
++++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl
+@@ -31,9 +31,9 @@ elseif Sys.isapple()
+ const libmbedtls = "@rpath/libmbedtls.13.dylib"
+ const libmbedx509 = "@rpath/libmbedx509.1.dylib"
+ else
+- const libmbedcrypto = "libmbedcrypto.so.5"
+- const libmbedtls = "libmbedtls.so.13"
+- const libmbedx509 = "libmbedx509.so.1"
++ const libmbedcrypto = "libmbedcrypto.so"
++ const libmbedtls = "libmbedtls.so"
++ const libmbedx509 = "libmbedx509.so"
+ end
+
+ function __init__()
+diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
+index fa45e754e5..b51812e3a8 100644
+--- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl
++++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl
+@@ -23,7 +23,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+ const libLLVM = "@rpath/libLLVM.dylib"
+ else
+- const libLLVM = "libLLVM-11jl.so"
++ const libLLVM = "libLLVM.so"
+ end
+
+ function __init__()
+diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
+index 8b98c76ac5..77ad9e3800 100644
+--- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl
++++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl
+@@ -22,7 +22,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+ const libnghttp2 = "@rpath/libnghttp2.14.dylib"
+ else
+- const libnghttp2 = "libnghttp2.so.14"
++ const libnghttp2 = "libnghttp2.so"
+ end
+
+ function __init__()
+diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl
+index f0d4b5dda6..2ed3017b51 100644
+--- a/stdlib/LibGit2_jll/src/LibGit2_jll.jl
++++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl
+@@ -23,7 +23,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+ const libgit2 = "@rpath/libgit2.1.1.dylib"
+ else
+- const libgit2 = "libgit2.so.1.1"
++ const libgit2 = "libgit2.so"
+ end
+
+ function __init__()
+diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
+index 215de8aed6..918d1ffdc2 100644
+--- a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
++++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl
+@@ -22,7 +22,7 @@ if Sys.iswindows()
+ elseif Sys.isapple()
+ const libopenlibm = "@rpath/libopenlibm.3.dylib"
+ else
+- const libopenlibm = "libopenlibm.so.3"
++ const libopenlibm = "libopenlibm.so"
+ end
+
+ function __init__()
diff --git a/dev-lang/julia/files/julia-1.6.5-lazy_artifacts_fix.patch b/dev-lang/julia/files/julia-1.6.5-lazy_artifacts_fix.patch
new file mode 100644
index 000000000000..9e0d5ecf1a32
--- /dev/null
+++ b/dev-lang/julia/files/julia-1.6.5-lazy_artifacts_fix.patch
@@ -0,0 +1,30 @@
+Patch from
+https://github.com/JuliaLang/julia/commit/d6a655bc.patch
+ Fix LazyArtifacts tests
+
+From d6a655bcfb610130626470e1aa5e2fc28a014b4a Mon Sep 17 00:00:00 2001
+From: Jameson Nash <vtjnash@gmail.com>
+Date: Thu, 24 Dec 2020 00:29:37 -0500
+Subject: [PATCH] codegen: use new freeze intrinsics to avoid poison UB
+ (#38977)
+
+LLVM would likely be required to insert this anyways to make hoisting
+legal (converting branches to and/or), so might as well add it
+ourselves, so that users can legally write that code directly.
+---
+ src/intrinsics.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp
+index ada6166c1ceb..b5160bbc39c0 100644
+--- a/src/intrinsics.cpp
++++ b/src/intrinsics.cpp
+@@ -542,6 +542,8 @@ static jl_cgval_t generic_cast(
+ #endif
+ }
+ Value *ans = ctx.builder.CreateCast(Op, from, to);
++ if (f == fptosi || f == fptoui)
++ ans = ctx.builder.CreateFreeze(ans);
+ return mark_julia_type(ctx, ans, false, jlto);
+ }
+
diff --git a/dev-lang/julia/files/julia-1.6.5-llvm_13_compat_part_4.patch b/dev-lang/julia/files/julia-1.6.5-llvm_13_compat_part_4.patch
new file mode 100644
index 000000000000..839dd4ba39a0
--- /dev/null
+++ b/dev-lang/julia/files/julia-1.6.5-llvm_13_compat_part_4.patch
@@ -0,0 +1,35 @@
+Patch from
+ https://github.com/JuliaLang/julia/commit/a2d85f6d.patch
+
+
+From a2d85f6dc63439aea9f973bacb55006596fdb2b8 Mon Sep 17 00:00:00 2001
+From: Fangrui Song <i@maskray.me>
+Date: Tue, 4 May 2021 11:53:40 -0700
+Subject: [PATCH] Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None
+ (#40666)
+
+The former is deprecated.
+OF_None has been available in LLVM since 2018-06.
+---
+ src/codegen.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/codegen.cpp b/src/codegen.cpp
+index ee5ec4dce0c1..bc60798220d5 100644
+--- a/src/codegen.cpp
++++ b/src/codegen.cpp
+@@ -8092,12 +8092,12 @@ extern "C" void jl_dump_llvm_mfunction(void *v)
+
+ extern void jl_write_bitcode_func(void *F, char *fname) {
+ std::error_code EC;
+- raw_fd_ostream OS(fname, EC, sys::fs::F_None);
++ raw_fd_ostream OS(fname, EC, sys::fs::OF_None);
+ llvm::WriteBitcodeToFile(*((llvm::Function*)F)->getParent(), OS);
+ }
+
+ extern void jl_write_bitcode_module(void *M, char *fname) {
+ std::error_code EC;
+- raw_fd_ostream OS(fname, EC, sys::fs::F_None);
++ raw_fd_ostream OS(fname, EC, sys::fs::OF_None);
+ llvm::WriteBitcodeToFile(*(llvm::Module*)M, OS);
+ }
diff --git a/dev-lang/julia/files/julia-1.6.5-llvm_bad_perf_fix.patch b/dev-lang/julia/files/julia-1.6.5-llvm_bad_perf_fix.patch
new file mode 100644
index 000000000000..f38c26bfd52e
--- /dev/null
+++ b/dev-lang/julia/files/julia-1.6.5-llvm_bad_perf_fix.patch
@@ -0,0 +1,33 @@
+Patch from
+ https://github.com/JuliaLang/julia/commit/7df16be0.patch
+fixes bad performance with LLVM 12
+
+From 7df16be0bfafee6d304ee0690366fa33845cc8d6 Mon Sep 17 00:00:00 2001
+From: Valentin Churavy <v.churavy@gmail.com>
+Date: Wed, 12 May 2021 18:44:40 -0400
+Subject: [PATCH] [LLVM] add correlated value propagation after jump threading
+
+---
+ src/aotcompile.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp
+index db3f9f4b0e22..4cc22d127528 100644
+--- a/src/aotcompile.cpp
++++ b/src/aotcompile.cpp
+@@ -692,6 +692,7 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level,
+ PM->add(createSROAPass());
+ PM->add(createInstSimplifyLegacyPass());
+ PM->add(createJumpThreadingPass());
++ PM->add(createCorrelatedValuePropagationPass());
+
+ PM->add(createReassociatePass());
+
+@@ -743,6 +744,7 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level,
+ // loops over Union-typed arrays to vectorize.
+ PM->add(createInstructionCombiningPass());
+ PM->add(createJumpThreadingPass());
++ PM->add(createCorrelatedValuePropagationPass());
+ PM->add(createDeadStoreEliminationPass());
+
+ // More dead allocation (store) deletion before loop optimization
diff --git a/dev-lang/julia/julia-1.6.5.ebuild b/dev-lang/julia/julia-1.6.5.ebuild
new file mode 100644
index 000000000000..e7bcae84ca7a
--- /dev/null
+++ b/dev-lang/julia/julia-1.6.5.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit llvm pax-utils toolchain-funcs
+
+# correct versions for stdlibs are in deps/checksums
+# for everything else, run with network-sandbox and wait for the crash
+
+#MY_LIBUV_V="fb3e3364c33ae48c827f6b103e05c3f0e78b79a9"
+#MY_LIBWHICH_V="81e9723c0273d78493dc8c8ed570f68d9ce7e89e"
+MY_LLVM_V="13.0.1"
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="https://julialang.org/"
+
+SRC_URI="
+ https://github.com/JuliaLang/julia/releases/download/v${PV}/${P}-full.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+system-llvm"
+
+RDEPEND="
+ system-llvm? ( sys-devel/llvm:13=[llvm_targets_NVPTX(-)] )
+"
+LLVM_MAX_SLOT=13
+
+RDEPEND+="
+ app-arch/p7zip
+ dev-libs/gmp:0=
+ dev-libs/libgit2:0
+ >=dev-libs/libpcre2-10.23:0=[jit,unicode]
+ dev-libs/mpfr:0=
+ dev-libs/libutf8proc:0=[-cjk]
+ dev-util/patchelf
+ >=net-libs/mbedtls-2.2
+ net-misc/curl[http2,ssh]
+ sci-libs/amd:0=
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/ccolamd:0=
+ sci-libs/cholmod:0=
+ sci-libs/colamd:0=
+ sci-libs/fftw:3.0=[threads]
+ sci-libs/openlibm:0=
+ sci-libs/spqr:0=
+ sci-libs/umfpack:0=
+ >=sci-mathematics/dsfmt-2.2.4
+ >=sys-libs/libunwind-1.1:0=
+ sys-libs/zlib:0=
+ >=virtual/blas-3.6
+ virtual/lapack"
+
+DEPEND="${RDEPEND}
+ dev-util/patchelf
+ virtual/pkgconfig
+ !system-llvm? ( dev-util/cmake )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}"-1.1.0-fix_llvm_install.patch
+ "${FILESDIR}/${PN}"-1.4.0-no_symlink_llvm.patch
+ "${FILESDIR}/${PN}"-1.6.5-llvm_bad_perf_fix.patch
+ "${FILESDIR}/${PN}"-1.7.0-llvm_13_compat_part_1.patch
+ "${FILESDIR}/${PN}"-1.7.0-llvm_13_compat_part_2.patch
+ "${FILESDIR}/${PN}"-1.7.0-llvm_13_compat_part_3.patch
+ "${FILESDIR}/${PN}"-1.6.5-llvm_13_compat_part_4.patch
+ "${FILESDIR}/${PN}"-1.7.0-libgit-1.2.patch
+ "${FILESDIR}/${PN}"-1.7.0-make-install-no-build.patch
+ "${FILESDIR}/${PN}"-1.6.5-hardcoded-libs.patch
+ "${FILESDIR}/${PN}"-1.6.5-do_not_set_rpath.patch
+ "${FILESDIR}/${PN}"-1.6.5-lazy_artifacts_fix.patch
+)
+
+pkg_setup() {
+ use system-llvm && llvm_pkg_setup
+}
+
+src_unpack() {
+ local tounpack=(${A})
+ # the main source tree, followed by deps
+ unpack "${tounpack[0]}"
+
+ mkdir -p "${S}/deps/srccache/"
+ for i in "${tounpack[@]:1}"; do
+ cp "${DISTDIR}/${i}" "${S}/deps/srccache/${i#julia-}" || die
+ done
+}
+
+src_prepare() {
+ default
+
+ # Sledgehammer:
+ # - prevent fetching of bundled stuff in compile and install phase
+ # - respect CFLAGS
+ # - respect EPREFIX and Gentoo specific paths
+
+ sed -i \
+ -e "\|SHIPFLAGS :=|c\\SHIPFLAGS := ${CFLAGS}" \
+ Make.inc || die
+
+ sed -i \
+ -e "s|ar -rcs|$(tc-getAR) -rcs|g" \
+ src/Makefile || die
+
+ # disable doc install starting git fetching
+ sed -i -e 's~install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html~install: $(build_depsbindir)/stringreplace~' Makefile || die
+}
+
+src_configure() {
+ use system-llvm && ewarn "You have enabled system-llvm. This is unsupported by upstream and may not work."
+
+ # julia does not play well with the system versions of libuv
+ # USE_SYSTEM_LIBM=0 implies using external openlibm
+ cat <<-EOF > Make.user
+ LOCALBASE:="${EPREFIX}/usr"
+ override prefix:="${EPREFIX}/usr"
+ override libdir:="\$(prefix)/$(get_libdir)"
+ override CC:=$(tc-getCC)
+ override CXX:=$(tc-getCXX)
+ override AR:=$(tc-getAR)
+
+ BUNDLE_DEBUG_LIBS:=0
+ USE_BINARYBUILDER:=0
+ USE_SYSTEM_CSL:=1
+ USE_SYSTEM_LLVM:=$(usex system-llvm 1 0)
+ USE_SYSTEM_LIBUNWIND:=1
+ USE_SYSTEM_PCRE:=1
+ USE_SYSTEM_LIBM:=0
+ USE_SYSTEM_OPENLIBM:=1
+ USE_SYSTEM_DSFMT:=1
+ USE_SYSTEM_BLAS:=1
+ USE_SYSTEM_LAPACK:=1
+ USE_SYSTEM_GMP:=1
+ USE_SYSTEM_MPFR:=1
+ USE_SYSTEM_SUITESPARSE:=1
+ USE_SYSTEM_LIBUV:=0
+ USE_SYSTEM_UTF8PROC:=1
+ USE_SYSTEM_MBEDTLS:=1
+ USE_SYSTEM_LIBSSH2:=1
+ USE_SYSTEM_NGHTTP2:=1
+ USE_SYSTEM_CURL:=1
+ USE_SYSTEM_LIBGIT2:=1
+ USE_SYSTEM_PATCHELF:=1
+ USE_SYSTEM_ZLIB:=1
+ USE_SYSTEM_P7ZIP:=1
+ VERBOSE:=1
+ EOF
+}
+
+src_compile() {
+ # Julia accesses /proc/self/mem on Linux
+ addpredict /proc/self/mem
+
+ default
+ pax-mark m "$(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')"
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ if ! use system-llvm ; then
+ local llvmslot=$(ver_cut 1 ${MY_LLVM_V})
+ cp "${S}/usr/lib/libLLVM-${llvmslot}jl.so" "${ED}/usr/$(get_libdir)/julia/" || die
+ fi
+
+ dodoc README.md
+
+ mv "${ED}"/usr/etc/julia "${ED}"/etc || die
+ rmdir "${ED}"/usr/etc || die
+ mv "${ED}"/usr/share/doc/julia/html "${ED}"/usr/share/doc/"${PF}" || die
+ rmdir "${ED}"/usr/share/doc/julia || die
+
+ # The appdata directory is deprecated.
+ mv "${ED}"/usr/share/{appdata,metainfo}/ || die
+}
+
+pkg_postinst() {
+ elog "To use Plots, you will need to install sci-visualization/gr."
+}