julia-vl.spec 6.2 KB

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