Files
haikuports/sci-libs/openblas/patches/openblas-0.2.19.patchset

183 lines
5.0 KiB
Plaintext

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
From 3f451bdfb905576b6684ae6839820779900ed73d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Tue, 27 Dec 2016 14:41:07 +0100
Subject: [PATCH] Haiku don't need -pthread
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 2ae0047..7c97dfb 100644
--- a/Makefile
+++ b/Makefile
@@ -244,6 +244,8 @@ ifeq ($(F_COMPILER), GFORTRAN)
ifdef SMP
ifeq ($(OSNAME), WINNT)
-@echo "LOADER = $(FC)" >> $(NETLIB_LAPACK_DIR)/make.inc
+else ifeq ($(OSNAME), Haiku)
+ -@echo "LOADER = $(FC)" >> $(NETLIB_LAPACK_DIR)/make.inc
else
-@echo "LOADER = $(FC) -pthread" >> $(NETLIB_LAPACK_DIR)/make.inc
endif
--
2.10.2
From f4665b6c89202b47b733851f9ad887c0e3b12289 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Fri, 30 Dec 2016 21:19:56 +0100
Subject: [PATCH] Haiku get_num_procs support
---
driver/others/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/driver/others/memory.c b/driver/others/memory.c
index e89f5c3..9a851b8 100644
--- a/driver/others/memory.c
+++ b/driver/others/memory.c
@@ -169,7 +169,7 @@ void goto_set_num_threads(int num_threads) {};
#else
-#if defined(OS_LINUX) || defined(OS_SUNOS)
+#if defined(OS_LINUX) || defined(OS_SUNOS) || defined(OS_HAIKU)
#ifndef NO_AFFINITY
int get_num_procs(void);
#else
--
2.10.2