unicorn, drop old version (#9708)

This commit is contained in:
Schrijvers Luc
2023-10-30 06:33:15 +00:00
committed by GitHub
parent 6c60f0a7d7
commit e7eccdb0aa
2 changed files with 0 additions and 157 deletions

View File

@@ -1,63 +0,0 @@
From 0cce29bf31c1af1d5e1f4ea3514dc384fa63f211 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Thu, 2 Aug 2018 15:04:23 +0000
Subject: [PATCH 1/2] Haiku: fix broken gcc strong stack protector
---
Makefile | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Makefile b/Makefile
index 9a10c2e..3cf68dc 100644
--- a/Makefile
+++ b/Makefile
@@ -139,6 +139,15 @@ UNICORN_CFLAGS := $(UNICORN_CFLAGS:-fPIC=)
$(LIBNAME)_LDFLAGS += -Wl,--output-def,unicorn.def
DO_WINDOWS_EXPORT = 1
+# Haiku
+else ifneq ($(filter Haiku%,$(UNAME_S)),)
+EXT = so
+VERSION_EXT = $(EXT).$(API_MAJOR)
+AR_EXT = a
+$(LIBNAME)_LDFLAGS += -Wl,-Bsymbolic-functions,-soname,lib$(LIBNAME).$(VERSION_EXT)
+UNICORN_CFLAGS := $(UNICORN_CFLAGS:-fPIC=)
+UNICORN_QEMU_FLAGS += --disable-stack-protector
+
# Linux, Darwin
else
EXT = so
--
2.16.4
From af943ccc2bad58f8843e831d4a00880fbdbd3396 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Thu, 2 Aug 2018 15:12:18 +0000
Subject: [PATCH 2/2] qemu: Backport minor Haiku fix
We need to push this fix upstream to qemu. If we don't
get it upstreamed, i'll circle back and patch it if
Unicorn updates its qemu version.
---
qemu/util/oslib-posix.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/qemu/util/oslib-posix.c b/qemu/util/oslib-posix.c
index b688ae6..3614205 100644
--- a/qemu/util/oslib-posix.c
+++ b/qemu/util/oslib-posix.c
@@ -45,7 +45,11 @@
#include <sys/mman.h>
#include <libgen.h>
#include <setjmp.h>
+#ifdef __HAIKU__
+#include <posix/signal.h>
+#else
#include <sys/signal.h>
+#endif
#ifdef CONFIG_LINUX
#if !defined(__CYGWIN__)
--
2.16.4

View File

@@ -1,94 +0,0 @@
SUMMARY="A CPU emulator framework"
DESCRIPTION="Unicorn is a lightweight, thread-safe, multi-platform, multi-architecture \
CPU emulator framework written in pure C, and based on QEMU."
HOMEPAGE="https://www.unicorn-engine.org/"
COPYRIGHT="2015-2018, Nguyen Anh Quynh"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/unicorn-engine/unicorn/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="3a6a4f2b8c405ab009040ca43af8e4aa10ebe44d9c8b336aa36dc35df955017c"
SOURCE_FILENAME="unicorn-$portVersion.tar.gz"
SOURCE_DIR="unicorn-$portVersion"
# Should be safe to remove after 1.0.1 (upstreamed)
PATCHES="unicorn-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
unicorn$secondaryArchSuffix = $portVersion
lib:libunicorn$secondaryArchSuffix = $portVersion compat >= 1.0
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
unicorn${secondaryArchSuffix}_devel
devel:libunicorn$secondaryArchSuffix = $portVersion compat >= 1.0
"
REQUIRES_devel="
unicorn$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:python
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:find
cmd:awk
"
defineDebugInfoPackage unicorn$secondaryArchSuffix \
"$libDir"/libunicorn.so.1
SUMMARY_python="The python bindings for unicorn"
PROVIDES_python="
unicorn_python = $portVersion
"
REQUIRES_python="
unicorn == $portVersion base
haiku$secondaryArchSuffix
lib:libunicorn$secondaryArchSuffix
cmd:python
"
BUILD()
{
# We make clean because unicorn is *really*
# sensitive to mis-matched headers/libraries
make clean && make
cd bindings/python
make
}
INSTALL()
{
make PREFIX=$prefix install
mkdir -p $developDir/headers
mv $prefix/include/* $developDir/headers
rm -rf $prefix/include
prepareInstalledDevelLib libunicorn
fixPkgconfig
packageEntries devel \
"$developDir"
# Install python module
cd bindings/python
pythonVersion=$(python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$libDir/python$pythonVersion/vendor-packages/
mkdir -p $installLocation
cp -R unicorn $installLocation/
packageEntries python \
$libDir/python*
}