mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
qemu-8.0.0: new recipe (#8558)
This commit is contained in:
1497
app-emulation/qemu/patches/qemu-8.0.0-haiku.patchset
Normal file
1497
app-emulation/qemu/patches/qemu-8.0.0-haiku.patchset
Normal file
File diff suppressed because it is too large
Load Diff
43
app-emulation/qemu/patches/qemu-8.0.0.patchset
Normal file
43
app-emulation/qemu/patches/qemu-8.0.0.patchset
Normal file
@@ -0,0 +1,43 @@
|
||||
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
|
||||
|
||||
251
app-emulation/qemu/qemu-8.0.0.recipe
Normal file
251
app-emulation/qemu/qemu-8.0.0.recipe
Normal file
@@ -0,0 +1,251 @@
|
||||
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="bb60f0341531181d6cc3969dd19a013d0427a87f918193970d9adb91131e56d0"
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user