mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
radare2, enable 4.5.1 (#5433)
This commit is contained in:
@@ -1,86 +0,0 @@
|
||||
From 6cd3c369c952c10b1eb6d571513de39747777b12 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Fri, 3 Apr 2020 10:31:38 +0200
|
||||
Subject: Build fix
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index eda093b..611a697 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -616,8 +616,11 @@ else
|
||||
if [ "$HOST_OS" = "openbsd" ]; then
|
||||
USEROSTYPE="bsd"
|
||||
else
|
||||
+if [ "$HOST_OS" = "haiku" ]; then
|
||||
+USEROSTYPE="haiku"
|
||||
+else
|
||||
if [ "$HOST_OS" = "darwin" ]; then
|
||||
-USEROSTYPE="darwin"; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi
|
||||
+USEROSTYPE="darwin"; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi
|
||||
if [ "$LIBVERSION" = "xxx" ]; then
|
||||
LIBVERSION="$VERSION"; fi
|
||||
if [ "$USEROSTYPE" = "gnulinux" ]; then
|
||||
@@ -644,8 +647,12 @@ if [ "$USEROSTYPE" = "solaris" ]; then
|
||||
HAVE_PTRACE="0"
|
||||
USE_PTRACE_WRAP="0"
|
||||
else
|
||||
+if [ "$USEROSTYPE" = "haiku" ]; then
|
||||
+HAVE_PTRACE="0"
|
||||
+USE_PTRACE_WRAP="0"
|
||||
+else
|
||||
HAVE_PTRACE="1"
|
||||
-USE_PTRACE_WRAP="0"; fi; fi; fi; fi; fi
|
||||
+USE_PTRACE_WRAP="0"; fi; fi; fi; fi; fi; fi
|
||||
if [ "$DEBUGGER" = "0" ]; then
|
||||
HAVE_PTRACE="0"; fi
|
||||
if [ "$WANT_PTRACE_WRAP" = "0" ]; then
|
||||
diff --git a/libr/include/r_types.h b/libr/include/r_types.h
|
||||
index b9ac963..21daa9a 100644
|
||||
--- a/libr/include/r_types.h
|
||||
+++ b/libr/include/r_types.h
|
||||
@@ -561,11 +561,11 @@ enum {
|
||||
R_SYS_ARCH_LM32 = 0x80000000LL, // 1<<31
|
||||
};
|
||||
|
||||
-#if HAVE_CLOCK_NANOSLEEP && CLOCK_MONOTONIC && (__linux__ || (__FreeBSD__ && __FreeBSD_version >= 1101000) || (__NetBSD__ && __NetBSD_Version__ >= 700000000))
|
||||
-#define HAS_CLOCK_NANOSLEEP 1
|
||||
-#else
|
||||
+//#if HAVE_CLOCK_NANOSLEEP && CLOCK_MONOTONIC && (__linux__ || (__FreeBSD__ && __FreeBSD_version >= 1101000) || (__NetBSD__ && __NetBSD_Version__ >= 700000000))
|
||||
+//#define HAS_CLOCK_NANOSLEEP 1
|
||||
+//#else
|
||||
#define HAS_CLOCK_NANOSLEEP 0
|
||||
-#endif
|
||||
+//#endif
|
||||
|
||||
/* os */
|
||||
#if defined (__QNX__)
|
||||
diff --git a/libr/io/p/io_gprobe.c b/libr/io/p/io_gprobe.c
|
||||
index ad4017d..50b1b39 100644
|
||||
--- a/libr/io/p/io_gprobe.c
|
||||
+++ b/libr/io/p/io_gprobe.c
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
||||
-#if __linux__ || __APPLE__ || __OpenBSD__ || __FreeBSD__ || __NetBSD__ || __DragonFly__
|
||||
+#if __linux__ || __APPLE__ || __OpenBSD__ || __FreeBSD__ || __NetBSD__ || __DragonFly__ || __HAIKU__
|
||||
#include <sys/ioctl.h>
|
||||
#include <termios.h>
|
||||
#else
|
||||
diff --git a/shlr/heap/include/r_jemalloc/internal/jemalloc_internal_decls.h b/shlr/heap/include/r_jemalloc/internal/jemalloc_internal_decls.h
|
||||
index c907d91..52dae8b 100644
|
||||
--- a/shlr/heap/include/r_jemalloc/internal/jemalloc_internal_decls.h
|
||||
+++ b/shlr/heap/include/r_jemalloc/internal/jemalloc_internal_decls.h
|
||||
@@ -9,7 +9,7 @@
|
||||
#else
|
||||
# include <sys/param.h>
|
||||
# include <sys/mman.h>
|
||||
-# if !defined(__pnacl__) && !defined(__native_client__)
|
||||
+# if !defined(__pnacl__) && !defined(__native_client__) && !defined(__HAIKU__)
|
||||
# include <sys/syscall.h>
|
||||
# if !defined(SYS_write) && defined(__NR_write)
|
||||
# define SYS_write __NR_write
|
||||
--
|
||||
2.24.1
|
||||
|
||||
22
dev-util/radare2/patches/radare2-4.5.1.patchset
Normal file
22
dev-util/radare2/patches/radare2-4.5.1.patchset
Normal file
@@ -0,0 +1,22 @@
|
||||
From 6f963691d4cb1ac0458212160ceebda35944e7c3 Mon Sep 17 00:00:00 2001
|
||||
From: devnexen <devnexen@gmail.com>
|
||||
Date: Mon, 23 Nov 2020 09:28:36 +0000
|
||||
Subject: Merge upstream patch for using proper team_id/pid_t
|
||||
|
||||
|
||||
diff --git a/libr/util/sys.c b/libr/util/sys.c
|
||||
index f2dc348..6dbdc67 100644
|
||||
--- a/libr/util/sys.c
|
||||
+++ b/libr/util/sys.c
|
||||
@@ -1212,7 +1212,7 @@ R_API char *r_sys_pid_to_path(int pid) {
|
||||
int32_t group = 0;
|
||||
image_info ii;
|
||||
|
||||
- while (get_next_image_info (0, &group, &ii) == B_OK) {
|
||||
+ while (get_next_image_info ((team_id)pid, &group, &ii) == B_OK) {
|
||||
if (ii.type == B_APP_IMAGE) {
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,294 +0,0 @@
|
||||
SUMMARY="UNIX-like reverse engineering framework and commandline tools"
|
||||
DESCRIPTION="Forensics tool, scriptable commandline hexadecimal editor, \
|
||||
able to open disk files, analyzing binaries in several common and less common \
|
||||
formats, disassemble code for several CPU architectures, debug programs, \
|
||||
attach to remote GDB servers, and much more."
|
||||
HOMEPAGE="https://radare.org/"
|
||||
COPYRIGHT="2007-2016 pancake
|
||||
2007-2015 Skia
|
||||
2012-2015 pof
|
||||
2008-2015 nibble
|
||||
2007-2015 ret2libc
|
||||
2009-2016 defragger
|
||||
2005-2006 Matt Mackall
|
||||
2009-2015 earada
|
||||
2009-2015 Jody Frankowski
|
||||
2009-2015 Anton Kochkov
|
||||
2011-2015 RoValles
|
||||
2009-2015 dso
|
||||
2013-2016 condret
|
||||
2012-2015 Fedor Sakharov
|
||||
2012-2015 Bhootravi
|
||||
2013-2015 th0rpe
|
||||
2015 julien (jvoisin) voisin
|
||||
2014-2015 jn
|
||||
2009-2015 montekki
|
||||
2009-2015 ninjahacker
|
||||
2015 riq
|
||||
2015 qnix
|
||||
2015 danielps
|
||||
2015 dkreuter
|
||||
2015 ampotos
|
||||
2008 Anant Narayanan
|
||||
2008-2015 inisider
|
||||
2015 nodepad
|
||||
2008-2013 xvilka
|
||||
2013-2015 sghctoma
|
||||
2013-2014 batchdrake
|
||||
2010-2015 Adam Pridgen
|
||||
2010-2013 eloi
|
||||
2014 jfrankowski
|
||||
2009-2015 The Lemon Man
|
||||
2013-2015 fenugrec
|
||||
2004 Philippe Biondi
|
||||
2015 aaronpuchert
|
||||
2010-2015 dark_k3y
|
||||
2015 Felix Held
|
||||
2012-2013 Alexander
|
||||
2014 Jonathan Neuschöfer
|
||||
2016 bobby.smiles
|
||||
2015-2016 oddcoder
|
||||
2009-2016 Alexandru Caciulescu
|
||||
2015-2016 javierprtd
|
||||
2016 SkUaTeR
|
||||
2009-2016 madprogrammer
|
||||
2016 moritz
|
||||
2016 n4x0r
|
||||
2016 soez
|
||||
2013 Daniel Holden
|
||||
2010 Bean Lee
|
||||
2014-2016 defragger
|
||||
2014-2016 madprogrammer
|
||||
1986-2016 Free Software Foundation, Inc.
|
||||
2005 QNX Software Systems.
|
||||
2001-2004 Fabrice Bellard
|
||||
2009 Intel Corporation
|
||||
1988-2004 Keith Packard
|
||||
1988-2004 Bart Massey
|
||||
2007-2015 dso
|
||||
2002-2013 Vivek Thampi
|
||||
1999-2013 Dieter Baron and Thomas Klausner
|
||||
1995-2013 Jean-loup Gailly
|
||||
2012 Alexander Demin
|
||||
2005 Jan Wilmans
|
||||
2002-2009 Bas Wijnen
|
||||
2014-2016 condret
|
||||
2016 unlogic
|
||||
2012 Karl Hobley
|
||||
2007 Vanya A. Sergeev
|
||||
2007-2012 Synopsys Inc
|
||||
1994-1995 Myricom, Inc.
|
||||
1986-1995 Ian F. Darwin
|
||||
2003 Christos Zoulas
|
||||
1992-1994 Henry Spencer
|
||||
2011 Remy Oukaour
|
||||
2000-2001 Markus Friedl
|
||||
2008 Nadia Heninger
|
||||
2008 J. Alex Halderman
|
||||
2003-2010 University of Illinois at Urbana-Champaign
|
||||
1987-1994 The Regents of the University of California
|
||||
2000-2001 Aaron D. Gifford
|
||||
1991-1992 RSA Data Security, Inc.
|
||||
2012 Yann Collet
|
||||
1995-1999 Cryptography Research, Inc. All
|
||||
1997-1998 Andrew Tridgell
|
||||
2002-2003 Steve French
|
||||
2010-2016 Sebastian Reichel"
|
||||
LICENSE="GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/radare/radare2/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="4abcb9c9dff24eab44d64d392e115ae774ab1ad90d04f2c983d96d7d7f9476aa"
|
||||
SOURCE_FILENAME="radare2-$portVersion.tar.gz"
|
||||
#PATCHES="radare2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandBinDir=$prefix/bin
|
||||
commandSuffix=
|
||||
fi
|
||||
|
||||
libVersion="4.3.1"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
radare2$secondaryArchSuffix = $portVersion
|
||||
cmd:r2$commandSuffix = $portVersion
|
||||
cmd:r2agent$commandSuffix = $portVersion
|
||||
cmd:r2pm$commandSuffix = $portVersion
|
||||
cmd:rabin2$commandSuffix = $portVersion
|
||||
cmd:radare2$commandSuffix = $portVersion
|
||||
cmd:radiff2$commandSuffix = $portVersion
|
||||
cmd:rafind2$commandSuffix = $portVersion
|
||||
cmd:ragg2$commandSuffix = $portVersion
|
||||
cmd:ragg2_cc$commandSuffix = $portVersion
|
||||
cmd:rahash2$commandSuffix = $portVersion
|
||||
cmd:rarun2$commandSuffix = $portVersion
|
||||
cmd:rasm2$commandSuffix = $portVersion
|
||||
cmd:rax2$commandSuffix = $portVersion
|
||||
cmd:r2p$commandSuffix = $portVersion
|
||||
lib:libr_anal$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_asm$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_bin$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_bp$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_config$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_cons$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_core$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_crypto$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_debug$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_egg$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_flag$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_fs$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_hash$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_io$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_lang$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_magic$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_main$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_parse$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_reg$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_search$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_shlr$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_socket$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_syscall$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libr_util$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= r1~alpha4_pm_hrev52284
|
||||
lib:libcapstone$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libgmp$secondaryArchSuffix
|
||||
lib:libmagic$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libxxhash$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
radare2${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libr_anal$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_asm$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_bin$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_bp$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_config$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_cons$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_core$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_crypto$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_debug$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_egg$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_flag$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_fs$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_hash$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_io$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_lang$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_magic$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_parse$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_reg$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_search$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_shlr$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_socket$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_syscall$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libr_util$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
radare2${secondaryArchSuffix} == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= r1~alpha4_pm_hrev52284
|
||||
devel:libcapstone$secondaryArchSuffix
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
devel:liblua$secondaryArchSuffix
|
||||
devel:libmagic$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libxxhash$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:git
|
||||
cmd:make
|
||||
cmd:sh
|
||||
cmd:patch
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
# What happend with libr2.so?
|
||||
defineDebugInfoPackage radare2$secondaryArchSuffix \
|
||||
"$commandBinDir"/r2agent \
|
||||
"$commandBinDir"/rabin2 \
|
||||
"$commandBinDir"/radare2 \
|
||||
"$commandBinDir"/radiff2 \
|
||||
"$commandBinDir"/rafind2 \
|
||||
"$commandBinDir"/ragg2 \
|
||||
"$commandBinDir"/rahash2 \
|
||||
"$commandBinDir"/rarun2 \
|
||||
"$commandBinDir"/rasm2 \
|
||||
"$commandBinDir"/rax2 \
|
||||
"$libDir"/libr_anal.so.$libVersion \
|
||||
"$libDir"/libr_asm.so.$libVersion \
|
||||
"$libDir"/libr_bin.so.$libVersion \
|
||||
"$libDir"/libr_bp.so.$libVersion \
|
||||
"$libDir"/libr_config.so.$libVersion \
|
||||
"$libDir"/libr_cons.so.$libVersion \
|
||||
"$libDir"/libr_core.so.$libVersion \
|
||||
"$libDir"/libr_crypto.so.$libVersion \
|
||||
"$libDir"/libr_debug.so.$libVersion \
|
||||
"$libDir"/libr_egg.so.$libVersion \
|
||||
"$libDir"/libr_flag.so.$libVersion \
|
||||
"$libDir"/libr_fs.so.$libVersion \
|
||||
"$libDir"/libr_hash.so.$libVersion \
|
||||
"$libDir"/libr_io.so.$libVersion \
|
||||
"$libDir"/libr_lang.so.$libVersion \
|
||||
"$libDir"/libr_magic.so.$libVersion \
|
||||
"$libDir"/libr_parse.so.$libVersion \
|
||||
"$libDir"/libr_reg.so.$libVersion \
|
||||
"$libDir"/libr_search.so.$libVersion \
|
||||
"$libDir"/libr_socket.so.$libVersion \
|
||||
"$libDir"/libr_syscall.so.$libVersion \
|
||||
"$libDir"/libr_util.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
CFLAGS="-lbsd" LDFLAGS="-lbsd" \
|
||||
runConfigure --omit-dirs docdir,datarootdir,bindir ./configure \
|
||||
--bindir=$commandBinDir \
|
||||
--with-sysmagic \
|
||||
--with-syscapstone \
|
||||
--with-sysxxhash \
|
||||
--with-openssl
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
cp libr/*/libr_*.so $libDir
|
||||
|
||||
mkdir -p `dirname $docDir`
|
||||
mv $prefix/data/radare2 $docDir
|
||||
rm -rf $prefix/share
|
||||
|
||||
prepareInstalledDevelLibs libr_shlr libr_anal libr_asm libr_bin \
|
||||
libr_bp libr_config libr_cons libr_core libr_crypto libr_debug libr_egg \
|
||||
libr_flag libr_fs libr_hash libr_io libr_lang libr_magic libr_parse \
|
||||
libr_reg libr_search libr_socket libr_syscall libr_util
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
# Be warned, it will clone the regressions repo with git.
|
||||
# It will try to use the installed radare2 executable, which is
|
||||
# not available in PATH in chroot.
|
||||
make tests
|
||||
}
|
||||
@@ -96,12 +96,13 @@ COPYRIGHT="2007-2020 pancake
|
||||
2010-2016 Sebastian Reichel"
|
||||
LICENSE="GNU GPL v3
|
||||
GNU LGPL v3"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://github.com/radare/radare2/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="4e85b35987bd2ca5881ad9585970b970fe7374814bd383bd1cd62e961a0c228b"
|
||||
PATCHES="radare2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
@@ -110,7 +111,7 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
fi
|
||||
|
||||
libVersion="4.5.1"
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
|
||||
Reference in New Issue
Block a user