diff options
author | Narrat | 2018-11-22 02:19:30 +0100 |
---|---|---|
committer | Narrat | 2018-11-22 02:20:53 +0100 |
commit | 2e6c25adcc4d6e883367f908803dc421b9df64a9 (patch) | |
tree | 271750fe091d91a9df29de8f5ae7e176649c2e9c | |
parent | 81aa38a7dd616feaedbe69cbce587c1aba183987 (diff) | |
download | aur-2e6c25adcc4d6e883367f908803dc421b9df64a9.tar.gz |
Julia: Overhaul regarding 1.0 release
Incorporate changes from the repo PKGBUILD, which changes deps.
System llvm cannot be used currently, as they use a patched version. Until those patches are upstreamed nothing can be done.
-rw-r--r-- | .SRCINFO | 41 | ||||
-rw-r--r-- | Make.user | 15 | ||||
-rw-r--r-- | PKGBUILD | 91 | ||||
-rw-r--r-- | cblas.patch | 127 | ||||
-rw-r--r-- | julia-makefile.patch | 14 |
5 files changed, 220 insertions, 68 deletions
@@ -1,50 +1,50 @@ pkgbase = julia-git pkgdesc = High-level, high-performance, dynamic programming language - pkgver = 0.7.0.DEV.r41074.g018fb61ff6 + pkgver = 1.1.0.DEV.r43604.g36d0116774 pkgrel = 1 - url = http://julialang.org - arch = i686 + url = https://julialang.org arch = x86_64 license = MIT + makedepends = cmake makedepends = gcc-fortran - makedepends = git - makedepends = arpack - makedepends = blas>=3.5.0 makedepends = gmp - makedepends = lapack>=3.5.0 + makedepends = python2 + makedepends = git + makedepends = cblas + makedepends = hicolor-icon-theme makedepends = libgit2 makedepends = libunwind + makedepends = libutf8proc makedepends = mbedtls makedepends = mpfr + makedepends = openblas makedepends = openlibm makedepends = pcre2 makedepends = suitesparse - makedepends = patchelf - makedepends = hicolor-icon-theme makedepends = xdg-utils makedepends = desktop-file-utils makedepends = gtk-update-icon-cache - options = !emptydirs source = git://github.com/JuliaLang/julia.git#branch=master source = Make.user - md5sums = SKIP - md5sums = 490d7e6f1a8829b5ad0232935f63ff2f + source = julia-makefile.patch + source = cblas.patch + sha256sums = SKIP + sha256sums = 89c7b3234cf87d132345b6c0194dae756836059d3793cc8a97cc6366203a6ae7 + sha256sums = 29b68ecdaf91770585609f54e5559e571d6b57a6312a3e8335caa7d647a2d2ca + sha256sums = 5c346bf8ed9a5763cf3bf6478158297107f16bbc07052b43920f778f0018b77a pkgname = julia-git - depends = arpack - depends = blas>=3.5.0 - depends = gmp - depends = lapack>=3.5.0 + depends = cblas + depends = hicolor-icon-theme depends = libgit2 depends = libunwind - depends = llvm39 + depends = libutf8proc depends = mbedtls depends = mpfr + depends = openblas depends = openlibm depends = pcre2 depends = suitesparse - depends = patchelf - depends = hicolor-icon-theme depends = xdg-utils depends = desktop-file-utils depends = gtk-update-icon-cache @@ -56,8 +56,9 @@ pkgname = julia-git backup = etc/julia/juliarc.jl pkgname = julia-git-docs - pkgdesc = High-level, high-performance, dynamic programming language (Documentation and examples) + pkgdesc = Documentation and examples for Julia arch = any + depends = julia provides = julia-docs conflicts = julia-docs conflicts = julia-git-doc diff --git a/Make.user b/Make.user index c3d42ad256e3..d1b83a45d774 100644 --- a/Make.user +++ b/Make.user @@ -1,21 +1,26 @@ +prefix:=/usr +sysconfdir:=/etc #MARCH=${CARCH/_/-} +USE_BLAS64:=0 USE_SYSTEM_LLVM:=0 USE_SYSTEM_LIBUNWIND:=1 -USE_SYSTEM_PCRE:=1 -USE_SYSTEM_LIBM:=1 +USE_SYSTEM_PCRE:=0 +USE_SYSTEM_LIBM:=0 USE_SYSTEM_OPENLIBM:=1 USE_SYSTEM_DSFMT:=0 USE_SYSTEM_BLAS:=1 USE_SYSTEM_LAPACK:=1 USE_SYSTEM_GMP:=1 -USE_SYSTEM_MPFR:=1 -USE_SYSTEM_ARPACK:=1 +USE_SYSTEM_MPFR:=0 USE_SYSTEM_SUITESPARSE:=1 USE_SYSTEM_LIBUV:=0 -USE_SYSTEM_UTF8PROC:=0 +USE_SYSTEM_UTF8PROC:=1 USE_SYSTEM_MBEDTLS:=1 USE_SYSTEM_LIBSSH2:=1 USE_SYSTEM_CURL:=1 USE_SYSTEM_LIBGIT2:=1 +# 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. USE_SYSTEM_PATCHELF:=1 USE_INTEL_MKL:=0 +USE_SYSTEM_CBLAS:=1 @@ -5,24 +5,26 @@ _pkgbase=julia pkgbase=${_pkgbase}-git pkgname=('julia-git' 'julia-git-docs') -pkgver=0.7.0.DEV.r41074.g018fb61ff6 +pkgver=1.1.0.DEV.r43604.g36d0116774 pkgrel=1 pkgdesc='High-level, high-performance, dynamic programming language' -arch=('i686' 'x86_64') -url="http://julialang.org" +arch=('x86_64') +url="https://julialang.org" license=('MIT') -makedepends=('gcc-fortran' 'git') -makedepends+=('arpack' 'blas>=3.5.0' 'gmp' 'lapack>=3.5.0' 'libgit2' - 'libunwind' 'mbedtls' 'mpfr' 'openlibm' - 'pcre2' 'suitesparse' 'patchelf' 'hicolor-icon-theme' - 'xdg-utils' 'desktop-file-utils' 'gtk-update-icon-cache') # 'llvm39' 'utf8proc' (AUR) 'intel-mkl' (AUR) +makedepends=('cmake' 'gcc-fortran' 'gmp' 'python2' 'git') +makedepends+=('cblas' 'hicolor-icon-theme' 'libgit2' 'libunwind' 'libutf8proc' + 'mbedtls' 'mpfr' 'openblas' 'openlibm' 'pcre2' 'suitesparse' + 'xdg-utils' 'desktop-file-utils' 'gtk-update-icon-cache') # 'llvm' 'patchelf' 'intel-mkl' # Needed if building the documentation #makedepends+=('juliadoc-git' 'texlive-langcjk' 'texlive-latexextra') -options=('!emptydirs') source=(git://github.com/JuliaLang/julia.git#branch=master - Make.user) -md5sums=('SKIP' - '490d7e6f1a8829b5ad0232935f63ff2f') + Make.user + julia-makefile.patch + cblas.patch) +sha256sums=('SKIP' + '89c7b3234cf87d132345b6c0194dae756836059d3793cc8a97cc6366203a6ae7' + '29b68ecdaf91770585609f54e5559e571d6b57a6312a3e8335caa7d647a2d2ca' + '5c346bf8ed9a5763cf3bf6478158297107f16bbc07052b43920f778f0018b77a') pkgver() { @@ -39,19 +41,21 @@ prepare() { git submodule init git submodule update - # For /etc/ld.so.conf.d/ - echo '/usr/lib/julia' > julia.conf - # Move the Make.user in place cp -v $srcdir/Make.user . + + # make 'make install' really just install + patch -p0 -i ../julia-makefile.patch + + # add and use option to build with system cblas + # https://github.com/JuliaLang/julia/pull/29540 + patch -p1 --no-backup-if-mismatch -i ../cblas.patch } build() { - # SSE2 is a requirement for Julia on 32-bit x86 - CFLAGS=${CFLAGS//-march=i686/-march=pentium4} - CXXFLAGS=${CXXFLAGS//-march=i686/-march=pentium4} - - make -C $_pkgbase prefix=/usr sysconfdir=/etc + # See FS#57387 for why USE_SYSTEM_LLVM=0 is used, for now + # See FS#58221 for why USE_SYSTEM_ARPACK=0 is used, for now + env CFLAGS="$CFLAGS -w" CXXFLAGS="$CXXFLAGS -w" make -C "$_pkgbase" # Building doc cd $_pkgbase/doc @@ -60,12 +64,20 @@ build() { #make info } +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-git() { - backup=('etc/ld.so.conf.d/julia.conf' 'etc/julia/juliarc.jl') - depends=('arpack' 'blas>=3.5.0' 'gmp' 'lapack>=3.5.0' 'libgit2' - 'libunwind' 'llvm39' 'mbedtls' 'mpfr' 'openlibm' - 'pcre2' 'suitesparse' 'patchelf' 'hicolor-icon-theme' - 'xdg-utils' 'desktop-file-utils' 'gtk-update-icon-cache') # 'utf8proc' (AUR) 'intel-mkl' (AUR) + depends=('cblas' 'hicolor-icon-theme' 'libgit2' 'libunwind' 'libutf8proc' + 'mbedtls' 'mpfr' 'openblas' 'openlibm' 'pcre2' 'suitesparse' + 'xdg-utils' 'desktop-file-utils' 'gtk-update-icon-cache') # 'llvm' 'patchelf' 'intel-mkl' optdepends=('openblas-lapack: multithreaded replacement for lapack' 'fftw: If using the FFTW package from julia' 'gnuplot: If using the Gaston Package from julia') @@ -76,17 +88,12 @@ package_julia-git() { CFLAGS=${CFLAGS//-march=i686/-march=pentium4} CXXFLAGS=${CXXFLAGS//-march=i686/-march=pentium4} - cd $_pkgbase - make DESTDIR=$pkgdir prefix=/usr sysconfdir=/etc install - - # For /etc/ld.so.conf.d, FS#41731 - install -Dm644 julia.conf "$pkgdir/etc/ld.so.conf.d/julia.conf" + make -C "$_pkgbase" DESTDIR="$pkgdir" install - # Remove doc files - rm -r $pkgdir/usr/share/doc/julia + # Documentation and examples are in the julia-docs package + rm -rf "$pkgdir/usr/share/"{doc,julia/doc,julia/examples} - # Install license - install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgbase/LICENSE.md" + install -Dm644 "$_pkgbase/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgbase/LICENSE.md" # Remove files that don't belong into the package find ${pkgdir} -name ".gitignore" -delete @@ -94,23 +101,21 @@ package_julia-git() { package_julia-git-docs() { arch=('any') - pkgdesc+=" (Documentation and examples)" + pkgdesc='Documentation and examples for Julia' + depends=('julia') provides=('julia-docs') conflicts=('julia-docs' 'julia-git-doc') - # Source files and examples" install -d "$pkgdir/usr/share/doc" - - cd "$srcdir/$_pkgbase" - cp -rv "doc" "$pkgdir/usr/share/doc/$_pkgbase" - cp -rv "examples" "$pkgdir/usr/share/doc/$_pkgbase/examples" - install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md" + cp -r "$_pkgbase/doc" "$pkgdir/usr/share/doc/$_pkgbase" + cp -r "$_pkgbase/examples" "$pkgdir/usr/share/doc/$_pkgbase/examples" + install -Dm644 "$_pkgbase/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgbase/LICENSE.md" # Remove double - rm -rv "$pkgdir/usr/share/doc/julia/man/" + rm -rf "$pkgdir/usr/share/doc/julia/man/" # Installing built docs. Adjust it accordingly to your changes in build() - cd doc/_build + cd "$_pkgbase/doc/_build" cp -dpr --no-preserve=ownership html $pkgdir/usr/share/doc/julia/ #install -D -m644 man/julialanguage.1 $pkgdir/usr/share/man/man1/julialanguage.1 #install -D -m644 texinfo/JuliaLanguage.info $pkgdir/usr/share/info/julialanguage.info diff --git a/cblas.patch b/cblas.patch new file mode 100644 index 000000000000..e742507ff3c5 --- /dev/null +++ b/cblas.patch @@ -0,0 +1,127 @@ +commit 0c442318196389d653ee21eba65d8c4f7beb72a0 +Author: Eli Schwartz <eschwartz@archlinux.org> +Date: Fri Oct 5 15:52:17 2018 +0000 + + Use a dedicated cblas library, that may or may not be in fact the blas one. + + Openblas can be built with statically compiled convenience copies of + cblas, but if not, then the system libcblas.so should be used. + +diff --git a/Make.inc b/Make.inc +index b00a41b356..7bc6cd69e8 100644 +--- a/Make.inc ++++ b/Make.inc +@@ -886,6 +886,7 @@ endif + ifeq ($(USE_SYSTEM_BLAS), 1) + ifeq ($(OS), Darwin) + USE_BLAS64 := 0 ++USE_SYSTEM_CBLAS := 0 + USE_SYSTEM_LAPACK := 0 + LIBBLAS := -L$(build_libdir) -lgfortblas + LIBBLASNAME := libgfortblas +@@ -898,12 +899,21 @@ LIBBLAS := -L$(build_shlibdir) -lopenblas + LIBBLASNAME := libopenblas + endif + +-# OpenBLAS builds LAPACK as part of its build. ++# OpenBLAS builds cblas/LAPACK as part of its build. + # We only need to build LAPACK if we are not using OpenBLAS. + ifeq ($(USE_SYSTEM_BLAS), 0) ++LIBCBLAS := $(LIBBLAS) ++LIBCBLASNAME := $(LIBBLASNAME) + LIBLAPACK := $(LIBBLAS) + LIBLAPACKNAME := $(LIBBLASNAME) + else ++ifeq ($(USE_SYSTEM_CBLAS), 1) ++LIBCBLAS ?= -lcblas ++LIBCBLASNAME ?= libcblas ++else ++LIBCBLAS := -L$(build_shlibdir) -lcblas $(LIBBLAS) ++LIBCBLASNAME := libcblas ++endif + ifeq ($(USE_SYSTEM_LAPACK), 1) + LIBLAPACK ?= -llapack + LIBLAPACKNAME ?= liblapack +diff --git a/Makefile b/Makefile +index 6063e79ae9..7df60b8170 100644 +--- a/Makefile ++++ b/Makefile +@@ -254,6 +254,9 @@ endif + endif + + JL_PRIVATE_LIBS-$(USE_SYSTEM_BLAS) += $(LIBBLASNAME) ++ifneq ($(LIBCBLASNAME),$(LIBBLASNAME)) ++JL_PRIVATE_LIBS-$(USE_SYSTEM_CBLAS) += $(LIBCBLASNAME) ++endif + ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME)) + JL_PRIVATE_LIBS-$(USE_SYSTEM_LAPACK) += $(LIBLAPACKNAME) + endif +diff --git a/base/Makefile b/base/Makefile +index 70e6da933d..8ecfa6902b 100644 +--- a/base/Makefile ++++ b/base/Makefile +@@ -42,6 +42,7 @@ else + endif + @echo "const libm_name = \"$(LIBMNAME)\"" >> $@ + @echo "const libblas_name = \"$(LIBBLASNAME)\"" >> $@ ++ @echo "const libcblas_name = \"$(LIBCBLASNAME)\"" >> $@ + @echo "const liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@ + ifeq ($(USE_BLAS64), 1) + @echo "const USE_BLAS64 = true" >> $@ +@@ -175,6 +176,9 @@ endif + $(eval $(call symlink_system_library,libpcre2-8,PCRE)) + $(eval $(call symlink_system_library,libdSFMT,DSFMT)) + $(eval $(call symlink_system_library,$(LIBBLASNAME),BLAS)) ++ifneq ($(LIBCBLASNAME),$(LIBBLASNAME)) ++$(eval $(call symlink_system_library,$(LIBCBLASNAME),CBLAS)) ++endif + ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME)) + $(eval $(call symlink_system_library,$(LIBLAPACKNAME),LAPACK)) + endif +diff --git a/stdlib/LinearAlgebra/src/blas.jl b/stdlib/LinearAlgebra/src/blas.jl +index fee8c9e74d..8c76d1acbf 100644 +--- a/stdlib/LinearAlgebra/src/blas.jl ++++ b/stdlib/LinearAlgebra/src/blas.jl +@@ -62,6 +62,7 @@ export + + + const libblas = Base.libblas_name ++const libcblas = Base.libcblas_name + const liblapack = Base.liblapack_name + + import LinearAlgebra +@@ -102,6 +103,16 @@ else + end + end + ++if libcblas == libblas ++ macro cblasfunc(x) ++ return @blasfunc(x) ++ end ++else ++ macro cblasfunc(x) ++ return Expr(:quote, x) ++ end ++end ++ + openblas_get_config() = strip(unsafe_string(ccall((@blasfunc(openblas_get_config), Base.libblas_name), Ptr{UInt8}, () ))) + + """ +@@ -301,7 +312,7 @@ for (fname, elty) in ((:cblas_zdotc_sub,:ComplexF64), + # DOUBLE PRECISION DX(*),DY(*) + function dotc(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer) + result = Ref{$elty}() +- ccall((@blasfunc($fname), libblas), Cvoid, ++ ccall((@cblasfunc($fname), libcblas), Cvoid, + (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}), + n, DX, incx, DY, incy, result) + result[] +@@ -319,7 +330,7 @@ for (fname, elty) in ((:cblas_zdotu_sub,:ComplexF64), + # DOUBLE PRECISION DX(*),DY(*) + function dotu(n::Integer, DX::Union{Ptr{$elty},AbstractArray{$elty}}, incx::Integer, DY::Union{Ptr{$elty},AbstractArray{$elty}}, incy::Integer) + result = Ref{$elty}() +- ccall((@blasfunc($fname), libblas), Cvoid, ++ ccall((@cblasfunc($fname), libcblas), Cvoid, + (BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}, BlasInt, Ptr{$elty}), + n, DX, incx, DY, incy, result) + result[] diff --git a/julia-makefile.patch b/julia-makefile.patch new file mode 100644 index 000000000000..0618b96803e3 --- /dev/null +++ b/julia-makefile.patch @@ -0,0 +1,14 @@ +--- Makefile.orig 2017-10-28 17:06:53.003582943 +0000 ++++ Makefile 2017-10-28 17:07:27.690408154 +0000 +@@ -316,8 +316,9 @@ + $(build_depsbindir)/stringreplace $$(strings -t x - $1 | grep '$2' | awk '{print $$1;}') '$3' 255 "$(call cygpath_w,$1)" + endef + +-install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html +- @$(MAKE) $(QUIET_MAKE) all ++docsindex: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html ++ ++install: + @for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir); do \ + mkdir -p $(DESTDIR)$$subdir; \ + done |