mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Add recipe & patch for OpenBLAS
This commit is contained in:
63
sci-libs/openblas/openblas-0.2.19.recipe
Normal file
63
sci-libs/openblas/openblas-0.2.19.recipe
Normal file
@@ -0,0 +1,63 @@
|
||||
SUMMARY="An optimized BLAS library based on GotoBLAS2 1.13 BSD version"
|
||||
DESCRIPTION="OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version."
|
||||
HOMEPAGE="http://www.openblas.net/"
|
||||
COPYRIGHT="2011-2015 The OpenBLAS Project"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://github.com/xianyi/OpenBLAS/archive/v0.2.19.tar.gz"
|
||||
CHECKSUM_SHA256="9c40b5e4970f27c5f6911cb0a28aa26b6c83f17418b69f8e5a116bb983ca8557"
|
||||
SOURCE_DIR="OpenBLAS-$portVersion"
|
||||
PATCHES="openblas-$portVersion.patchset"
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
openblas$secondaryArchSuffix = $portVersion
|
||||
lib:libopenblas$secondaryArchSuffix = $portVersion compat >= 0
|
||||
lib:libopenblas_r${portVersion}_$secondaryArchSuffix = $portVersion compat >= 0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
openblas${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libopenblas$secondaryArchSuffix = portVersion compat >= 0
|
||||
devel:libopenblasp_r${portVersion}$secondaryArchSuffix = $portVersion compat >= 0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
openblas$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
#cmd:gfortran
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# DYNAMIC_ARCH is x86 only
|
||||
# PPC & others should specify TARGET=
|
||||
make NO_LAPACKE=1 NO_AFFINITY=1 NO_WARMUP=1 \
|
||||
NUM_THREADS=64 \
|
||||
DYNAMIC_ARCH=1
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install PREFIX=$prefix \
|
||||
OPENBLAS_LIBRARY_DIR=$libDir \
|
||||
OPENBLAS_INCLUDE_DIR=$includeDir
|
||||
|
||||
prepareInstalledDevelLib libopenblas
|
||||
prepareInstalledDevelLib libopenblasp-r$portVersion
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
133
sci-libs/openblas/patches/openblas-0.2.19.patchset
Normal file
133
sci-libs/openblas/patches/openblas-0.2.19.patchset
Normal file
@@ -0,0 +1,133 @@
|
||||
From 5af0340141c868892e6767fbe898e64942733df8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Mon, 14 Nov 2016 20:50:32 +0100
|
||||
Subject: Make Haiku a known OS
|
||||
|
||||
|
||||
diff --git a/c_check b/c_check
|
||||
index 2ec9fc4..76127ca 100644
|
||||
--- a/c_check
|
||||
+++ b/c_check
|
||||
@@ -61,6 +61,7 @@ $os = WINNT if ($data =~ /OS_WINNT/);
|
||||
$os = CYGWIN_NT if ($data =~ /OS_CYGWIN_NT/);
|
||||
$os = Interix if ($data =~ /OS_INTERIX/);
|
||||
$os = Android if ($data =~ /OS_ANDROID/);
|
||||
+$os = Haiku if ($data =~ /OS_HAIKU/);
|
||||
|
||||
$architecture = x86 if ($data =~ /ARCH_X86/);
|
||||
$architecture = x86_64 if ($data =~ /ARCH_X86_64/);
|
||||
diff --git a/ctest.c b/ctest.c
|
||||
index e0ef46e..a8dee71 100644
|
||||
--- a/ctest.c
|
||||
+++ b/ctest.c
|
||||
@@ -93,6 +93,10 @@ OS_INTERIX
|
||||
OS_LINUX
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+OS_HAIKU
|
||||
+#endif
|
||||
+
|
||||
#if defined(__i386) || defined(_X86)
|
||||
ARCH_X86
|
||||
#endif
|
||||
--
|
||||
2.7.0
|
||||
|
||||
|
||||
From 2a54379975b845f51ce849ef81285cbfd77b542c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Mon, 14 Nov 2016 20:31:01 +0100
|
||||
Subject: Do not use sys/shm.h on Haiku
|
||||
|
||||
|
||||
diff --git a/common.h b/common.h
|
||||
index 480174c..7ab6fb8 100644
|
||||
--- a/common.h
|
||||
+++ b/common.h
|
||||
@@ -105,6 +105,10 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifdef OS_HAIKU
|
||||
+#define NO_SYSV_IPC
|
||||
+#endif
|
||||
+
|
||||
#ifdef OS_WINDOWS
|
||||
#ifdef ATOM
|
||||
#define GOTO_ATOM ATOM
|
||||
--
|
||||
2.7.0
|
||||
|
||||
|
||||
From 79e47bc88488411535814bd06d70de6bebe4134b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Mon, 14 Nov 2016 20:50:53 +0100
|
||||
Subject: Haiku uses .so and .so.version lib names
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2ae0047..9a287db 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -81,7 +81,7 @@ endif
|
||||
|
||||
shared :
|
||||
ifndef NO_SHARED
|
||||
-ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS))
|
||||
+ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Haiku))
|
||||
@$(MAKE) -C exports so
|
||||
@ln -fs $(LIBSONAME) $(LIBPREFIX).so
|
||||
@ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
|
||||
diff --git a/Makefile.install b/Makefile.install
|
||||
index 1b9388a..9a1c699 100644
|
||||
--- a/Makefile.install
|
||||
+++ b/Makefile.install
|
||||
@@ -64,7 +64,7 @@ endif
|
||||
#for install shared library
|
||||
ifndef NO_SHARED
|
||||
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
|
||||
-ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS))
|
||||
+ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Haiku))
|
||||
@install -pm755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
|
||||
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
|
||||
ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \
|
||||
diff --git a/exports/Makefile b/exports/Makefile
|
||||
index 5632b6f..1a1facd 100644
|
||||
--- a/exports/Makefile
|
||||
+++ b/exports/Makefile
|
||||
@@ -118,7 +118,7 @@ endif
|
||||
dllinit.$(SUFFIX) : dllinit.c
|
||||
$(CC) $(CFLAGS) -c -o $(@F) -s $<
|
||||
|
||||
-ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS))
|
||||
+ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Haiku))
|
||||
|
||||
so : ../$(LIBSONAME)
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
|
||||
From 2f085a79dc89981a2f5f226f8054c3342a95f528 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
||||
Date: Mon, 14 Nov 2016 20:51:51 +0100
|
||||
Subject: Haiku uses regular *nix includes
|
||||
|
||||
|
||||
diff --git a/driver/others/blas_server.c b/driver/others/blas_server.c
|
||||
index 42cadf4..5a89546 100644
|
||||
--- a/driver/others/blas_server.c
|
||||
+++ b/driver/others/blas_server.c
|
||||
@@ -70,7 +70,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
/*********************************************************************/
|
||||
|
||||
#include "common.h"
|
||||
-#if defined(OS_LINUX) || defined(OS_NETBSD) || defined(OS_DARWIN) || defined(OS_ANDROID) || defined(OS_SUNOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_NETBSD) || defined(OS_DARWIN) || defined(OS_ANDROID) || defined(OS_SUNOS) || defined(OS_HAIKU)
|
||||
#include <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <sys/resource.h>
|
||||
--
|
||||
2.7.0
|
||||
|
||||
Reference in New Issue
Block a user