[arch-commits] Commit in julia/trunk (5 files)

Antonio Rojas arojas at archlinux.org
Fri Dec 6 15:30:17 UTC 2019


    Date: Friday, December 6, 2019 @ 15:30:16
  Author: arojas
Revision: 535846

Update to 1.3.0, use more system libraries, restore patch that was removed for no good reason, include compile options in PKGBUILD instead of using a custom Makefile

Added:
  julia/trunk/julia-system-cblas.patch
  julia/trunk/make-install-no-build.patch
Modified:
  julia/trunk/PKGBUILD
  julia/trunk/libunwind-version.patch
Deleted:
  julia/trunk/Make.user

-----------------------------+
 Make.user                   |   38 ------------
 PKGBUILD                    |   60 ++++++++++++------
 julia-system-cblas.patch    |  133 ++++++++++++++++++++++++++++++++++++++++++
 libunwind-version.patch     |    2 
 make-install-no-build.patch |   16 +++++
 5 files changed, 188 insertions(+), 61 deletions(-)

Deleted: Make.user
===================================================================
--- Make.user	2019-12-06 14:29:07 UTC (rev 535845)
+++ Make.user	2019-12-06 15:30:16 UTC (rev 535846)
@@ -1,38 +0,0 @@
-# vim: set ft=make:
-
-override prefix = /usr
-override sysconfdir = /etc
-override MARCH = x86-64
-override JULIA_BUILD_MODE = release
-
-override USE_BLAS64 = 0
-override USE_SYSTEM_DSFMT = 0
-override USE_SYSTEM_LIBM = 0
-override USE_SYSTEM_MPFR = 0
-override USE_SYSTEM_OPENLIBM = 0
-override USE_SYSTEM_OPENSPECFUN = 0
-override USE_SYSTEM_PCRE = 0
-
-override USE_SYSTEM_FFTW = 1
-override USE_SYSTEM_GMP = 1
-override USE_SYSTEM_LIBUNWIND = 1
-override USE_SYSTEM_SUITESPARSE = 1
-override USE_SYSTEM_UTF8PROC = 1
-
-# system blas with cblas symbols linked too
-override USE_SYSTEM_BLAS = 1
-override USE_SYSTEM_CBLAS = 1
-override USE_SYSTEM_LAPACK = 1
-
-# FS#63536
-override USE_SYSTEM_LIBGIT2 = 1
-
-# FS#57387
-override USE_SYSTEM_LLVM = 0
-
-# FS#60227
-override USE_LLVM_SHLIB = 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.
-override USE_SYSTEM_PATCHELF = 1

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-06 14:29:07 UTC (rev 535845)
+++ PKGBUILD	2019-12-06 15:30:16 UTC (rev 535846)
@@ -8,24 +8,24 @@
 pkgbase=julia
 pkgname=(julia julia-docs)
 epoch=2
-pkgver=1.2.0
-pkgrel=2
+pkgver=1.3.0
+pkgrel=1
 arch=(x86_64)
 pkgdesc='High-level, high-performance, dynamic programming language'
 url='https://julialang.org/'
 license=(MIT)
 depends=(cblas fftw hicolor-icon-theme libgit2 libunwind libutf8proc openblas
-         suitesparse)
-makedepends=(cmake gcc-fortran gmp python2)
+         suitesparse mbedtls openlibm)
+makedepends=(cmake gcc-fortran gmp python)
 source=("https://github.com/JuliaLang/julia/releases/download/v$pkgver/$pkgbase-$pkgver-full.tar.gz"{,.asc}
-        'cblas.patch::https://github.com/JuliaLang/julia/pull/29540/commits/0c442318196389d653ee21eba65d8c4f7beb72a0.patch'
+        julia-system-cblas.patch
         libunwind-version.patch
-        Make.user)
-sha256sums=('2419b268fc5c3666dd9aeb554815fe7cf9e0e7265bc9b94a43957c31a68d9184'
+        make-install-no-build.patch)
+sha256sums=('98c38f75eab1c16bde71509e8e3bdc941bc4686fe80dfc3c560f851c81e9e748'
             'SKIP'
-            '88fcbd8a2450027aada0892a60c49c891a8dae43ee6c19e64364b1a1373d50bc'
-            'a5eec1e43e1161c313b1d32a5f35a67d6b4a2bbc2d6d324c010f6f2b35be4a72'
-            '2057587e21a2261c49adb524ece2af48aa9a04a544c21a2de115c7b4fe58e98a')
+            'd4c8fe9eec1bc416549924ae328ceb3f63cc736ecd5e67886faa924e7c14bc5d'
+            '856dab2da8124df95e4fbd17f1164bebe1b10e99852fedf38f9dfe31f8ae295c'
+            '0b57e0bc6e25c92fde8a6474394f7a99bfb57f9b5d0f7b53f988622ae67de8b7')
 # Julia (Binary signing key) <buildbot at julialang.org>
 validpgpkeys=('3673DF529D9049477F76B37566E3C7DC03D6E495')
 
@@ -33,23 +33,39 @@
   cd $pkgbase-$pkgver
 
   # Add and use option to build with system cblas
-  patch -p1 --no-backup-if-mismatch -i ../cblas.patch
+  patch -p1 -i ../julia-system-cblas.patch
 
   # Fixing libunwind version check
   # https://github.com/JuliaLang/julia/pull/29082
   patch -p1 -i ../libunwind-version.patch
 
-  # Configuring the build
-  cp -f ../Make.user Make.user
-
-  # Prepare a symlink from "python" to "python2"
-  mkdir -p "$srcdir/bin"
-  ln -s /usr/bin/python2 "$srcdir/bin/python"
+  # Don't build again in install
+  patch -p1 -i ../make-install-no-build.patch
 }
 
 build() {
   export PATH="$srcdir/bin:$PATH"
-  env CFLAGS="$CFLAGS -w" CXXFLAGS="$CXXFLAGS -w" make -C $pkgbase-$pkgver
+  env CFLAGS="$CFLAGS -w" CXXFLAGS="$CXXFLAGS -w" make VERBOSE=1 -C $pkgbase-$pkgver \
+    USE_SYSTEM_LLVM=0 \
+    USE_SYSTEM_LIBUNWIND=1 \
+    USE_SYSTEM_PCRE=1 \
+    USE_SYSTEM_BLAS=1 \
+    USE_SYSTEM_LAPACK=1 \
+    USE_SYSTEM_GMP=1 \
+    USE_SYSTEM_MPFR=1 \
+    USE_SYSTEM_SUITESPARSE=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 \
+    MARCH=x86-64
 }
 
 check() {
@@ -66,7 +82,10 @@
   backup=(etc/julia/startup.jl)
   optdepends=('gnuplot: If using the Gaston Package from julia')
 
-  make -C $pkgbase-$pkgver DESTDIR="$pkgdir" install
+  make -C $pkgbase-$pkgver DESTDIR="$pkgdir" install \
+    prefix=/usr \
+    libexecdir=/usr/lib \
+    sysconfdir=/etc
 
   # Documentation is in the julia-docs package.
   # Man pages in /usr/share/julia/doc/man are duplicate.
@@ -86,6 +105,3 @@
   install -Dm644 $pkgbase-$pkgver/LICENSE.md \
     "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
 }
-
-# getver: julialang.org/downloads
-# vim: ts=2 sw=2 et:

Added: julia-system-cblas.patch
===================================================================
--- julia-system-cblas.patch	                        (rev 0)
+++ julia-system-cblas.patch	2019-12-06 15:30:16 UTC (rev 535846)
@@ -0,0 +1,133 @@
+From 0c442318196389d653ee21eba65d8c4f7beb72a0 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz at archlinux.org>
+Date: Fri, 5 Oct 2018 15:52:17 +0000
+Subject: [PATCH] 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.
+---
+ Make.inc                         | 12 +++++++++++-
+ Makefile                         |  3 +++
+ base/Makefile                    |  4 ++++
+ stdlib/LinearAlgebra/src/blas.jl | 15 +++++++++++++--
+ 4 files changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/Make.inc b/Make.inc
+index b00a41b356d8..7bc6cd69e863 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -945,6 +945,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
+@@ -957,12 +958,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 6063e79ae956..7df60b8170d6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -184,6 +184,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 70e6da933d70..8ecfa6902b59 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" >> $@
+@@ -183,6 +184,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 fee8c9e74d7e..8c76d1acbf29 100644
+--- a/stdlib/LinearAlgebra/src/blas.jl
++++ b/stdlib/LinearAlgebra/src/blas.jl
+@@ -61,6 +61,7 @@ export
+ 
+ 
+ const libblas = Base.libblas_name
++const libcblas = Base.libcblas_name
+ const liblapack = Base.liblapack_name
+ 
+ import LinearAlgebra
+@@ -101,6 +102,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), libblas), Ptr{UInt8}, () )))
+ 
+ """
+@@ -300,7 +311,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[]
+@@ -318,7 +329,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[]

Modified: libunwind-version.patch
===================================================================
--- libunwind-version.patch	2019-12-06 14:29:07 UTC (rev 535845)
+++ libunwind-version.patch	2019-12-06 15:30:16 UTC (rev 535846)
@@ -2,7 +2,7 @@
 index 186b5d7b2b..33143f2062 100644
 --- a/src/julia_internal.h
 +++ b/src/julia_internal.h
-@@ -623,12 +623,9 @@ extern volatile int jl_in_stackwalk;
+@@ -612,12 +612,9 @@ extern volatile int jl_in_stackwalk;
  #  include <libunwind.h>
  typedef unw_context_t bt_context_t;
  typedef unw_cursor_t bt_cursor_t;

Added: make-install-no-build.patch
===================================================================
--- make-install-no-build.patch	                        (rev 0)
+++ make-install-no-build.patch	2019-12-06 15:30:16 UTC (rev 535846)
@@ -0,0 +1,16 @@
+--- julia-1.3.0/Makefile.orig	2019-12-06 12:54:23.879790955 +0000
++++ julia-1.3.0/Makefile	2019-12-06 12:54:36.329952953 +0000
+@@ -277,12 +277,7 @@
+ endif
+ 
+ 
+-install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html
+-ifeq ($(BUNDLE_DEBUG_LIBS),1)
+-	@$(MAKE) $(QUIET_MAKE) all
+-else
+-	@$(MAKE) $(QUIET_MAKE) release
+-endif
++install:
+ 	@for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(libexecdir); do \
+ 		mkdir -p $(DESTDIR)$$subdir; \
+ 	done


More information about the arch-commits mailing list