Files
haikuports/dev-libs/capstone/capstone5-5.0.1.recipe
augiedoggie e70520e600 capstone: remove sed editing of .pc file (#9608)
Include paths are already correct on x86_64 and x86 without it.
Fixes #9591
2023-10-10 14:44:07 -06:00

108 lines
2.8 KiB
Bash

SUMMARY="Lightweight multi-platform, multi-architecture disassembly framework"
DESCRIPTION="* Multi-architectures: Arm, Arm64 (Armv8), Mips, PowerPC, Sparc, \
SystemZ, XCore & X86 (include X86_64) (details).
* Clean/simple/lightweight/intuitive architecture-neutral API.
* Provide details on disassembled instruction (called “decomposer” by some others).
* Provide some semantics of the disassembled instruction, such as list of \
implicit registers read & written.
* Implemented in pure C language, with bindings for Perl, Python, Ruby, C#, \
NodeJS, Java, GO, C++, OCaml, Lua, Rust, Delphi, Free Pascall & Vala available.
* Native support for Windows & *nix (with Mac OSX, iOS, Android, Linux, *BSD & \
Solaris confirmed).
* Thread-safe by design.
* Special support for embedding into firmware or OS kernel.
* High performance & suitable for malware analysis (capable of handling \
various X86 malware tricks)."
HOMEPAGE="http://www.capstone-engine.org"
COPYRIGHT="2013-2020 COSEINC"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="https://github.com/capstone-engine/capstone/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="2b9c66915923fdc42e0e32e2a9d7d83d3534a45bb235e163a70047951890c01a"
SOURCE_FILENAME="capstone-$portVersion.tar.gz"
SOURCE_DIR="capstone-$portVersion"
PATCHES="capstone5-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="5.0.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
capstone5$secondaryArchSuffix = $portVersion
lib:libcapstone$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_tools="
capstone5${secondaryArchSuffix}_tools = $portVersion
cmd:cstool$commandSuffix = $portVersion
"
REQUIRES_tools="
capstone5$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
"
CONFLICTS_tools="
capstone$secondaryArchSuffix
"
PROVIDES_devel="
capstone5${secondaryArchSuffix}_devel = $portVersion
devel:libcapstone$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
capstone5$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
capstone${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
-DBUILD_SHARED_LIBS=ON
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libcapstone
fixPkgconfig
packageEntries tools \
$commandBinDir
packageEntries devel $developDir \
$libDir/cmake
}
TEST()
{
./build/test_basic
./build/test_detail
./build/test_x86
}