OpenBLAS: update to 0.2.20, enhance/fix build with options
This commit is contained in:
parent
963ffdec2b
commit
b16a3dee84
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD$
|
||||
|
||||
DISTNAME= OpenBLAS-0.2.19
|
||||
DISTNAME= OpenBLAS-0.2.20
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=xianyi/}
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
|
@ -20,9 +20,17 @@ GCC_REQD+= 6.2
|
|||
|
||||
NO_CONFIGURE= yes
|
||||
|
||||
# You may override the autodetected thread count limit.
|
||||
# Default is detected from build host.
|
||||
BUILD_DEFS+= OPENBLAS_THREAD_LIMIT
|
||||
|
||||
MAKE_ENV= PREFIX=${PREFIX}
|
||||
MAKE_ENV+= CC=${CCPATH}
|
||||
MAKE_ENV+= FC=${FCPATH}
|
||||
MAKE_ENV+= NUM_THREADS=${OPENBLAS_THREAD_LIMIT:Q}
|
||||
|
||||
# Those work further on MAKE_ENV.
|
||||
.include "options.mk"
|
||||
|
||||
.if (${MACHINE_ARCH} == "i386")
|
||||
MAKE_ENV+= BINARY=32
|
||||
|
@ -30,12 +38,6 @@ MAKE_ENV+= BINARY=32
|
|||
MAKE_ENV+= BINARY=64
|
||||
.endif
|
||||
|
||||
# Choose the processor kernel dynamically at runtime
|
||||
MAKE_ENV+= DYNAMIC_ARCH=1
|
||||
|
||||
# NO_AFFINITY=1 recommended for use in OpenMP codes
|
||||
MAKE_ENV+= USE_OPENMP=1 NO_AFFINITY=1
|
||||
|
||||
INSTALL_MAKE_FLAGS+= PREFIX=${PREFIX}
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -10,6 +10,8 @@ lib/cmake/openblas/OpenBLASConfig.cmake
|
|||
lib/cmake/openblas/OpenBLASConfigVersion.cmake
|
||||
lib/libopenblas.a
|
||||
lib/libopenblas.so
|
||||
lib/libopenblasp-r${PKGVERSION}.a
|
||||
lib/libopenblasp-r${PKGVERSION}.so
|
||||
lib/libopenblas.so.0
|
||||
lib/libopenblas_pkg-r${PKGVERSION}.a
|
||||
lib/libopenblas_pkg-r${PKGVERSION}.so
|
||||
lib/pkgconfig/openblas.pc
|
||||
@pkgdir bin
|
||||
|
|
12
OpenBLAS/buildlink3.mk
Normal file
12
OpenBLAS/buildlink3.mk
Normal file
|
@ -0,0 +1,12 @@
|
|||
# $NetBSD$
|
||||
|
||||
BUILDLINK_TREE+= OpenBLAS
|
||||
|
||||
.if !defined(OPENBLAS_BUILDLINK3_MK)
|
||||
OPENBLAS_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.OpenBLAS+= OpenBLAS>=0.2.19
|
||||
BUILDLINK_PKGSRCDIR.OpenBLAS?= ../../wip/OpenBLAS
|
||||
.endif # OPENBLAS_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -OpenBLAS
|
|
@ -1,7 +1,8 @@
|
|||
$NetBSD$
|
||||
|
||||
SHA1 (OpenBLAS-0.2.19.tar.gz) = df4ceb25d2529748ad0f2715e62fefb348477edd
|
||||
RMD160 (OpenBLAS-0.2.19.tar.gz) = 8472d90075a8c1d357b896eba7ce293be508bca0
|
||||
SHA512 (OpenBLAS-0.2.19.tar.gz) = 7081a8540b8037c0d4d6db0ec4b51277856c0e0f4e2575671984e5deb3482102da8936c43691087c8475d67070f89ac6925e4867ead60802aa2a29e8517e7495
|
||||
Size (OpenBLAS-0.2.19.tar.gz) = 10834034 bytes
|
||||
SHA1 (patch-driver_others_memory.c) = 3f0d6014782810cc89c6fe0d0c1684e5ffdc2000
|
||||
SHA1 (OpenBLAS-0.2.20.tar.gz) = a186074145a24823e82c65672dad1cd1ca6fe89c
|
||||
RMD160 (OpenBLAS-0.2.20.tar.gz) = 2b9728cd227894d7378b0f3686b90d0e7e7975d9
|
||||
SHA512 (OpenBLAS-0.2.20.tar.gz) = 8dfc8e8c8d456b834d2e9544c8eadd9f4770e30db8b8dd76af601ec0735fd86c9cf63dd6a03ccd23fc02ec2e05069a09875b9073dfe29f99aadab3a958ae2634
|
||||
Size (OpenBLAS-0.2.20.tar.gz) = 11637301 bytes
|
||||
Size (patch-fixedlibname) = 662 bytes
|
||||
SHA1 (patch-fixedlibname) = 17d35f09aedcddfb8f20bb888fa134cdf0b3bd2b
|
||||
|
|
24
OpenBLAS/options.mk
Normal file
24
OpenBLAS/options.mk
Normal file
|
@ -0,0 +1,24 @@
|
|||
PKG_OPTIONS_VAR= PKG_OPTIONS.openblas
|
||||
# Choose dynamic target/processor choice at runtime or
|
||||
# fixed build with build host CPU.
|
||||
PKG_OPTIONS_GROUP.target= dynamic fixed
|
||||
# Threading model. Pthread seems more robust e.g. with numpy usage.
|
||||
PKG_OPTIONS_GROUP.threading = single pthread openmp
|
||||
PKG_OPTIONS_REQUIRED_GROUPS= target threading
|
||||
PKG_SUGGESTED_OPTIONS= dynamic pthread
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdynamic)
|
||||
MAKE_ENV+= DYNAMIC_ARCH=1
|
||||
.else
|
||||
MAKE_ENV+= DYNAMIC_ARCH=0
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mopenmp)
|
||||
MAKE_ENV+= USE_OPENMP=1 NO_AFFINITY=1
|
||||
.elif !empty(PKG_OPTIONS:Mpthread)
|
||||
MAKE_ENV+= USE_OPENMP=0 USE_THREAD=1
|
||||
.else
|
||||
MAKE_ENV+= USE_OPENMP=0 USE_THREAD=0
|
||||
.endif
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD$
|
||||
|
||||
Patch for NO_AFFINITY=1. Sent upstream as issue #979.
|
||||
|
||||
--- driver/others/memory.c.orig 2016-10-11 14:00:54.030387184 +0000
|
||||
+++ driver/others/memory.c
|
||||
@@ -169,7 +169,7 @@ void goto_set_num_threads(int num_thread
|
||||
|
||||
#else
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_SUNOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_SUNOS) || defined(OS_NETBSD)
|
||||
#ifndef NO_AFFINITY
|
||||
int get_num_procs(void);
|
||||
#else
|
19
OpenBLAS/patches/patch-fixedlibname
Normal file
19
OpenBLAS/patches/patch-fixedlibname
Normal file
|
@ -0,0 +1,19 @@
|
|||
$NetBSD$
|
||||
|
||||
Patch to have one predictable library name, not depending on build configuration.
|
||||
There is only one install of OpenBLAS in pkgsrc at a given time. Funny how
|
||||
the LIBDLLNAME was not differing ...
|
||||
|
||||
--- Makefile.system.orig 2017-02-09 21:15:17.079845857 +0100
|
||||
+++ Makefile.system 2017-02-09 21:16:54.915105356 +0100
|
||||
@@ -1061,6 +1061,10 @@
|
||||
endif
|
||||
endif
|
||||
|
||||
+# Override the library name madness to have one predictable
|
||||
+# name to put into PLIST for pkgsrc.
|
||||
+LIBNAME = $(LIBPREFIX)_pkg$(REVISION).$(LIBSUFFIX)
|
||||
+LIBNAME_P = $(LIBPREFIX)_pkg$(REVISION)_p.$(LIBSUFFIX)
|
||||
|
||||
LIBDLLNAME = $(LIBPREFIX).dll
|
||||
LIBSONAME = $(LIBNAME:.$(LIBSUFFIX)=.so)
|
Loading…
Reference in a new issue