julia-vl.spec 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. %define pkg_name julia
  2. %define pkg_version 1.1.0
  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-2348256acf5759a544e5ca7935f638d2bc091d60.tar.gz
  17. Source13: patchelf-0.9.tar.gz
  18. Source14: utf8proc-97ef668b312b96382714dbb8eaac4affce0816e6.tar.gz
  19. Source15: llvm-6.0.1.src.tar.xz
  20. # Source16: openblas-fd8d1868a126bb9f12bbc43b36ee30d1ba943fbb.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: openblas-devel
  43. %ifarch x86_64
  44. BuildRequires: openblas64-devel
  45. %endif
  46. BuildRequires: openspecfun-devel
  47. BuildRequires: openlibm-devel
  48. BuildRequires: suitesparse-devel
  49. BuildRequires: dSFMT-devel
  50. BuildRequires: pcre2-devel
  51. BuildRequires: curl-devel
  52. BuildRequires: libssh2-devel
  53. BuildRequires: libgit2-devel
  54. BuildRequires: mbedtls-devel
  55. BuildRequires: libatomic
  56. BuildRequires: desktop-file-utils
  57. Requires: openblas-threads
  58. %ifarch x86_64
  59. Requires: openblas-threads64_
  60. %endif
  61. Requires: openlibm
  62. Requires: suitesparse
  63. Requires: dSFMT
  64. Requires: pcre2
  65. Requires: libssh2 mbedtls
  66. Requires: libgit2
  67. Requires: libatomic
  68. Vendor: Project Vine
  69. Distribution: Vine Linux
  70. Packager: ara_t
  71. %description
  72. Julia is a high-level, high-performance dynamic programming language
  73. for numerical computing. It provides a sophisticated compiler,
  74. distributed parallel execution, numerical accuracy, and an extensive
  75. mathematical function library. Julia’s Base library, largely written
  76. in Julia itself, also integrates mature, best-of-breed open source C
  77. and Fortran libraries for linear algebra, random number generation,
  78. signal processing, and string processing. In addition, the Julia developer
  79. community is contributing a number of external packages through Julia's
  80. built-in package manager at a rapid pace.
  81. IJulia, a collaboration between the Jupyter and Julia communities,
  82. provides a powerful browser-based graphical notebook interface to Julia.
  83. Julia programs are organized around multiple dispatch; by defining functions
  84. and overloading them for different combinations of argument types,
  85. which can also be user-defined. For a more in-depth discussion of the
  86. rationale and advantages of Julia over other systems, see the following
  87. highlights or read the introduction in the online manual.
  88. #'
  89. %prep
  90. %{__rm} -rf ${RPM_BUILD_ROOT}
  91. %setup -q
  92. # %patch0 -p1 -b .unwind
  93. # %patch1 -p1 -b.ieee754_rem_pio2
  94. %patch11 -b .release
  95. %patch21 -b .skip_test
  96. # %patch22 -p1 -b .tolerance
  97. cat > Make.user <<EOF
  98. # Link to the LLVM shared library
  99. USE_LLVM_SHLIB=0
  100. # Link to the LLVM shared library
  101. USE_SYSTEM_LLVM=0
  102. USE_SYSTEM_LIBUNWIND=0
  103. USE_SYSTEM_LIBUV=0
  104. USE_SYSTEM_LIBM=0
  105. USE_SYSTEM_OPENLIBM=1
  106. UNTRUSTED_SYSTEM_LIBM=0
  107. USE_SYSTEM_OPENSPECFUN=1
  108. USE_SYSTEM_PCRE=1
  109. USE_SYSTEM_DSFMT=1
  110. USE_SYSTEM_GMP=1
  111. USE_SYSTEM_MPFR=0
  112. USE_SYSTEM_BLAS=1
  113. USE_SYSTEM_LAPACK=1
  114. USE_SYSTEM_SUITESPARSE=1
  115. USE_SYSTEM_LIBSSH2=1
  116. USE_SYSTEM_CURL=1
  117. USE_SYSTEM_LIBGIT2=1
  118. USE_SYSTEM_MBEDTLS=1
  119. EOF
  120. %{__mkdir_p} deps/srccache
  121. %{__cp} \
  122. %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} \
  123. %{SOURCE17} %{SOURCE18} \
  124. deps/srccache
  125. # Required so that the image is not optimized for the build CPU
  126. # (i386 does not work yet: https://github.com/JuliaLang/julia/issues/7185)
  127. # Without specifying MARCH, the Julia system image would only work on native CPU
  128. %ifarch %{ix86}
  129. %global march pentium4
  130. %endif
  131. %ifarch x86_64
  132. %global march x86-64
  133. %endif
  134. # setting for using system openblas
  135. %ifarch %{ix86}
  136. %global blas USE_BLAS64=0 LIBBLAS=-lopenblasp LIBBLASNAME=libopenblasp LIBLAPACK=-lopenblasp LIBLAPACKNAME=libopenblasp
  137. %endif
  138. %ifarch x86_64
  139. %global blas USE_BLAS64=1 LIBBLAS=-lopenblasp64_ LIBBLASNAME=libopenblasp64_ LIBLAPACK=-lopenblasp64_ LIBLAPACKNAME=libopenblasp64_
  140. %endif
  141. # About build, build_libdir and build_bindir
  142. # see https://github.com/JuliaLang/julia/issues/5063#issuecomment-32628111
  143. %global julia_builddir %{_builddir}/%{name}-%{version}/build
  144. %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}
  145. %global commonopts MARCH=%{march} %{blas} %{installopts}
  146. %build
  147. %{__make} %{?_smp_mflags} %{commonopts}
  148. # to avoid making documents
  149. %{__mkdir_p} doc/_build/html/en
  150. touch doc/_build/html/en/index.html
  151. %install
  152. %{__make} %{commonopts} install DESTDIR=${RPM_BUILD_ROOT}
  153. # remove html files
  154. pushd ${RPM_BUILD_ROOT}%{_docdir}
  155. %{__mv} julia %{name}-%{version}
  156. %{__rm} -rf %{name}-%{version}/html
  157. popd
  158. %{__cp} \
  159. CONTRIBUTING.md DISTRIBUTING.md HISTORY.md \
  160. LICENSE.md NEWS.md README.md \
  161. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
  162. %check
  163. %{__make} %{?_smp_mflags} %{commonopts} test
  164. %clean
  165. %{__rm} -rf ${RPM_BUILD_ROOT}
  166. %post
  167. %{_syssbindir}/ldconfig
  168. if [ -x %{_bindir}/update-desktop-database ] ; then
  169. %{_bindir}/update-desktop-database %{_datadir}/applications
  170. fi
  171. %postun
  172. %{_syssbindir}/ldconfig
  173. if [ $1 -eq 0 ] ; then
  174. if [ -x %{_bindir}/update-desktop-database ] ; then
  175. %{_bindir}/update-desktop-database %{_datadir}/applications
  176. fi
  177. fi
  178. %files
  179. %defattr(-, root, root)
  180. %{_bindir}/julia
  181. %{_sysconfdir}/%{name}
  182. %{_includedir}/%{name}
  183. %{_libdir}/%{name}/
  184. %{_libdir}/libjulia.so*
  185. %{_datadir}/appdata/
  186. %{_datadir}/applications/
  187. %{_datadir}/icons/
  188. %{_datadir}/julia/
  189. %{_docdir}/%{name}-%{version}
  190. %{_mandir}/man1/
  191. %changelog
  192. * Mon Jan 28 2019 Toshiaki Ara <ara_t@384.jp> 1.1.0-1
  193. - update to 1.1.0
  194. - change using system openblas
  195. * Sat Jan 26 2019 Toshiaki Ara <ara_t@384.jp> 1.0.3-2
  196. - remove unnecessary sofiles
  197. - rebuild with gfortran-8.2.0
  198. * Sat Jan 05 2019 Toshiaki Ara <ara_t@384.jp> 1.0.3-1
  199. - update to 1.0.3
  200. * Fri Nov 16 2018 Toshiaki Ara <ara_t@384.jp> 1.0.2-1
  201. - update to 1.0.2
  202. * Thu Oct 04 2018 Toshiaki Ara <ara_t@384.jp> 1.0.1-1
  203. - update to 1.0.1
  204. * Wed Aug 22 2018 Toshiaki Ara <ara_t@384.jp> 1.0.0-2
  205. - rebuild with suitesparse-4.4.6
  206. * Fri Aug 17 2018 Toshiaki Ara <ara_t@384.jp> 1.0.0-1
  207. - update to 1.0.0
  208. - add/update sources
  209. - drop some Patches
  210. - add BuildRequires: and Requires: libatomic
  211. * Sat Jul 14 2018 Toshiaki Ara <ara_t@384.jp> 0.6.4-1
  212. - new upstream release
  213. - update SOURCE17 (openblas)
  214. * Sun Jun 17 2018 Toshiaki Ara <ara_t@384.jp> 0.6.3-1
  215. - new package