From 14345cc7dfa7170cfc867191aa12e517472cc3a4 Mon Sep 17 00:00:00 2001 From: Piraty Date: Wed, 18 Jul 2018 16:06:46 +0200 Subject: [PATCH] openblas: update to 0.3.2. --- srcpkgs/openblas/patches/init.patch | 60 +++++++++++++++++++ .../{v0.2.20-memory.patch => memory.patch} | 43 +++++++------ srcpkgs/openblas/patches/v0.2.20-init.patch | 57 ------------------ srcpkgs/openblas/template | 11 ++-- 4 files changed, 91 insertions(+), 80 deletions(-) create mode 100644 srcpkgs/openblas/patches/init.patch rename srcpkgs/openblas/patches/{v0.2.20-memory.patch => memory.patch} (55%) delete mode 100644 srcpkgs/openblas/patches/v0.2.20-init.patch diff --git a/srcpkgs/openblas/patches/init.patch b/srcpkgs/openblas/patches/init.patch new file mode 100644 index 0000000000..172cc34add --- /dev/null +++ b/srcpkgs/openblas/patches/init.patch @@ -0,0 +1,60 @@ +--- driver/others/init.c.orig ++++ driver/others/init.c +@@ -857,56 +857,13 @@ + common -> shmid = pshmid; + + if (common -> magic != SH_MAGIC) { +- cpu_set_t *cpusetp; +- int nums; +- int ret; +- + #ifdef DEBUG + fprintf(stderr, "Shared Memory Initialization.\n"); + #endif + + //returns the number of processors which are currently online + +- nums = sysconf(_SC_NPROCESSORS_CONF); +- +-#if !defined(__GLIBC_PREREQ) +- common->num_procs = nums; +-#else +- +-#if !__GLIBC_PREREQ(2, 3) +- common->num_procs = nums; +-#elif __GLIBC_PREREQ(2, 7) +- cpusetp = CPU_ALLOC(nums); +- if (cpusetp == NULL) { +- common->num_procs = nums; +- } else { +- size_t size; +- size = CPU_ALLOC_SIZE(nums); +- ret = sched_getaffinity(0,size,cpusetp); +- if (ret!=0) +- common->num_procs = nums; +- else +- common->num_procs = CPU_COUNT_S(size,cpusetp); +- } +- CPU_FREE(cpusetp); +-#else +- ret = sched_getaffinity(0,sizeof(cpu_set_t), cpusetp); +- if (ret!=0) { +- common->num_procs = nums; +- } else { +-#if !__GLIBC_PREREQ(2, 6) +- int i; +- int n = 0; +- for (i=0;inum_procs = n; +- } +-#else +- common->num_procs = CPU_COUNT(sizeof(cpu_set_t),cpusetp); +- } +-#endif +- +-#endif ++ common -> num_procs = sysconf(_SC_NPROCESSORS_CONF); + #endif + if(common -> num_procs > MAX_CPUS) { + fprintf(stderr, "\nOpenBLAS Warning : The number of CPU/Cores(%d) is beyond the limit(%d). Terminated.\n", common->num_procs, MAX_CPUS); diff --git a/srcpkgs/openblas/patches/v0.2.20-memory.patch b/srcpkgs/openblas/patches/memory.patch similarity index 55% rename from srcpkgs/openblas/patches/v0.2.20-memory.patch rename to srcpkgs/openblas/patches/memory.patch index 8c73a039eb..3b0173bf69 100644 --- a/srcpkgs/openblas/patches/v0.2.20-memory.patch +++ b/srcpkgs/openblas/patches/memory.patch @@ -1,41 +1,50 @@ ---- driver/others/memory.c.orig 2017-07-30 17:33:01.590217775 +0200 -+++ driver/others/memory.c 2017-07-30 17:07:26.933137836 +0200 -@@ -178,5 +177,0 @@ int get_num_procs(void) { +--- driver/others/memory.c.orig ++++ driver/others/memory.c +@@ -185,47 +185,8 @@ + #else + int get_num_procs(void) { + static int nums = 0; -cpu_set_t *cpusetp; -size_t size; -int ret; -int i,n; - -@@ -184,32 +178,0 @@ int i,n; + if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF); -#if !defined(OS_LINUX) -- return nums; + return nums; -#endif -- +- -#if !defined(__GLIBC_PREREQ) - return nums; --#endif --#if !__GLIBC_PREREQ(2, 3) +-#else +- #if !__GLIBC_PREREQ(2, 3) - return nums; --#endif +- #endif - --#if !__GLIBC_PREREQ(2, 7) +- #if !__GLIBC_PREREQ(2, 7) - ret = sched_getaffinity(0,sizeof(cpu_set_t), cpusetp); - if (ret!=0) return nums; - n=0; --#if !__GLIBC_PREREQ(2, 6) +- #if !__GLIBC_PREREQ(2, 6) - for (i=0;i 0 && ret < nums) nums = ret; - CPU_FREE(cpusetp); +- return nums; +- #endif +-#endif + } + #endif + #endif diff --git a/srcpkgs/openblas/patches/v0.2.20-init.patch b/srcpkgs/openblas/patches/v0.2.20-init.patch deleted file mode 100644 index ed2806bab3..0000000000 --- a/srcpkgs/openblas/patches/v0.2.20-init.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- driver/others/init.c.orig 2017-07-30 17:32:46.798217004 +0200 -+++ driver/others/init.c 2017-07-30 17:07:26.933137836 +0200 -@@ -781 +781 @@ void gotoblas_affinity_init(void) { --#ifndef USE_OPENMP -+#ifndef USE_OPENMP -@@ -785 +785 @@ void gotoblas_affinity_init(void) { -- -+ -@@ -829,4 +828,0 @@ void gotoblas_affinity_init(void) { -- cpu_set_t *cpusetp; -- int nums; -- int ret; -- -@@ -838,36 +834 @@ void gotoblas_affinity_init(void) { -- -- nums = sysconf(_SC_NPROCESSORS_CONF); -- --#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 3) -- common->num_procs = nums; --#elif __GLIBC_PREREQ(2, 7) -- cpusetp = CPU_ALLOC(nums); -- if (cpusetp == NULL) { -- common->num_procs = nums; -- } else { -- size_t size; -- size = CPU_ALLOC_SIZE(nums); -- ret = sched_getaffinity(0,size,cpusetp); -- if (ret!=0) -- common->num_procs = nums; -- else -- common->num_procs = CPU_COUNT_S(size,cpusetp); -- } -- CPU_FREE(cpusetp); --#else -- ret = sched_getaffinity(0,sizeof(cpu_set_t), cpusetp); -- if (ret!=0) { -- common->num_procs = nums; -- } else { --#if !__GLIBC_PREREQ(2, 6) -- int i; -- int n = 0; -- for (i=0;inum_procs = n; -- } --#else -- common->num_procs = CPU_COUNT(sizeof(cpu_set_t),cpusetp); --#endif -- --#endif -+ common -> num_procs = sysconf(_SC_NPROCESSORS_CONF);; -@@ -876 +837 @@ void gotoblas_affinity_init(void) { -- fprintf(stderr, "\nOpenBLAS Warning : The number of CPU/Cores(%d) is beyond the limit(%d). Terminated.\n", common->num_procs, MAX_CPUS); -+ fprintf(stderr, "\nOpenBLAS Warining : The number of CPU/Cores(%d) is beyond the limit(%d). Terminated.\n", common->num_procs, MAX_CPUS); -@@ -889 +850 @@ void gotoblas_affinity_init(void) { -- for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1; //Make the max cpu number. -+ for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1; //Make the max cpu number. diff --git a/srcpkgs/openblas/template b/srcpkgs/openblas/template index e2b52bd10a..6b6d7d0bc8 100644 --- a/srcpkgs/openblas/template +++ b/srcpkgs/openblas/template @@ -1,19 +1,18 @@ # Template file for 'openblas' pkgname=openblas -version=0.2.20 -revision=3 +version=0.3.2 +revision=1 wrksrc="OpenBLAS-${version}" build_style=gnu-makefile -make_install_args="PREFIX=/usr" make_build_args=" HOSTCC=gcc USE_OPENMP=1" hostmakedepends="perl gcc-fortran" makedepends="libgomp-devel" short_desc="Basic Linear Algebra Subprograms based on GotoBLAS2" maintainer="Julien Dehos " -homepage="http://www.openblas.net/" -license="3-clause-BSD" +homepage="https://www.openblas.net/" +license="BSD-3-Clause" distfiles="https://github.com/xianyi/${pkgname}/archive/v${version}.tar.gz" -checksum="5ef38b15d9c652985774869efd548b8e3e972e1e99475c673b25537ed7bcf394" +checksum=e8ba64f6b103c511ae13736100347deb7121ba9b41ba82052b1a018a65c0cb15 case "${XBPS_TARGET_MACHINE}" in armv5*) make_build_args+=" TARGET=ARMV5" ;;