summaryrefslogtreecommitdiff
path: root/community/julia/PKGBUILD
blob: 064fbd10a4b2e616de3aaea6d14b6f6c5280d9ed (plain)
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
# $Id: PKGBUILD 114770 2014-07-03 23:57:26Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: Michael Jakl <jakl.michael@gmail.com>
# Contributor: devmotion <nospam-archlinux.org@devmotion.de>

pkgname=julia
pkgver=0.3.0_prerelease
pkgrel=8
pkgdesc='High-level, high-performance, dynamic programming language'
arch=('x86_64' 'i686')
url='http://julialang.org'
license=('GPL')
depends=('arpack' 'fftw' 'git' 'gmp' 'libunwind' 'mpfr' 'pcre' 'readline' 'zlib')
makedepends=('gcc-fortran' 'python2' 'libuv' 'setconf')
optdepends=('gnuplot: If using the Gaston Package from julia')
options=('!emptydirs' 'staticlibs')
source=('git://github.com/JuliaLang/julia.git#commit=a8545c0a93')
sha256sums=('SKIP')

prepare() {
  # Fix for FS#40736
  [ $CARCH = x86_64 ] && (setconf "$pkgname/Make.inc" JULIA_CPU_TARGET core2) || true
}

build() {
  make -C "$pkgname" prefix=/usr sysconfdir=/etc \
    USE_SYSTEM_LLVM=0 \
    USE_SYSTEM_LIBUNWIND=1 \
    USE_SYSTEM_READLINE=1 \
    USE_SYSTEM_PCRE=1 \
    USE_SYSTEM_LIBM=1 \
    USE_SYSTEM_OPENLIBM=0 \
    USE_SYSTEM_OPENSPECFUN=0 \
    USE_SYSTEM_BLAS=1 \
    USE_SYSTEM_LAPACK=1 \
    USE_SYSTEM_FFTW=1 \
    USE_SYSTEM_GMP=1 \
    USE_SYSTEM_MPFR=1 \
    USE_SYSTEM_ARPACK=1 \
    USE_SYSTEM_SUITESPARSE=0 \
    USE_SYSTEM_ZLIB=1 \
    USE_SYSTEM_GRISU=0 \
    USE_SYSTEM_RMATH=0 \
    USE_SYSTEM_LIBUV=0 \
    USE_SYSTEM_UTF8PROC=0 \
    USE_MKL=0 \
    USE_BLAS64=0 \
    USE_LLVM_SHLIB=0
}

package() {
  make -C "$pkgname" DESTDIR="$pkgdir" \
    prefix=/usr sysconfdir=/etc  \
    USE_SYSTEM_LLVM=0 \
    USE_SYSTEM_LIBUNWIND=1 \
    USE_SYSTEM_READLINE=1 \
    USE_SYSTEM_PCRE=1 \
    USE_SYSTEM_LIBM=1 \
    USE_SYSTEM_OPENLIBM=0 \
    USE_SYSTEM_OPENSPECFUN=0 \
    USE_SYSTEM_BLAS=1 \
    USE_SYSTEM_LAPACK=1 \
    USE_SYSTEM_FFTW=1 \
    USE_SYSTEM_GMP=1 \
    USE_SYSTEM_MPFR=1 \
    USE_SYSTEM_ARPACK=1 \
    USE_SYSTEM_SUITESPARSE=0 \
    USE_SYSTEM_ZLIB=1 \
    USE_SYSTEM_GRISU=0 \
    USE_SYSTEM_RMATH=0 \
    USE_SYSTEM_LIBUV=0 \
    USE_SYSTEM_UTF8PROC=0 \
    USE_MKL=0 \
    USE_BLAS64=0 \
    USE_LLVM_SHLIB=0 \
    install
    
    # Remove duplicate man-page from julia/doc
    rm -rv "$pkgdir/usr/share/julia/doc/man"

    # Remove this file in order for Julia to start, see FS#39721
    rm -v "$pkgdir/usr/lib/julia/sys.so"

    # Fix wonky permission
    chmod 644 "$pkgdir/usr/lib/julia/libuv.a"
}

# vim:set ts=2 sw=2 et: