mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
* unicorn: recipe clean up. Also, minor patch to the Python bindings code. Co-authored-by: Schrijvers Luc <begasus@gmail.com> Co-authored-by: Oscar Lesta <oscar.lesta@gmail.com> * unicorn: Use same lib path patch as upstream * unicorn: no need to provide _x86 python package * unicorn: mark x86 as tested --------- Co-authored-by: Schrijvers Luc <begasus@gmail.com>
70 lines
2.4 KiB
Plaintext
70 lines
2.4 KiB
Plaintext
From 15f6f2ac747ffbce1f534906aeddd7822e20f479 Mon Sep 17 00:00:00 2001
|
|
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
|
Date: Wed, 22 Mar 2023 13:57:12 -0500
|
|
Subject: build: Fixes for Haiku
|
|
|
|
* Haiku is fully posix, so can be lumped together with most unix cases
|
|
|
|
diff --git a/glib_compat/grand.c b/glib_compat/grand.c
|
|
index b6e5764..0d3f95b 100644
|
|
--- a/glib_compat/grand.c
|
|
+++ b/glib_compat/grand.c
|
|
@@ -232,7 +232,7 @@ GRand *g_rand_new_with_seed_array (const guint32 *seed, guint seed_length)
|
|
|
|
gint64 g_get_real_time (void)
|
|
{
|
|
-#if defined(unix) || defined(__unix__) || defined(__unix) || defined (__MINGW32__) || defined(__APPLE__)
|
|
+#if defined(unix) || defined(__unix__) || defined(__unix) || defined (__MINGW32__) || defined(__APPLE__) || defined(__HAIKU__)
|
|
struct timeval r;
|
|
|
|
/* this is required on alpha, there the timeval structs are ints
|
|
@@ -271,7 +271,7 @@ gint64 g_get_real_time (void)
|
|
GRand *g_rand_new (void)
|
|
{
|
|
guint32 seed[4];
|
|
-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__)
|
|
+#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__HAIKU__)
|
|
static gboolean dev_urandom_exists = TRUE;
|
|
|
|
if (dev_urandom_exists)
|
|
diff --git a/tests/unit/acutest.h b/tests/unit/acutest.h
|
|
index 6b4d596..fbe55bc 100644
|
|
--- a/tests/unit/acutest.h
|
|
+++ b/tests/unit/acutest.h
|
|
@@ -270,7 +270,7 @@
|
|
#include <string.h>
|
|
#include <setjmp.h>
|
|
|
|
-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__)
|
|
+#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__HAIKU__)
|
|
#define ACUTEST_UNIX_ 1
|
|
#include <errno.h>
|
|
#include <libgen.h>
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From a6e09e3fac6c277e433a43b73555136f312405c0 Mon Sep 17 00:00:00 2001
|
|
From: Oscar Lesta <oscar.lesta@gmail.com>
|
|
Date: Sun, 26 Mar 2023 01:55:40 -0300
|
|
Subject: Use libunicorn.so.2 as fallback path
|
|
|
|
Same patch is already applied in upstream's dev branch.
|
|
|
|
diff --git a/bindings/python/unicorn/unicorn.py b/bindings/python/unicorn/unicorn.py
|
|
index 2e6a938..0aacfb1 100644
|
|
--- a/bindings/python/unicorn/unicorn.py
|
|
+++ b/bindings/python/unicorn/unicorn.py
|
|
@@ -94,7 +94,7 @@ _path_list = [os.getenv('LIBUNICORN_PATH', None),
|
|
|
|
for _path in _path_list:
|
|
if _path is None: continue
|
|
- _uc = _load_lib(_path, _lib.get(sys.platform, "libunicorn.so"))
|
|
+ _uc = _load_lib(_path, _lib.get(sys.platform, "libunicorn.so.2"))
|
|
if _uc is not None:
|
|
break
|
|
|
|
--
|
|
2.37.3
|
|
|