cutter, bump version (#6213)

This commit is contained in:
Schrijvers Luc
2021-09-29 22:03:06 +02:00
committed by GitHub
parent 158b77865e
commit a38be3a682
3 changed files with 154 additions and 152 deletions

View File

@@ -1,128 +0,0 @@
SUMMARY="A Qt and C++ GUI for radare2 reverse engineering framework"
DESCRIPTION="Radare is a portable reversing framework that can...
* Disassemble (and assemble for) many different architectures
* Debug with local native and remote debuggers (gdb, rap, webui, r2pipe, \
winedbg, windbg)
* Run on Linux, *BSD, Windows, OSX, Android, iOS, Solaris and Haiku
* Perform forensics on filesystems and data carving
* Be scripted in Python, Javascript, Go and more
* Support collaborative analysis using the embedded webserver
* Visualize data structures of several file types
* Patch programs to uncover new features or fix vulnerabilities
* Use powerful analysis capabilities to speed up reversing
* Aid in software exploitation"
HOMEPAGE="https://github.com/radareorg/cutter"
COPYRIGHT="2018 xarkes, thestr4ng3r, ballessay, Hugo Teso"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="868213d2ea0b4a29b9b03c9b605c2b2155c4c03b62735a9bd376a0dadcb4fe1b"
SOURCE_FILENAME="cutter-$portVersion.tar.gz"
PATCHES="cutter-$portVersion.patchset"
ADDITIONAL_FILES="cutter.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cutter$secondaryArchSuffix = $portVersion
cmd:cutter$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
# cmd:python3
lib:libcapstone$secondaryArchSuffix
lib:libmagic$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Svg$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libr_anal$secondaryArchSuffix
lib:libr_asm$secondaryArchSuffix
lib:libr_bin$secondaryArchSuffix
lib:libr_bp$secondaryArchSuffix
lib:libr_config$secondaryArchSuffix
lib:libr_cons$secondaryArchSuffix
lib:libr_core$secondaryArchSuffix
lib:libr_crypto$secondaryArchSuffix
lib:libr_debug$secondaryArchSuffix
lib:libr_egg$secondaryArchSuffix
lib:libr_flag$secondaryArchSuffix
lib:libr_fs$secondaryArchSuffix
lib:libr_hash$secondaryArchSuffix
lib:libr_io$secondaryArchSuffix
lib:libr_lang$secondaryArchSuffix
lib:libr_magic$secondaryArchSuffix
lib:libr_parse$secondaryArchSuffix
lib:libr_reg$secondaryArchSuffix
lib:libr_search$secondaryArchSuffix
lib:libr_socket$secondaryArchSuffix
lib:libr_syscall$secondaryArchSuffix
lib:libr_util$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libxxhash$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcapstone$secondaryArchSuffix
devel:libmagic$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Svg$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libr_core$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libxxhash$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
# cmd:python3
cmd:qmake$secondaryArchSuffix >= 5
"
BUILD()
{
cd src
mkdir -p build
cd build
cmake .. \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCUTTER_ENABLE_QTWEBENGINE=OFF \
-DCUTTER_ENABLE_JUPYTER=OFF \
-DRADARE2_INCLUDE_DIRS="$portPackageLinksDir/lib~libr_core$secondaryArchSuffix/$relativeIncludeDir/libr" \
-DCMAKE_CXX_FLAGS="-fpermissive"
make $jobArgs
}
INSTALL()
{
cd src/build
mkdir -p $appsDir
cp Cutter $appsDir/Cutter
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/cutter.rdef.in > cutter.rdef
addResourcesToBinaries cutter.rdef \
$appsDir/Cutter
addAppDeskbarSymlink $appsDir/Cutter
}
TEST()
{
make test
}

View File

@@ -0,0 +1,154 @@
SUMMARY="A Qt and C++ GUI for rizin reverse engineering framework"
DESCRIPTION="Cutter is a free and open-source reverse engineering platform \
powered by rizin.
It aims at being an advanced and customizable reverse engineering platform \
while keeping the user experience in mind. Cutter is created by reverse \
engineers for reverse engineers."
HOMEPAGE="https://github.com/radareorg/cutter"
COPYRIGHT="2021 xarkes, thestr4ng3r, ballessay, Hugo Teso"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="b6ea21b8846c426ec17150ae5ef56e3e415c7e0b16190295b6bbdf367d4b755c"
SOURCE_FILENAME="cutter-$portVersion.tar.gz"
srcGitRev_2="974298653ba71b958e1b6c83f6011f5fefff6236"
SOURCE_URI_2="https://github.com/rizinorg/cutter-translations/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="9a9d42769c1e9364dfc694968b05994d02ea840813a33b16ca6a6cbe80c90069"
SOURCE_FILENAME_2="translations-$srcGitRev_2.tar.gz"
ADDITIONAL_FILES="cutter.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cutter$secondaryArchSuffix = $portVersion
app:Cutter$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcapstone$secondaryArchSuffix
lib:libgvc$secondaryArchSuffix
lib:libpython3.9$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Svg$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:librz_analysis$secondaryArchSuffix
lib:librz_asm$secondaryArchSuffix
lib:librz_bin$secondaryArchSuffix
lib:librz_bp$secondaryArchSuffix
lib:librz_config$secondaryArchSuffix
lib:librz_cons$secondaryArchSuffix
lib:librz_core$secondaryArchSuffix
lib:librz_crypto$secondaryArchSuffix
lib:librz_debug$secondaryArchSuffix
lib:librz_diff$secondaryArchSuffix
lib:librz_egg$secondaryArchSuffix
lib:librz_flag$secondaryArchSuffix
lib:librz_hash$secondaryArchSuffix
lib:librz_io$secondaryArchSuffix
lib:librz_lang$secondaryArchSuffix
lib:librz_magic$secondaryArchSuffix
lib:librz_main$secondaryArchSuffix
lib:librz_parse$secondaryArchSuffix
lib:librz_reg$secondaryArchSuffix
lib:librz_search$secondaryArchSuffix
lib:librz_socket$secondaryArchSuffix
lib:librz_syscall$secondaryArchSuffix
lib:librz_type$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libtree_sitter$secondaryArchSuffix
lib:libuv$secondaryArchSuffix
lib:libxxhash$secondaryArchSuffix
lib:liblz4$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libzip$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcapstone$secondaryArchSuffix
devel:libgvc$secondaryArchSuffix
devel:libpython3.9$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Svg$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:librz_analysis$secondaryArchSuffix
devel:librz_asm$secondaryArchSuffix
devel:librz_bin$secondaryArchSuffix
devel:librz_bp$secondaryArchSuffix
devel:librz_config$secondaryArchSuffix
devel:librz_cons$secondaryArchSuffix
devel:librz_core$secondaryArchSuffix
devel:librz_crypto$secondaryArchSuffix
devel:librz_debug$secondaryArchSuffix
devel:librz_diff$secondaryArchSuffix
devel:librz_egg$secondaryArchSuffix
devel:librz_flag$secondaryArchSuffix
devel:librz_hash$secondaryArchSuffix
devel:librz_io$secondaryArchSuffix
devel:librz_lang$secondaryArchSuffix
devel:librz_magic$secondaryArchSuffix
devel:librz_main$secondaryArchSuffix
devel:librz_parse$secondaryArchSuffix
devel:librz_reg$secondaryArchSuffix
devel:librz_search$secondaryArchSuffix
devel:librz_socket$secondaryArchSuffix
devel:librz_syscall$secondaryArchSuffix
devel:librz_type$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libtree_sitter$secondaryArchSuffix
devel:libuv$secondaryArchSuffix
devel:libxxhash$secondaryArchSuffix
devel:liblz4$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libzip$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3.9
cmd:qmake$secondaryArchSuffix >= 5
"
BUILD()
{
cp -rf $sourceDir2/cutter-translations-$srcGitRev_2/* src/translations
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$appsDir \
-DCUTTER_ENABLE_PYTHON=ON \
-DCUTTER_USE_BUNDLED_RIZIN=OFF \
-DCMAKE_CXX_FLAGS="-fpermissive"
make -C build $jobArgs
}
INSTALL()
{
make -C build install
mv $appsDir/cutter $appsDir/Cutter
# we are not linux
rm -rf $prefix/share
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/cutter.rdef.in > cutter.rdef
addResourcesToBinaries cutter.rdef \
$appsDir/Cutter
addAppDeskbarSymlink $appsDir/Cutter
}

View File

@@ -1,24 +0,0 @@
From ed35fa0f5036239711b25aa8b893c7524512e901 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Mon, 23 Nov 2020 11:57:51 +0000
Subject: Haiku doesn't have O_ASYNC yet
diff --git a/src/widgets/ConsoleWidget.cpp b/src/widgets/ConsoleWidget.cpp
index 8730f95..58d497e 100644
--- a/src/widgets/ConsoleWidget.cpp
+++ b/src/widgets/ConsoleWidget.cpp
@@ -16,6 +16,10 @@
#include "common/SvgIconEngine.h"
#include "WidgetShortcuts.h"
+#ifdef Q_OS_HAIKU
+#define O_ASYNC O_NONBLOCK
+#endif
+
#ifdef Q_OS_WIN
#include <io.h>
#define dup2 _dup2
--
2.28.0