diff --git a/dev-util/keystone/keystone-0.9.1.recipe b/dev-util/keystone/keystone-0.9.1.recipe new file mode 100644 index 000000000..daac472ec --- /dev/null +++ b/dev-util/keystone/keystone-0.9.1.recipe @@ -0,0 +1,72 @@ +SUMMARY="A Lightweight multi-platform, multi-architecture assembly framework" +DESCRIPTION="* Multi-architecture: Arm, (AArch64/Armv8), Mips, PowerPC, Sparc, \ +SystemZ, XCore & X86 (include X86_64) (details). +* Clean/simple/lightweight/intuitive architecture-neutral API. +* Implemented in C/C++ language, with bindings for Powershell 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. +* Open source - with a dual license." +HOMEPAGE="http://www.keystone-engine.org" +LICENSE="GNU GPL v2" +COPYRIGHT="2013-2015, COSEINC" +REVISION="1" +SOURCE_URI="https://github.com/keystone-engine/keystone/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="e9d706cd0c19c49a6524b77db8158449b9c434b415fbf94a073968b68cf8a9f0" +PATCHES="keystone-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + keystone$secondaryArchSuffix = $portVersion + lib:libkeystone$secondaryArchSuffix = 0 + cmd:kstool +" + +PROVIDES_devel=" + devel:libkeystone$secondaryArchSuffix = 0 +" + +REQUIRES_devel=" + keystone$secondaryArchSuffix == $portVersion base +" + +REQUIRES=" + haiku$secondaryArchSuffix +" + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel +" + +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:cmake + cmd:python + cmd:pkg_config$secondaryArchSuffix +" + +BUILD() +{ + mkdir build + cd build + cmake -DBUILD_LIBS_ONLY=$BUILD_LIBS_ONLY -DLLVM_BUILD_32_BITS="$LLVM_BUILD_32_BITS" \ + -DLLVM_LIBDIR_SUFFIX="$LLVM_LIBDIR_SUFFIX" -DCMAKE_INSTALL_PREFIX=$prefix \ + -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON \ + -DLLVM_TARGETS_TO_BUILD="all" \ + -G "Unix Makefiles" .. + make $jobArgs +} + +INSTALL() +{ + make install -C build + mkdir -p $(dirname $includeDir) + mv $prefix/include $includeDir + prepareInstalledDevelLib libkeystone + fixPkgconfig + packageEntries devel $developDir +} diff --git a/dev-util/keystone/patches/keystone-0.9.1.patchset b/dev-util/keystone/patches/keystone-0.9.1.patchset new file mode 100644 index 000000000..d4becf91e --- /dev/null +++ b/dev-util/keystone/patches/keystone-0.9.1.patchset @@ -0,0 +1,25 @@ +From 0728ed422e3ab37df5dd1b3dcd5e712c7fc18444 Mon Sep 17 00:00:00 2001 +From: Calvin Hill +Date: Sat, 28 Jan 2017 19:20:34 +0000 +Subject: [PATCH] haiku: patch Host.h for endian.h + +--- + llvm/include/llvm/Support/Host.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/llvm/include/llvm/Support/Host.h b/llvm/include/llvm/Support/Host.h +index 8f4bf3c..8114f9b 100644 +--- a/llvm/include/llvm/Support/Host.h ++++ b/llvm/include/llvm/Support/Host.h +@@ -16,7 +16,7 @@ + + #include "llvm/ADT/StringMap.h" + +-#if defined(__linux__) || defined(__GNU__) ++#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) + #include + #else + #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32) +-- +2.7.4 +