1 |
commit: 3040b1578a07c14d7f9c2d64ba09b062b789c11c |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 30 02:11:21 2018 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 31 02:31:08 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3040b157 |
7 |
|
8 |
dev-lang/julia: version bump to 1.0.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/663266 |
11 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
12 |
|
13 |
dev-lang/julia/Manifest | 2 + |
14 |
.../julia/files/julia-1.0.0-fix_build_system.patch | 75 ++++++++ |
15 |
dev-lang/julia/julia-1.0.0.ebuild | 202 +++++++++++++++++++++ |
16 |
3 files changed, 279 insertions(+) |
17 |
|
18 |
diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest |
19 |
index 0124be31939..88b87cdcf4b 100644 |
20 |
--- a/dev-lang/julia/Manifest |
21 |
+++ b/dev-lang/julia/Manifest |
22 |
@@ -1,2 +1,4 @@ |
23 |
DIST julia-0.6.3-bundled.tar.gz 2099258 BLAKE2B dea1f5d37477e0a612e3901d7d568e8c4b350496f9d2b344cd7e2c2043ae30b4dd26b567803a2cb96d1ec4dbe2ba514fb08b925c695589746691887334330dd2 SHA512 d04cd55ba0dde08f253db3a388cf5ebe87cec8ae321a5af4c1c92f2680aa6e6ef2ebfa771ec74f8f1ff96409e2c0645476acf577859e8718eac4a581f097639d |
24 |
DIST julia-0.6.3.tar.gz 5542642 BLAKE2B cccd1ee2eb4d9f59382a0d1f6466e77c84b0542456c405c05b718bc8a39ff537a09760a523ee572fc9eee6797158aa00010fc4c931a80deac645fb1e45061c87 SHA512 f529bb30a17989234061cf4c3d87aecc6da720eb494efaca7be4ec1ed5eda60d440896fb76a45b6cb30205030256e7de765e8944f873b31d96f7c9ecac542db8 |
25 |
+DIST julia-1.0.0-bundled.tar.gz 3740215 BLAKE2B 1d230d9f2ba47a1ee3221d1a4c94648bd02a80c30205dd9d438f78261e005ab7ed2173a3c7673489b17ee50050a4cbc0563ce90f16202b8cea65e4c65155cf2c SHA512 be89442366e0ebc789c16485b790368ef8702375bc1c1520d33bda152c8eda988a87f0a389d9b060f51b00ad0c249a95149468ab296811cd7050e110368d256a |
26 |
+DIST julia-1.0.0.tar.gz 7378753 BLAKE2B 1fcf3a63b00b6a49a86ca69b6ee809a28c828287c739405ae180e96645d565de0941b049d319f82f60e1ee63ee89629be213ecb22ab1ea901b306d1e149fa861 SHA512 5a53b16a1ab57cdffa5dadf11e78c413ed9f18af23ae90b64dee8323c2fc9bd6e6918b341f48accbcb7a6eab559811c80d72ac3ac0576c7cf6c9c9057356f6ba |
27 |
|
28 |
diff --git a/dev-lang/julia/files/julia-1.0.0-fix_build_system.patch b/dev-lang/julia/files/julia-1.0.0-fix_build_system.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..1ed19d6e06e |
31 |
--- /dev/null |
32 |
+++ b/dev-lang/julia/files/julia-1.0.0-fix_build_system.patch |
33 |
@@ -0,0 +1,75 @@ |
34 |
+diff --git a/Make.inc b/Make.inc |
35 |
+index 8e0df61..5747a1c 100644 |
36 |
+--- a/Make.inc |
37 |
++++ b/Make.inc |
38 |
+@@ -181,7 +181,7 @@ USE_GPL_LIBS ?= 1 |
39 |
+ # Directories where said libraries get installed to |
40 |
+ prefix ?= $(BUILDROOT)/julia-$(JULIA_COMMIT) |
41 |
+ bindir := $(prefix)/bin |
42 |
+-libdir := $(prefix)/lib |
43 |
++libdir := $(prefix)/GENTOOLIBDIR |
44 |
+ libexecdir := $(prefix)/libexec |
45 |
+ datarootdir := $(prefix)/share |
46 |
+ docdir := $(datarootdir)/doc/julia |
47 |
+@@ -413,7 +413,7 @@ ifneq ($(OS), WINNT) |
48 |
+ JCXXFLAGS += -pedantic |
49 |
+ endif |
50 |
+ DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all |
51 |
+-SHIPFLAGS := -O3 -ggdb2 -falign-functions |
52 |
++SHIPFLAGS := GENTOOCFLAGS |
53 |
+ endif |
54 |
+ |
55 |
+ ifeq ($(USECLANG),1) |
56 |
+@@ -424,7 +424,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 |
57 |
+ JCPPFLAGS := -fasynchronous-unwind-tables |
58 |
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic |
59 |
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all |
60 |
+-SHIPFLAGS := -O3 -g |
61 |
++SHIPFLAGS := GENTOOCFLAGS |
62 |
+ ifeq ($(OS), Darwin) |
63 |
+ ifeq ($(USE_LIBCPP), 1) |
64 |
+ MACOSX_VERSION_MIN := 10.8 |
65 |
+@@ -453,7 +453,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 |
66 |
+ JCPPFLAGS := |
67 |
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti |
68 |
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all |
69 |
+-SHIPFLAGS := -O3 -g -falign-functions |
70 |
++SHIPFLAGS := GENTOOCFLAGS |
71 |
+ endif |
72 |
+ |
73 |
+ ifeq ($(USECCACHE), 1) |
74 |
+diff --git a/doc/Makefile b/doc/Makefile |
75 |
+index 89b7988..c3125fd 100644 |
76 |
+--- a/doc/Makefile |
77 |
++++ b/doc/Makefile |
78 |
+@@ -29,7 +29,7 @@ deps: UnicodeData.txt |
79 |
+ $(JLCHECKSUM) UnicodeData.txt |
80 |
+ |
81 |
+ clean: |
82 |
+- -rm -rf _build/* deps/* docbuild.log UnicodeData.txt |
83 |
++ @echo "Do not clean doc/_build/html. Just use it..." |
84 |
+ |
85 |
+ cleanall: clean |
86 |
+ |
87 |
+diff --git a/src/Makefile b/src/Makefile |
88 |
+index 20da34d..84eae21 100644 |
89 |
+--- a/src/Makefile |
90 |
++++ b/src/Makefile |
91 |
+@@ -88,16 +88,7 @@ UV_HEADERS += uv/*.h |
92 |
+ endif |
93 |
+ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLIC_HEADERS)) $(UV_HEADERS)) |
94 |
+ |
95 |
+-ifeq ($(JULIACODEGEN),LLVM) |
96 |
+-# In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs |
97 |
+-# In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries. |
98 |
+-ifneq ($(USE_LLVM_SHLIB),1) |
99 |
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS)) $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null) |
100 |
+-else |
101 |
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM |
102 |
+-FLAGS += -DLLVM_SHLIB |
103 |
+-endif # USE_LLVM_SHLIB == 1 |
104 |
+-endif |
105 |
++LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs) |
106 |
+ |
107 |
+ COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS) |
108 |
+ DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS) |
109 |
|
110 |
diff --git a/dev-lang/julia/julia-1.0.0.ebuild b/dev-lang/julia/julia-1.0.0.ebuild |
111 |
new file mode 100644 |
112 |
index 00000000000..a9701eaddef |
113 |
--- /dev/null |
114 |
+++ b/dev-lang/julia/julia-1.0.0.ebuild |
115 |
@@ -0,0 +1,202 @@ |
116 |
+# Copyright 1999-2018 Gentoo Foundation |
117 |
+# Distributed under the terms of the GNU General Public License v2 |
118 |
+ |
119 |
+EAPI=6 |
120 |
+ |
121 |
+RESTRICT="test" |
122 |
+ |
123 |
+inherit llvm pax-utils toolchain-funcs |
124 |
+ |
125 |
+DESCRIPTION="High-performance programming language for technical computing" |
126 |
+HOMEPAGE="https://julialang.org/" |
127 |
+SRC_URI=" |
128 |
+ https://github.com/JuliaLang/${PN}/releases/download/v${PV}/${P}.tar.gz |
129 |
+ https://dev.gentoo.org/~tamiko/distfiles/${P}-bundled.tar.gz |
130 |
+" |
131 |
+ |
132 |
+S="${WORKDIR}/julia" |
133 |
+ |
134 |
+LICENSE="MIT" |
135 |
+SLOT="0" |
136 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
137 |
+IUSE="" |
138 |
+ |
139 |
+RDEPEND=" |
140 |
+ >=sys-devel/llvm-4.0.0:= |
141 |
+ >=sys-devel/clang-4.0.0:=" |
142 |
+LLVM_MAX_SLOT=5 |
143 |
+ |
144 |
+RDEPEND+=" |
145 |
+ dev-libs/double-conversion:0= |
146 |
+ dev-libs/gmp:0= |
147 |
+ dev-libs/libgit2:0= |
148 |
+ >=dev-libs/libpcre2-10.23:0=[jit] |
149 |
+ dev-libs/mpfr:0= |
150 |
+ dev-libs/openspecfun |
151 |
+ sci-libs/amd:0= |
152 |
+ sci-libs/arpack:0= |
153 |
+ sci-libs/camd:0= |
154 |
+ sci-libs/ccolamd:0= |
155 |
+ sci-libs/cholmod:0= |
156 |
+ sci-libs/colamd:0= |
157 |
+ sci-libs/fftw:3.0=[threads] |
158 |
+ sci-libs/openlibm:0= |
159 |
+ sci-libs/spqr:0= |
160 |
+ sci-libs/umfpack:0= |
161 |
+ sci-mathematics/glpk:0= |
162 |
+ >=sys-libs/libunwind-1.1:7= |
163 |
+ sys-libs/readline:0= |
164 |
+ sys-libs/zlib:0= |
165 |
+ >=virtual/blas-3.6 |
166 |
+ virtual/lapack" |
167 |
+ |
168 |
+ |
169 |
+DEPEND="${RDEPEND} |
170 |
+ dev-vcs/git |
171 |
+ dev-util/patchelf |
172 |
+ virtual/pkgconfig" |
173 |
+ |
174 |
+PATCHES=( |
175 |
+ "${FILESDIR}"/${PN}-1.0.0-fix_build_system.patch |
176 |
+) |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ mv "${WORKDIR}"/bundled/UnicodeData.txt doc || die |
180 |
+ mkdir deps/srccache || die |
181 |
+ mv "${WORKDIR}"/bundled/* deps/srccache || die |
182 |
+ rmdir "${WORKDIR}"/bundled || die |
183 |
+ |
184 |
+ default |
185 |
+ |
186 |
+ # Sledgehammer: |
187 |
+ # - prevent fetching of bundled stuff in compile and install phase |
188 |
+ # - respect CFLAGS |
189 |
+ # - respect EPREFIX and Gentoo specific paths |
190 |
+ # - fix BLAS and LAPACK link interface |
191 |
+ |
192 |
+ sed -i \ |
193 |
+ -e 's|git submodule|${EPREFIX}/bin/true|g' \ |
194 |
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \ |
195 |
+ -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \ |
196 |
+ deps/Makefile || die |
197 |
+ |
198 |
+ local libblas="$($(tc-getPKG_CONFIG) --libs-only-l blas)" |
199 |
+ libblas="${libblas%% *}" |
200 |
+ libblas="lib${libblas#-l}" |
201 |
+ local liblapack="$($(tc-getPKG_CONFIG) --libs-only-l lapack)" |
202 |
+ liblapack="${liblapack%% *}" |
203 |
+ liblapack="lib${liblapack#-l}" |
204 |
+ |
205 |
+ sed -i \ |
206 |
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \ |
207 |
+ -e "s|GENTOOLIBDIR|$(get_libdir)|" \ |
208 |
+ -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \ |
209 |
+ -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" \ |
210 |
+ -e "s|= libblas|= ${libblas}|" \ |
211 |
+ -e "s|-llapack|$($(tc-getPKG_CONFIG) --libs lapack)|" \ |
212 |
+ -e "s|= liblapack|= ${liblapack}|" \ |
213 |
+ Make.inc || die |
214 |
+ |
215 |
+ sed -i \ |
216 |
+ -e "s|,lib)|,$(get_libdir))|g" \ |
217 |
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \ |
218 |
+ Makefile || die |
219 |
+ |
220 |
+ sed -i \ |
221 |
+ -e "s|ar -rcs|$(tc-getAR) -rcs|g" \ |
222 |
+ src/Makefile || die |
223 |
+ |
224 |
+ # disable doc install starting git fetching |
225 |
+ sed -i -e 's~install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html~install: $(build_depsbindir)/stringreplace~' Makefile || die |
226 |
+} |
227 |
+ |
228 |
+src_configure() { |
229 |
+ # julia does not play well with the system versions of dsfmt, libuv, |
230 |
+ # and utf8proc |
231 |
+ |
232 |
+ # USE_SYSTEM_LIBM=0 implies using external openlibm |
233 |
+ cat <<-EOF > Make.user |
234 |
+ USE_SYSTEM_DSFMT=0 |
235 |
+ USE_SYSTEM_LIBUV=0 |
236 |
+ USE_SYSTEM_PCRE=1 |
237 |
+ USE_SYSTEM_RMATH=0 |
238 |
+ USE_SYSTEM_UTF8PROC=0 |
239 |
+ USE_LLVM_SHLIB=0 |
240 |
+ USE_SYSTEM_ARPACK=1 |
241 |
+ USE_SYSTEM_BLAS=1 |
242 |
+ USE_SYSTEM_FFTW=1 |
243 |
+ USE_SYSTEM_GMP=1 |
244 |
+ USE_SYSTEM_GRISU=1 |
245 |
+ USE_SYSTEM_LAPACK=1 |
246 |
+ USE_SYSTEM_LIBGIT2=1 |
247 |
+ USE_SYSTEM_LIBM=0 |
248 |
+ USE_SYSTEM_LIBUNWIND=1 |
249 |
+ USE_SYSTEM_LLVM=1 |
250 |
+ USE_SYSTEM_MPFR=1 |
251 |
+ USE_SYSTEM_OPENLIBM=1 |
252 |
+ USE_SYSTEM_OPENSPECFUN=1 |
253 |
+ USE_SYSTEM_PATCHELF=1 |
254 |
+ USE_SYSTEM_READLINE=1 |
255 |
+ USE_SYSTEM_SUITESPARSE=1 |
256 |
+ USE_SYSTEM_ZLIB=1 |
257 |
+ VERBOSE=1 |
258 |
+ libdir="${EROOT}/usr/$(get_libdir)" |
259 |
+ EOF |
260 |
+ |
261 |
+} |
262 |
+ |
263 |
+src_compile() { |
264 |
+ |
265 |
+ # Julia accesses /proc/self/mem on Linux |
266 |
+ addpredict /proc/self/mem |
267 |
+ |
268 |
+ emake cleanall |
269 |
+ |
270 |
+ # Create symlinks... |
271 |
+ local libblas="$($(tc-getPKG_CONFIG) --libs-only-l blas)" |
272 |
+ libblas="${libblas%% *}" |
273 |
+ libblas="lib${libblas#-l}" |
274 |
+ local liblapack="$($(tc-getPKG_CONFIG) --libs-only-l lapack)" |
275 |
+ liblapack="${liblapack%% *}" |
276 |
+ liblapack="lib${liblapack#-l}" |
277 |
+ mkdir -p "${S}"/usr/lib/julia || die "mkdir failed" |
278 |
+ for i in ${libblas}.so ${liblapack}.so libumfpack.so libspqr.so; do |
279 |
+ ln -s "${EROOT}/usr/$(get_libdir)/${i}" "${S}"/usr/lib/julia/ || die "ln failed" |
280 |
+ done |
281 |
+ |
282 |
+ emake VERBOSE=1 julia-release \ |
283 |
+ prefix="${EPREFIX}/usr" DESTDIR="${D}" \ |
284 |
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" |
285 |
+ pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}') |
286 |
+ emake |
287 |
+} |
288 |
+ |
289 |
+src_test() { |
290 |
+ emake test |
291 |
+} |
292 |
+ |
293 |
+src_install() { |
294 |
+ # Julia is special. It tries to find a valid git repository (that would |
295 |
+ # normally be cloned during compilation/installation). Just make it |
296 |
+ # happy... |
297 |
+ git init && \ |
298 |
+ git config --local user.email "whatyoudoing@×××××××.com" && \ |
299 |
+ git config --local user.name "Whyyyyyy" && \ |
300 |
+ git commit -a --allow-empty -m "initial" || die "git failed" |
301 |
+ |
302 |
+ emake install \ |
303 |
+ prefix="${EPREFIX}/usr" DESTDIR="${D}" \ |
304 |
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" |
305 |
+ cat > 99julia <<-EOF |
306 |
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/julia |
307 |
+ EOF |
308 |
+ doenvd 99julia |
309 |
+ |
310 |
+ dodoc README.md |
311 |
+ |
312 |
+ mv "${ED}"/usr/etc/julia "${ED}"/etc || die |
313 |
+ rmdir "${ED}"/usr/etc || die |
314 |
+ mv "${ED}"/usr/share/doc/julia/{examples,html} \ |
315 |
+ "${ED}"/usr/share/doc/${PF} || die |
316 |
+ rmdir "${ED}"/usr/share/doc/julia || die |
317 |
+} |