2023-12-11 15:36:07 +01:00
|
|
|
#
|
2014-08-06 09:24:22 +02:00
|
|
|
# spec file for package julia
|
|
|
|
#
|
2023-12-11 15:36:07 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2014-08-06 09:24:22 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-08-06 09:24:22 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
# We must not strip binaries in julia, since it can lead to many problems.
|
|
|
|
# For example, see:
|
|
|
|
#
|
|
|
|
# https://github.com/JuliaLang/julia/issues/17941
|
|
|
|
%undefine _build_create_debug
|
|
|
|
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
|
|
|
|
|
2023-12-09 09:57:13 +01:00
|
|
|
%global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$
|
|
|
|
|
|
|
|
# List all bundled libraries.
|
|
|
|
%global _privatelibs lib(LLVM-.*|ccalltest|dSFMT|git2|llvmcalltest|openlibm|suitesparse_wrapper|mbedcrypto|mbedtls|mbedx509|uv)\\.so.*
|
|
|
|
%global __provides_exclude ^(%{_privatelibs})$
|
|
|
|
%global __requires_exclude ^(%{_privatelibs})$
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
%define libjulia_sover_major 1
|
2023-12-09 09:02:57 +01:00
|
|
|
%define libjulia_sover_minor 9
|
2023-12-17 16:37:23 +01:00
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
%if "@BUILD_FLAVOR@%{nil}" == "compat"
|
|
|
|
%define compat_mode 1
|
|
|
|
%else
|
|
|
|
%define compat_mode 0
|
|
|
|
%endif
|
2023-12-09 09:02:57 +01:00
|
|
|
|
2023-12-17 16:37:23 +01:00
|
|
|
%if 0%{?compat_mode}
|
2023-12-18 03:14:29 +01:00
|
|
|
%define libname libjulia-compat%{libjulia_sover_major}
|
2023-12-17 16:37:23 +01:00
|
|
|
%else
|
2023-12-18 03:14:29 +01:00
|
|
|
%define libname libjulia%{libjulia_sover_major}
|
2023-12-17 16:37:23 +01:00
|
|
|
%endif
|
|
|
|
|
2023-12-09 09:02:57 +01:00
|
|
|
# LTO currently makes building blastrampoline and Julia itself fail
|
|
|
|
# It is not enabled upstream anyway
|
|
|
|
%global _lto_cflags %nil
|
|
|
|
Version: 1.9.4
|
2014-08-06 09:24:22 +02:00
|
|
|
Release: 0
|
2022-07-05 14:30:51 +02:00
|
|
|
URL: http://julialang.org/
|
|
|
|
Source0: https://github.com/JuliaLang/julia/releases/download/v%{version}/julia-%{version}-full.tar.gz
|
|
|
|
Source1: julia-rpmlintrc
|
|
|
|
# PATCH-FIX-OPENSUSE julia-env-script-interpreter.patch ronisbr@gmail.com -- Change script interpreted to avoid errors in rpmlint.
|
2023-12-09 09:02:57 +01:00
|
|
|
Patch1: julia-env-script-interpreter.patch
|
2023-12-09 09:46:17 +01:00
|
|
|
Patch2: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/e08e1444.patch?ref_type=heads#/new-pass-manager.patch
|
|
|
|
Patch3: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/959902f1.patch?ref_type=heads#/support-float16-depending-on-llvm-and-platform.patch
|
|
|
|
Patch4: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/f11bfc6c.patch?ref_type=heads#/use-newpm-asan.patch
|
|
|
|
Patch5: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/21d4c2f1.patch?ref_type=heads#/llvm-set-of-custom-patches.patch
|
2023-12-09 09:02:57 +01:00
|
|
|
Patch6: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/julia-libunwind-1.6.patch?ref_type=heads#/julia-libunwind-1.9.patch
|
|
|
|
Patch8: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/julia-libgit2-1.7.patch?ref_type=heads#/julia-libgit2-1.7.patch
|
|
|
|
Patch9: https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/julia-suitesparse-7.patch?ref_type=heads#/julia-suitesparse-7.patch
|
|
|
|
Patch10: use-system-libuv-correctly.patch
|
|
|
|
Patch11: openlibm.patch
|
|
|
|
Patch12: llvm-link-shared.patch
|
2023-12-10 16:00:31 +01:00
|
|
|
# Adapted from https://gitlab.archlinux.org/archlinux/packaging/packages/julia/-/raw/main/julia-hardcoded-libs.patch?ref_type=heads
|
|
|
|
# We just remove the julia specific llvm sofile change
|
|
|
|
Patch13: julia-hardcoded-libs.patch
|
2023-12-09 09:02:57 +01:00
|
|
|
Patch14: mbedtls-hardcoded-libs.patch
|
2023-12-11 15:36:07 +01:00
|
|
|
Patch15: libblastrampoline-hardcoded-libs.patch
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: arpack-ng-devel >= 3.3.0
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: blas-devel
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: ca-certificates
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: cmake
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: dSFMT-devel
|
2023-12-18 03:15:53 +01:00
|
|
|
BuildRequires: dos2unix
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: double-conversion-devel
|
|
|
|
BuildRequires: fdupes
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: fftw3-threads-devel >= 3.3.4
|
2023-12-09 09:02:57 +01:00
|
|
|
BuildRequires: gcc
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: gcc-c++
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: gcc-fortran
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: git
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: gmp-devel >= 6.1.2
|
|
|
|
BuildRequires: hicolor-icon-theme
|
|
|
|
BuildRequires: lapack-devel >= 3.5.0
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: libblastrampoline-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: libcurl-devel
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: libgit2-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: libnghttp2-devel
|
|
|
|
BuildRequires: libopenblas_openmp-devel >= 0.3.5
|
|
|
|
BuildRequires: libssh2-devel >= 1.9.0
|
|
|
|
BuildRequires: libunwind-devel >= 1.3.1
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: libuv-devel
|
|
|
|
BuildRequires: libwhich
|
|
|
|
BuildRequires: lld14
|
|
|
|
BuildRequires: llvm14-devel
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: m4
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: mbedtls-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: mpfr-devel >= 4.0.2
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: openblas-common-devel
|
|
|
|
BuildRequires: openlibm-devel
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: openspecfun-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: openssl
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: p7zip >= 16
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: patchelf >= 0.9
|
|
|
|
BuildRequires: pcre2-devel >= 10.31
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: perl
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: python >= 2.5
|
2014-08-06 09:24:22 +02:00
|
|
|
BuildRequires: readline-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
BuildRequires: suitesparse-devel >= 5.4.0
|
|
|
|
BuildRequires: update-desktop-files
|
2023-12-11 15:36:07 +01:00
|
|
|
BuildRequires: utf8proc-devel
|
|
|
|
BuildRequires: zlib-devel
|
2023-12-09 09:02:57 +01:00
|
|
|
Requires: ca-certificates
|
2023-12-11 15:36:07 +01:00
|
|
|
Requires: p7zip >= 16
|
|
|
|
Requires: readline
|
2023-12-10 16:00:31 +01:00
|
|
|
Requires(post): %{_sbindir}/update-alternatives
|
2023-12-13 01:37:09 +01:00
|
|
|
Requires(post): %{_sbindir}/ldconfig
|
2023-12-11 15:36:07 +01:00
|
|
|
Requires(postun):%{_sbindir}/update-alternatives
|
2023-12-13 01:37:09 +01:00
|
|
|
Requires(postun):%{_sbindir}/ldconfig
|
2022-07-05 14:30:51 +02:00
|
|
|
Recommends: arpack-ng-devel
|
2014-08-06 09:24:22 +02:00
|
|
|
Recommends: git
|
|
|
|
Recommends: gmp-devel
|
|
|
|
Recommends: mpfr-devel
|
|
|
|
Recommends: openspecfun-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
Recommends: pcre2-devel
|
2014-08-06 09:24:22 +02:00
|
|
|
Recommends: suitesparse-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
%if 0%{?compat_mode} == 0
|
|
|
|
Name: julia
|
|
|
|
%else
|
|
|
|
Name: julia-compat
|
|
|
|
%endif
|
|
|
|
%if 0%{?compat_mode} == 0
|
|
|
|
Summary: High-level, high-performance dynamic programming language
|
|
|
|
License: BSD-3-Clause AND GPL-2.0-or-later AND MIT AND Zlib
|
|
|
|
Group: Development/Languages/Other
|
|
|
|
%else
|
|
|
|
Summary: High-level, high-performance dynamic programming language (without CPU optim.)
|
|
|
|
License: BSD-3-Clause AND GPL-2.0-or-later AND MIT AND Zlib
|
|
|
|
Group: Development/Languages/Other
|
|
|
|
%endif
|
|
|
|
%if 0%{?compat_mode}
|
|
|
|
Conflicts: julia
|
|
|
|
Provides: julia = %{version}
|
|
|
|
%endif
|
|
|
|
# Since the 32-bit julia package is already being built using MARCH=pentium4,
|
|
|
|
# which is the most generic flag supported, then the julia-compat mode only
|
|
|
|
# makes sense for 64-bit architectures.
|
|
|
|
%if 0%{?compat_mode}
|
|
|
|
ExclusiveArch: x86_64
|
|
|
|
%else
|
|
|
|
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le
|
|
|
|
%endif
|
2014-08-06 09:24:22 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Julia is a high-level, high-performance dynamic programming language for
|
|
|
|
technical computing, with syntax that is familiar to users of other technical
|
|
|
|
computing environments. It provides a sophisticated compiler, distributed
|
|
|
|
parallel execution, numerical accuracy, and an extensive mathematical function
|
|
|
|
library. The library, largely written in Julia itself, also integrates mature,
|
|
|
|
best-of-breed C and Fortran libraries for linear algebra, random number
|
|
|
|
generation, signal processing, and string processing.
|
|
|
|
|
2023-12-09 09:02:57 +01:00
|
|
|
This package is experimental and by no means supported by upstream. If you want
|
2023-12-10 16:00:31 +01:00
|
|
|
to use julia, please install juliaup instead.
|
2023-12-09 09:02:57 +01:00
|
|
|
|
2014-08-06 09:24:22 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Julia development, debugging and testing files
|
|
|
|
Group: Development/Languages/Other
|
2023-12-17 11:50:38 +01:00
|
|
|
Requires: %{libname} = %{version}
|
2022-07-05 14:30:51 +02:00
|
|
|
%if 0%{?compat_mode}
|
|
|
|
Conflicts: julia-devel
|
2023-12-17 11:50:38 +01:00
|
|
|
Provides: julia-devel
|
2022-07-05 14:30:51 +02:00
|
|
|
%endif
|
2014-08-06 09:24:22 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
Contains library symbolic links and header files for developing applications
|
|
|
|
linking to the Julia library, in particular embedding it, as well as tests and a
|
|
|
|
debugging version of Julia. This package is normally not needed when programming
|
|
|
|
in the Julia language, but rather for embedding Julia into external programs or
|
|
|
|
debugging Julia itself.
|
|
|
|
|
2023-12-17 11:50:38 +01:00
|
|
|
%package -n %{libname}
|
|
|
|
Summary: Julia shared object libraries
|
|
|
|
Group: System/Libraries
|
2023-12-17 16:37:23 +01:00
|
|
|
%if 0%{?compat_mode}
|
2023-12-18 03:14:29 +01:00
|
|
|
Conflicts: libjulia%{libjulia_sover_major}
|
|
|
|
Provides: libjulia%{libjulia_sover_major}
|
2023-12-17 16:37:23 +01:00
|
|
|
%endif
|
2023-12-17 11:50:38 +01:00
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
Contains library files for interacting with Julia through C interfaces.
|
|
|
|
|
2014-08-06 09:24:22 +02:00
|
|
|
%prep
|
2014-08-21 07:42:58 +02:00
|
|
|
%setup -q -n julia-%{version}
|
2023-12-09 09:02:57 +01:00
|
|
|
patch -p1 -i %{PATCH1}
|
2023-12-10 16:00:31 +01:00
|
|
|
# patch -p1 -i %%{PATCH2}
|
|
|
|
# patch -p1 -i %%{PATCH3}
|
|
|
|
# patch -p1 -i %%{PATCH4}
|
|
|
|
# patch -p1 -i %%{PATCH5}
|
2023-12-09 09:02:57 +01:00
|
|
|
# libunwind 1.6 compatibility
|
|
|
|
patch -p1 -i %{PATCH6}
|
|
|
|
# Fix tests with libgit2 1.7
|
|
|
|
patch -p1 -i %{PATCH8}
|
|
|
|
# Make.inc puts it in the wrong libpath
|
2023-12-10 16:00:31 +01:00
|
|
|
# patch -p1 -i %%{PATCH10}
|
2023-12-09 09:02:57 +01:00
|
|
|
patch -p1 -i %{PATCH11}
|
|
|
|
patch -p1 -i %{PATCH12}
|
|
|
|
patch -p1 -i %{PATCH13}
|
|
|
|
patch -p1 -i %{PATCH14}
|
|
|
|
patch -p1 -i %{PATCH15}
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
%ifarch aarch64 %{arm}
|
|
|
|
# https://github.com/JuliaLang/julia/issues/41613#issuecomment-976535193
|
|
|
|
sed -i 's#$(eval $(call symlink_system_library,CSL,libquadmath,0))##' base/Makefile
|
|
|
|
%endif
|
2014-08-06 09:24:22 +02:00
|
|
|
|
2023-12-09 09:02:57 +01:00
|
|
|
pushd stdlib/srccache
|
|
|
|
tar -xzf SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz
|
|
|
|
patch -d JuliaSparse-SparseArrays.jl-37e6e58 -p1 -i %{PATCH9}
|
|
|
|
rm SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz
|
|
|
|
tar -czf SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz JuliaSparse-SparseArrays.jl-37e6e58
|
|
|
|
md5sum SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz | cut -d ' ' -f 1 > ../../deps/checksums/SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz/md5
|
|
|
|
sha512sum SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz | cut -d ' ' -f 1 > ../../deps/checksums/SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz/sha512
|
|
|
|
|
|
|
|
popd
|
2023-12-11 15:36:07 +01:00
|
|
|
|
2023-12-09 09:02:57 +01:00
|
|
|
# Work around bug that prompts zlib to be downloaded even when not used
|
|
|
|
# https://github.com/JuliaLang/julia/pull/42524/files#r734972945
|
|
|
|
sed "s/ \$(build_prefix)\\/manifest\\/zlib//" -i deps/llvm.mk
|
2014-08-06 09:24:22 +02:00
|
|
|
|
|
|
|
%build
|
2022-07-05 14:30:51 +02:00
|
|
|
|
|
|
|
%if 0%{?compat_mode} == 0
|
|
|
|
%ifarch x86_64
|
|
|
|
%define julia_march core2
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
%define julia_march pentium4
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch aarch64
|
|
|
|
%define julia_march armv8-a
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch armv7l armv7hl
|
|
|
|
%define julia_march armv7-a
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch armv6l armv6hl
|
|
|
|
%define julia_march armv6
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
%define julia_march ppc64le
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
# compat_mode is only defined for 64-bit architecture.
|
|
|
|
|
|
|
|
%define julia_march x86-64
|
|
|
|
%endif
|
|
|
|
|
2023-12-18 03:14:29 +01:00
|
|
|
%ifarch armv6l armv6hl
|
2022-07-05 14:30:51 +02:00
|
|
|
export LDFLAGS="$LDFLAGS -latomic"
|
|
|
|
%endif
|
|
|
|
|
2023-12-17 11:50:38 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
export CXXFLAGS="%{optflags}"
|
2023-12-12 08:56:41 +01:00
|
|
|
export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir}:%{_builddir}/%{buildsubdir}/usr/lib
|
2022-07-05 14:30:51 +02:00
|
|
|
|
2023-12-11 13:14:27 +01:00
|
|
|
pushd deps
|
2023-12-12 15:30:07 +01:00
|
|
|
export BUILDDIR="%{_builddir}/%{buildsubdir}/build"
|
2023-12-11 13:14:27 +01:00
|
|
|
export USE_BLAS64=1
|
|
|
|
export USE_BINARYBUILDER_OPENBLAS=0
|
|
|
|
export OPENBLAS_LIBNAMESUFFIX="%{?__isa_bits}_"
|
|
|
|
export OPENBLAS_SYMBOLSUFFIX="%{?__isa_bits}_"
|
|
|
|
export OPENBLAS_CFLAGS="%{optflags}"
|
2023-12-12 15:30:07 +01:00
|
|
|
make prefix=%{prefix} libdir=%{_libdir} bindir=%{_bindir} install-openblas
|
2023-12-11 13:14:27 +01:00
|
|
|
popd
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
make %{?_smp_mflags} \
|
|
|
|
MARCH=%{julia_march} \
|
|
|
|
%ifarch aarch64
|
2023-12-09 09:02:57 +01:00
|
|
|
JULIA_CPU_TARGET="generic;cortex-a57;thunderx2t99;armv8.2-a,crypto,fullfp16,lse,rdm" \
|
|
|
|
%endif
|
|
|
|
%ifarch x86_64
|
|
|
|
JULIA_CPU_TARGET="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)" \
|
2022-07-05 14:30:51 +02:00
|
|
|
%endif
|
2023-12-09 09:02:57 +01:00
|
|
|
build_prefix=%{_builddir}/%{buildsubdir}/build%{_prefix} \
|
|
|
|
build_libdir=%{_builddir}/%{buildsubdir}/build%{_libdir} \
|
2022-07-05 14:30:51 +02:00
|
|
|
prefix=%{_prefix} \
|
|
|
|
bindir=%{_bindir} \
|
|
|
|
libdir=%{_libdir} \
|
|
|
|
libexecdir=%{_libexecdir} \
|
|
|
|
datarootdir=%{_datarootdir} \
|
|
|
|
includedir=%{_includedir} \
|
|
|
|
sysconfdir=%{_sysconfdir} \
|
2023-12-09 09:02:57 +01:00
|
|
|
USE_BINARYBUILDER=0 \
|
|
|
|
USE_SYSTEM_CSL=1 \
|
2023-12-10 16:00:31 +01:00
|
|
|
USE_SYSTEM_LLVM=0 \
|
2023-12-09 09:02:57 +01:00
|
|
|
USE_SYSTEM_LLD=1 \
|
|
|
|
USE_SYSTEM_LIBUNWIND=1 \
|
|
|
|
USE_SYSTEM_PCRE=1 \
|
2023-12-12 15:30:07 +01:00
|
|
|
USE_SYSTEM_BLAS=0 \
|
2023-12-11 07:39:56 +01:00
|
|
|
USE_SYSTEM_LAPACK=0 \
|
2023-12-09 09:02:57 +01:00
|
|
|
USE_SYSTEM_LIBBLASTRAMPOLINE=1 \
|
|
|
|
USE_SYSTEM_GMP=1 \
|
|
|
|
USE_SYSTEM_MPFR=1 \
|
|
|
|
USE_SYSTEM_LIBSUITESPARSE=1 \
|
|
|
|
USE_SYSTEM_SUITESPARSE=1 \
|
|
|
|
USE_INTEL_JITEVENTS=0 \
|
|
|
|
USE_SYSTEM_LIBWHICH=1 \
|
|
|
|
USE_SYSTEM_DSFMT=1 \
|
|
|
|
USE_SYSTEM_LIBUV=0 \
|
|
|
|
USE_SYSTEM_UTF8PROC=1 \
|
|
|
|
USE_SYSTEM_LIBGIT2=1 \
|
|
|
|
USE_SYSTEM_LIBSSH2=1 \
|
|
|
|
USE_SYSTEM_MBEDTLS=1 \
|
|
|
|
USE_SYSTEM_CURL=1 \
|
|
|
|
USE_SYSTEM_PATCHELF=1 \
|
|
|
|
USE_SYSTEM_ZLIB=1 \
|
|
|
|
USE_SYSTEM_P7ZIP=1 \
|
|
|
|
USE_SYSTEM_OPENLIBM=1 \
|
2023-12-11 09:16:35 +01:00
|
|
|
USE_BLAS64=1 \
|
2023-12-09 09:02:57 +01:00
|
|
|
JLDFLAGS="$LDFLAGS" \
|
|
|
|
VERBOSE=1 \
|
|
|
|
TAGGED_RELEASE_BANNER="openSUSE %{suse_version} experimental build (unofficial)" \
|
2022-07-05 14:30:51 +02:00
|
|
|
release debug
|
2023-12-11 13:14:27 +01:00
|
|
|
|
2023-12-11 02:18:42 +01:00
|
|
|
# This may fix other issues where libLLVM-14jl.so is not properly copied?
|
|
|
|
if [ "x%{_lib}" != xlib ] ; then
|
|
|
|
cp -a %{_builddir}/%{buildsubdir}/build/usr/lib/* %{_builddir}/%{buildsubdir}/build/%{_libdir}
|
|
|
|
rm -rf %{_builddir}/%{buildsubdir}/build/usr/lib/
|
|
|
|
fi
|
2022-07-05 14:30:51 +02:00
|
|
|
|
|
|
|
%check
|
|
|
|
# The tests will only pass if openblas is being used.
|
|
|
|
# make %{?_smp_mflags} test
|
2014-08-06 09:24:22 +02:00
|
|
|
|
|
|
|
%install
|
2023-12-18 03:14:29 +01:00
|
|
|
|
|
|
|
%ifarch armv6l armv6hl
|
|
|
|
export LDFLAGS="$LDFLAGS -latomic"
|
|
|
|
%endif
|
|
|
|
|
2023-12-17 11:50:38 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
export CXXFLAGS="%{optflags}"
|
2023-12-12 08:56:41 +01:00
|
|
|
export LD_LIBRARY_PATH=%{_builddir}/%{buildsubdir}/build/usr/lib:%{_builddir}/%{buildsubdir}/build%{_libdir}:%{_builddir}/%{buildsubdir}/usr/lib
|
2023-12-09 09:02:57 +01:00
|
|
|
|
2014-08-06 09:24:22 +02:00
|
|
|
make install DESTDIR=%{buildroot} \
|
2022-07-05 14:30:51 +02:00
|
|
|
MARCH=%{julia_march} \
|
|
|
|
%ifarch aarch64
|
2023-12-09 09:02:57 +01:00
|
|
|
JULIA_CPU_TARGET="generic;cortex-a57;thunderx2t99;armv8.2-a,crypto,fullfp16,lse,rdm" \
|
|
|
|
%endif
|
|
|
|
%ifarch x86_64
|
|
|
|
JULIA_CPU_TARGET="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)" \
|
2022-07-05 14:30:51 +02:00
|
|
|
%endif
|
2023-12-09 09:02:57 +01:00
|
|
|
build_prefix=%{_builddir}/%{buildsubdir}/build%{_prefix} \
|
|
|
|
build_libdir=%{_builddir}/%{buildsubdir}/build%{_libdir} \
|
2014-08-06 09:24:22 +02:00
|
|
|
prefix=%{_prefix} \
|
2022-07-05 14:30:51 +02:00
|
|
|
bindir=%{_bindir} \
|
2014-08-06 09:24:22 +02:00
|
|
|
libdir=%{_libdir} \
|
2022-07-05 14:30:51 +02:00
|
|
|
libexecdir=%{_libexecdir} \
|
|
|
|
datarootdir=%{_datarootdir} \
|
|
|
|
includedir=%{_includedir} \
|
2014-08-06 09:24:22 +02:00
|
|
|
sysconfdir=%{_sysconfdir} \
|
2023-12-09 09:02:57 +01:00
|
|
|
USE_BINARYBUILDER=0 \
|
|
|
|
USE_SYSTEM_CSL=1 \
|
2023-12-10 16:00:31 +01:00
|
|
|
USE_SYSTEM_LLVM=0 \
|
2023-12-09 09:02:57 +01:00
|
|
|
USE_SYSTEM_LLD=1 \
|
|
|
|
USE_SYSTEM_LIBUNWIND=1 \
|
|
|
|
USE_SYSTEM_PCRE=1 \
|
2023-12-12 15:30:07 +01:00
|
|
|
USE_SYSTEM_BLAS=0 \
|
2023-12-11 07:39:56 +01:00
|
|
|
USE_SYSTEM_LAPACK=0 \
|
2023-12-09 09:02:57 +01:00
|
|
|
USE_SYSTEM_LIBBLASTRAMPOLINE=1 \
|
|
|
|
USE_SYSTEM_GMP=1 \
|
|
|
|
USE_SYSTEM_MPFR=1 \
|
|
|
|
USE_SYSTEM_LIBSUITESPARSE=1 \
|
|
|
|
USE_SYSTEM_SUITESPARSE=1 \
|
|
|
|
USE_INTEL_JITEVENTS=0 \
|
|
|
|
USE_SYSTEM_LIBWHICH=1 \
|
|
|
|
USE_SYSTEM_DSFMT=1 \
|
|
|
|
USE_SYSTEM_LIBUV=0 \
|
|
|
|
USE_SYSTEM_UTF8PROC=1 \
|
|
|
|
USE_SYSTEM_LIBGIT2=1 \
|
|
|
|
USE_SYSTEM_LIBSSH2=1 \
|
|
|
|
USE_SYSTEM_MBEDTLS=1 \
|
|
|
|
USE_SYSTEM_CURL=1 \
|
|
|
|
USE_SYSTEM_PATCHELF=1 \
|
|
|
|
USE_SYSTEM_ZLIB=1 \
|
|
|
|
USE_SYSTEM_P7ZIP=1 \
|
|
|
|
USE_SYSTEM_OPENLIBM=1 \
|
2023-12-11 07:39:56 +01:00
|
|
|
USE_BLAS64=1 \
|
2023-12-09 09:02:57 +01:00
|
|
|
JLDFLAGS="$LDFLAGS" \
|
|
|
|
VERBOSE=1 \
|
2023-12-11 15:36:07 +01:00
|
|
|
TAGGED_RELEASE_BANNER="openSUSE %{suse_version} experimental build (unofficial)"
|
2014-08-06 09:24:22 +02:00
|
|
|
|
|
|
|
# GZip man page.
|
|
|
|
gzip %{buildroot}/%{_mandir}/man1/julia.1
|
|
|
|
|
|
|
|
# Copy the man page for every executable.
|
|
|
|
cd %{buildroot}/%{_mandir}/man1/
|
|
|
|
|
2014-08-25 16:21:44 +02:00
|
|
|
rm -f %{buildroot}%{_libdir}/julia/libuv.a
|
|
|
|
rm -f %{buildroot}%{_datadir}/julia/base/build.h
|
|
|
|
rm -f %{buildroot}%{_datadir}/julia/base/Makefile
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
# Fix documentation directories.
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/julia
|
|
|
|
mv -f %{buildroot}%{_datadir}/doc/julia/* %{buildroot}%{_docdir}/julia/
|
|
|
|
rm -r %{buildroot}%{_datadir}/doc/julia
|
|
|
|
|
2023-12-09 09:02:57 +01:00
|
|
|
ln -sfv /var/lib/ca-certificates/ca-bundle.pem %{buildroot}%{_datadir}/julia/cert.pem # Needed by some julia packages
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
# Remove execution permission on documentation files.
|
|
|
|
chmod -x+X -R %{buildroot}%{_docdir}/julia/*
|
|
|
|
|
2023-12-09 09:02:57 +01:00
|
|
|
# Remove hidden files and zero-length files and directories from stdlib.
|
|
|
|
pushd %{buildroot}
|
|
|
|
find . -name ".codecov.yml" -prune -execdir rm -rf {} \;
|
|
|
|
find . -name ".git*" -prune -execdir rm -rf {} \;
|
|
|
|
find . -name ".ci" -prune -execdir rm -rf {} \;
|
|
|
|
find . -name ".devcontainer" -prune -execdir rm -rf {} \;
|
|
|
|
find . -name ".travis.yml" -prune -execdir rm -rf {} \;
|
|
|
|
find . -empty -type d -prune -execdir rm -rf {} \;
|
|
|
|
find . -empty -type f -prune -execdir rm -rf {} \;
|
2023-12-11 15:36:07 +01:00
|
|
|
find . -name "*.orig" -prune -execdir rm -rf {} \;
|
2022-07-05 14:30:51 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
%if 0%{?compat_mode}
|
|
|
|
rm -rf %{buildroot}%{_docdir}/julia/
|
|
|
|
|
|
|
|
# The 'application' object must be only provided by one package
|
|
|
|
# Alternatively, we could rename the .appdata and .desktop file to have
|
|
|
|
# both applications show up in a valid way, but that would require the
|
|
|
|
# -compat appdata to be modified to make the difference clear
|
|
|
|
rm %{buildroot}%{_datadir}/appdata/julia.appdata.xml
|
|
|
|
%endif
|
|
|
|
|
2023-12-18 04:56:59 +01:00
|
|
|
%suse_update_desktop_file -r julia Science Math
|
2014-08-06 09:24:22 +02:00
|
|
|
|
2023-12-10 16:00:31 +01:00
|
|
|
mv %{buildroot}%{_bindir}/julia %{buildroot}%{_bindir}/julia-base
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
2023-12-12 08:56:41 +01:00
|
|
|
|
|
|
|
if [ "x%{_lib}" != xlib ] ; then
|
2023-12-12 12:03:51 +01:00
|
|
|
mkdir -p %{buildroot}%{_prefix}/lib
|
2023-12-17 11:50:38 +01:00
|
|
|
ln -sf %{_libdir}/julia %{buildroot}%{_prefix}/lib/julia
|
2023-12-12 08:56:41 +01:00
|
|
|
fi
|
|
|
|
|
2023-12-10 16:00:31 +01:00
|
|
|
ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}%{_bindir}/julia
|
|
|
|
|
2023-12-18 03:14:29 +01:00
|
|
|
# Convert all eol encodings to Unix
|
|
|
|
find %{buildroot} -type f -execdir dos2unix -k {} \;
|
|
|
|
|
|
|
|
# make it executable
|
|
|
|
chmod +x %{buildroot}%{_datadir}/julia/stdlib/v1.9/SparseArrays/gen/generator.jl
|
|
|
|
|
2023-12-18 07:24:09 +01:00
|
|
|
# Remove duplicated files.
|
2023-12-18 11:11:00 +01:00
|
|
|
%fdupes %{buildroot}%{_datadir}/julia
|
2023-12-18 07:24:09 +01:00
|
|
|
|
2023-12-10 16:00:31 +01:00
|
|
|
%post
|
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/julia \
|
|
|
|
julia %{_bindir}/julia-base 5
|
|
|
|
%{_sbindir}/ldconfig
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ ! -f %{_bindir}/julia-base ] ; then
|
|
|
|
%{_sbindir}/update-alternatives --remove julia %{_bindir}/julia-base
|
|
|
|
fi
|
|
|
|
%{_sbindir}/ldconfig
|
|
|
|
|
2023-12-17 11:55:43 +01:00
|
|
|
%post devel -p %{_sbindir}/ldconfig
|
|
|
|
%postun devel -p %{_sbindir}/ldconfig
|
|
|
|
%post -n %{libname} -p %{_sbindir}/ldconfig
|
|
|
|
%postun -n %{libname} -p %{_sbindir}/ldconfig
|
2014-08-06 09:24:22 +02:00
|
|
|
|
|
|
|
%files
|
2022-07-05 14:30:51 +02:00
|
|
|
%doc CONTRIBUTING.md NEWS.md README.md
|
|
|
|
%license LICENSE.md
|
2023-12-10 16:00:31 +01:00
|
|
|
%ghost %{_bindir}/julia
|
2023-12-12 20:34:51 +01:00
|
|
|
%ghost %{_sysconfdir}/alternatives/julia
|
2023-12-10 16:00:31 +01:00
|
|
|
%{_bindir}/julia-base
|
2014-08-06 09:24:22 +02:00
|
|
|
%dir %{_datadir}/julia
|
|
|
|
%{_datadir}/julia/base
|
2022-07-05 14:30:51 +02:00
|
|
|
%{_datadir}/julia/base.cache
|
|
|
|
%{_datadir}/julia/stdlib
|
2023-12-09 09:02:57 +01:00
|
|
|
%{_datadir}/julia/compiled*
|
2022-07-05 14:30:51 +02:00
|
|
|
%{_datadir}/julia/cert.pem
|
2023-12-09 09:02:57 +01:00
|
|
|
%dir %{_libexecdir}/julia
|
|
|
|
%{_libexecdir}/julia/*
|
|
|
|
|
2022-07-05 14:30:51 +02:00
|
|
|
%if !%{?compat_mode}
|
|
|
|
%dir %{_datadir}/appdata/
|
|
|
|
%{_datadir}/appdata/julia.appdata.xml
|
2023-12-09 09:02:57 +01:00
|
|
|
%dir %{_docdir}/julia
|
|
|
|
%{_docdir}/julia/*
|
2022-07-05 14:30:51 +02:00
|
|
|
%endif
|
|
|
|
%{_datadir}/applications/julia.desktop
|
2023-12-12 15:21:45 +01:00
|
|
|
%{_prefix}/lib/julia
|
2022-07-05 14:30:51 +02:00
|
|
|
%{_libdir}/julia/
|
|
|
|
%{_mandir}/man1/julia.1%{?ext_man}
|
2014-08-06 09:24:22 +02:00
|
|
|
%dir %{_sysconfdir}/julia/
|
2022-07-05 14:30:51 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/julia/startup.jl
|
2014-08-06 09:24:22 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_datadir}/julia/test/
|
2022-07-05 14:30:51 +02:00
|
|
|
%{_datadir}/julia/julia-config.jl
|
2014-08-06 09:24:22 +02:00
|
|
|
%{_includedir}/julia/
|
|
|
|
%{_libdir}/libjulia.so
|
|
|
|
|
2023-12-17 11:50:38 +01:00
|
|
|
%files -n %{libname}
|
|
|
|
%{_libdir}/libjulia.so.*
|
|
|
|
|
2014-08-06 09:24:22 +02:00
|
|
|
%changelog
|