mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
qemu: drop older recipes. (#10816)
Not much use on keeping these around (can be grabbed from git history if needed).
This commit is contained in:
@@ -1,541 +0,0 @@
|
||||
From a4dade48889221d8e8a719f79df5baafb7b537df Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 16 Jan 2019 22:00:42 +1000
|
||||
Subject: Haiku patches
|
||||
|
||||
|
||||
diff --git a/os-posix.c b/os-posix.c
|
||||
index 4bd80e4..98565ba 100644
|
||||
--- a/os-posix.c
|
||||
+++ b/os-posix.c
|
||||
@@ -41,6 +41,15 @@
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#ifndef MCL_CURRENT
|
||||
+#define MCL_CURRENT 8192
|
||||
+#endif
|
||||
+#ifndef MCL_FUTURE
|
||||
+#define MCL_FUTURE 16384
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Must set all three of these at once.
|
||||
* Legal combinations are unset by name by uid
|
||||
diff --git a/target/mips/mips-semi.c b/target/mips/mips-semi.c
|
||||
index a7aefba..16c2336 100644
|
||||
--- a/target/mips/mips-semi.c
|
||||
+++ b/target/mips/mips-semi.c
|
||||
@@ -75,6 +75,7 @@ enum UHIOpenFlags {
|
||||
|
||||
/* Errno values taken from asm-mips/errno.h */
|
||||
static uint16_t host_to_mips_errno[] = {
|
||||
+#ifndef __HAIKU__
|
||||
[ENAMETOOLONG] = 78,
|
||||
#ifdef EOVERFLOW
|
||||
[EOVERFLOW] = 79,
|
||||
@@ -82,6 +83,9 @@ static uint16_t host_to_mips_errno[] = {
|
||||
#ifdef ELOOP
|
||||
[ELOOP] = 90,
|
||||
#endif
|
||||
+#else
|
||||
+NULL
|
||||
+#endif
|
||||
};
|
||||
|
||||
static int errno_mips(int err)
|
||||
diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c
|
||||
index 2f76216..3540ea0 100644
|
||||
--- a/target/xtensa/xtensa-semi.c
|
||||
+++ b/target/xtensa/xtensa-semi.c
|
||||
@@ -96,59 +96,53 @@ enum {
|
||||
|
||||
static uint32_t errno_h2g(int host_errno)
|
||||
{
|
||||
- static const uint32_t guest_errno[] = {
|
||||
- [EPERM] = TARGET_EPERM,
|
||||
- [ENOENT] = TARGET_ENOENT,
|
||||
- [ESRCH] = TARGET_ESRCH,
|
||||
- [EINTR] = TARGET_EINTR,
|
||||
- [EIO] = TARGET_EIO,
|
||||
- [ENXIO] = TARGET_ENXIO,
|
||||
- [E2BIG] = TARGET_E2BIG,
|
||||
- [ENOEXEC] = TARGET_ENOEXEC,
|
||||
- [EBADF] = TARGET_EBADF,
|
||||
- [ECHILD] = TARGET_ECHILD,
|
||||
- [EAGAIN] = TARGET_EAGAIN,
|
||||
- [ENOMEM] = TARGET_ENOMEM,
|
||||
- [EACCES] = TARGET_EACCES,
|
||||
- [EFAULT] = TARGET_EFAULT,
|
||||
+ switch (host_errno) {
|
||||
+ case 0: return 0;
|
||||
+ case EPERM: return TARGET_EPERM;
|
||||
+ case ENOENT: return TARGET_ENOENT;
|
||||
+ case ESRCH: return TARGET_ESRCH;
|
||||
+ case EINTR: return TARGET_EINTR;
|
||||
+ case EIO: return TARGET_EIO;
|
||||
+ case ENXIO: return TARGET_ENXIO;
|
||||
+ case E2BIG: return TARGET_E2BIG;
|
||||
+ case ENOEXEC: return TARGET_ENOEXEC;
|
||||
+ case EBADF: return TARGET_EBADF;
|
||||
+ case ECHILD: return TARGET_ECHILD;
|
||||
+ case EAGAIN: return TARGET_EAGAIN;
|
||||
+ case ENOMEM: return TARGET_ENOMEM;
|
||||
+ case EACCES: return TARGET_EACCES;
|
||||
+ case EFAULT: return TARGET_EFAULT;
|
||||
#ifdef ENOTBLK
|
||||
- [ENOTBLK] = TARGET_ENOTBLK,
|
||||
+ case ENOTBLK: return TARGET_ENOTBLK;
|
||||
#endif
|
||||
- [EBUSY] = TARGET_EBUSY,
|
||||
- [EEXIST] = TARGET_EEXIST,
|
||||
- [EXDEV] = TARGET_EXDEV,
|
||||
- [ENODEV] = TARGET_ENODEV,
|
||||
- [ENOTDIR] = TARGET_ENOTDIR,
|
||||
- [EISDIR] = TARGET_EISDIR,
|
||||
- [EINVAL] = TARGET_EINVAL,
|
||||
- [ENFILE] = TARGET_ENFILE,
|
||||
- [EMFILE] = TARGET_EMFILE,
|
||||
- [ENOTTY] = TARGET_ENOTTY,
|
||||
+ case EBUSY: return TARGET_EBUSY;
|
||||
+ case EEXIST: return TARGET_EEXIST;
|
||||
+ case EXDEV: return TARGET_EXDEV;
|
||||
+ case ENODEV: return TARGET_ENODEV;
|
||||
+ case ENOTDIR: return TARGET_ENOTDIR;
|
||||
+ case EISDIR: return TARGET_EISDIR;
|
||||
+ case EINVAL: return TARGET_EINVAL;
|
||||
+ case ENFILE: return TARGET_ENFILE;
|
||||
+ case EMFILE: return TARGET_EMFILE;
|
||||
+ case ENOTTY: return TARGET_ENOTTY;
|
||||
#ifdef ETXTBSY
|
||||
- [ETXTBSY] = TARGET_ETXTBSY,
|
||||
+ case ETXTBSY: return TARGET_ETXTBSY;
|
||||
#endif
|
||||
- [EFBIG] = TARGET_EFBIG,
|
||||
- [ENOSPC] = TARGET_ENOSPC,
|
||||
- [ESPIPE] = TARGET_ESPIPE,
|
||||
- [EROFS] = TARGET_EROFS,
|
||||
- [EMLINK] = TARGET_EMLINK,
|
||||
- [EPIPE] = TARGET_EPIPE,
|
||||
- [EDOM] = TARGET_EDOM,
|
||||
- [ERANGE] = TARGET_ERANGE,
|
||||
- [ENOSYS] = TARGET_ENOSYS,
|
||||
+ case EFBIG: return TARGET_EFBIG;
|
||||
+ case ENOSPC: return TARGET_ENOSPC;
|
||||
+ case ESPIPE: return TARGET_ESPIPE;
|
||||
+ case EROFS: return TARGET_EROFS;
|
||||
+ case EMLINK: return TARGET_EMLINK;
|
||||
+ case EPIPE: return TARGET_EPIPE;
|
||||
+ case EDOM: return TARGET_EDOM;
|
||||
+ case ERANGE: return TARGET_ERANGE;
|
||||
+ case ENOSYS: return TARGET_ENOSYS;
|
||||
#ifdef ELOOP
|
||||
- [ELOOP] = TARGET_ELOOP,
|
||||
+ case ELOOP: return TARGET_ELOOP;
|
||||
#endif
|
||||
};
|
||||
|
||||
- if (host_errno == 0) {
|
||||
- return 0;
|
||||
- } else if (host_errno > 0 && host_errno < ARRAY_SIZE(guest_errno) &&
|
||||
- guest_errno[host_errno]) {
|
||||
- return guest_errno[host_errno];
|
||||
- } else {
|
||||
- return TARGET_EINVAL;
|
||||
- }
|
||||
+ return TARGET_EINVAL;
|
||||
}
|
||||
|
||||
typedef struct XtensaSimConsole {
|
||||
diff --git a/tests/Makefile.include b/tests/Makefile.include
|
||||
index fb0b449..6780e70 100644
|
||||
--- a/tests/Makefile.include
|
||||
+++ b/tests/Makefile.include
|
||||
@@ -778,7 +778,7 @@ tests/migration/initrd-stress.img: tests/migration/stress$(EXESUF)
|
||||
rmdir $(INITRD_WORK_DIR)
|
||||
|
||||
ifeq ($(CONFIG_POSIX),y)
|
||||
-LIBS += -lutil
|
||||
+LIBS +=
|
||||
endif
|
||||
|
||||
# QTest rules
|
||||
diff --git a/util/compatfd.c b/util/compatfd.c
|
||||
index 980bd33..31e01d6 100644
|
||||
--- a/util/compatfd.c
|
||||
+++ b/util/compatfd.c
|
||||
@@ -17,7 +17,9 @@
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/thread.h"
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/syscall.h>
|
||||
+#endif
|
||||
|
||||
struct sigfd_compat_info
|
||||
{
|
||||
diff --git a/util/main-loop.c b/util/main-loop.c
|
||||
index affe040..de89c2c 100644
|
||||
--- a/util/main-loop.c
|
||||
+++ b/util/main-loop.c
|
||||
@@ -83,7 +83,9 @@ static int qemu_signal_init(void)
|
||||
*/
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIG_IPI);
|
||||
+#ifdef SIGIO
|
||||
sigaddset(&set, SIGIO);
|
||||
+#endif
|
||||
sigaddset(&set, SIGALRM);
|
||||
sigaddset(&set, SIGBUS);
|
||||
/* SIGINT cannot be handled via signalfd, so that ^C can be used
|
||||
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
|
||||
index c1bee2a..b1011b0 100644
|
||||
--- a/util/oslib-posix.c
|
||||
+++ b/util/oslib-posix.c
|
||||
@@ -36,7 +36,9 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/sockets.h"
|
||||
#include <libgen.h>
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/signal.h>
|
||||
+#endif
|
||||
#include "qemu/cutils.h"
|
||||
|
||||
#ifdef CONFIG_LINUX
|
||||
diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c
|
||||
index 2e8b43b..adcc732 100644
|
||||
--- a/util/qemu-openpty.c
|
||||
+++ b/util/qemu-openpty.c
|
||||
@@ -35,7 +35,9 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
|
||||
-#if defined(__GLIBC__)
|
||||
+#if defined(__HAIKU__)
|
||||
+# include <termios.h>
|
||||
+#elif defined(__GLIBC__)
|
||||
# include <pty.h>
|
||||
#elif defined CONFIG_BSD
|
||||
# include <termios.h>
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 47e776e4f6736ac5cc283747e810ecc6a16f45aa Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 16 Jan 2019 22:01:29 +1000
|
||||
Subject: Haiku build fix
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 0a3c6a7..2013a19 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -865,8 +865,8 @@ SunOS)
|
||||
;;
|
||||
Haiku)
|
||||
haiku="yes"
|
||||
- QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS $QEMU_CFLAGS"
|
||||
- LIBS="-lposix_error_mapper -lnetwork $LIBS"
|
||||
+ QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE $QEMU_CFLAGS"
|
||||
+ LIBS="-lposix_error_mapper -lnetwork -lbsd $LIBS"
|
||||
;;
|
||||
Linux)
|
||||
audio_drv_list="oss"
|
||||
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
|
||||
index a684c1a..09bdb7f 100644
|
||||
--- a/include/qemu/bswap.h
|
||||
+++ b/include/qemu/bswap.h
|
||||
@@ -8,6 +8,8 @@
|
||||
# include <machine/bswap.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
# include <sys/endian.h>
|
||||
+#elif defined(__HAIKU__)
|
||||
+# include <endian.h>
|
||||
#elif defined(CONFIG_BYTESWAP_H)
|
||||
# include <byteswap.h>
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From b264891c1f3d2e9d40e0fc8f082e304e7a3295bf Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 16 Jan 2019 22:02:47 +1000
|
||||
Subject: Fix keymap for Haiku
|
||||
|
||||
|
||||
diff --git a/ui/input-keymap-haiku-to-qcode.h b/ui/input-keymap-haiku-to-qcode.h
|
||||
new file mode 100644
|
||||
index 0000000..c3b4fff
|
||||
--- /dev/null
|
||||
+++ b/ui/input-keymap-haiku-to-qcode.h
|
||||
@@ -0,0 +1,105 @@
|
||||
+const guint16 qemu_input_map_haiku_to_qcode[] = {
|
||||
+ [0x00] = Q_KEY_CODE_UNMAPPED,
|
||||
+ [0x01] = Q_KEY_CODE_ESC,
|
||||
+ [0x02] = Q_KEY_CODE_F1,
|
||||
+ [0x03] = Q_KEY_CODE_F2,
|
||||
+ [0x04] = Q_KEY_CODE_F3,
|
||||
+ [0x05] = Q_KEY_CODE_F4,
|
||||
+ [0x06] = Q_KEY_CODE_F5,
|
||||
+ [0x07] = Q_KEY_CODE_F6,
|
||||
+ [0x08] = Q_KEY_CODE_F7,
|
||||
+ [0x09] = Q_KEY_CODE_F8,
|
||||
+ [0x0a] = Q_KEY_CODE_F9,
|
||||
+ [0x0b] = Q_KEY_CODE_F10,
|
||||
+ [0x0c] = Q_KEY_CODE_F11,
|
||||
+ [0x0d] = Q_KEY_CODE_F12,
|
||||
+ [0x0e] = Q_KEY_CODE_SYSRQ,
|
||||
+ [0x0f] = Q_KEY_CODE_SCROLL_LOCK,
|
||||
+ [0x10] = Q_KEY_CODE_UNMAPPED, // ?
|
||||
+ [0x11] = Q_KEY_CODE_GRAVE_ACCENT,
|
||||
+ [0x12] = Q_KEY_CODE_1,
|
||||
+ [0x13] = Q_KEY_CODE_2,
|
||||
+ [0x14] = Q_KEY_CODE_3,
|
||||
+ [0x15] = Q_KEY_CODE_4,
|
||||
+ [0x16] = Q_KEY_CODE_5,
|
||||
+ [0x17] = Q_KEY_CODE_6,
|
||||
+ [0x18] = Q_KEY_CODE_7,
|
||||
+ [0x19] = Q_KEY_CODE_8,
|
||||
+ [0x1a] = Q_KEY_CODE_9,
|
||||
+ [0x1b] = Q_KEY_CODE_0,
|
||||
+ [0x1c] = Q_KEY_CODE_MINUS,
|
||||
+ [0x1d] = Q_KEY_CODE_EQUAL,
|
||||
+ [0x1e] = Q_KEY_CODE_BACKSPACE,
|
||||
+ [0x1f] = Q_KEY_CODE_INSERT,
|
||||
+ [0x20] = Q_KEY_CODE_HOME,
|
||||
+ [0x21] = Q_KEY_CODE_PGUP,
|
||||
+ [0x22] = Q_KEY_CODE_NUM_LOCK,
|
||||
+ [0x23] = Q_KEY_CODE_KP_DIVIDE,
|
||||
+ [0x24] = Q_KEY_CODE_KP_MULTIPLY,
|
||||
+ [0x25] = Q_KEY_CODE_KP_SUBTRACT,
|
||||
+ [0x26] = Q_KEY_CODE_TAB,
|
||||
+ [0x27] = Q_KEY_CODE_Q,
|
||||
+ [0x28] = Q_KEY_CODE_W,
|
||||
+ [0x29] = Q_KEY_CODE_E,
|
||||
+ [0x2a] = Q_KEY_CODE_R,
|
||||
+ [0x2b] = Q_KEY_CODE_T,
|
||||
+ [0x2c] = Q_KEY_CODE_Y,
|
||||
+ [0x2d] = Q_KEY_CODE_U,
|
||||
+ [0x2e] = Q_KEY_CODE_I,
|
||||
+ [0x2f] = Q_KEY_CODE_O,
|
||||
+ [0x30] = Q_KEY_CODE_P,
|
||||
+ [0x31] = Q_KEY_CODE_BRACKET_LEFT,
|
||||
+ [0x32] = Q_KEY_CODE_BRACKET_RIGHT,
|
||||
+ [0x33] = Q_KEY_CODE_BACKSLASH,
|
||||
+ [0x34] = Q_KEY_CODE_DELETE,
|
||||
+ [0x35] = Q_KEY_CODE_END,
|
||||
+ [0x36] = Q_KEY_CODE_PGDN,
|
||||
+ [0x37] = Q_KEY_CODE_KP_7,
|
||||
+ [0x38] = Q_KEY_CODE_KP_8,
|
||||
+ [0x39] = Q_KEY_CODE_KP_9,
|
||||
+ [0x3a] = Q_KEY_CODE_KP_ADD,
|
||||
+ [0x3b] = Q_KEY_CODE_CAPS_LOCK,
|
||||
+ [0x3c] = Q_KEY_CODE_A,
|
||||
+ [0x3d] = Q_KEY_CODE_S,
|
||||
+ [0x3e] = Q_KEY_CODE_D,
|
||||
+ [0x3f] = Q_KEY_CODE_F,
|
||||
+ [0x40] = Q_KEY_CODE_G,
|
||||
+ [0x41] = Q_KEY_CODE_H,
|
||||
+ [0x42] = Q_KEY_CODE_J,
|
||||
+ [0x43] = Q_KEY_CODE_K,
|
||||
+ [0x44] = Q_KEY_CODE_L,
|
||||
+ [0x45] = Q_KEY_CODE_SEMICOLON,
|
||||
+ [0x46] = Q_KEY_CODE_APOSTROPHE,
|
||||
+ [0x47] = Q_KEY_CODE_RET,
|
||||
+ [0x48] = Q_KEY_CODE_KP_4,
|
||||
+ [0x49] = Q_KEY_CODE_KP_5,
|
||||
+ [0x4a] = Q_KEY_CODE_KP_6,
|
||||
+ [0x4b] = Q_KEY_CODE_SHIFT,
|
||||
+ [0x4c] = Q_KEY_CODE_Z,
|
||||
+ [0x4d] = Q_KEY_CODE_X,
|
||||
+ [0x4e] = Q_KEY_CODE_C,
|
||||
+ [0x4f] = Q_KEY_CODE_V,
|
||||
+ [0x50] = Q_KEY_CODE_B,
|
||||
+ [0x51] = Q_KEY_CODE_N,
|
||||
+ [0x52] = Q_KEY_CODE_M,
|
||||
+ [0x53] = Q_KEY_CODE_COMMA,
|
||||
+ [0x54] = Q_KEY_CODE_DOT,
|
||||
+ [0x55] = Q_KEY_CODE_SLASH,
|
||||
+ [0x56] = Q_KEY_CODE_SHIFT_R,
|
||||
+ [0x57] = Q_KEY_CODE_UP,
|
||||
+ [0x58] = Q_KEY_CODE_KP_1,
|
||||
+ [0x59] = Q_KEY_CODE_KP_2,
|
||||
+ [0x5a] = Q_KEY_CODE_KP_3,
|
||||
+ [0x5b] = Q_KEY_CODE_KP_ENTER,
|
||||
+ [0x5c] = Q_KEY_CODE_CTRL,
|
||||
+ [0x5d] = Q_KEY_CODE_ALT,
|
||||
+ [0x5e] = Q_KEY_CODE_SPC,
|
||||
+ [0x5f] = Q_KEY_CODE_ALT_R,
|
||||
+ [0x60] = Q_KEY_CODE_CTRL_R,
|
||||
+ [0x61] = Q_KEY_CODE_LEFT,
|
||||
+ [0x62] = Q_KEY_CODE_DOWN,
|
||||
+ [0x63] = Q_KEY_CODE_RIGHT,
|
||||
+ [0x64] = Q_KEY_CODE_KP_0,
|
||||
+ [0x65] = Q_KEY_CODE_KP_DECIMAL
|
||||
+};
|
||||
+const guint qemu_input_map_haiku_to_qcode_len = sizeof(qemu_input_map_haiku_to_qcode)/sizeof(qemu_input_map_haiku_to_qcode[0]);
|
||||
diff --git a/ui/sdl.c b/ui/sdl.c
|
||||
index 190b16f..b2c0590 100644
|
||||
--- a/ui/sdl.c
|
||||
+++ b/ui/sdl.c
|
||||
@@ -35,9 +35,12 @@
|
||||
#include "ui/console.h"
|
||||
#include "ui/input.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
-#ifndef WIN32
|
||||
+#if !defined(WIN32) && !defined(__HAIKU__)
|
||||
#include "x_keymap.h"
|
||||
#endif
|
||||
+#if defined(__HAIKU__)
|
||||
+#include "input-keymap-haiku-to-qcode.h"
|
||||
+#endif
|
||||
#include "sdl_zoom.h"
|
||||
|
||||
static DisplayChangeListener *dcl;
|
||||
@@ -224,6 +227,9 @@ static const guint16 *sdl_get_keymap(size_t *maplen)
|
||||
#if defined(WIN32)
|
||||
*maplen = qemu_input_map_atset1_to_qcode_len;
|
||||
return qemu_input_map_atset1_to_qcode;
|
||||
+#elif defined(__HAIKU__)
|
||||
+ *maplen = qemu_input_map_haiku_to_qcode_len;
|
||||
+ return qemu_input_map_haiku_to_qcode;
|
||||
#else
|
||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||
SDL_SysWMinfo info;
|
||||
diff --git a/ui/x_keymap.c b/ui/x_keymap.c
|
||||
index 2bc0143..6e29686 100644
|
||||
--- a/ui/x_keymap.c
|
||||
+++ b/ui/x_keymap.c
|
||||
@@ -9,6 +9,7 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#include "x_keymap.h"
|
||||
@@ -112,3 +113,4 @@ const guint16 *qemu_xkeymap_mapping_table(Display *dpy, size_t *maplen)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
diff --git a/ui/x_keymap.h b/ui/x_keymap.h
|
||||
index 0395e33..96f4812 100644
|
||||
--- a/ui/x_keymap.h
|
||||
+++ b/ui/x_keymap.h
|
||||
@@ -25,8 +25,11 @@
|
||||
#ifndef QEMU_X_KEYMAP_H
|
||||
#define QEMU_X_KEYMAP_H
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
+
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
const guint16 *qemu_xkeymap_mapping_table(Display *dpy, size_t *maplen);
|
||||
|
||||
#endif
|
||||
+#endif
|
||||
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
|
||||
index 865e476..faa3d9a 100644
|
||||
--- a/util/qemu-thread-posix.c
|
||||
+++ b/util/qemu-thread-posix.c
|
||||
@@ -293,7 +293,11 @@ int qemu_sem_timedwait(QemuSemaphore *sem, int ms)
|
||||
}
|
||||
}
|
||||
if (rc < 0) {
|
||||
+#ifndef __HAIKU__
|
||||
error_exit(errno, __func__);
|
||||
+#else
|
||||
+ return -1;
|
||||
+#endif
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From a4a7a33d9a708302d158f64767ce0c368c0490c7 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 16 Jan 2019 22:03:12 +1000
|
||||
Subject: Fix crash on qemu-img exit
|
||||
|
||||
|
||||
diff --git a/util/notify.c b/util/notify.c
|
||||
index 06de63a..9f85c2d 100644
|
||||
--- a/util/notify.c
|
||||
+++ b/util/notify.c
|
||||
@@ -37,6 +37,9 @@ void notifier_list_notify(NotifierList *list, void *data)
|
||||
Notifier *notifier, *next;
|
||||
|
||||
QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) {
|
||||
+#ifdef __HAIKU__
|
||||
+ if(notifier->notify == NULL)break;
|
||||
+#endif
|
||||
notifier->notify(notifier, data);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From c0e278138903513f4c747572421e371436dc980a Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 16 Jan 2019 23:29:06 +1000
|
||||
Subject: Use system int defs
|
||||
|
||||
|
||||
diff --git a/disas/nanomips.h b/disas/nanomips.h
|
||||
index 84cc9a6..742a867 100644
|
||||
--- a/disas/nanomips.h
|
||||
+++ b/disas/nanomips.h
|
||||
@@ -24,10 +24,14 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
typedef unsigned short uint16;
|
||||
typedef unsigned int uint32;
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
+#else
|
||||
+#include <SupportDefs.h>
|
||||
+#endif
|
||||
|
||||
namespace img
|
||||
{
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 6be2d318e0899d9e58070e9819904f6040e705b1 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 16 Jan 2019 23:29:29 +1000
|
||||
Subject: Disable mlockall for Haiku
|
||||
|
||||
|
||||
diff --git a/os-posix.c b/os-posix.c
|
||||
index 98565ba..668a405 100644
|
||||
--- a/os-posix.c
|
||||
+++ b/os-posix.c
|
||||
@@ -361,11 +361,11 @@ bool is_daemonized(void)
|
||||
int os_mlock(void)
|
||||
{
|
||||
int ret = 0;
|
||||
-
|
||||
+#ifndef __HAIKU__
|
||||
ret = mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
if (ret < 0) {
|
||||
error_report("mlockall: %s", strerror(errno));
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From e4399a97f16a6a8b23ce95bafdec4df0d9c70ef9 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Tue, 18 May 2021 16:49:20 -0500
|
||||
Subject: haiku: fixes and patches, rebased from qemu 3.x
|
||||
|
||||
|
||||
diff --git a/disas/nanomips.h b/disas/nanomips.h
|
||||
index a0a2225..8b8add8 100644
|
||||
--- a/disas/nanomips.h
|
||||
+++ b/disas/nanomips.h
|
||||
@@ -25,10 +25,14 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
typedef uint32_t uint32;
|
||||
typedef uint16_t uint16;
|
||||
+#else
|
||||
+#include <SupportDefs.h>
|
||||
+#endif
|
||||
|
||||
namespace img
|
||||
{
|
||||
diff --git a/os-posix.c b/os-posix.c
|
||||
index ae6c9f2..c778f5c 100644
|
||||
--- a/os-posix.c
|
||||
+++ b/os-posix.c
|
||||
@@ -42,6 +42,16 @@
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#ifndef MCL_CURRENT
|
||||
+#define MCL_CURRENT 8192
|
||||
+#endif
|
||||
+#ifndef MCL_FUTURE
|
||||
+#define MCL_FUTURE 16384
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/*
|
||||
* Must set all three of these at once.
|
||||
* Legal combinations are unset by name by uid
|
||||
diff --git a/slirp/src/tftp.c b/slirp/src/tftp.c
|
||||
index a19c889..7b868f5 100644
|
||||
--- a/slirp/src/tftp.c
|
||||
+++ b/slirp/src/tftp.c
|
||||
@@ -29,6 +29,11 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
+#ifndef O_BINARY
|
||||
+#define O_BINARY 0
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
static inline int tftp_session_in_use(struct tftp_session *spt)
|
||||
{
|
||||
return (spt->slirp != NULL);
|
||||
diff --git a/util/main-loop.c b/util/main-loop.c
|
||||
index 06b18b1..1d6f79e 100644
|
||||
--- a/util/main-loop.c
|
||||
+++ b/util/main-loop.c
|
||||
@@ -97,7 +97,9 @@ static int qemu_signal_init(Error **errp)
|
||||
*/
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIG_IPI);
|
||||
+ #ifdef SIGIO
|
||||
sigaddset(&set, SIGIO);
|
||||
+ #endif
|
||||
sigaddset(&set, SIGALRM);
|
||||
sigaddset(&set, SIGBUS);
|
||||
/* SIGINT cannot be handled via signalfd, so that ^C can be used
|
||||
diff --git a/util/notify.c b/util/notify.c
|
||||
index 76bab21..7c1ea84 100644
|
||||
--- a/util/notify.c
|
||||
+++ b/util/notify.c
|
||||
@@ -67,6 +67,10 @@ int notifier_with_return_list_notify(NotifierWithReturnList *list, void *data)
|
||||
int ret = 0;
|
||||
|
||||
QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) {
|
||||
+ #ifdef __HAIKU__
|
||||
+ if(notifier->notify == NULL) break;
|
||||
+ #endif
|
||||
+
|
||||
ret = notifier->notify(notifier, data);
|
||||
if (ret != 0) {
|
||||
break;
|
||||
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
|
||||
index e1225b6..46925cd 100644
|
||||
--- a/util/qemu-thread-posix.c
|
||||
+++ b/util/qemu-thread-posix.c
|
||||
@@ -332,7 +332,11 @@ int qemu_sem_timedwait(QemuSemaphore *sem, int ms)
|
||||
}
|
||||
}
|
||||
if (rc < 0) {
|
||||
+ #ifndef __HAIKU__
|
||||
error_exit(errno, __func__);
|
||||
+ #else
|
||||
+ return -1;
|
||||
+ #endif
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
--
|
||||
2.37.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
||||
From 9c0e39e2efb85dd15eaa7e79126adae4bdbb6343 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Tue, 18 May 2021 16:49:20 -0500
|
||||
Subject: haiku: fixes and patches, rebased from qemu 3.x
|
||||
|
||||
|
||||
diff --git a/disas/nanomips.c b/disas/nanomips.c
|
||||
index a025359..e877de2 100644
|
||||
--- a/disas/nanomips.c
|
||||
+++ b/disas/nanomips.c
|
||||
@@ -30,10 +30,14 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "disas/dis-asm.h"
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
typedef uint32_t uint32;
|
||||
typedef uint16_t uint16;
|
||||
+#else
|
||||
+#include <SupportDefs.h>
|
||||
+#endif
|
||||
typedef uint64_t img_address;
|
||||
|
||||
typedef enum {
|
||||
diff --git a/util/notify.c b/util/notify.c
|
||||
index 76bab21..7c1ea84 100644
|
||||
--- a/util/notify.c
|
||||
+++ b/util/notify.c
|
||||
@@ -67,6 +67,10 @@ int notifier_with_return_list_notify(NotifierWithReturnList *list, void *data)
|
||||
int ret = 0;
|
||||
|
||||
QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) {
|
||||
+ #ifdef __HAIKU__
|
||||
+ if(notifier->notify == NULL) break;
|
||||
+ #endif
|
||||
+
|
||||
ret = notifier->notify(notifier, data);
|
||||
if (ret != 0) {
|
||||
break;
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
From 6678ed6484b25a1147af81d79386a213cfa8ae72 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Tue, 29 Aug 2023 18:25:46 +0200
|
||||
Subject: target/i386: generalize operand size "ph" for use in CVTPS2PD
|
||||
|
||||
CVTPS2PD only loads a half-register for memory, like CVTPH2PS. It can
|
||||
reuse the "ph" packed half-precision size to load a half-register,
|
||||
but rename it to "xh" because it is now a variation of "x" (it is not
|
||||
used only for half-precision values).
|
||||
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
|
||||
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
|
||||
index e7fa5e9458..42be3fd779 100644
|
||||
--- a/target/i386/tcg/decode-new.c.inc
|
||||
+++ b/target/i386/tcg/decode-new.c.inc
|
||||
@@ -337,7 +337,7 @@ static const X86OpEntry opcodes_0F38_00toEF[240] = {
|
||||
[0x07] = X86_OP_ENTRY3(PHSUBSW, V,x, H,x, W,x, vex4 cpuid(SSSE3) mmx avx2_256 p_00_66),
|
||||
|
||||
[0x10] = X86_OP_ENTRY2(PBLENDVB, V,x, W,x, vex4 cpuid(SSE41) avx2_256 p_66),
|
||||
- [0x13] = X86_OP_ENTRY2(VCVTPH2PS, V,x, W,ph, vex11 cpuid(F16C) p_66),
|
||||
+ [0x13] = X86_OP_ENTRY2(VCVTPH2PS, V,x, W,xh, vex11 cpuid(F16C) p_66),
|
||||
[0x14] = X86_OP_ENTRY2(BLENDVPS, V,x, W,x, vex4 cpuid(SSE41) p_66),
|
||||
[0x15] = X86_OP_ENTRY2(BLENDVPD, V,x, W,x, vex4 cpuid(SSE41) p_66),
|
||||
/* Listed incorrectly as type 4 */
|
||||
@@ -565,7 +565,7 @@ static const X86OpEntry opcodes_0F3A[256] = {
|
||||
[0x15] = X86_OP_ENTRY3(PEXTRW, E,w, V,dq, I,b, vex5 cpuid(SSE41) zext0 p_66),
|
||||
[0x16] = X86_OP_ENTRY3(PEXTR, E,y, V,dq, I,b, vex5 cpuid(SSE41) p_66),
|
||||
[0x17] = X86_OP_ENTRY3(VEXTRACTPS, E,d, V,dq, I,b, vex5 cpuid(SSE41) p_66),
|
||||
- [0x1d] = X86_OP_ENTRY3(VCVTPS2PH, W,ph, V,x, I,b, vex11 cpuid(F16C) p_66),
|
||||
+ [0x1d] = X86_OP_ENTRY3(VCVTPS2PH, W,xh, V,x, I,b, vex11 cpuid(F16C) p_66),
|
||||
|
||||
[0x20] = X86_OP_ENTRY4(PINSRB, V,dq, H,dq, E,b, vex5 cpuid(SSE41) zext2 p_66),
|
||||
[0x21] = X86_OP_GROUP0(VINSERTPS),
|
||||
@@ -1103,7 +1103,7 @@ static bool decode_op_size(DisasContext *s, X86OpEntry *e, X86OpSize size, MemOp
|
||||
*ot = s->vex_l ? MO_256 : MO_128;
|
||||
return true;
|
||||
|
||||
- case X86_SIZE_ph: /* SSE/AVX packed half precision */
|
||||
+ case X86_SIZE_xh: /* SSE/AVX packed half register */
|
||||
*ot = s->vex_l ? MO_128 : MO_64;
|
||||
return true;
|
||||
|
||||
diff --git a/target/i386/tcg/decode-new.h b/target/i386/tcg/decode-new.h
|
||||
index cb6b8bcf67..a542ec1681 100644
|
||||
--- a/target/i386/tcg/decode-new.h
|
||||
+++ b/target/i386/tcg/decode-new.h
|
||||
@@ -92,7 +92,7 @@ typedef enum X86OpSize {
|
||||
/* Custom */
|
||||
X86_SIZE_d64,
|
||||
X86_SIZE_f64,
|
||||
- X86_SIZE_ph, /* SSE/AVX packed half precision */
|
||||
+ X86_SIZE_xh, /* SSE/AVX packed half register */
|
||||
} X86OpSize;
|
||||
|
||||
typedef enum X86CPUIDFeature {
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
||||
From 692d97a57c4bab09b28ce6c3fafe4a293b69a1c4 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Tue, 29 Aug 2023 18:28:33 +0200
|
||||
Subject: target/i386: fix memory operand size for CVTPS2PD
|
||||
|
||||
CVTPS2PD only loads a half-register for memory, unlike the other
|
||||
operations under 0x0F 0x5A. "Unpack" the group into separate
|
||||
emission functions instead of using gen_unary_fp_sse.
|
||||
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
|
||||
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
|
||||
index 42be3fd779..93e19d3564 100644
|
||||
--- a/target/i386/tcg/decode-new.c.inc
|
||||
+++ b/target/i386/tcg/decode-new.c.inc
|
||||
@@ -804,10 +804,20 @@ static void decode_sse_unary(DisasContext *s, CPUX86State *env, X86OpEntry *entr
|
||||
case 0x51: entry->gen = gen_VSQRT; break;
|
||||
case 0x52: entry->gen = gen_VRSQRT; break;
|
||||
case 0x53: entry->gen = gen_VRCP; break;
|
||||
- case 0x5A: entry->gen = gen_VCVTfp2fp; break;
|
||||
}
|
||||
}
|
||||
|
||||
+static void decode_0F5A(DisasContext *s, CPUX86State *env, X86OpEntry *entry, uint8_t *b)
|
||||
+{
|
||||
+ static const X86OpEntry opcodes_0F5A[4] = {
|
||||
+ X86_OP_ENTRY2(VCVTPS2PD, V,x, W,xh, vex2), /* VCVTPS2PD */
|
||||
+ X86_OP_ENTRY2(VCVTPD2PS, V,x, W,x, vex2), /* VCVTPD2PS */
|
||||
+ X86_OP_ENTRY3(VCVTSS2SD, V,x, H,x, W,x, vex2_rep3), /* VCVTSS2SD */
|
||||
+ X86_OP_ENTRY3(VCVTSD2SS, V,x, H,x, W,x, vex2_rep3), /* VCVTSD2SS */
|
||||
+ };
|
||||
+ *entry = *decode_by_prefix(s, opcodes_0F5A);
|
||||
+}
|
||||
+
|
||||
static void decode_0F5B(DisasContext *s, CPUX86State *env, X86OpEntry *entry, uint8_t *b)
|
||||
{
|
||||
static const X86OpEntry opcodes_0F5B[4] = {
|
||||
@@ -890,7 +900,7 @@ static const X86OpEntry opcodes_0F[256] = {
|
||||
|
||||
[0x58] = X86_OP_ENTRY3(VADD, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2),
|
||||
[0x59] = X86_OP_ENTRY3(VMUL, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2),
|
||||
- [0x5a] = X86_OP_GROUP3(sse_unary, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2),
|
||||
+ [0x5a] = X86_OP_GROUP0(0F5A),
|
||||
[0x5b] = X86_OP_GROUP0(0F5B),
|
||||
[0x5c] = X86_OP_ENTRY3(VSUB, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2),
|
||||
[0x5d] = X86_OP_ENTRY3(VMIN, V,x, H,x, W,x, vex2_rep3 p_00_66_f3_f2),
|
||||
diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc
|
||||
index 4fe8dec427..45a3e55cbf 100644
|
||||
--- a/target/i386/tcg/emit.c.inc
|
||||
+++ b/target/i386/tcg/emit.c.inc
|
||||
@@ -1914,12 +1914,22 @@ static void gen_VCOMI(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
set_cc_op(s, CC_OP_EFLAGS);
|
||||
}
|
||||
|
||||
-static void gen_VCVTfp2fp(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
+static void gen_VCVTPD2PS(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
{
|
||||
- gen_unary_fp_sse(s, env, decode,
|
||||
- gen_helper_cvtpd2ps_xmm, gen_helper_cvtps2pd_xmm,
|
||||
- gen_helper_cvtpd2ps_ymm, gen_helper_cvtps2pd_ymm,
|
||||
- gen_helper_cvtsd2ss, gen_helper_cvtss2sd);
|
||||
+ if (s->vex_l) {
|
||||
+ gen_helper_cvtpd2ps_ymm(cpu_env, OP_PTR0, OP_PTR2);
|
||||
+ } else {
|
||||
+ gen_helper_cvtpd2ps_xmm(cpu_env, OP_PTR0, OP_PTR2);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void gen_VCVTPS2PD(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
+{
|
||||
+ if (s->vex_l) {
|
||||
+ gen_helper_cvtps2pd_ymm(cpu_env, OP_PTR0, OP_PTR2);
|
||||
+ } else {
|
||||
+ gen_helper_cvtps2pd_xmm(cpu_env, OP_PTR0, OP_PTR2);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void gen_VCVTPS2PH(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
@@ -1936,6 +1946,16 @@ static void gen_VCVTPS2PH(DisasContext *s, CPUX86State *env, X86DecodedInsn *dec
|
||||
}
|
||||
}
|
||||
|
||||
+static void gen_VCVTSD2SS(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
+{
|
||||
+ gen_helper_cvtsd2ss(cpu_env, OP_PTR0, OP_PTR1, OP_PTR2);
|
||||
+}
|
||||
+
|
||||
+static void gen_VCVTSS2SD(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
+{
|
||||
+ gen_helper_cvtss2sd(cpu_env, OP_PTR0, OP_PTR1, OP_PTR2);
|
||||
+}
|
||||
+
|
||||
static void gen_VCVTSI2Sx(DisasContext *s, CPUX86State *env, X86DecodedInsn *decode)
|
||||
{
|
||||
int vec_len = vector_len(s, decode);
|
||||
--
|
||||
2.42.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
||||
From 89b7d1620826fe203511b680d7ee66382605b8a8 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Tue, 18 May 2021 16:49:20 -0500
|
||||
Subject: haiku: fixes and patches, rebased from qemu 3.x
|
||||
|
||||
|
||||
diff --git a/disas/nanomips.c b/disas/nanomips.c
|
||||
index a025359..e877de2 100644
|
||||
--- a/disas/nanomips.c
|
||||
+++ b/disas/nanomips.c
|
||||
@@ -30,10 +30,14 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "disas/dis-asm.h"
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
typedef uint32_t uint32;
|
||||
typedef uint16_t uint16;
|
||||
+#else
|
||||
+#include <SupportDefs.h>
|
||||
+#endif
|
||||
typedef uint64_t img_address;
|
||||
|
||||
typedef enum {
|
||||
diff --git a/util/notify.c b/util/notify.c
|
||||
index 76bab21..7c1ea84 100644
|
||||
--- a/util/notify.c
|
||||
+++ b/util/notify.c
|
||||
@@ -67,6 +67,10 @@ int notifier_with_return_list_notify(NotifierWithReturnList *list, void *data)
|
||||
int ret = 0;
|
||||
|
||||
QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) {
|
||||
+ #ifdef __HAIKU__
|
||||
+ if(notifier->notify == NULL) break;
|
||||
+ #endif
|
||||
+
|
||||
ret = notifier->notify(notifier, data);
|
||||
if (ret != 0) {
|
||||
break;
|
||||
--
|
||||
2.42.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,69 +0,0 @@
|
||||
From 213c05df476769966f2db0884315646787616f0f Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Tue, 18 May 2021 16:49:20 -0500
|
||||
Subject: haiku: fixes and patches, rebased from qemu 3.x
|
||||
|
||||
|
||||
diff --git a/disas/nanomips.c b/disas/nanomips.c
|
||||
index a025359..e877de2 100644
|
||||
--- a/disas/nanomips.c
|
||||
+++ b/disas/nanomips.c
|
||||
@@ -30,10 +30,14 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "disas/dis-asm.h"
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
typedef uint32_t uint32;
|
||||
typedef uint16_t uint16;
|
||||
+#else
|
||||
+#include <SupportDefs.h>
|
||||
+#endif
|
||||
typedef uint64_t img_address;
|
||||
|
||||
typedef enum {
|
||||
diff --git a/util/notify.c b/util/notify.c
|
||||
index 76bab21..7c1ea84 100644
|
||||
--- a/util/notify.c
|
||||
+++ b/util/notify.c
|
||||
@@ -67,6 +67,10 @@ int notifier_with_return_list_notify(NotifierWithReturnList *list, void *data)
|
||||
int ret = 0;
|
||||
|
||||
QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) {
|
||||
+ #ifdef __HAIKU__
|
||||
+ if(notifier->notify == NULL) break;
|
||||
+ #endif
|
||||
+
|
||||
ret = notifier->notify(notifier, data);
|
||||
if (ret != 0) {
|
||||
break;
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
||||
From 2a539ebf7f9fa0d8f2d59fdebfd062b4de16b8ed Mon Sep 17 00:00:00 2001
|
||||
From: David Karoly <david.karoly@outlook.com>
|
||||
Date: Fri, 8 Dec 2023 15:49:29 +0100
|
||||
Subject: Haiku: fix build
|
||||
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index a9c4f28..319ade2 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -277,9 +277,9 @@ endif
|
||||
# instead, we can't add -no-pie because it overrides -shared: the linker then
|
||||
# tries to build an executable instead of a shared library and fails. So
|
||||
# don't add -no-pie anywhere and cross fingers. :(
|
||||
-if not get_option('b_pie')
|
||||
- qemu_common_flags += cc.get_supported_arguments('-fno-pie', '-no-pie')
|
||||
-endif
|
||||
+#if not get_option('b_pie')
|
||||
+# qemu_common_flags += cc.get_supported_arguments('-fno-pie', '-no-pie')
|
||||
+#endif
|
||||
|
||||
if not get_option('stack_protector').disabled()
|
||||
stack_protector_probe = '''
|
||||
--
|
||||
2.42.1
|
||||
@@ -1,237 +0,0 @@
|
||||
SUMMARY="A generic and open source machine emulator and virtualizer"
|
||||
DESCRIPTION="QEMU is a generic and open source machine emulator and virtualizer.
|
||||
|
||||
QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a \
|
||||
different machine (e.g. your own PC). By using dynamic translation, it \
|
||||
achieves very good performance."
|
||||
HOMEPAGE="https://www.qemu.org/"
|
||||
COPYRIGHT="2003-2019 Fabrice Bellard"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="8"
|
||||
SOURCE_URI="https://download.qemu.org/qemu-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="b148fc3c7382c5addd915db433383160ca7b840bc6ea90bb0d35c6b253526d56"
|
||||
SOURCE_DIR="qemu-$portVersion"
|
||||
PATCHES="qemu-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="qemu.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
platformList="x86 arm mips ppc sparc m68k riscv"
|
||||
archList_x86="i386 x86_64"
|
||||
archList_arm="arm aarch64"
|
||||
archList_mips="mips mipsel mips64 mips64el"
|
||||
archList_ppc="ppc ppc64"
|
||||
archList_sparc="sparc sparc64"
|
||||
archList_m68k="m68k"
|
||||
archList_riscv="riscv32 riscv64"
|
||||
|
||||
PROVIDES="
|
||||
qemu$secondaryArchSuffix = $portVersion
|
||||
cmd:qemu_edid$commandSuffix = $portVersion
|
||||
cmd:qemu_img$commandSuffix = $portVersion
|
||||
cmd:qemu_io$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:iasl
|
||||
cmd:smbd$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcapstone$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libfdt$secondaryArchSuffix
|
||||
lib:libgcrypt$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgnutls$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:liblzo2$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libnettle$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL_1.2$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libssh2$secondaryArchSuffix
|
||||
lib:libssp$secondaryArchSuffix
|
||||
lib:libtasn1$secondaryArchSuffix
|
||||
lib:libusb_1.0$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_x86="
|
||||
qemu${secondaryArchSuffix}_x86 = $portVersion
|
||||
cmd:qemu$commandSuffix = $portVersion
|
||||
cmd:qemu_system_i386$commandSuffix = $portVersion
|
||||
cmd:qemu_system_x86_64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_x86="
|
||||
$REQUIRES
|
||||
qemu$secondaryArchSuffix
|
||||
"
|
||||
SUPPLEMENTS_x86="
|
||||
qemu$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_arm="
|
||||
qemu${secondaryArchSuffix}_arm = $portVersion
|
||||
cmd:qemu_system_aarch64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_arm$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_arm=$REQUIRES_x86
|
||||
|
||||
PROVIDES_mips="
|
||||
qemu${secondaryArchSuffix}_mips = $portVersion
|
||||
cmd:qemu_system_mips$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64el$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mipsel$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_mips=$REQUIRES_x86
|
||||
|
||||
PROVIDES_ppc="
|
||||
qemu${secondaryArchSuffix}_ppc = $portVersion
|
||||
cmd:qemu_system_ppc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_ppc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_ppc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_sparc="
|
||||
qemu${secondaryArchSuffix}_sparc = $portVersion
|
||||
cmd:qemu_system_sparc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_sparc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_sparc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_m68k="
|
||||
qemu${secondaryArchSuffix}_m68k = $portVersion
|
||||
cmd:qemu_system_m68k$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_m68k=$REQUIRES_x86
|
||||
|
||||
PROVIDES_riscv="
|
||||
qemu${secondaryArchSuffix}_riscv = $portVersion
|
||||
cmd:qemu_system_riscv32$commandSuffix = $portVersion
|
||||
cmd:qemu_system_riscv64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_riscv=$REQUIRES_x86
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcapstone$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libfdt$secondaryArchSuffix
|
||||
devel:libgcrypt$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgnutls$secondaryArchSuffix
|
||||
devel:libgpg_error$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:liblzo2$secondaryArchSuffix
|
||||
devel:libncursesw$secondaryArchSuffix
|
||||
devel:libnettle$secondaryArchSuffix >= 8
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL_1.2$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libssh2$secondaryArchSuffix
|
||||
devel:libtasn1$secondaryArchSuffix
|
||||
devel:libusb_1.0$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gcov$secondaryArchSuffix
|
||||
cmd:gprof$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:find
|
||||
cmd:iasl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:pod2man
|
||||
cmd:python
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CFLAGS="-I`finddir B_SYSTEM_HEADERS_DIRECTORY`/capstone"
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
targetList="$archItem-softmmu,$targetList"
|
||||
done
|
||||
|
||||
runConfigure --omit-dirs "binDir sbinDir" \
|
||||
--omit-buildspec ./configure \
|
||||
--bindir="$commandBinDir" --sbindir="$commandBinDir" \
|
||||
--enable-capstone=system \
|
||||
--enable-gcrypt \
|
||||
--disable-tpm \
|
||||
--smbd=/$relativeBinDir/smbd \
|
||||
--target-list="${targetList::-1}"
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install $jobArgs
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
|
||||
archList=""
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
echo $archItem
|
||||
local APP_SIGNATURE="application/x-vnd.qemu-system-$archItem"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/qemu.rdef.in > qemu-system-$archItem.rdef
|
||||
addResourcesToBinaries qemu-system-$archItem.rdef $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
|
||||
# provide convenience symlink to just "qemu"
|
||||
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
|
||||
ln -s $commandBinDir/qemu-system-x86_64 $commandBinDir/qemu
|
||||
else
|
||||
ln -s $commandBinDir/qemu-system-i386 $commandBinDir/qemu
|
||||
fi
|
||||
|
||||
packageEntries x86 $commandBinDir/qemu
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
for archItem in $platformArchList; do
|
||||
packageEntries $platformItem $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
SUMMARY="A generic and open source machine emulator and virtualizer"
|
||||
DESCRIPTION="QEMU is a generic and open source machine emulator and virtualizer.
|
||||
|
||||
QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a \
|
||||
different machine (e.g. your own PC). By using dynamic translation, it \
|
||||
achieves very good performance."
|
||||
HOMEPAGE="https://www.qemu.org/"
|
||||
COPYRIGHT="2003-2021 Fabrice Bellard"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://download.qemu.org/qemu-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45"
|
||||
SOURCE_DIR="qemu-$portVersion"
|
||||
PATCHES="qemu-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="qemu.rdef.in"
|
||||
|
||||
ARCHITECTURES="?all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
platformList="x86 arm mips ppc sparc m68k riscv"
|
||||
archList_x86="i386 x86_64"
|
||||
archList_arm="arm aarch64"
|
||||
archList_mips="mips mipsel mips64 mips64el"
|
||||
archList_ppc="ppc ppc64"
|
||||
archList_sparc="sparc sparc64"
|
||||
archList_m68k="m68k"
|
||||
archList_riscv="riscv32 riscv64"
|
||||
|
||||
PROVIDES="
|
||||
qemu$secondaryArchSuffix = $portVersion
|
||||
cmd:elf2dmp$commandSuffix = $portVersion
|
||||
cmd:qemu_edid$commandSuffix = $portVersion
|
||||
cmd:qemu_keymap$commandSuffix = $portVersion
|
||||
cmd:qemu_img$commandSuffix = $portVersion
|
||||
cmd:qemu_io$commandSuffix = $portVersion
|
||||
cmd:qemu_nbd$commandSuffix = $portVersion
|
||||
cmd:qemu_storage_daemon$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:iasl
|
||||
cmd:smbd$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcapstone$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libfdt$secondaryArchSuffix
|
||||
lib:libgcrypt$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgnutls$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:liblzo2$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libnettle$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libssh2$secondaryArchSuffix
|
||||
lib:libssp$secondaryArchSuffix
|
||||
lib:libtasn1$secondaryArchSuffix
|
||||
lib:libusb_1.0$secondaryArchSuffix
|
||||
lib:libxkbcommon$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_x86="
|
||||
qemu${secondaryArchSuffix}_x86 = $portVersion
|
||||
cmd:qemu$commandSuffix = $portVersion
|
||||
cmd:qemu_system_i386$commandSuffix = $portVersion
|
||||
cmd:qemu_system_x86_64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_x86="
|
||||
$REQUIRES
|
||||
qemu$secondaryArchSuffix
|
||||
lib:libcairo$secondaryArchSuffix
|
||||
lib:libepoxy$secondaryArchSuffix
|
||||
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
lib:libgtk_3$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
"
|
||||
SUPPLEMENTS_x86="
|
||||
qemu$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_arm="
|
||||
qemu${secondaryArchSuffix}_arm = $portVersion
|
||||
cmd:qemu_system_aarch64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_arm$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_arm=$REQUIRES_x86
|
||||
|
||||
PROVIDES_mips="
|
||||
qemu${secondaryArchSuffix}_mips = $portVersion
|
||||
cmd:qemu_system_mips$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64el$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mipsel$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_mips=$REQUIRES_x86
|
||||
|
||||
PROVIDES_ppc="
|
||||
qemu${secondaryArchSuffix}_ppc = $portVersion
|
||||
cmd:qemu_system_ppc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_ppc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_ppc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_sparc="
|
||||
qemu${secondaryArchSuffix}_sparc = $portVersion
|
||||
cmd:qemu_system_sparc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_sparc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_sparc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_m68k="
|
||||
qemu${secondaryArchSuffix}_m68k = $portVersion
|
||||
cmd:qemu_system_m68k$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_m68k=$REQUIRES_x86
|
||||
|
||||
PROVIDES_riscv="
|
||||
qemu${secondaryArchSuffix}_riscv = $portVersion
|
||||
cmd:qemu_system_riscv32$commandSuffix = $portVersion
|
||||
cmd:qemu_system_riscv64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_riscv=$REQUIRES_x86
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcapstone$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libfdt$secondaryArchSuffix
|
||||
devel:libgcrypt$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgnutls$secondaryArchSuffix
|
||||
devel:libgpg_error$secondaryArchSuffix
|
||||
devel:libgtk_3${secondaryArchSuffix}
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:liblzo2$secondaryArchSuffix
|
||||
devel:libncursesw$secondaryArchSuffix
|
||||
devel:libnettle$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libssh2$secondaryArchSuffix
|
||||
devel:libtasn1$secondaryArchSuffix
|
||||
devel:libusb_1.0$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:git
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gcov$secondaryArchSuffix
|
||||
cmd:gprof$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:find
|
||||
cmd:iasl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:pod2man
|
||||
cmd:python
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CFLAGS="-I`finddir B_SYSTEM_HEADERS_DIRECTORY`/capstone"
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
targetList="$archItem-softmmu,$targetList"
|
||||
done
|
||||
|
||||
runConfigure --omit-dirs "binDir sbinDir" \
|
||||
--omit-buildspec ./configure \
|
||||
--bindir="$commandBinDir" --sbindir="$commandBinDir" \
|
||||
--enable-capstone=system \
|
||||
--enable-gcrypt \
|
||||
--disable-tpm \
|
||||
--smbd=/$relativeBinDir/smbd \
|
||||
--target-list="${targetList::-1}"
|
||||
|
||||
cd build
|
||||
ninja $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
ninja install $jobArgs
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
|
||||
archList=""
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
echo $archItem
|
||||
local APP_SIGNATURE="application/x-vnd.qemu-system-$archItem"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/qemu.rdef.in > qemu-system-$archItem.rdef
|
||||
addResourcesToBinaries qemu-system-$archItem.rdef $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
|
||||
# provide convenience symlink to just "qemu"
|
||||
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
|
||||
ln -s $commandBinDir/qemu-system-x86_64 $commandBinDir/qemu
|
||||
else
|
||||
ln -s $commandBinDir/qemu-system-i386 $commandBinDir/qemu
|
||||
fi
|
||||
|
||||
packageEntries x86 $commandBinDir/qemu
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
for archItem in $platformArchList; do
|
||||
packageEntries $platformItem $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
SUMMARY="A generic and open source machine emulator and virtualizer"
|
||||
DESCRIPTION="QEMU is a generic and open source machine emulator and virtualizer.
|
||||
|
||||
QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a \
|
||||
different machine (e.g. your own PC). By using dynamic translation, it \
|
||||
achieves very good performance."
|
||||
HOMEPAGE="https://www.qemu.org/"
|
||||
COPYRIGHT="2003-2023 Fabrice Bellard"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://download.qemu.org/qemu-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="8c85699acf9d7a43a5fe29a64cdd56370b0c2d1ad074baf7098a824d17aad73b"
|
||||
SOURCE_DIR="qemu-$portVersion"
|
||||
PATCHES="
|
||||
qemu-$portVersion.patchset
|
||||
qemu-$portVersion-haiku.patchset
|
||||
"
|
||||
ADDITIONAL_FILES="qemu.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
platformList="x86 arm mips ppc sparc m68k riscv"
|
||||
archList_x86="i386 x86_64"
|
||||
archList_arm="arm aarch64"
|
||||
archList_mips="mips mipsel mips64 mips64el"
|
||||
archList_ppc="ppc ppc64"
|
||||
archList_sparc="sparc sparc64"
|
||||
archList_m68k="m68k"
|
||||
archList_riscv="riscv32 riscv64"
|
||||
|
||||
PROVIDES="
|
||||
qemu$secondaryArchSuffix = $portVersion
|
||||
cmd:elf2dmp$commandSuffix = $portVersion
|
||||
cmd:qemu_edid$commandSuffix = $portVersion
|
||||
cmd:qemu_keymap$commandSuffix = $portVersion
|
||||
cmd:qemu_img$commandSuffix = $portVersion
|
||||
cmd:qemu_io$commandSuffix = $portVersion
|
||||
cmd:qemu_nbd$commandSuffix = $portVersion
|
||||
cmd:qemu_storage_daemon$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:iasl
|
||||
cmd:smbd$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcapstone$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libfdt$secondaryArchSuffix
|
||||
lib:libgcrypt$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgnutls$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:liblzo2$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libnettle$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libssh2$secondaryArchSuffix
|
||||
lib:libssp$secondaryArchSuffix
|
||||
lib:libtasn1$secondaryArchSuffix
|
||||
lib:libusb_1.0$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_x86="
|
||||
qemu${secondaryArchSuffix}_x86 = $portVersion
|
||||
cmd:qemu$commandSuffix = $portVersion
|
||||
cmd:qemu_system_i386$commandSuffix = $portVersion
|
||||
cmd:qemu_system_x86_64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_x86="
|
||||
$REQUIRES
|
||||
qemu$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libslirp$secondaryArchSuffix
|
||||
"
|
||||
SUPPLEMENTS_x86="
|
||||
qemu$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_arm="
|
||||
qemu${secondaryArchSuffix}_arm = $portVersion
|
||||
cmd:qemu_system_aarch64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_arm$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_arm=$REQUIRES_x86
|
||||
|
||||
PROVIDES_mips="
|
||||
qemu${secondaryArchSuffix}_mips = $portVersion
|
||||
cmd:qemu_system_mips$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64el$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mipsel$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_mips=$REQUIRES_x86
|
||||
|
||||
PROVIDES_ppc="
|
||||
qemu${secondaryArchSuffix}_ppc = $portVersion
|
||||
cmd:qemu_system_ppc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_ppc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_ppc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_sparc="
|
||||
qemu${secondaryArchSuffix}_sparc = $portVersion
|
||||
cmd:qemu_system_sparc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_sparc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_sparc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_m68k="
|
||||
qemu${secondaryArchSuffix}_m68k = $portVersion
|
||||
cmd:qemu_system_m68k$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_m68k=$REQUIRES_x86
|
||||
|
||||
PROVIDES_riscv="
|
||||
qemu${secondaryArchSuffix}_riscv = $portVersion
|
||||
cmd:qemu_system_riscv32$commandSuffix = $portVersion
|
||||
cmd:qemu_system_riscv64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_riscv=$REQUIRES_x86
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcapstone$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libfdt$secondaryArchSuffix
|
||||
devel:libgcrypt$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgnutls$secondaryArchSuffix
|
||||
devel:libgpg_error$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:liblzo2$secondaryArchSuffix
|
||||
devel:libncursesw$secondaryArchSuffix
|
||||
devel:libnettle$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libslirp$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libssh2$secondaryArchSuffix
|
||||
devel:libtasn1$secondaryArchSuffix
|
||||
devel:libusb_1.0$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:git
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gcov$secondaryArchSuffix
|
||||
cmd:gprof$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:find
|
||||
cmd:iasl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:pod2man
|
||||
cmd:python
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CFLAGS="-I`finddir B_SYSTEM_HEADERS_DIRECTORY`/capstone"
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
targetList="$archItem-softmmu,$targetList"
|
||||
done
|
||||
|
||||
runConfigure --omit-dirs "binDir sbinDir" \
|
||||
--omit-buildspec ./configure \
|
||||
--bindir="$commandBinDir" --sbindir="$commandBinDir" \
|
||||
--localedir=data/locale \
|
||||
--enable-gcrypt \
|
||||
--disable-gtk \
|
||||
--smbd=/$relativeBinDir/smbd \
|
||||
--target-list="${targetList::-1}"
|
||||
|
||||
cd build
|
||||
ninja $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
ninja install $jobArgs
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
|
||||
archList=""
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
echo $archItem
|
||||
local APP_SIGNATURE="application/x-vnd.qemu-system-$archItem"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/qemu.rdef.in > qemu-system-$archItem.rdef
|
||||
addResourcesToBinaries qemu-system-$archItem.rdef $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
|
||||
# provide convenience symlink to just "qemu"
|
||||
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
|
||||
ln -s $commandBinDir/qemu-system-x86_64 $commandBinDir/qemu
|
||||
else
|
||||
ln -s $commandBinDir/qemu-system-i386 $commandBinDir/qemu
|
||||
fi
|
||||
|
||||
packageEntries x86 $commandBinDir/qemu
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
for archItem in $platformArchList; do
|
||||
packageEntries $platformItem $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
SUMMARY="A generic and open source machine emulator and virtualizer"
|
||||
DESCRIPTION="QEMU is a generic and open source machine emulator and virtualizer.
|
||||
|
||||
QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a \
|
||||
different machine (e.g. your own PC). By using dynamic translation, it \
|
||||
achieves very good performance."
|
||||
HOMEPAGE="https://www.qemu.org/"
|
||||
COPYRIGHT="2003-2023 Fabrice Bellard"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://download.qemu.org/qemu-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="91d3024d51e441c235dcb1b0c87cb3aab302283166e8d3d5f8282aa06c346be1"
|
||||
SOURCE_DIR="qemu-$portVersion"
|
||||
PATCHES="
|
||||
qemu-$portVersion.patchset
|
||||
qemu-$portVersion-backports.patchset
|
||||
qemu-$portVersion-haiku.patchset
|
||||
"
|
||||
ADDITIONAL_FILES="qemu.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
platformList="x86 arm mips ppc sparc m68k riscv"
|
||||
archList_x86="i386 x86_64"
|
||||
archList_arm="arm aarch64"
|
||||
archList_mips="mips mipsel mips64 mips64el"
|
||||
archList_ppc="ppc ppc64"
|
||||
archList_sparc="sparc sparc64"
|
||||
archList_m68k="m68k"
|
||||
archList_riscv="riscv32 riscv64"
|
||||
|
||||
PROVIDES="
|
||||
qemu$secondaryArchSuffix = $portVersion
|
||||
cmd:elf2dmp$commandSuffix = $portVersion
|
||||
cmd:qemu_edid$commandSuffix = $portVersion
|
||||
cmd:qemu_keymap$commandSuffix = $portVersion
|
||||
cmd:qemu_img$commandSuffix = $portVersion
|
||||
cmd:qemu_io$commandSuffix = $portVersion
|
||||
cmd:qemu_nbd$commandSuffix = $portVersion
|
||||
cmd:qemu_storage_daemon$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:iasl
|
||||
cmd:smbd$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcapstone$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libfdt$secondaryArchSuffix
|
||||
lib:libgcrypt$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgnutls$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:liblzo2$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libnettle$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libssh2$secondaryArchSuffix
|
||||
lib:libssp$secondaryArchSuffix
|
||||
lib:libtasn1$secondaryArchSuffix
|
||||
lib:libusb_1.0$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_x86="
|
||||
qemu${secondaryArchSuffix}_x86 = $portVersion
|
||||
cmd:qemu$commandSuffix = $portVersion
|
||||
cmd:qemu_system_i386$commandSuffix = $portVersion
|
||||
cmd:qemu_system_x86_64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_x86="
|
||||
$REQUIRES
|
||||
qemu$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libslirp$secondaryArchSuffix
|
||||
"
|
||||
SUPPLEMENTS_x86="
|
||||
qemu$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_arm="
|
||||
qemu${secondaryArchSuffix}_arm = $portVersion
|
||||
cmd:qemu_system_aarch64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_arm$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_arm=$REQUIRES_x86
|
||||
|
||||
PROVIDES_mips="
|
||||
qemu${secondaryArchSuffix}_mips = $portVersion
|
||||
cmd:qemu_system_mips$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64el$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mipsel$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_mips=$REQUIRES_x86
|
||||
|
||||
PROVIDES_ppc="
|
||||
qemu${secondaryArchSuffix}_ppc = $portVersion
|
||||
cmd:qemu_system_ppc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_ppc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_ppc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_sparc="
|
||||
qemu${secondaryArchSuffix}_sparc = $portVersion
|
||||
cmd:qemu_system_sparc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_sparc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_sparc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_m68k="
|
||||
qemu${secondaryArchSuffix}_m68k = $portVersion
|
||||
cmd:qemu_system_m68k$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_m68k=$REQUIRES_x86
|
||||
|
||||
PROVIDES_riscv="
|
||||
qemu${secondaryArchSuffix}_riscv = $portVersion
|
||||
cmd:qemu_system_riscv32$commandSuffix = $portVersion
|
||||
cmd:qemu_system_riscv64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_riscv=$REQUIRES_x86
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcapstone$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libfdt$secondaryArchSuffix
|
||||
devel:libgcrypt$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgnutls$secondaryArchSuffix
|
||||
devel:libgpg_error$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:liblzo2$secondaryArchSuffix
|
||||
devel:libncursesw$secondaryArchSuffix
|
||||
devel:libnettle$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libslirp$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libssh2$secondaryArchSuffix
|
||||
devel:libtasn1$secondaryArchSuffix
|
||||
devel:libusb_1.0$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:git
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gcov$secondaryArchSuffix
|
||||
cmd:gprof$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:find
|
||||
cmd:iasl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:pod2man
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CFLAGS="-I`finddir B_SYSTEM_HEADERS_DIRECTORY`/capstone"
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
targetList="$archItem-softmmu,$targetList"
|
||||
done
|
||||
|
||||
runConfigure --omit-dirs "binDir sbinDir" \
|
||||
--omit-buildspec ./configure \
|
||||
--bindir="$commandBinDir" --sbindir="$commandBinDir" \
|
||||
--localedir=data/locale \
|
||||
--enable-gcrypt \
|
||||
--disable-gtk \
|
||||
--smbd=/$relativeBinDir/smbd \
|
||||
--target-list="${targetList::-1}"
|
||||
|
||||
cd build
|
||||
ninja $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
ninja install $jobArgs
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
|
||||
archList=""
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
echo $archItem
|
||||
local APP_SIGNATURE="application/x-vnd.qemu-system-$archItem"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/qemu.rdef.in > qemu-system-$archItem.rdef
|
||||
addResourcesToBinaries qemu-system-$archItem.rdef $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
|
||||
# provide convenience symlink to just "qemu"
|
||||
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
|
||||
ln -s $commandBinDir/qemu-system-x86_64 $commandBinDir/qemu
|
||||
else
|
||||
ln -s $commandBinDir/qemu-system-i386 $commandBinDir/qemu
|
||||
fi
|
||||
|
||||
packageEntries x86 $commandBinDir/qemu
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
for archItem in $platformArchList; do
|
||||
packageEntries $platformItem $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
SUMMARY="A generic and open source machine emulator and virtualizer"
|
||||
DESCRIPTION="QEMU is a generic and open source machine emulator and virtualizer.
|
||||
|
||||
QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a \
|
||||
different machine (e.g. your own PC). By using dynamic translation, it \
|
||||
achieves very good performance."
|
||||
HOMEPAGE="https://www.qemu.org/"
|
||||
COPYRIGHT="2003-2024 Fabrice Bellard"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://download.qemu.org/qemu-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="9763b1efec4fd49796b5080d0883512d70cb6389ead65c661cc3686a52232896"
|
||||
SOURCE_DIR="qemu-$portVersion"
|
||||
PATCHES="
|
||||
qemu-$portVersion.patchset
|
||||
qemu-$portVersion-haiku.patchset
|
||||
"
|
||||
ADDITIONAL_FILES="qemu.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
platformList="x86 arm mips ppc sparc m68k riscv"
|
||||
archList_x86="i386 x86_64"
|
||||
archList_arm="arm aarch64"
|
||||
archList_mips="mips mipsel mips64 mips64el"
|
||||
archList_ppc="ppc ppc64"
|
||||
archList_sparc="sparc sparc64"
|
||||
archList_m68k="m68k"
|
||||
archList_riscv="riscv32 riscv64"
|
||||
|
||||
PROVIDES="
|
||||
qemu$secondaryArchSuffix = $portVersion
|
||||
cmd:elf2dmp$commandSuffix = $portVersion
|
||||
cmd:qemu_edid$commandSuffix = $portVersion
|
||||
cmd:qemu_keymap$commandSuffix = $portVersion
|
||||
cmd:qemu_img$commandSuffix = $portVersion
|
||||
cmd:qemu_io$commandSuffix = $portVersion
|
||||
cmd:qemu_nbd$commandSuffix = $portVersion
|
||||
cmd:qemu_storage_daemon$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:iasl
|
||||
cmd:smbd$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcapstone$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libfdt$secondaryArchSuffix
|
||||
lib:libgcrypt$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgnutls$secondaryArchSuffix
|
||||
lib:libgpg_error$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:liblzo2$secondaryArchSuffix
|
||||
lib:libncursesw$secondaryArchSuffix
|
||||
lib:libnettle$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libssh2$secondaryArchSuffix
|
||||
lib:libssp$secondaryArchSuffix
|
||||
lib:libtasn1$secondaryArchSuffix
|
||||
lib:libusb_1.0$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_x86="
|
||||
qemu${secondaryArchSuffix}_x86 = $portVersion
|
||||
cmd:qemu$commandSuffix = $portVersion
|
||||
cmd:qemu_system_i386$commandSuffix = $portVersion
|
||||
cmd:qemu_system_x86_64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_x86="
|
||||
$REQUIRES
|
||||
qemu$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libslirp$secondaryArchSuffix
|
||||
"
|
||||
SUPPLEMENTS_x86="
|
||||
qemu$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_arm="
|
||||
qemu${secondaryArchSuffix}_arm = $portVersion
|
||||
cmd:qemu_system_aarch64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_arm$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_arm=$REQUIRES_x86
|
||||
|
||||
PROVIDES_mips="
|
||||
qemu${secondaryArchSuffix}_mips = $portVersion
|
||||
cmd:qemu_system_mips$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mips64el$commandSuffix = $portVersion
|
||||
cmd:qemu_system_mipsel$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_mips=$REQUIRES_x86
|
||||
|
||||
PROVIDES_ppc="
|
||||
qemu${secondaryArchSuffix}_ppc = $portVersion
|
||||
cmd:qemu_system_ppc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_ppc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_ppc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_sparc="
|
||||
qemu${secondaryArchSuffix}_sparc = $portVersion
|
||||
cmd:qemu_system_sparc$commandSuffix = $portVersion
|
||||
cmd:qemu_system_sparc64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_sparc=$REQUIRES_x86
|
||||
|
||||
PROVIDES_m68k="
|
||||
qemu${secondaryArchSuffix}_m68k = $portVersion
|
||||
cmd:qemu_system_m68k$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_m68k=$REQUIRES_x86
|
||||
|
||||
PROVIDES_riscv="
|
||||
qemu${secondaryArchSuffix}_riscv = $portVersion
|
||||
cmd:qemu_system_riscv32$commandSuffix = $portVersion
|
||||
cmd:qemu_system_riscv64$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_riscv=$REQUIRES_x86
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcapstone$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libfdt$secondaryArchSuffix
|
||||
devel:libgcrypt$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgnutls$secondaryArchSuffix
|
||||
devel:libgpg_error$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:liblzo2$secondaryArchSuffix
|
||||
devel:libncursesw$secondaryArchSuffix
|
||||
devel:libnettle$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libslirp$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libssh2$secondaryArchSuffix
|
||||
devel:libtasn1$secondaryArchSuffix
|
||||
devel:libusb_1.0$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:git
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gcov$secondaryArchSuffix
|
||||
cmd:gprof$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:find
|
||||
cmd:iasl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:pod2man
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CFLAGS="-I`finddir B_SYSTEM_HEADERS_DIRECTORY`/capstone"
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
targetList="$archItem-softmmu,$targetList"
|
||||
done
|
||||
|
||||
runConfigure --omit-dirs "binDir sbinDir" \
|
||||
--omit-buildspec ./configure \
|
||||
--bindir="$commandBinDir" --sbindir="$commandBinDir" \
|
||||
--localedir=data/locale \
|
||||
--enable-gcrypt \
|
||||
--disable-gtk \
|
||||
--smbd=/$relativeBinDir/smbd \
|
||||
--target-list="${targetList::-1}"
|
||||
|
||||
cd build
|
||||
ninja $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
ninja install $jobArgs
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
|
||||
archList=""
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
archList="$archList $platformArchList"
|
||||
done
|
||||
|
||||
for archItem in $archList; do
|
||||
echo $archItem
|
||||
local APP_SIGNATURE="application/x-vnd.qemu-system-$archItem"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/qemu.rdef.in > qemu-system-$archItem.rdef
|
||||
addResourcesToBinaries qemu-system-$archItem.rdef $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
|
||||
# provide convenience symlink to just "qemu"
|
||||
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
|
||||
ln -s $commandBinDir/qemu-system-x86_64 $commandBinDir/qemu
|
||||
else
|
||||
ln -s $commandBinDir/qemu-system-i386 $commandBinDir/qemu
|
||||
fi
|
||||
|
||||
packageEntries x86 $commandBinDir/qemu
|
||||
|
||||
for platformItem in $platformList; do
|
||||
platformArchList=$(eval echo \$archList_$platformItem)
|
||||
for archItem in $platformArchList; do
|
||||
packageEntries $platformItem $commandBinDir/qemu-system-$archItem
|
||||
done
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user