This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 297
/
PKGBUILD
147 lines (137 loc) · 5.49 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Lex Black <autumn-wind@web.de>
# Contributor: Michael Jakl <jakl.michael@gmail.com>
# Contributor: devmotion <nospam-archlinux.org@devmotion.de>
# Contributor: Valentin Churavy <v.churavy@gmail.com>
pkgname=julia
epoch=2
pkgver=1.9.0
pkgrel=2
arch=(x86_64)
pkgdesc='High-level, high-performance, dynamic programming language'
url='https://julialang.org/'
license=(MIT)
depends=(fftw hicolor-icon-theme libgit2 libunwind libutf8proc openblas64 cblas64 lapack64
suitesparse64 mbedtls openlibm pcre2 llvm-libs p7zip libblastrampoline lld)
makedepends=(cmake gcc-fortran python llvm patchelf libwhich)
optdepends=('gnuplot: If using the Gaston Package from julia')
replaces=(julia-docs)
source=(https://github.com/JuliaLang/julia/releases/download/v$pkgver/$pkgname-$pkgver-full.tar.gz{,.asc}
julia-libunwind-1.6.patch
julia-system-blas-libs.patch
julia-hardcoded-libs.patch
julia-suitesparse-7.patch
julia-mpfr-4.2.patch
959902f1.patch
e08e1444.patch
f11bfc6c.patch
21d4c2f1.patch)
backup=(etc/julia/startup.jl)
sha256sums=('222eb533c9dc54734949eb3a4169f54aefa1bc20be385fc1cf798c8219fe6400'
'SKIP'
'3c0c03eabb668e3242fcd3058c1011dfbb579cc1c5adc3ae1016531e711cc64e'
'7845e6ce0f652ba35f00ed23b30d11ef3325398da1f9d094b737169522e453e3'
'8d1bdfd0f8fd482044b20f5e5964e44f2d2b67d3f5c3a3cbca07e5ef39f7f1b6'
'481ce9b093969c2433b86d4d2bc0815470225f680712fc6231df3629ca7fbe5e'
'9c959381a94e9ab6691b76b91b494808cd489a749f86c71bd0a36e406f1e2a7c'
'5e3f55e68e3f7172d545888479cd9a35e7589d0467684c6d98c721e3b1878acd'
'628d41c0b7739ed6c4c34c7416efd81646fbd17ebab9e88ae46a3668650d3104'
'ea1b30a11fe4d381d5a2ee2aeb4d7cb688d03e0520805cad8939a11267545e04'
'2bcae4dc2478f738ebaaf3650a632ae9eb4a593340c578be3a5631a54661afdc')
validpgpkeys=('3673DF529D9049477F76B37566E3C7DC03D6E495') # Julia (Binary signing key) <buildbot@julialang.org>
options=(!lto)
prepare() {
cd $pkgname-$pkgver
# Port to LLVM 15
patch -p1 -i ../e08e1444.patch
patch -p1 -i ../959902f1.patch
patch -p1 -i ../f11bfc6c.patch
patch -p1 -i ../21d4c2f1.patch
# libunwind 1.6 compatibility
patch -p1 -i ../julia-libunwind-1.6.patch
# Use system lapack and cblas libraries
patch -p1 -i ../julia-system-blas-libs.patch
# Don't hardcode library names
patch -p1 -i ../julia-hardcoded-libs.patch
# Fix tests with MPFR 4.2
patch -p1 -i ../julia-mpfr-4.2.patch
# Fix test failures due to using system blas
sed -e 's|0.22314355f0 + 3.1415927f0im|0.22314355f0 - 3.1415927f0im|' -i stdlib/LinearAlgebra/test/lu.jl
# Fix warnings with suitesparse 7
cd stdlib/srccache
tar -xzf SparseArrays-37e6e58706a54c5a1b96a17cda7d3e8be8bcb190.tar.gz
patch -d JuliaSparse-SparseArrays.jl-37e6e58 -p1 < "$srcdir"/julia-suitesparse-7.patch
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
}
_buildopts="prefix=/usr \
bindir=/usr/bin \
sysconfdir=/etc \
libexecdir=/usr/lib \
USE_BINARYBUILDER=0 \
USE_SYSTEM_CSL=1 \
USE_SYSTEM_LLVM=1 \
USE_SYSTEM_LLD=1 \
USE_SYSTEM_LIBUNWIND=1 \
USE_SYSTEM_PCRE=1 \
USE_SYSTEM_BLAS=1 \
USE_SYSTEM_LAPACK=1 \
USE_SYSTEM_LIBBLASTRAMPOLINE=1 \
USE_SYSTEM_GMP=1 \
USE_SYSTEM_MPFR=1 \
USE_SYSTEM_LIBSUITESPARSE=1 \
USE_SYSTEM_LIBWHICH=1 \
USE_SYSTEM_DSFMT=0 \
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 \
USE_BLAS64=1 \
LIBBLAS=-lblas64 \
LIBBLASNAME=libblas64 \
LIBLAPACK=-llapack64 \
LIBLAPACKNAME=liblapack64 \
MARCH=x86-64"
build() {
cd $pkgname-$pkgver
make release VERBOSE=1 JLDFLAGS=${LDFLAGS} $_buildopts
}
check() {
cd $pkgname-$pkgver/test
ln -s /etc/ssl/cert.pem ../usr/share/julia
# TODO: Remove SparseArrays from skip list when SuiteSparse is updated to v7 (it is downloaded at build time from a separate repo, not easily patchable)
../julia --check-bounds=yes --startup-file=no ./runtests.jl \
--skip Downloads \
--skip Sockets \
--skip nghttp2_jll \
--skip GMP_jll \
--skip LibCURL \
--skip LibSSH2_jll \
--skip MbedTLS_jll \
--skip MPFR_jll \
--skip OpenBLAS_jll \
--skip SparseArrays \
--skip SuiteSparse_jll \
--skip PCRE2_jll \
--skip LibGit2_jll \
--skip Zlib_jll
find ../stdlib \( -name \*.cov -o -name \*.mem \) -delete
rm -fr ../stdlib/Artifacts/test/artifacts
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install $_buildopts
ln -sf /etc/ssl/cert.pem "$pkgdir"/usr/share/julia # Needed by some packages
rm "$pkgdir"/usr/lib/julia/libccalltest.so.debug # Remove debug testing library
install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname
}