julia-vl.spec 6.3 KB

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