mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-06 08:25:01 +01:00
retdec: first working version, see https://github.com/pentoo/pentoo-overlay/issues/258 for more details
This commit is contained in:
parent
49d1f2b71c
commit
ac2cf80038
6 changed files with 89 additions and 48 deletions
|
|
@ -1 +1 @@
|
|||
DIST retdec-3.0.tar.gz 1703308 BLAKE2B 2294b280088eb93b785c108e957ace666f1c2b50ce78bc9bf2a0fed2999674609e081d5826eea74865231dda6166b4cb1a0d59df125290e728eb2815ee8f5af0 SHA512 b175427ed9cc94c17242219c124aea4c16c9f1cf5b50bc0f5381987ac826320d2b27fb7f6fcc710162a8fb38504abd9e40f1ca5aca17fae1f65c602652a27586
|
||||
DIST retdec-3.1.tar.gz 2884221 BLAKE2B 390c44e98d6dc9a748f7b09417715c83aeb13d78d733a65b6be7c5a4b45627feb4bb030933613181dd8c98c89a1f22f1b0a3a289ea708ec32f6e00f94f7ae2b0 SHA512 a85dc2df1bcb0081459fd74eb8cf6c2f1226227b37ac494f094b49ba6b806b2bf53790727516f8bda99d387f02f5778b43b6e560477d5825ddcf210f91a5eb92
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="RetDec is a retargetable machine-code decompiler based on LLVM."
|
||||
HOMEPAGE="https://github.com/avast-tl/retdec"
|
||||
SRC_URI="https://github.com/avast-tl/retdec/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
#https://github.com/pentoo/pentoo-overlay/issues/258
|
||||
#KEYWORDS="~x86 ~amd64"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="app-arch/upx-bin
|
||||
sys-devel/bc
|
||||
"
|
||||
# media-gfx/graphviz
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/cmake
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
|
||||
# -Dbtrfs-snapshot=$(usex btrfs)
|
||||
#-DRETDEC_DOC=ON
|
||||
#-DRETDEC_TESTS=ON
|
||||
#-DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/opt"
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
#mkdir build && cd build
|
||||
#cmake .. -DCMAKE_INSTALL_PREFIX=<path>
|
||||
#make && make install
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX="${EPREFIX}/opt"
|
||||
}
|
||||
82
dev-util/retdec/retdec-3.1.ebuild
Normal file
82
dev-util/retdec/retdec-3.1.ebuild
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="RetDec is a retargetable machine-code decompiler based on LLVM."
|
||||
HOMEPAGE="https://github.com/avast-tl/retdec"
|
||||
SRC_URI="https://github.com/avast-tl/retdec/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
IUSE="doc external"
|
||||
|
||||
RDEPEND="|| ( app-arch/upx-ucl app-arch/upx-bin )
|
||||
sys-devel/bc
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
dev-ruby/pkg-config
|
||||
sys-apps/coreutils
|
||||
sys-libs/zlib
|
||||
sys-libs/ncurses:*
|
||||
|
||||
dev-libs/libdwarf
|
||||
|
||||
doc? ( media-gfx/graphviz
|
||||
app-doc/doxygen )"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/cmake"
|
||||
|
||||
# dev-libs/jsoncpp
|
||||
# dev-libs/rapidjson
|
||||
# dev-libs/tinyxml2
|
||||
|
||||
CMAKE_REMOVE_MODULES_LIST="FindJsoncpp FindRapidjson FindTynyxml2 FindLibdwarf FindOpenssl"
|
||||
|
||||
src_prepare(){
|
||||
#https://github.com/avast-tl/retdec/issues/357
|
||||
|
||||
#compile with system dwarf
|
||||
sed "s|libdwarf|dwarf elf z|g" -i ./src/cpdetect/CMakeLists.txt
|
||||
sed "s|libdwarf|dwarf elf z|g" -i ./src/dwarfparser/CMakeLists.txt
|
||||
|
||||
#FIXME: do not download files here
|
||||
#use system files
|
||||
# sed "s|add_subdirectory(jsoncpp)|#add_subdirectory(jsoncpp)|g" -i ./deps/CMakeLists.txt
|
||||
#/data/notmpfs/portage/dev-util/retdec-3.1/work/retdec-3.1/include/retdec/config/base.h:16:10: fatal error: json/json.h: No such file or directory
|
||||
# #include <json/json.h>
|
||||
# sed "s|add_subdirectory(rapidjson)|#add_subdirectory(rapidjson)|g" -i ./deps/CMakeLists.txt
|
||||
# sed "s|add_subdirectory(tinyxml2)|#add_subdirectory(tinyxml2)|g" -i ./deps/CMakeLists.txt
|
||||
sed "s|add_subdirectory(libdwarf)|#add_subdirectory(libdwarf)|g" -i ./deps/CMakeLists.txt
|
||||
|
||||
sed "s|INSTALL_PATH=\"\$1\"|INSTALL_PATH=\"${D}\$1\"|g" -i ./cmake/install-share.sh
|
||||
if use !external; then
|
||||
sed "s|include(|#include(|g" -i ./CMakeLists.txt
|
||||
fi
|
||||
|
||||
sed "s|OUT=\"\$3\"|OUT=\"${D}\$3\"|g" -i ./support/yara_patterns/tools/compile-yara.sh
|
||||
|
||||
cmake-utils_src_prepare
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
||||
#-Dbtrfs-snapshot=$(usex btrfs)
|
||||
#-DRETDEC_DOC=ON
|
||||
#-DRETDEC_TESTS=ON
|
||||
#-DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
}
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
~app-arch/upx-ucl-3.09
|
||||
~app-arch/upx-ucl-3.91
|
||||
~app-arch/upx-bin-3.91
|
||||
app-arch/pixz
|
||||
|
|
|
|||
|
|
@ -52,3 +52,6 @@ dev-libs/libdwarf
|
|||
#=dev-libs/pegtl-2.1*
|
||||
=dev-libs/pegtl-1.3*
|
||||
=dev-cpp/catch-2.2*
|
||||
|
||||
~dev-libs/rapidjson-1.1.0
|
||||
~dev-libs/elfio-1.0.3
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ dev-util/intel-ocl-sdk
|
|||
=dev-util/valabind-1.4*
|
||||
dev-util/radare2
|
||||
=dev-util/cutter-1*
|
||||
=dev-util/retdec-3*
|
||||
|
||||
#virtualbox
|
||||
~dev-util/kbuild-0.1.9998_pre20131130
|
||||
|
|
|
|||
Loading…
Reference in a new issue