pkgbase=julia pkgname=(julia julia-docs) pkgver=1.0.0 pkgrel=1 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' 'suitesparse') makedepends=('cmake' 'gcc-fortran' 'gmp' 'python2') source=("https://github.com/JuliaLang/$pkgbase/releases/download/v$pkgver/$pkgbase-$pkgver-full.tar.gz" "julia-libunwind-version.diff" "julia-makefile.diff") sha256sums=('1a2497977b1d43bb821a5b7475b4054b29938baae8170881c6b8dd4099d133f1' '22974e1a6602c250cd993cc89cf38fd24668617484f44cadd60665e9af15207b' 'b7374fcd5a579fc59d6988795fc0c3cf411a89205942c691a5b3003793ae6c52') prepare() { cd $pkgbase # https://github.com/JuliaLang/julia/pull/29082 fix libunwind version check patch -p1 -i ../julia-libunwind-version.diff # make 'make install' really just install patch -p0 -i ../julia-makefile.diff } build() { # configure the build. # # Setting USE_SYSTEM_*=1 for quite a few things, for now, # just to make Julia 1.0.0 compile. cat << '__EOF__' > $pkgbase/Make.user override prefix = /usr override sysconfdir = /etc override MARCH = x86-64 override JULIA_BUILD_MODE = release override USE_BLAS64 = 0 override USE_SYSTEM_BLAS = 0 override USE_SYSTEM_DSFMT = 0 override USE_SYSTEM_FFTW = 1 override USE_SYSTEM_GMP = 1 override USE_SYSTEM_LAPACK = 0 override USE_SYSTEM_LIBGIT2 = 1 override USE_SYSTEM_LIBM = 0 override USE_SYSTEM_LIBUNWIND = 1 override USE_SYSTEM_MPFR = 0 override USE_SYSTEM_OPENLIBM = 0 override USE_SYSTEM_OPENSPECFUN = 0 override USE_SYSTEM_PCRE = 0 override USE_SYSTEM_SUITESPARSE = 1 override USE_SYSTEM_UTF8PROC = 1 # FS#57387 override USE_SYSTEM_LLVM = 0 override USE_LLVM_SHLIB = 0 # patchelf is not even used unless $(private_libdir_rel) != $(build_private_libdir_rel) # but we USE_SYSTEM_PATCHELF=1 to prevent building it. This is why it is not in makedepends. override USE_SYSTEM_PATCHELF = 1 __EOF__ export CFLAGS="$CFLAGS -w" export CXXFLAGS="$CXXFLAGS -w" make -C "$pkgbase" } check() { cd $pkgbase/test # this is the make testall target, plus the --skip option from travis/appveyor/circleci # (one test fails with DNS resolution errors) ../julia --check-bounds=yes --startup-file=no ./runtests.jl all --skip Sockets find ../stdlib \( -name \*.cov -o -name \*.mem \) -delete rm -r depot/compiled/ } package_julia() { backup=('etc/julia/startup.jl') optdepends=('gnuplot: If using the Gaston Package from julia') make -C "$pkgbase" DESTDIR="$pkgdir" install # Remove duplicate man-page from julia/doc rm -rf "$pkgdir/usr/share/julia/doc/man" # Documentation is in the julia-docs package rm -rf "$pkgdir/usr/share/"{doc,julia/doc} # License install -Dm644 "$pkgbase/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md" } package_julia-docs() { pkgdesc='Documentation and examples for Julia' depends=('julia') cd "$pkgbase" install -d "$pkgdir/usr/share/doc" cp -r doc "$pkgdir/usr/share/doc/$pkgbase" rm -rf "$pkgdir"/usr/share/doc/julia/man/ install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md" }