1 | %define pkg_name julia |
---|
2 | %define pkg_version 0.6.3 |
---|
3 | %define pkg_release 1%{?_dist_release} |
---|
4 | |
---|
5 | Summary: High-level, high-performance dynamic programming language for numerical computing |
---|
6 | Name: %{pkg_name} |
---|
7 | Version: %{pkg_version} |
---|
8 | Release: %{pkg_release} |
---|
9 | |
---|
10 | License: MIT and BSD |
---|
11 | # julia: MIT |
---|
12 | # openblas, arpack and llvm: BSD |
---|
13 | Group: Applications/Edutainment |
---|
14 | URL: https://julialang.org/ |
---|
15 | |
---|
16 | Source0: https://github.com/JuliaLang/julia/releases/download/v%{version}/%{name}-%{version}.tar.gz |
---|
17 | |
---|
18 | Source11: libunwind-1.1-julia2.tar.gz |
---|
19 | Source12: libuv-d8ab1c6a33e77bf155facb54215dd8798e13825d.tar.gz |
---|
20 | Source13: patchelf-0.9.tar.gz |
---|
21 | Source14: utf8proc-d688ac122660e465dc65c8eb7b1c2444fcd52829.tar.gz |
---|
22 | Source15: llvm-3.9.1.src.tar.xz |
---|
23 | Source16: arpack-ng-3.3.0.tar.gz |
---|
24 | Source17: openblas-5dde4e65d321076582a2fafe16949d2160551e81.tar.gz |
---|
25 | |
---|
26 | # Patches from Fedora srpm |
---|
27 | Patch0: julia_unwind_version.patch |
---|
28 | |
---|
29 | # https://github.com/JuliaLang/julia/pull/22603 |
---|
30 | # Remove ieee754_rem_pio2 in favor of a rem_pio2_kernel written in Julia. |
---|
31 | Patch1: julia-0.6.3-issue22603.patch |
---|
32 | |
---|
33 | # not make debug |
---|
34 | Patch11: julia-0.6.3-Makefile_release.patch |
---|
35 | |
---|
36 | ## Patches for make test |
---|
37 | # Avoid test error |
---|
38 | Patch21: julia-0.6.3-skip_libgit2_test.patch |
---|
39 | |
---|
40 | # https://github.com/JuliaLang/julia/pull/23124 |
---|
41 | # Bump tolerance a bit in stressful test of eigs on matrix |
---|
42 | # with many repeated eigenvalues. |
---|
43 | Patch22: julia-0.6.3-issue23124.patch |
---|
44 | |
---|
45 | |
---|
46 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
47 | |
---|
48 | BuildRequires: cmake |
---|
49 | BuildRequires: gcc-gfortran |
---|
50 | BuildRequires: gmp-devel mpfr-devel |
---|
51 | BuildRequires: openspecfun-devel |
---|
52 | BuildRequires: openlibm-devel |
---|
53 | BuildRequires: suitesparse-devel |
---|
54 | BuildRequires: dSFMT-devel |
---|
55 | BuildRequires: fftw3-devel |
---|
56 | BuildRequires: pcre2-devel |
---|
57 | BuildRequires: curl-devel |
---|
58 | BuildRequires: libssh2-devel |
---|
59 | BuildRequires: libgit2-devel |
---|
60 | BuildRequires: mbedtls-devel |
---|
61 | BuildRequires: desktop-file-utils |
---|
62 | |
---|
63 | Requires: openlibm |
---|
64 | Requires: suitesparse |
---|
65 | Requires: dSFMT |
---|
66 | Requires: fftw3 |
---|
67 | Requires: pcre2 |
---|
68 | Requires: libssh2 libgit2 mbedtls |
---|
69 | |
---|
70 | |
---|
71 | Vendor: Project Vine |
---|
72 | Distribution: Vine Linux |
---|
73 | Packager: ara_t |
---|
74 | |
---|
75 | |
---|
76 | %description |
---|
77 | Julia is a high-level, high-performance dynamic programming language |
---|
78 | for numerical computing. It provides a sophisticated compiler, |
---|
79 | distributed parallel execution, numerical accuracy, and an extensive |
---|
80 | mathematical function library. Julia’s Base library, largely written |
---|
81 | in Julia itself, also integrates mature, best-of-breed open source C |
---|
82 | and Fortran libraries for linear algebra, random number generation, |
---|
83 | signal processing, and string processing. In addition, the Julia developer |
---|
84 | community is contributing a number of external packages through Julia's |
---|
85 | built-in package manager at a rapid pace. |
---|
86 | IJulia, a collaboration between the Jupyter and Julia communities, |
---|
87 | provides a powerful browser-based graphical notebook interface to Julia. |
---|
88 | |
---|
89 | Julia programs are organized around multiple dispatch; by defining functions |
---|
90 | and overloading them for different combinations of argument types, |
---|
91 | which can also be user-defined. For a more in-depth discussion of the |
---|
92 | rationale and advantages of Julia over other systems, see the following |
---|
93 | highlights or read the introduction in the online manual. |
---|
94 | #' |
---|
95 | |
---|
96 | |
---|
97 | %prep |
---|
98 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
99 | %setup -q |
---|
100 | |
---|
101 | %patch0 -p1 -b .unwind |
---|
102 | %patch1 -p1 -b.ieee754_rem_pio2 |
---|
103 | |
---|
104 | %patch11 -b .release |
---|
105 | %patch21 -b .skip_test |
---|
106 | %patch22 -p1 -b .tolerance |
---|
107 | |
---|
108 | cat > Make.user <<EOF |
---|
109 | # Link to the LLVM shared library |
---|
110 | USE_LLVM_SHLIB=0 |
---|
111 | |
---|
112 | # Link to the LLVM shared library |
---|
113 | USE_SYSTEM_LLVM=0 |
---|
114 | USE_SYSTEM_LIBUNWIND=0 |
---|
115 | USE_SYSTEM_LIBUV=0 |
---|
116 | USE_SYSTEM_LIBM=0 |
---|
117 | USE_SYSTEM_OPENLIBM=1 |
---|
118 | UNTRUSTED_SYSTEM_LIBM=0 |
---|
119 | USE_SYSTEM_OPENSPECFUN=1 |
---|
120 | |
---|
121 | USE_SYSTEM_PCRE=1 |
---|
122 | USE_SYSTEM_DSFMT=1 |
---|
123 | USE_SYSTEM_FFTW=1 |
---|
124 | USE_SYSTEM_GMP=1 |
---|
125 | USE_SYSTEM_MPFR=1 |
---|
126 | USE_SYSTEM_SUITESPARSE=1 |
---|
127 | |
---|
128 | USE_SYSTEM_BLAS=0 |
---|
129 | USE_SYSTEM_LAPACK=0 |
---|
130 | USE_SYSTEM_ARPACK=0 |
---|
131 | |
---|
132 | USE_SYSTEM_LIBSSH2=1 |
---|
133 | USE_SYSTEM_CURL=1 |
---|
134 | USE_SYSTEM_LIBGIT2=1 |
---|
135 | USE_SYSTEM_MBEDTLS=1 |
---|
136 | EOF |
---|
137 | |
---|
138 | %{__mkdir_p} deps/srccache |
---|
139 | %{__cp} \ |
---|
140 | %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} \ |
---|
141 | %{SOURCE16} %{SOURCE17} \ |
---|
142 | deps/srccache |
---|
143 | |
---|
144 | # About build, build_libdir and build_bindir |
---|
145 | # see https://github.com/JuliaLang/julia/issues/5063#issuecomment-32628111 |
---|
146 | %global julia_builddir %{_builddir}/%{name}-%{version}/build |
---|
147 | %global installopts prefix=%{_prefix} bindir=%{_bindir} libdir=%{_libdir} libexecdir=%{_libexecdir} datarootdir=%{_datarootdir} includedir=%{_includedir} sysconfdir=%{_sysconfdir} build_prefix=%{julia_builddir} build_bindir=%{julia_builddir}%{_bindir} build_libdir=%{julia_builddir}%{_libdir} build_private_libdir=%{julia_builddir}%{_libdir}/julia build_libexecdir=%{julia_builddir}%{_libexecdir} build_datarootdir=%{julia_builddir}%{_datarootdir} build_includedir=%{julia_builddir}%{_includedir} build_sysconfdir=%{julia_builddir}%{_sysconfdir} |
---|
148 | |
---|
149 | # Required so that the image is not optimized for the build CPU |
---|
150 | # # (i386 does not work yet: https://github.com/JuliaLang/julia/issues/7185) |
---|
151 | # # Without specifying MARCH, the Julia system image would only work on native CPU |
---|
152 | # using openblas |
---|
153 | %ifarch %{ix86} |
---|
154 | %global march pentium4 |
---|
155 | %endif |
---|
156 | %ifarch x86_64 |
---|
157 | %global march x86-64 |
---|
158 | %endif |
---|
159 | |
---|
160 | %global commonopts MARCH=%{march} %{installopts} |
---|
161 | |
---|
162 | %build |
---|
163 | %{__make} %{?_smp_mflags} %{commonopts} release |
---|
164 | |
---|
165 | # to avoid making documents |
---|
166 | %{__mkdir_p} doc/_build/html/en |
---|
167 | touch doc/_build/html/en/index.html |
---|
168 | |
---|
169 | %install |
---|
170 | %{__make} %{commonopts} install DESTDIR=${RPM_BUILD_ROOT} |
---|
171 | |
---|
172 | pushd ${RPM_BUILD_ROOT}%{_docdir} |
---|
173 | %{__mv} julia %{name}-%{version} |
---|
174 | %{__rm} -rf %{name}-%{version}/html |
---|
175 | popd |
---|
176 | |
---|
177 | |
---|
178 | %{__cp} \ |
---|
179 | CONTRIBUTING.md DISTRIBUTING.md HISTORY.md \ |
---|
180 | LICENSE.md NEWS.md README.md \ |
---|
181 | ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version} |
---|
182 | |
---|
183 | %check |
---|
184 | %{__make} %{?_smp_mflags} %{commonopts} test |
---|
185 | |
---|
186 | %clean |
---|
187 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
188 | |
---|
189 | %post |
---|
190 | %{_syssbindir}/ldconfig |
---|
191 | if [ -x %{_bindir}/update-desktop-database ] ; then |
---|
192 | %{_bindir}/update-desktop-database %{_datadir}/applications |
---|
193 | fi |
---|
194 | |
---|
195 | %postun |
---|
196 | %{_syssbindir}/ldconfig |
---|
197 | if [ $1 -eq 0 ] ; then |
---|
198 | if [ -x %{_bindir}/update-desktop-database ] ; then |
---|
199 | %{_bindir}/update-desktop-database %{_datadir}/applications |
---|
200 | fi |
---|
201 | fi |
---|
202 | |
---|
203 | |
---|
204 | %files |
---|
205 | %defattr(-, root, root) |
---|
206 | %{_bindir}/julia* |
---|
207 | %{_sysconfdir}/%{name} |
---|
208 | %{_includedir}/%{name} |
---|
209 | %{_libdir}/%{name}/ |
---|
210 | %{_libdir}/libjulia* |
---|
211 | %{_datadir}/appdata/ |
---|
212 | %{_datadir}/applications/ |
---|
213 | %{_datadir}/icons/ |
---|
214 | %{_datadir}/julia/ |
---|
215 | %{_docdir}/%{name}-%{version} |
---|
216 | %{_mandir}/man1/ |
---|
217 | |
---|
218 | |
---|
219 | %changelog |
---|
220 | * Sun Jun 17 2018 Toshiaki Ara <ara_t@384.jp> 0.6.3-1 |
---|
221 | - new package |
---|
222 | |
---|