From cb575ac4d08a123d4969b0b8808374ea15b75390 Mon Sep 17 00:00:00 2001 From: Adam Beckmeyer Date: Sun, 5 Dec 2021 22:05:17 -0500 Subject: [PATCH] WIP: julia: update to 1.7.1. This needs to be separated out into two commits: one for the new libblastrampoline package. --- common/shlibs | 1 + .../julia/patches/julia-hardcoded-libs.patch | 13 -------- .../patches/julia-libblastrampoline-4.patch | 15 ++++++++++ srcpkgs/julia/template | 20 +++++++------ srcpkgs/libblastrampoline-devel | 1 + srcpkgs/libblastrampoline/template | 30 +++++++++++++++++++ 6 files changed, 58 insertions(+), 22 deletions(-) create mode 100644 srcpkgs/julia/patches/julia-libblastrampoline-4.patch create mode 120000 srcpkgs/libblastrampoline-devel create mode 100644 srcpkgs/libblastrampoline/template diff --git a/common/shlibs b/common/shlibs index 76df17e8ba13..faa605fd0fcb 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4102,3 +4102,4 @@ libkaddressbookprivate.so.5 kaddressbook-21.08.3_1 libcodec2.so.1.0 codec2-1.0.1_1 libx86emu.so.3 libx86emu-3.4_1 libdeflate.so.0 libdeflate-1.8_1 +libblastrampoline.so.5 libblastrampoline-5.0.1_1 diff --git a/srcpkgs/julia/patches/julia-hardcoded-libs.patch b/srcpkgs/julia/patches/julia-hardcoded-libs.patch index bf657361b980..3fa7ea993c19 100644 --- a/srcpkgs/julia/patches/julia-hardcoded-libs.patch +++ b/srcpkgs/julia/patches/julia-hardcoded-libs.patch @@ -14,19 +14,6 @@ index a7ca666b23..b84a42f4e7 100644 + const libmbedx509 = "libmbedx509.so" end - function __init__() -diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl -index fa45e754e5..b51812e3a8 100644 ---- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl -+++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl -@@ -23,7 +23,7 @@ if Sys.iswindows() - elseif Sys.isapple() - const libLLVM = "@rpath/libLLVM.dylib" - else -- const libLLVM = "libLLVM-11jl.so" -+ const libLLVM = "libLLVM.so" - end - function __init__() diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl index 8b98c76ac5..77ad9e3800 100644 diff --git a/srcpkgs/julia/patches/julia-libblastrampoline-4.patch b/srcpkgs/julia/patches/julia-libblastrampoline-4.patch new file mode 100644 index 000000000000..d99ce314caee --- /dev/null +++ b/srcpkgs/julia/patches/julia-libblastrampoline-4.patch @@ -0,0 +1,15 @@ +diff --git a/stdlib/LinearAlgebra/src/lbt.jl b/stdlib/LinearAlgebra/src/lbt.jl +index 26b3a1210a3f..ea1ab25c9e1a 100644 +--- a/stdlib/LinearAlgebra/src/lbt.jl ++++ b/stdlib/LinearAlgebra/src/lbt.jl +@@ -156,8 +156,8 @@ function lbt_set_num_threads(nthreads) + return ccall((:lbt_set_num_threads, libblastrampoline), Cvoid, (Int32,), nthreads) + end + +-function lbt_forward(path; clear::Bool = false, verbose::Bool = false) +- ccall((:lbt_forward, libblastrampoline), Int32, (Cstring, Int32, Int32), path, clear ? 1 : 0, verbose ? 1 : 0) ++function lbt_forward(path; clear::Bool = false, verbose::Bool = false, suffix_hint::Union{String,Nothing} = nothing) ++ ccall((:lbt_forward, libblastrampoline), Int32, (Cstring, Int32, Int32, Cstring), path, clear ? 1 : 0, verbose ? 1 : 0, something(suffix_hint, C_NULL)) + end + + function lbt_set_default_func(addr) diff --git a/srcpkgs/julia/template b/srcpkgs/julia/template index 576b5beb9bf0..21706e832081 100644 --- a/srcpkgs/julia/template +++ b/srcpkgs/julia/template @@ -1,36 +1,38 @@ # Template file for 'julia' pkgname=julia -version=1.6.1 +version=1.7.1 revision=1 archs="i686* x86_64* armv7l* aarch64*" build_style=gnu-makefile -make_build_args="prefix=/usr sysconfdir=/etc datarootdir=/usr/share +make_build_args="VERBOSE=1 + prefix=/usr sysconfdir=/etc datarootdir=/usr/share USE_BINARYBUILDER=0 USE_SYSTEM_LIBM=0 USE_SYSTEM_DSFMT=0 USE_SYSTEM_LIBUV=0 - USE_SYSTEM_SUITESPARSE=0 USE_SYSTEM_BLAS=0 USE_SYSTEM_LAPACK=0 USE_SYSTEM_LLVM=0 + USE_SYSTEM_SUITESPARSE=0 USE_SYSTEM_BLAS=1 USE_SYSTEM_LAPACK=1 USE_SYSTEM_LLVM=0 USE_SYSTEM_LIBUNWIND=1 USE_SYSTEM_PCRE=1 USE_SYSTEM_GMP=1 USE_SYSTEM_PATCHELF=1 USE_SYSTEM_MPFR=1 USE_SYSTEM_MBEDTLS=1 USE_SYSTEM_LIBSSH2=1 USE_SYSTEM_NGHTTP2=1 USE_SYSTEM_CURL=1 USE_SYSTEM_ZLIB=1 USE_SYSTEM_P7ZIP=1 USE_SYSTEM_LIBGIT2=1 - USE_SYSTEM_UTF8PROC=1 - UTF8PROC_INC='${XBPS_CROSS_BASE}/usr/include'" + USE_SYSTEM_UTF8PROC=1 USE_SYSTEM_LIBBLASTRAMPOLINE=1 USE_SYSTEM_CSL=1" +make_build_target=release make_install_args="$make_build_args" make_check_args="$make_build_args" make_check_target=testall conf_files="/etc/julia/startup.jl" -hostmakedepends="pkg-config perl cmake python gcc-fortran patchelf which tar xz" +hostmakedepends="pkg-config perl cmake python3 gcc-fortran patchelf which tar xz" makedepends="p7zip pcre2-devel mpfr-devel libgit2-devel libcurl-devel nghttp2-devel libssh2-devel mbedtls-devel libatomic-devel zlib-devel libunwind-devel - libutf8proc-devel" + libutf8proc-devel libblastrampoline-devel openblas-devel" # Julia provides vendored symlinks in /usr/lib/julia pointing to these libraries, # but none of the julia executables link to them so these are not auto-detected depends="libgit2 libcurl mpfr mbedtls libatomic libpcre2 - libssh2 nghttp2 libquadmath libssp p7zip" + libssh2 nghttp2 libquadmath libssp p7zip libblastrampoline openblas" short_desc="High-level, high-performance dynamic programming language" maintainer="Adam Beckmeyer " license="MIT" homepage="https://julialang.org" distfiles="https://github.com/JuliaLang/julia/releases/download/v${version}/julia-${version}-full.tar.gz" -checksum=71d8e40611361370654e8934c407b2dec04944cf3917c5ecb6482d6b85ed767f +checksum=add869121b7e788ff487a234fd39484469dbb3ded29b17041c63c4757515dd58 nocross="build system is a mess" +noverifyrdeps="Julia doesn't need to depend on system llvm/openblas with vendored builds in /usr/lib/julia/" # Targets for the vendored symlinks mentioned above shlib_requires="libgit2.so.1.0 libcurl.so.4 libmpfr.so.6 libgmp.so.10 libmbedcrypto.so.3 libmbedtls.so.12 libmbedx509.so.0 libpcre2-8.so.0 diff --git a/srcpkgs/libblastrampoline-devel b/srcpkgs/libblastrampoline-devel new file mode 120000 index 000000000000..7e1d8237793a --- /dev/null +++ b/srcpkgs/libblastrampoline-devel @@ -0,0 +1 @@ +libblastrampoline \ No newline at end of file diff --git a/srcpkgs/libblastrampoline/template b/srcpkgs/libblastrampoline/template new file mode 100644 index 000000000000..dc24eb4fdc4b --- /dev/null +++ b/srcpkgs/libblastrampoline/template @@ -0,0 +1,30 @@ +# Template file for 'libblastrampoline' +pkgname=libblastrampoline +version=5.0.1 +revision=1 +build_wrksrc=src +build_style=gnu-makefile +make_build_args="COMPLEX_RETSTYLE_AUTODETECTION=0 F2C_AUTODETECTION=0" +make_install_args="${make_build_args} prefix=\${DESTDIR}/usr" +short_desc="BLAS and LAPACK demuxing library" +maintainer="Adam Beckmeyer " +license="MIT" +homepage="https://github.com/JuliaLinearAlgebra/libblastrampoline" +distfiles="https://github.com/JuliaLinearAlgebra/libblastrampoline/archive/refs/tags/v${version}.tar.gz" +checksum=1066b4d157276e41ca66ca94f0f8c2900c221b49da2df3c410e6f8bf1ce9b488 + +LBT_CFLAGS="-fPIC -D_GNU_SOURCE" +LBT_LDFLAGS="-shared" + +post_install() { + vlicense ../LICENSE +} + +libblastrampoline-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/*.so + } +}