mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-27 17:20:59 +02:00
retdec: bundled version doesn't compile, nor does this unbundled version
This commit is contained in:
parent
e02ba7cbe1
commit
ec81ea4647
2 changed files with 42 additions and 41 deletions
16
dev-util/retdec/files/9999-system-deps.patch
Normal file
16
dev-util/retdec/files/9999-system-deps.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
--- retdec-4.0.orig/CMakeLists.txt.orig 2020-04-08 05:09:28.000000000 +0800
|
||||
+++ retdec-4.0/CMakeLists.txt 2020-04-17 14:10:27.292819899 +0800
|
||||
@@ -26,6 +26,13 @@
|
||||
# RetDec, and some dependencies (e.g. LLVM, Keystone), require Python 3.
|
||||
find_package(PythonInterp 3.4 REQUIRED)
|
||||
|
||||
+find_package(LLVM REQUIRED CONFIG)
|
||||
+message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
+message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
|
||||
+
|
||||
+include_directories(${LLVM_INCLUDE_DIRS})
|
||||
+add_definitions(${LLVM_DEFINITIONS})
|
||||
+
|
||||
### Variables.
|
||||
|
||||
## Repository directories.
|
||||
|
|
@ -20,7 +20,7 @@ fi
|
|||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="doc system-libs"
|
||||
IUSE="doc"
|
||||
|
||||
MY_RDEPEND="|| ( app-arch/upx app-arch/upx-bin )
|
||||
sys-devel/bc
|
||||
|
|
@ -30,13 +30,11 @@ MY_RDEPEND="|| ( app-arch/upx app-arch/upx-bin )
|
|||
sys-libs/ncurses:*[tinfo]
|
||||
dev-libs/capstone
|
||||
dev-libs/openssl:0
|
||||
|
||||
system-libs? (
|
||||
dev-libs/jsoncpp
|
||||
sys-devel/llvm:*
|
||||
dev-libs/rapidjson
|
||||
dev-libs/tinyxml2
|
||||
)"
|
||||
dev-libs/jsoncpp
|
||||
sys-devel/llvm:*
|
||||
dev-libs/rapidjson
|
||||
dev-libs/tinyxml2
|
||||
"
|
||||
|
||||
RDEPEND=${MY_RDEPEND}
|
||||
|
||||
|
|
@ -52,40 +50,27 @@ CMAKE_REMOVE_MODULES_LIST="FindJsoncpp FindRapidjson FindTynyxml2 FindLibdwarf F
|
|||
|
||||
src_prepare(){
|
||||
|
||||
# if use system-libs; then
|
||||
# sed '/add_subdirectory(deps)/d' -i ./CMakeLists.txt
|
||||
eapply "${FILESDIR}/4.0-system-deps.patch"
|
||||
sed '/cond_add_subdirectory(capstone/d' -i ./deps/CMakeLists.txt
|
||||
sed '/cond_add_subdirectory(keystone/d' -i ./deps/CMakeLists.txt
|
||||
sed '/cond_add_subdirectory(llvm/d' -i ./deps/CMakeLists.txt
|
||||
sed '/cond_add_subdirectory(rapidjson/d' -i ./deps/CMakeLists.txt
|
||||
sed '/cond_add_subdirectory(tinyxml2/d' -i ./deps/CMakeLists.txt
|
||||
sed '/cond_add_subdirectory(yara/d' -i ./deps/CMakeLists.txt
|
||||
sed '/cond_add_subdirectory(yaramod/d' -i ./deps/CMakeLists.txt
|
||||
sed '/cond_add_subdirectory(openssl/d' -i ./deps/CMakeLists.txt
|
||||
# fi
|
||||
eapply "${FILESDIR}/9999-system-deps.patch"
|
||||
sed '/cond_add_subdirectory(capstone/d' -i ./deps/CMakeLists.txt || die
|
||||
sed '/cond_add_subdirectory(keystone/d' -i ./deps/CMakeLists.txt || die
|
||||
sed '/cond_add_subdirectory(llvm/d' -i ./deps/CMakeLists.txt || die
|
||||
sed '/cond_add_subdirectory(rapidjson/d' -i ./deps/CMakeLists.txt || die
|
||||
sed '/cond_add_subdirectory(tinyxml2/d' -i ./deps/CMakeLists.txt || die
|
||||
sed '/cond_add_subdirectory(yara/d' -i ./deps/CMakeLists.txt || die
|
||||
sed '/cond_add_subdirectory(yaramod/d' -i ./deps/CMakeLists.txt || die
|
||||
sed '/cond_add_subdirectory(openssl/d' -i ./deps/CMakeLists.txt || die
|
||||
|
||||
sed "s|get_install_path(sys.argv)| \"${D}\" + get_install_path(sys.argv)|g" -i ./support/install-share.py
|
||||
sed "s|output = os.path.join|output = \"${D}\" + os.path.join|g" -i ./support/install-yara.py
|
||||
sed -i 's/retdec::deps::llvm/llvm/g' $(grep -r --color=never 'retdec::deps::llvm' | awk -F':' '{print $1}') || die
|
||||
sed -i 's/retdec::deps::rapidjson/rapidjson/g' $(grep -r --color=never 'retdec::deps::rapidjson' | awk -F':' '{print $1}') || die
|
||||
sed -i 's/retdec::deps::capstone/capstone/g' $(grep -r --color=never 'retdec::deps::capstone' | awk -F':' '{print $1}') || die
|
||||
sed -i 's/retdec::deps::libyara/yara/g' $(grep -r --color=never 'retdec::deps::libyara' | awk -F':' '{print $1}') || die
|
||||
sed -i 's/retdec::deps::tinyxml2/tinyxml2/g' $(grep -r --color=never 'retdec::deps::tinyxml2' | awk -F':' '{print $1}') || die
|
||||
sed -i 's/retdec::deps::yaramod/yaramod/g' $(grep -r --color=never 'retdec::deps::yaramod' | awk -F':' '{print $1}') || die
|
||||
#sed -i 's/retdec::deps::openssl-crypto/libcrypto/g' $(grep -r --color=never 'retdec::deps::openssl-crypto' | awk -F':' '{print $1}') || die
|
||||
|
||||
cmake-utils_src_prepare
|
||||
eapply_user
|
||||
sed "s|get_install_path(sys.argv)| \"${D}\" + get_install_path(sys.argv)|g" -i ./support/install-share.py || die
|
||||
sed "s|output = os.path.join|output = \"${D}\" + os.path.join|g" -i ./support/install-yara.py || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
#src_configure() {
|
||||
|
||||
#-Dbtrfs-snapshot=$(usex btrfs)
|
||||
#-DRETDEC_DOC=ON
|
||||
#-DRETDEC_TESTS=ON
|
||||
#-DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
# local mycmakeargs=(
|
||||
# -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
# -DRETDEC_FORCE_OPENSSL_BUILD=0
|
||||
# )
|
||||
# cmake-utils_src_configure
|
||||
#}
|
||||
|
||||
#src_compile() {
|
||||
# cmake -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
#}
|
||||
|
|
|
|||
Loading…
Reference in a new issue