Niklas Poslovski
2022-10-02 492a1338bc92511c8493a028f355bc281d49ea72
openblas: Update to 0.3.21

8 files modified
112 ■■■■ changed files
components/scientific/openblas/Makefile 40 ●●●●● patch | view | raw | blame | history
components/scientific/openblas/manifests/sample-manifest.p5m 10 ●●●●● patch | view | raw | blame | history
components/scientific/openblas/openblas.p5m 9 ●●●●● patch | view | raw | blame | history
components/scientific/openblas/patches/openblas-01-shared-lib.patch 8 ●●●● patch | view | raw | blame | history
components/scientific/openblas/patches/openblas-02-disable-x86-only-cpu.patch 14 ●●●● patch | view | raw | blame | history
components/scientific/openblas/patches/openblas-03-link-flag.patch 19 ●●●● patch | view | raw | blame | history
components/scientific/openblas/patches/openblas-04-paths.patch 9 ●●●●● patch | view | raw | blame | history
components/scientific/openblas/pkg5 3 ●●●● patch | view | raw | blame | history
components/scientific/openblas/Makefile
@@ -19,35 +19,35 @@
# CDDL HEADER END
#
# Copyright (c) 2014-2017, Aurelien Larcher. All rights reserved.
# Copyright (c) 2022 Niklas Poslovski
#
BUILD_STYLE= justmake
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME=        openblas
COMPONENT_VERSION=    0.2.19
COMPONENT_VERSION_REV=    0
COMPONENT_VERSION_TAG=    ga7126c2
COMPONENT_REVISION_TAG= 9a7e0ec
COMPONENT_VERSION=    0.3.21
COMPONENT_FMRI=         library/math/openblas
COMPONENT_CLASSIFICATION=Development/High Performance Computing
COMPONENT_SRC=        xianyi-OpenBLAS-$(COMPONENT_REVISION_TAG)
COMPONENT_SRC=        OpenBLAS-$(COMPONENT_VERSION)
COMPONENT_PROJECT_URL=    http://www.openblas.net
COMPONENT_ARCHIVE=    xianyi-OpenBLAS-v$(COMPONENT_VERSION)-$(COMPONENT_VERSION_REV)-$(COMPONENT_VERSION_TAG).tar.gz
COMPONENT_ARCHIVE=    OpenBLAS-$(COMPONENT_VERSION).tar.gz
COMPONENT_ARCHIVE_HASH=    \
    sha256:878353b52940e0d5be32011cd5ba8440758f5270c3fa0f6f6200c26eabc53f1c
COMPONENT_ARCHIVE_URL=    http://github.com/xianyi/OpenBLAS/tarball/v$(COMPONENT_VERSION)
    sha256:f36ba3d7a60e7c8bcc54cd9aaa9b1223dd42eaf02c811791c37e8ca707c241ca
COMPONENT_ARCHIVE_URL=    http://github.com/xianyi/OpenBLAS/releases/download/v$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_LICENSE=      BSD 3-Clause
COMPONENT_SUMMARY=         Optimized BLAS library based on GotoBLAS2
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/justmake.mk
include $(WS_MAKE_RULES)/ips.mk
# Numerical libraries should be shipped as static libs as it is still common in scientific computing projects
# See discussion here: https://github.com/OpenIndiana/oi-userland/pull/9459
DROP_STATIC_LIBRARIES= no
include $(WS_MAKE_RULES)/common.mk
PATH=$(PATH.gnu)
# In a virtualized environment getarch cannot detect the architecture.
# It falls back to INTEL_UKNOWN which causes failure of the build.
# The option TARGET=GENERIC has to be passed to force detection.
# Do not define NO_STATIC nor NO_SHARED to build both libraries
COMPONENT_BUILD_GMAKE_ARGS= PREFIX=$(USRDIR) \
                            DYNAMIC_ARCH=1 \
                            TARGET=PRESCOTT \
@@ -58,19 +58,11 @@
                            NO_LAPACKE=1 \
                            USE_OPENMP=0 \
                            USE_THREAD=1 \
                            NUM_THREADS=64
                            NUM_THREADS=64 \
                            EXTRALIB=-lm
MACHDIR.32=
MACHDIR.64=$(MACH64)
COMPONENT_INSTALL_ARGS= PREFIX=$(PROTOUSRDIR) MACHDIR=$(MACHDIR.$(BITS))
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: $(NO_TESTS)
COMPONENT_INSTALL_ARGS= PREFIX=$(PROTOUSRDIR) MACHDIR=$(MACH64)
# Auto-generated dependencies
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += $(GFORTRAN_RUNTIME_PKG)
REQUIRED_PACKAGES += system/library/math
components/scientific/openblas/manifests/sample-manifest.p5m
@@ -10,10 +10,11 @@
#
#
# Copyright 2017 <contributor>
# Copyright 2022 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
@@ -24,6 +25,7 @@
file path=usr/include/openblas/cblas.h
file path=usr/include/openblas/f77blas.h
file path=usr/include/openblas/lapack.h
file path=usr/include/openblas/lapacke.h
file path=usr/include/openblas/lapacke_config.h
file path=usr/include/openblas/lapacke_mangling.h
@@ -37,10 +39,6 @@
    target=libopenblasp-r$(COMPONENT_VERSION).so
file path=usr/lib/$(MACH64)/libopenblasp-r$(COMPONENT_VERSION).a
file path=usr/lib/$(MACH64)/libopenblasp-r$(COMPONENT_VERSION).so
link path=usr/lib/libopenblas.a target=libopenblasp-r$(COMPONENT_VERSION).a
link path=usr/lib/libopenblas.so target=libopenblasp-r$(COMPONENT_VERSION).so
link path=usr/lib/libopenblas.so.0 target=libopenblasp-r$(COMPONENT_VERSION).so
file path=usr/lib/libopenblasp-r$(COMPONENT_VERSION).a
file path=usr/lib/libopenblasp-r$(COMPONENT_VERSION).so
file path=usr/lib/$(MACH64)/pkgconfig/openblas.pc
file path=usr/share/openblas-$(COMPONENT_VERSION)/OpenBLASConfig.cmake
file path=usr/share/openblas-$(COMPONENT_VERSION)/OpenBLASConfigVersion.cmake
components/scientific/openblas/openblas.p5m
@@ -11,9 +11,11 @@
#
# Copyright 2014-2015 Aurelien Larcher
# Copyright 2022 Niklas Poslovski
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
@@ -24,6 +26,7 @@
file path=usr/include/openblas/cblas.h
file path=usr/include/openblas/f77blas.h
file path=usr/include/openblas/lapack.h
file path=usr/include/openblas/lapacke.h
file path=usr/include/openblas/lapacke_config.h
file path=usr/include/openblas/lapacke_mangling.h
@@ -37,10 +40,6 @@
    target=libopenblasp-r$(COMPONENT_VERSION).so
file path=usr/lib/$(MACH64)/libopenblasp-r$(COMPONENT_VERSION).a
file path=usr/lib/$(MACH64)/libopenblasp-r$(COMPONENT_VERSION).so
link path=usr/lib/libopenblas.a target=libopenblasp-r$(COMPONENT_VERSION).a
link path=usr/lib/libopenblas.so target=libopenblasp-r$(COMPONENT_VERSION).so
link path=usr/lib/libopenblas.so.0 target=libopenblasp-r$(COMPONENT_VERSION).so
file path=usr/lib/libopenblasp-r$(COMPONENT_VERSION).a
file path=usr/lib/libopenblasp-r$(COMPONENT_VERSION).so
file path=usr/lib/$(MACH64)/pkgconfig/openblas.pc
file path=usr/share/openblas-$(COMPONENT_VERSION)/OpenBLASConfig.cmake
file path=usr/share/openblas-$(COMPONENT_VERSION)/OpenBLASConfigVersion.cmake
components/scientific/openblas/patches/openblas-01-shared-lib.patch
@@ -36,12 +36,12 @@
 ifeq ($(OSNAME), Darwin)
     @-cp $(LIBDYNNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
     @-install_name_tool -id "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)" "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)"
@@ -101,7 +106,7 @@
@@ -171,7 +171,7 @@
 
 ifndef NO_SHARED
 ifneq ($(NO_SHARED),1)
 #ifeq logical or
-ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD))
+ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD SunOS))
-ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD OpenBSD DragonFly))
+ifeq ($(OSNAME), $(filter $(OSNAME),Linux FreeBSD NetBSD OpenBSD DragonFly SunOS))
     @echo "SET(OpenBLAS_LIBRARIES ${OPENBLAS_LIBRARY_DIR}/$(LIBPREFIX).so)" >> "$(DESTDIR)$(OPENBLAS_CMAKE_DIR)/$(OPENBLAS_CMAKE_CONFIG)"
 endif
 ifeq ($(OSNAME), $(filter $(OSNAME),WINNT CYGWIN_NT))
components/scientific/openblas/patches/openblas-02-disable-x86-only-cpu.patch
@@ -10,15 +10,15 @@
 endif
 
 ifeq ($(ARCH), x86_64)
--- xianyi-OpenBLAS-aceee4e/driver/others/dynamic.c.orig    2015-02-09 22:01:44.997867567 +0000
+++ xianyi-OpenBLAS-aceee4e/driver/others/dynamic.c    2015-02-09 22:07:40.233707692 +0000
@@ -38,7 +38,8 @@
diff -Nru OpenBLAS-0.3.21.orig/driver/others/dynamic.c OpenBLAS-0.3.21/driver/others/dynamic.c
--- OpenBLAS-0.3.21.orig/driver/others/dynamic.c    2022-08-07 22:36:26.000000000 +0000
+++ OpenBLAS-0.3.21/driver/others/dynamic.c    2022-10-02 10:12:23.036339663 +0000
@@ -43,6 +43,8 @@
 #define strcasecmp _stricmp
 #endif
 
 #include "common.h"
-
+// Disable 32bit-only architectures
+#undef ARCH_X86
 #ifdef ARCH_X86
 #define EXTERN extern
 #else
 #else
components/scientific/openblas/patches/openblas-03-link-flag.patch
@@ -1,11 +1,12 @@
--- ./c_check.orig    2015-02-09 21:24:04.188778929 +0000
+++ ./c_check    2015-02-09 21:24:36.379282655 +0000
@@ -198,7 +198,7 @@
         }
diff -Nru OpenBLAS-0.3.21.orig/c_check OpenBLAS-0.3.21/c_check
--- OpenBLAS-0.3.21.orig/c_check    2022-08-07 22:36:26.000000000 +0000
+++ OpenBLAS-0.3.21/c_check    2022-10-02 10:15:33.310281620 +0000
@@ -327,7 +327,7 @@
     esac
 
     if ($flags =~ /^\-Y/) {
-        $linker_L .= "-Wl,". $flags . " "
+        #$linker_L .= "-Wl,". $flags . " "
         }
     case "$flag" in -Y*)
-        linker_L="$linker_L -Wl,$flag" ;;
+        #linker_L="$linker_L -Wl,$flag" ;;
     esac
 
     if (
     case "$flag" in --exclude-libs*)
components/scientific/openblas/patches/openblas-04-paths.patch
@@ -1,5 +1,6 @@
--- ./Makefile.install.orig    2015-12-14 13:05:13.817758515 +0100
+++ ./Makefile.install    2015-12-14 13:06:35.504469096 +0100
diff -Nru OpenBLAS-0.3.21.orig/Makefile.install OpenBLAS-0.3.21/Makefile.install
--- OpenBLAS-0.3.21.orig/Makefile.install    2022-10-02 10:16:07.409578214 +0000
+++ OpenBLAS-0.3.21/Makefile.install    2022-10-02 10:18:02.869804224 +0000
@@ -4,12 +4,13 @@
 include ./Makefile.system
 
@@ -13,8 +14,8 @@
+OPENBLAS_LIBRARY_DIR := $(PREFIX)/lib/$(MACHDIR)
+OPENBLAS_BINARY_DIR := $(PREFIX)/bin/$(MACHDIR)
 OPENBLAS_BUILD_DIR := $(CURDIR)
-OPENBLAS_CMAKE_DIR := $(OPENBLAS_LIBRARY_DIR)/cmake/openblas
-OPENBLAS_CMAKE_DIR := $(OPENBLAS_LIBRARY_DIR)/cmake/$(LIBSONAMEBASE)
+OPENBLAS_CMAKE_DIR := $(PREFIX)/share/openblas-$(VERSION)
 OPENBLAS_CMAKE_CONFIG := OpenBLASConfig.cmake
 OPENBLAS_CMAKE_CONFIG_VERSION := OpenBLASConfigVersion.cmake
 OPENBLAS_PKGCONFIG_DIR := $(OPENBLAS_LIBRARY_DIR)/pkgconfig
components/scientific/openblas/pkg5
@@ -1,8 +1,9 @@
{
    "dependencies": [
        "SUNWcs",
        "shell/ksh93",
        "system/library",
        "system/library/gfortran-7-runtime"
        "system/library/math"
    ],
    "fmris": [
        "library/math/openblas"