Files
haikuports/dev-util/cutter/cutter-1.7.1.recipe
2018-09-01 14:35:19 -04:00

124 lines
3.6 KiB
Bash

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="e9b737d75a6d5b6f27c1406ee6b09f4e570db226c3a52f2f6c5f3b8bdd4050f8"
SOURCE_FILENAME="cutter-$portVersion.tar.gz"
ADDITIONAL_FILES="cutter.rdef.in"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
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 >= 2.9.0
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
"
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 >= 2.9.0
devel:libssl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
# cmd:python3
cmd:qmake$secondaryArchSuffix >= 5
"
BUILD()
{
cd src
mkdir -p build
cd build
cmake .. \
-DCUTTER_ENABLE_QTWEBENGINE=OFF \
-DCUTTER_ENABLE_JUPYTER=OFF \
-DRADARE2_INCLUDE_DIRS="$portPackageLinksDir/lib~libr_core/$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
}