1 |
commit: 87441e688cb184fac2487554d07ddd970f7df3df |
2 |
Author: Janusz Andrzejewski <janusz.andrzejewski <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Dec 27 18:42:35 2021 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 3 21:37:28 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87441e68 |
7 |
|
8 |
dev-lang/julia: julia-1.6.5 ebuild |
9 |
|
10 |
- version bump to 1.6.5 |
11 |
- patches for llvm 13 compatiblity |
12 |
- misc patches and compilation fixes |
13 |
|
14 |
Closes: https://github.com/gentoo/gentoo/pull/23542 |
15 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
16 |
Signed-off-by: Janusz Andrzejewski <janusz.andrzejewski <AT> gmail.com> |
17 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
18 |
|
19 |
dev-lang/julia/Manifest | 1 + |
20 |
.../julia/files/julia-1.6.5-do_not_set_rpath.patch | 20 +++ |
21 |
.../julia/files/julia-1.6.5-hardcoded-libs.patch | 76 +++++++++ |
22 |
.../files/julia-1.6.5-lazy_artifacts_fix.patch | 30 ++++ |
23 |
.../files/julia-1.6.5-llvm_13_compat_part_4.patch | 35 ++++ |
24 |
.../files/julia-1.6.5-llvm_bad_perf_fix.patch | 33 ++++ |
25 |
dev-lang/julia/julia-1.6.5.ebuild | 183 +++++++++++++++++++++ |
26 |
7 files changed, 378 insertions(+) |
27 |
|
28 |
diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest |
29 |
index 35b63a65c103..00544099f430 100644 |
30 |
--- a/dev-lang/julia/Manifest |
31 |
+++ b/dev-lang/julia/Manifest |
32 |
@@ -1,6 +1,7 @@ |
33 |
DIST julia-1.5.3.tar.gz 6949901 BLAKE2B 08f8496980a9bbb9effc0c72cb6b7a5ce1dbd1774735caa366ddc1bb5404117111c624a639f6eb48360061f9fc597a7b37dff24f8555f03ebc4a22524cbeb3b8 SHA512 9e644a64fd6e2caf0390a2bc470084406c078244e65b70a2e3b031d5806c1dff780273ccccfe4bccfd8c03778b7d3a44de7a84bd13f3512afe6864efa5a730fc |
34 |
DIST julia-1.6.0.tar.gz 7711314 BLAKE2B 135862347a7f3a954acb8d8e17350fbdda84b4813d8498b862e107836a0d29d6e70a26c39c0c29655e6348a5a3afd5b4d7e9824cb88c9e8d31c4515468f46d5b SHA512 41dea60c08882a8f8f9024eb2285c30dbbc68e2256ed6afd5bf956a1828239128b2f39b4ce733a438eafe3b2324ff06dec5c1eb7c9b0f838b2daa972f587d909 |
35 |
DIST julia-1.6.3.tar.gz 7734900 BLAKE2B 679851ee159ac83f49e54f1d71068d4abde919a0da39475dccaecc97e705b87db70c38a55fbc7a0cfacc774291013b189fb516817d6c6e67ca5ccfbb515c3f90 SHA512 a622fddc9e9f3f47037053a1e722153a567c065723f99a97912f8c5a6c2a22c3be0be674325361dd1b04601bbe6c6f204c66004ce887f3f7822e8204fd6855de |
36 |
+DIST julia-1.6.5-full.tar.gz 153795029 BLAKE2B b86d3ad8dbc4ce486cc0d5e3c25f40c0bedf38cab5b29f1aac4dd527650e78c2e0e462f4eb13fde787adf48a2de9f8eee9cfb8f4aaafbae6ee5e76d7d9608995 SHA512 f057a913f4579280d757c0a97a7cd800fb335be8ec83a27a577d2bee0c9736d49715c7861f7bc1e6461966634bd82890f1f69fd0167f21903ad614e8f70e0dcc |
37 |
DIST julia-1.7.0-full.tar.gz 255670801 BLAKE2B e7c5be50ab9e7014f028cf7d0530b269e78dd798dc3d4a88af2ed9fa1331694e39fbcae26d2cae6f15aaf1087656384c9872f344f99121406abdf2902a200176 SHA512 00e1bfe354010f5d900476e46b471c4425b711fff5a2aa0ac9e5dbe6ff02245011d4297e4703f2d46f7d4e7b6d97ffaf1bc63170edbfec440196c5ec75c984ce |
38 |
DIST julia-Pkg-49908bffe83790bc7cf3c5d46faf3667f8902ad4.tar.gz 389738 BLAKE2B 1ed9201badf0a1db5142e0566bfe085b364e4681670937ac5fa53c15312ff8eb29d5e783b75fe3f4f379b041ba38c66ce94962fa7d98fcfd0b7b49acd1749d69 SHA512 a85aa80b3080794a8e3ae5ce54856e63457c461659c12fde5dde1b5ec33176ea06af49ee516d01ccd7b78d8358de2fe0ffcd5c6a6d5a5088cdcd76a0133780eb |
39 |
DIST julia-UnicodeData-13.0.0.txt 1851767 BLAKE2B 72bbcf352f2f6a004abb3f351fe5da160e83644feea8de0ca154b5a1aa78f36cb04b252d0c7b64a5eeca388e600b2875bb76bc2746ee799a1a6eff97c1fe8b06 SHA512 1a4a662e2ab33469976bf5f91aa6933ed9b73f6d4179a2daffb349e1869d7d6cfa885b164e82d15dcdad7458cd451c81add58d875eb0c70de854589dc97b2055 |
40 |
|
41 |
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 |
42 |
new file mode 100644 |
43 |
index 000000000000..c0c05cc649a0 |
44 |
--- /dev/null |
45 |
+++ b/dev-lang/julia/files/julia-1.6.5-do_not_set_rpath.patch |
46 |
@@ -0,0 +1,20 @@ |
47 |
+--- a/Makefile 2021-12-21 09:38:26.782829864 +0100 |
48 |
++++ b/Makefile 2021-12-21 10:52:40.760565902 +0100 |
49 |
+@@ -336,7 +336,7 @@ |
50 |
+ install_name_tool -add_rpath @executable_path/$(build_libdir_rel) @executable_path/$(libdir_rel) $(DESTDIR)$(bindir)/$$j; \ |
51 |
+ done |
52 |
+ endif |
53 |
+-else ifneq (,$(findstring $(OS),Linux FreeBSD)) |
54 |
++else ifneq (,$(findstring $(OS),FreeBSD)) |
55 |
+ for j in $(JL_TARGETS) ; do \ |
56 |
+ $(PATCHELF) --set-rpath '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $(DESTDIR)$(bindir)/$$j; \ |
57 |
+ done |
58 |
+@@ -357,7 +357,7 @@ |
59 |
+ endif |
60 |
+ |
61 |
+ # Set rpath for libjulia-internal, which is moving from `../lib` to `../lib/julia`. We only need to do this for Linux/FreeBSD |
62 |
+-ifneq (,$(findstring $(OS),Linux FreeBSD)) |
63 |
++ifneq (,$(findstring $(OS),FreeBSD)) |
64 |
+ $(PATCHELF) --set-rpath '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-internal.$(SHLIB_EXT) |
65 |
+ ifeq ($(BUNDLE_DEBUG_LIBS),1) |
66 |
+ $(PATCHELF) --set-rpath '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-internal-debug.$(SHLIB_EXT) |
67 |
|
68 |
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 |
69 |
new file mode 100644 |
70 |
index 000000000000..fcbc42cd18e6 |
71 |
--- /dev/null |
72 |
+++ b/dev-lang/julia/files/julia-1.6.5-hardcoded-libs.patch |
73 |
@@ -0,0 +1,76 @@ |
74 |
+This pacth is very similar to julia-hardcoded-libs-1.7.0.patch, |
75 |
+ https://raw.githubusercontent.com/archlinux/svntogit-community/packages/julia/trunk/julia-hardcoded-libs.patch |
76 |
+with changed line |
77 |
+ const libLLVM = "libLLVM-11jl.so" |
78 |
+to the line |
79 |
+ const libLLVM = "libLLVM-12jl.so" |
80 |
+ |
81 |
+diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl |
82 |
+index a7ca666b23..b84a42f4e7 100644 |
83 |
+--- a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl |
84 |
++++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl |
85 |
+@@ -31,9 +31,9 @@ elseif Sys.isapple() |
86 |
+ const libmbedtls = "@rpath/libmbedtls.13.dylib" |
87 |
+ const libmbedx509 = "@rpath/libmbedx509.1.dylib" |
88 |
+ else |
89 |
+- const libmbedcrypto = "libmbedcrypto.so.5" |
90 |
+- const libmbedtls = "libmbedtls.so.13" |
91 |
+- const libmbedx509 = "libmbedx509.so.1" |
92 |
++ const libmbedcrypto = "libmbedcrypto.so" |
93 |
++ const libmbedtls = "libmbedtls.so" |
94 |
++ const libmbedx509 = "libmbedx509.so" |
95 |
+ end |
96 |
+ |
97 |
+ function __init__() |
98 |
+diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl |
99 |
+index fa45e754e5..b51812e3a8 100644 |
100 |
+--- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl |
101 |
++++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl |
102 |
+@@ -23,7 +23,7 @@ if Sys.iswindows() |
103 |
+ elseif Sys.isapple() |
104 |
+ const libLLVM = "@rpath/libLLVM.dylib" |
105 |
+ else |
106 |
+- const libLLVM = "libLLVM-11jl.so" |
107 |
++ const libLLVM = "libLLVM.so" |
108 |
+ end |
109 |
+ |
110 |
+ function __init__() |
111 |
+diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl |
112 |
+index 8b98c76ac5..77ad9e3800 100644 |
113 |
+--- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl |
114 |
++++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl |
115 |
+@@ -22,7 +22,7 @@ if Sys.iswindows() |
116 |
+ elseif Sys.isapple() |
117 |
+ const libnghttp2 = "@rpath/libnghttp2.14.dylib" |
118 |
+ else |
119 |
+- const libnghttp2 = "libnghttp2.so.14" |
120 |
++ const libnghttp2 = "libnghttp2.so" |
121 |
+ end |
122 |
+ |
123 |
+ function __init__() |
124 |
+diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl |
125 |
+index f0d4b5dda6..2ed3017b51 100644 |
126 |
+--- a/stdlib/LibGit2_jll/src/LibGit2_jll.jl |
127 |
++++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl |
128 |
+@@ -23,7 +23,7 @@ if Sys.iswindows() |
129 |
+ elseif Sys.isapple() |
130 |
+ const libgit2 = "@rpath/libgit2.1.1.dylib" |
131 |
+ else |
132 |
+- const libgit2 = "libgit2.so.1.1" |
133 |
++ const libgit2 = "libgit2.so" |
134 |
+ end |
135 |
+ |
136 |
+ function __init__() |
137 |
+diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl |
138 |
+index 215de8aed6..918d1ffdc2 100644 |
139 |
+--- a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl |
140 |
++++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl |
141 |
+@@ -22,7 +22,7 @@ if Sys.iswindows() |
142 |
+ elseif Sys.isapple() |
143 |
+ const libopenlibm = "@rpath/libopenlibm.3.dylib" |
144 |
+ else |
145 |
+- const libopenlibm = "libopenlibm.so.3" |
146 |
++ const libopenlibm = "libopenlibm.so" |
147 |
+ end |
148 |
+ |
149 |
+ function __init__() |
150 |
|
151 |
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 |
152 |
new file mode 100644 |
153 |
index 000000000000..9e0d5ecf1a32 |
154 |
--- /dev/null |
155 |
+++ b/dev-lang/julia/files/julia-1.6.5-lazy_artifacts_fix.patch |
156 |
@@ -0,0 +1,30 @@ |
157 |
+Patch from |
158 |
+https://github.com/JuliaLang/julia/commit/d6a655bc.patch |
159 |
+ Fix LazyArtifacts tests |
160 |
+ |
161 |
+From d6a655bcfb610130626470e1aa5e2fc28a014b4a Mon Sep 17 00:00:00 2001 |
162 |
+From: Jameson Nash <vtjnash@×××××.com> |
163 |
+Date: Thu, 24 Dec 2020 00:29:37 -0500 |
164 |
+Subject: [PATCH] codegen: use new freeze intrinsics to avoid poison UB |
165 |
+ (#38977) |
166 |
+ |
167 |
+LLVM would likely be required to insert this anyways to make hoisting |
168 |
+legal (converting branches to and/or), so might as well add it |
169 |
+ourselves, so that users can legally write that code directly. |
170 |
+--- |
171 |
+ src/intrinsics.cpp | 2 ++ |
172 |
+ 1 file changed, 2 insertions(+) |
173 |
+ |
174 |
+diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp |
175 |
+index ada6166c1ceb..b5160bbc39c0 100644 |
176 |
+--- a/src/intrinsics.cpp |
177 |
++++ b/src/intrinsics.cpp |
178 |
+@@ -542,6 +542,8 @@ static jl_cgval_t generic_cast( |
179 |
+ #endif |
180 |
+ } |
181 |
+ Value *ans = ctx.builder.CreateCast(Op, from, to); |
182 |
++ if (f == fptosi || f == fptoui) |
183 |
++ ans = ctx.builder.CreateFreeze(ans); |
184 |
+ return mark_julia_type(ctx, ans, false, jlto); |
185 |
+ } |
186 |
+ |
187 |
|
188 |
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 |
189 |
new file mode 100644 |
190 |
index 000000000000..839dd4ba39a0 |
191 |
--- /dev/null |
192 |
+++ b/dev-lang/julia/files/julia-1.6.5-llvm_13_compat_part_4.patch |
193 |
@@ -0,0 +1,35 @@ |
194 |
+Patch from |
195 |
+ https://github.com/JuliaLang/julia/commit/a2d85f6d.patch |
196 |
+ |
197 |
+ |
198 |
+From a2d85f6dc63439aea9f973bacb55006596fdb2b8 Mon Sep 17 00:00:00 2001 |
199 |
+From: Fangrui Song <i@×××××××.me> |
200 |
+Date: Tue, 4 May 2021 11:53:40 -0700 |
201 |
+Subject: [PATCH] Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None |
202 |
+ (#40666) |
203 |
+ |
204 |
+The former is deprecated. |
205 |
+OF_None has been available in LLVM since 2018-06. |
206 |
+--- |
207 |
+ src/codegen.cpp | 4 ++-- |
208 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
209 |
+ |
210 |
+diff --git a/src/codegen.cpp b/src/codegen.cpp |
211 |
+index ee5ec4dce0c1..bc60798220d5 100644 |
212 |
+--- a/src/codegen.cpp |
213 |
++++ b/src/codegen.cpp |
214 |
+@@ -8092,12 +8092,12 @@ extern "C" void jl_dump_llvm_mfunction(void *v) |
215 |
+ |
216 |
+ extern void jl_write_bitcode_func(void *F, char *fname) { |
217 |
+ std::error_code EC; |
218 |
+- raw_fd_ostream OS(fname, EC, sys::fs::F_None); |
219 |
++ raw_fd_ostream OS(fname, EC, sys::fs::OF_None); |
220 |
+ llvm::WriteBitcodeToFile(*((llvm::Function*)F)->getParent(), OS); |
221 |
+ } |
222 |
+ |
223 |
+ extern void jl_write_bitcode_module(void *M, char *fname) { |
224 |
+ std::error_code EC; |
225 |
+- raw_fd_ostream OS(fname, EC, sys::fs::F_None); |
226 |
++ raw_fd_ostream OS(fname, EC, sys::fs::OF_None); |
227 |
+ llvm::WriteBitcodeToFile(*(llvm::Module*)M, OS); |
228 |
+ } |
229 |
|
230 |
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 |
231 |
new file mode 100644 |
232 |
index 000000000000..f38c26bfd52e |
233 |
--- /dev/null |
234 |
+++ b/dev-lang/julia/files/julia-1.6.5-llvm_bad_perf_fix.patch |
235 |
@@ -0,0 +1,33 @@ |
236 |
+Patch from |
237 |
+ https://github.com/JuliaLang/julia/commit/7df16be0.patch |
238 |
+fixes bad performance with LLVM 12 |
239 |
+ |
240 |
+From 7df16be0bfafee6d304ee0690366fa33845cc8d6 Mon Sep 17 00:00:00 2001 |
241 |
+From: Valentin Churavy <v.churavy@×××××.com> |
242 |
+Date: Wed, 12 May 2021 18:44:40 -0400 |
243 |
+Subject: [PATCH] [LLVM] add correlated value propagation after jump threading |
244 |
+ |
245 |
+--- |
246 |
+ src/aotcompile.cpp | 2 ++ |
247 |
+ 1 file changed, 2 insertions(+) |
248 |
+ |
249 |
+diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp |
250 |
+index db3f9f4b0e22..4cc22d127528 100644 |
251 |
+--- a/src/aotcompile.cpp |
252 |
++++ b/src/aotcompile.cpp |
253 |
+@@ -692,6 +692,7 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level, |
254 |
+ PM->add(createSROAPass()); |
255 |
+ PM->add(createInstSimplifyLegacyPass()); |
256 |
+ PM->add(createJumpThreadingPass()); |
257 |
++ PM->add(createCorrelatedValuePropagationPass()); |
258 |
+ |
259 |
+ PM->add(createReassociatePass()); |
260 |
+ |
261 |
+@@ -743,6 +744,7 @@ void addOptimizationPasses(legacy::PassManagerBase *PM, int opt_level, |
262 |
+ // loops over Union-typed arrays to vectorize. |
263 |
+ PM->add(createInstructionCombiningPass()); |
264 |
+ PM->add(createJumpThreadingPass()); |
265 |
++ PM->add(createCorrelatedValuePropagationPass()); |
266 |
+ PM->add(createDeadStoreEliminationPass()); |
267 |
+ |
268 |
+ // More dead allocation (store) deletion before loop optimization |
269 |
|
270 |
diff --git a/dev-lang/julia/julia-1.6.5.ebuild b/dev-lang/julia/julia-1.6.5.ebuild |
271 |
new file mode 100644 |
272 |
index 000000000000..e7bcae84ca7a |
273 |
--- /dev/null |
274 |
+++ b/dev-lang/julia/julia-1.6.5.ebuild |
275 |
@@ -0,0 +1,183 @@ |
276 |
+# Copyright 1999-2021 Gentoo Authors |
277 |
+# Distributed under the terms of the GNU General Public License v2 |
278 |
+ |
279 |
+EAPI=7 |
280 |
+ |
281 |
+inherit llvm pax-utils toolchain-funcs |
282 |
+ |
283 |
+# correct versions for stdlibs are in deps/checksums |
284 |
+# for everything else, run with network-sandbox and wait for the crash |
285 |
+ |
286 |
+#MY_LIBUV_V="fb3e3364c33ae48c827f6b103e05c3f0e78b79a9" |
287 |
+#MY_LIBWHICH_V="81e9723c0273d78493dc8c8ed570f68d9ce7e89e" |
288 |
+MY_LLVM_V="13.0.1" |
289 |
+ |
290 |
+DESCRIPTION="High-performance programming language for technical computing" |
291 |
+HOMEPAGE="https://julialang.org/" |
292 |
+ |
293 |
+SRC_URI=" |
294 |
+ https://github.com/JuliaLang/julia/releases/download/v${PV}/${P}-full.tar.gz |
295 |
+" |
296 |
+ |
297 |
+LICENSE="MIT" |
298 |
+SLOT="0" |
299 |
+KEYWORDS="~amd64 ~x86" |
300 |
+IUSE="+system-llvm" |
301 |
+ |
302 |
+RDEPEND=" |
303 |
+ system-llvm? ( sys-devel/llvm:13=[llvm_targets_NVPTX(-)] ) |
304 |
+" |
305 |
+LLVM_MAX_SLOT=13 |
306 |
+ |
307 |
+RDEPEND+=" |
308 |
+ app-arch/p7zip |
309 |
+ dev-libs/gmp:0= |
310 |
+ dev-libs/libgit2:0 |
311 |
+ >=dev-libs/libpcre2-10.23:0=[jit,unicode] |
312 |
+ dev-libs/mpfr:0= |
313 |
+ dev-libs/libutf8proc:0=[-cjk] |
314 |
+ dev-util/patchelf |
315 |
+ >=net-libs/mbedtls-2.2 |
316 |
+ net-misc/curl[http2,ssh] |
317 |
+ sci-libs/amd:0= |
318 |
+ sci-libs/arpack:0= |
319 |
+ sci-libs/camd:0= |
320 |
+ sci-libs/ccolamd:0= |
321 |
+ sci-libs/cholmod:0= |
322 |
+ sci-libs/colamd:0= |
323 |
+ sci-libs/fftw:3.0=[threads] |
324 |
+ sci-libs/openlibm:0= |
325 |
+ sci-libs/spqr:0= |
326 |
+ sci-libs/umfpack:0= |
327 |
+ >=sci-mathematics/dsfmt-2.2.4 |
328 |
+ >=sys-libs/libunwind-1.1:0= |
329 |
+ sys-libs/zlib:0= |
330 |
+ >=virtual/blas-3.6 |
331 |
+ virtual/lapack" |
332 |
+ |
333 |
+DEPEND="${RDEPEND} |
334 |
+ dev-util/patchelf |
335 |
+ virtual/pkgconfig |
336 |
+ !system-llvm? ( dev-util/cmake )" |
337 |
+ |
338 |
+PATCHES=( |
339 |
+ "${FILESDIR}/${PN}"-1.1.0-fix_llvm_install.patch |
340 |
+ "${FILESDIR}/${PN}"-1.4.0-no_symlink_llvm.patch |
341 |
+ "${FILESDIR}/${PN}"-1.6.5-llvm_bad_perf_fix.patch |
342 |
+ "${FILESDIR}/${PN}"-1.7.0-llvm_13_compat_part_1.patch |
343 |
+ "${FILESDIR}/${PN}"-1.7.0-llvm_13_compat_part_2.patch |
344 |
+ "${FILESDIR}/${PN}"-1.7.0-llvm_13_compat_part_3.patch |
345 |
+ "${FILESDIR}/${PN}"-1.6.5-llvm_13_compat_part_4.patch |
346 |
+ "${FILESDIR}/${PN}"-1.7.0-libgit-1.2.patch |
347 |
+ "${FILESDIR}/${PN}"-1.7.0-make-install-no-build.patch |
348 |
+ "${FILESDIR}/${PN}"-1.6.5-hardcoded-libs.patch |
349 |
+ "${FILESDIR}/${PN}"-1.6.5-do_not_set_rpath.patch |
350 |
+ "${FILESDIR}/${PN}"-1.6.5-lazy_artifacts_fix.patch |
351 |
+) |
352 |
+ |
353 |
+pkg_setup() { |
354 |
+ use system-llvm && llvm_pkg_setup |
355 |
+} |
356 |
+ |
357 |
+src_unpack() { |
358 |
+ local tounpack=(${A}) |
359 |
+ # the main source tree, followed by deps |
360 |
+ unpack "${tounpack[0]}" |
361 |
+ |
362 |
+ mkdir -p "${S}/deps/srccache/" |
363 |
+ for i in "${tounpack[@]:1}"; do |
364 |
+ cp "${DISTDIR}/${i}" "${S}/deps/srccache/${i#julia-}" || die |
365 |
+ done |
366 |
+} |
367 |
+ |
368 |
+src_prepare() { |
369 |
+ default |
370 |
+ |
371 |
+ # Sledgehammer: |
372 |
+ # - prevent fetching of bundled stuff in compile and install phase |
373 |
+ # - respect CFLAGS |
374 |
+ # - respect EPREFIX and Gentoo specific paths |
375 |
+ |
376 |
+ sed -i \ |
377 |
+ -e "\|SHIPFLAGS :=|c\\SHIPFLAGS := ${CFLAGS}" \ |
378 |
+ Make.inc || die |
379 |
+ |
380 |
+ sed -i \ |
381 |
+ -e "s|ar -rcs|$(tc-getAR) -rcs|g" \ |
382 |
+ src/Makefile || die |
383 |
+ |
384 |
+ # disable doc install starting git fetching |
385 |
+ sed -i -e 's~install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html~install: $(build_depsbindir)/stringreplace~' Makefile || die |
386 |
+} |
387 |
+ |
388 |
+src_configure() { |
389 |
+ use system-llvm && ewarn "You have enabled system-llvm. This is unsupported by upstream and may not work." |
390 |
+ |
391 |
+ # julia does not play well with the system versions of libuv |
392 |
+ # USE_SYSTEM_LIBM=0 implies using external openlibm |
393 |
+ cat <<-EOF > Make.user |
394 |
+ LOCALBASE:="${EPREFIX}/usr" |
395 |
+ override prefix:="${EPREFIX}/usr" |
396 |
+ override libdir:="\$(prefix)/$(get_libdir)" |
397 |
+ override CC:=$(tc-getCC) |
398 |
+ override CXX:=$(tc-getCXX) |
399 |
+ override AR:=$(tc-getAR) |
400 |
+ |
401 |
+ BUNDLE_DEBUG_LIBS:=0 |
402 |
+ USE_BINARYBUILDER:=0 |
403 |
+ USE_SYSTEM_CSL:=1 |
404 |
+ USE_SYSTEM_LLVM:=$(usex system-llvm 1 0) |
405 |
+ USE_SYSTEM_LIBUNWIND:=1 |
406 |
+ USE_SYSTEM_PCRE:=1 |
407 |
+ USE_SYSTEM_LIBM:=0 |
408 |
+ USE_SYSTEM_OPENLIBM:=1 |
409 |
+ USE_SYSTEM_DSFMT:=1 |
410 |
+ USE_SYSTEM_BLAS:=1 |
411 |
+ USE_SYSTEM_LAPACK:=1 |
412 |
+ USE_SYSTEM_GMP:=1 |
413 |
+ USE_SYSTEM_MPFR:=1 |
414 |
+ USE_SYSTEM_SUITESPARSE:=1 |
415 |
+ USE_SYSTEM_LIBUV:=0 |
416 |
+ USE_SYSTEM_UTF8PROC:=1 |
417 |
+ USE_SYSTEM_MBEDTLS:=1 |
418 |
+ USE_SYSTEM_LIBSSH2:=1 |
419 |
+ USE_SYSTEM_NGHTTP2:=1 |
420 |
+ USE_SYSTEM_CURL:=1 |
421 |
+ USE_SYSTEM_LIBGIT2:=1 |
422 |
+ USE_SYSTEM_PATCHELF:=1 |
423 |
+ USE_SYSTEM_ZLIB:=1 |
424 |
+ USE_SYSTEM_P7ZIP:=1 |
425 |
+ VERBOSE:=1 |
426 |
+ EOF |
427 |
+} |
428 |
+ |
429 |
+src_compile() { |
430 |
+ # Julia accesses /proc/self/mem on Linux |
431 |
+ addpredict /proc/self/mem |
432 |
+ |
433 |
+ default |
434 |
+ pax-mark m "$(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')" |
435 |
+} |
436 |
+ |
437 |
+src_install() { |
438 |
+ emake install DESTDIR="${D}" |
439 |
+ |
440 |
+ if ! use system-llvm ; then |
441 |
+ local llvmslot=$(ver_cut 1 ${MY_LLVM_V}) |
442 |
+ cp "${S}/usr/lib/libLLVM-${llvmslot}jl.so" "${ED}/usr/$(get_libdir)/julia/" || die |
443 |
+ fi |
444 |
+ |
445 |
+ dodoc README.md |
446 |
+ |
447 |
+ mv "${ED}"/usr/etc/julia "${ED}"/etc || die |
448 |
+ rmdir "${ED}"/usr/etc || die |
449 |
+ mv "${ED}"/usr/share/doc/julia/html "${ED}"/usr/share/doc/"${PF}" || die |
450 |
+ rmdir "${ED}"/usr/share/doc/julia || die |
451 |
+ |
452 |
+ # The appdata directory is deprecated. |
453 |
+ mv "${ED}"/usr/share/{appdata,metainfo}/ || die |
454 |
+} |
455 |
+ |
456 |
+pkg_postinst() { |
457 |
+ elog "To use Plots, you will need to install sci-visualization/gr." |
458 |
+} |