julia-vl.spec 6.7 KB

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