julia-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. %define pkg_name julia
  2. %define pkg_version 1.1.0
  3. %define pkg_release 3%{?_dist_release}
  4. %global unwindversion 1.1-julia2
  5. %global uvcommit 2348256acf5759a544e5ca7935f638d2bc091d60
  6. %global patchelfversion 0.9
  7. %global utf8proccommit 97ef668b312b96382714dbb8eaac4affce0816e6
  8. %global llvmversion 6.0.1
  9. %global libwhichcommit 81e9723c0273d78493dc8c8ed570f68d9ce7e89e
  10. %global mpfrversion 4.0.1
  11. %global cacertversion 2018-10-17
  12. %global pkgcommit 853b3f1fd9895db32b402d89e9dee153b66b2316
  13. Summary: High-level, high-performance dynamic programming language for numerical computing
  14. Name: %{pkg_name}
  15. Version: %{pkg_version}
  16. Release: %{pkg_release}
  17. License: MIT, BSD and GPLv3
  18. # julia, utf8proc, libwhich: MIT
  19. # libunwind, libuv, llvm: BSD
  20. # patchelf, mpfr: GPLv3
  21. Group: Applications/Edutainment
  22. URL: https://julialang.org/
  23. Source0: https://github.com/JuliaLang/julia/releases/download/v%{version}/%{name}-%{version}.tar.gz
  24. Source11: libunwind-%{unwindversion}.tar.gz
  25. Source12: libuv-%{uvcommit}.tar.gz
  26. Source13: patchelf-%{patchelfversion}.tar.gz
  27. Source14: utf8proc-%{utf8proccommit}.tar.gz
  28. Source15: llvm-%{llvmversion}.src.tar.xz
  29. Source16: libwhich-%{libwhichcommit}.tar.gz
  30. Source17: mpfr-%{mpfrversion}.tar.bz2
  31. Source18: cacert-%{cacertversion}.pem
  32. Source31: https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/%{pkgcommit}#/Pkg-%{pkgcommit}.tar.gz
  33. # not make debug
  34. Patch11: julia-Makefile_release.patch
  35. # ## Patches for make test
  36. # # Avoid test error
  37. # Patch21: julia-skip-LibGit2-libgit2.patch
  38. # Patch from Fedora
  39. Patch31: llvm-julia-installdirs-64.patch
  40. # march=pentium4 in i686
  41. Patch32: julia-i686-march.patch
  42. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  43. BuildRequires: cmake
  44. BuildRequires: gcc-gfortran
  45. BuildRequires: gmp-devel
  46. BuildRequires: openblas-devel
  47. %ifarch x86_64
  48. BuildRequires: openblas64-devel
  49. %endif
  50. BuildRequires: openspecfun-devel
  51. BuildRequires: openlibm-devel
  52. BuildRequires: suitesparse-devel
  53. BuildRequires: dSFMT-devel
  54. BuildRequires: pcre2-devel
  55. BuildRequires: libssh2-devel
  56. BuildRequires: curl-devel
  57. BuildRequires: libgit2-devel
  58. BuildRequires: mbedtls-devel
  59. BuildRequires: libatomic
  60. BuildRequires: desktop-file-utils
  61. Requires: openblas-threads
  62. %ifarch x86_64
  63. Requires: openblas-threads64_
  64. %endif
  65. Requires: openlibm
  66. Requires: suitesparse
  67. Requires: dSFMT
  68. Requires: pcre2
  69. Requires: libssh2
  70. Requires: libgit2
  71. Requires: mbedtls
  72. Requires: libatomic
  73. Vendor: Project Vine
  74. Distribution: Vine Linux
  75. Packager: ara_t
  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. Julia programs are organized around multiple dispatch; by defining functions
  89. and overloading them for different combinations of argument types,
  90. which can also be user-defined. For a more in-depth discussion of the
  91. rationale and advantages of Julia over other systems, see the following
  92. highlights or read the introduction in the online manual.
  93. #'
  94. %prep
  95. %{__rm} -rf ${RPM_BUILD_ROOT}
  96. %setup -q
  97. %patch11 -b .release
  98. # %patch21 -b .skip_test
  99. %ifarch x86_64
  100. %patch31 -p1 -b .installdir64
  101. %endif
  102. %ifarch %{ix86}
  103. %patch32 -b .march
  104. %endif
  105. cat > Make.user <<EOF
  106. USE_SYSTEM_LLVM=0
  107. USE_SYSTEM_LIBUNWIND=0
  108. USE_SYSTEM_LIBUV=0
  109. USE_SYSTEM_LIBM=0
  110. USE_SYSTEM_OPENLIBM=1
  111. UNTRUSTED_SYSTEM_LIBM=0
  112. USE_SYSTEM_OPENSPECFUN=1
  113. USE_SYSTEM_PCRE=1
  114. USE_SYSTEM_DSFMT=1
  115. USE_SYSTEM_GMP=1
  116. USE_SYSTEM_MPFR=0
  117. USE_SYSTEM_BLAS=1
  118. USE_SYSTEM_LAPACK=1
  119. USE_SYSTEM_SUITESPARSE=1
  120. USE_SYSTEM_LIBSSH2=1
  121. USE_SYSTEM_CURL=1
  122. USE_SYSTEM_LIBGIT2=1
  123. USE_SYSTEM_MBEDTLS=1
  124. EOF
  125. %{__mkdir_p} deps/srccache stdlib/srccache
  126. %{__cp} \
  127. %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} \
  128. %{SOURCE16} %{SOURCE17} %{SOURCE18} \
  129. deps/srccache
  130. %{__cp} %{SOURCE31} stdlib/srccache
  131. # Required so that the image is not optimized for the build CPU
  132. # (i386 does not work yet: https://github.com/JuliaLang/julia/issues/7185)
  133. # Without specifying MARCH, the Julia system image would only work on native CPU
  134. %ifarch %{ix86}
  135. %global march pentium4
  136. %endif
  137. %ifarch x86_64
  138. %global march x86-64
  139. %endif
  140. # setting for using system openblas
  141. %ifarch %{ix86}
  142. %global blas USE_BLAS64=0 LIBBLAS=-lopenblasp LIBBLASNAME=libopenblasp LIBLAPACK=-lopenblasp LIBLAPACKNAME=libopenblasp
  143. %endif
  144. %ifarch x86_64
  145. %global blas USE_BLAS64=1 LIBBLAS=-lopenblasp64_ LIBBLASNAME=libopenblasp64_ LIBLAPACK=-lopenblasp64_ LIBLAPACKNAME=libopenblasp64_ OPENBLAS_SYMBOLSUFFIX=64_
  146. %endif
  147. # About build, build_libdir and build_bindir
  148. # see https://github.com/JuliaLang/julia/issues/5063#issuecomment-32628111
  149. %global julia_builddir %{_builddir}/%{name}-%{version}/build
  150. %global installopts prefix=%{_prefix} bindir=%{_bindir} libdir=%{_libdir} libexecdir=%{_libexecdir} datarootdir=%{_datarootdir} includedir=%{_includedir} sysconfdir=%{_sysconfdir} build_prefix=%{julia_builddir}%{_prefix} 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}
  151. %global commonopts MARCH=%{march} %{blas} %{installopts}
  152. %build
  153. %{__make} %{?_smp_mflags} %{commonopts}
  154. # to avoid making documents
  155. %{__mkdir_p} doc/_build/html/en
  156. touch doc/_build/html/en/index.html
  157. %install
  158. %{__make} %{commonopts} install DESTDIR=${RPM_BUILD_ROOT}
  159. # remove html files
  160. pushd ${RPM_BUILD_ROOT}%{_docdir}
  161. %{__mv} julia %{name}-%{version}
  162. %{__rm} -rf %{name}-%{version}/html
  163. popd
  164. %{__cp} \
  165. CONTRIBUTING.md DISTRIBUTING.md HISTORY.md \
  166. LICENSE.md NEWS.md README.md \
  167. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
  168. %check
  169. %{__make} %{?_smp_mflags} %{commonopts} test
  170. %clean
  171. %{__rm} -rf ${RPM_BUILD_ROOT}
  172. %post
  173. %{_syssbindir}/ldconfig
  174. if [ -x %{_bindir}/update-desktop-database ] ; then
  175. %{_bindir}/update-desktop-database %{_datadir}/applications
  176. fi
  177. %postun
  178. %{_syssbindir}/ldconfig
  179. if [ $1 -eq 0 ] ; then
  180. if [ -x %{_bindir}/update-desktop-database ] ; then
  181. %{_bindir}/update-desktop-database %{_datadir}/applications
  182. fi
  183. fi
  184. %files
  185. %defattr(-, root, root)
  186. %{_bindir}/julia
  187. %{_sysconfdir}/%{name}
  188. %{_includedir}/%{name}
  189. %{_libdir}/%{name}/
  190. %{_libdir}/libjulia.so*
  191. %{_datadir}/appdata/
  192. %{_datadir}/applications/
  193. %{_datadir}/icons/
  194. %{_datadir}/julia/
  195. %{_docdir}/%{name}-%{version}
  196. %{_mandir}/man1/
  197. %changelog
  198. * Sun Nov 03 2019 Toshiaki Ara <ara_t@384.jp> 1.1.0-3
  199. - Rebuild for suitesparse 5.4.0
  200. * Wed Mar 27 2019 Toshiaki Ara <ara_t@384.jp> 1.1.0-2
  201. - build llvm shared library
  202. - add Patch31 for x86_64
  203. - add Patch32 for i686
  204. - add SOURCE18 (cacert-*.pem)
  205. - add SOURCE31 (Pkg library)
  206. - drop Patch21
  207. * Mon Jan 28 2019 Toshiaki Ara <ara_t@384.jp> 1.1.0-1
  208. - update to 1.1.0
  209. - change using system openblas
  210. * Sat Jan 26 2019 Toshiaki Ara <ara_t@384.jp> 1.0.3-2
  211. - remove unnecessary sofiles
  212. - rebuild with gfortran-8.2.0
  213. * Sat Jan 05 2019 Toshiaki Ara <ara_t@384.jp> 1.0.3-1
  214. - update to 1.0.3
  215. * Fri Nov 16 2018 Toshiaki Ara <ara_t@384.jp> 1.0.2-1
  216. - update to 1.0.2
  217. * Thu Oct 04 2018 Toshiaki Ara <ara_t@384.jp> 1.0.1-1
  218. - update to 1.0.1
  219. * Wed Aug 22 2018 Toshiaki Ara <ara_t@384.jp> 1.0.0-2
  220. - rebuild with suitesparse-4.4.6
  221. * Fri Aug 17 2018 Toshiaki Ara <ara_t@384.jp> 1.0.0-1
  222. - update to 1.0.0
  223. - add/update sources
  224. - drop some Patches
  225. - add BuildRequires: and Requires: libatomic
  226. * Sat Jul 14 2018 Toshiaki Ara <ara_t@384.jp> 0.6.4-1
  227. - new upstream release
  228. - update SOURCE17 (openblas)
  229. * Sun Jun 17 2018 Toshiaki Ara <ara_t@384.jp> 0.6.3-1
  230. - new package