Merge pull request #34021 from dtzWill/update/boomerang-20180118
boomerang: switch to new active fork, cleanup, maintain
This commit is contained in:
commit
b3e42e607c
@ -1,38 +1,43 @@
|
||||
{ stdenv, fetchgit, cmake, expat, qt5, boost }:
|
||||
{ stdenv, fetchFromGitHub, cmake, qtbase }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "boomerang-${version}";
|
||||
version = "0.3.99-alpha-2016-11-02";
|
||||
version = "0.4.0-alpha-2018-01-18";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/nemerle/boomerang.git";
|
||||
rev = "f95d6436845e9036c8cfbd936731449475f79b7a";
|
||||
sha256 = "1q3q92lfj24ij5sxdbdhcqyan28r6db1w80yrks4csf9zjij1ixh";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ceeac";
|
||||
repo = "boomerang";
|
||||
rev = "b4ff8d573407a8ed6365d4bfe53d2d47d983e393";
|
||||
sha256 = "0x17vlm6y1paa49fi3pmzz7vzdqms19qkr274hkq32ql342b6i6x";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake expat qt5.qtbase boost ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ qtbase ];
|
||||
|
||||
patches = [ ./fix-install.patch ./fix-output.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace loader/BinaryFileFactory.cpp \
|
||||
--replace '"lib"' '"../lib"'
|
||||
|
||||
substituteInPlace ui/DecompilerThread.cpp \
|
||||
--replace '"output"' '"./output"'
|
||||
|
||||
substituteInPlace boomerang.cpp \
|
||||
--replace 'progPath("./")' "progPath(\"$out/share/boomerang/\")"
|
||||
|
||||
substituteInPlace ui/commandlinedriver.cpp \
|
||||
--replace "QFileInfo(args[0]).absolutePath()" "\"$out/share/boomerang/\""
|
||||
postPatch =
|
||||
# Look in installation directory for required files, not relative to working directory
|
||||
''
|
||||
substituteInPlace src/boomerang/core/Settings.cpp \
|
||||
--replace "setDataDirectory(\"../share/boomerang\");" \
|
||||
"setDataDirectory(\"$out/share/boomerang\");" \
|
||||
--replace "setPluginDirectory(\"../lib/boomerang/plugins\");" \
|
||||
"setPluginDirectory(\"$out/lib/boomerang/plugins\");"
|
||||
''
|
||||
# Fixup version:
|
||||
# * don't try to inspect with git
|
||||
# (even if we kept .git and such it would be "dirty" because of patching)
|
||||
# * use date so version is monotonically increasing moving forward
|
||||
+ ''
|
||||
sed -i cmake-scripts/boomerang-version.cmake \
|
||||
-e 's/set(\(PROJECT\|BOOMERANG\)_VERSION ".*")/set(\1_VERSION "${version}")/'
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://boomerang.sourceforge.net/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = licenses.bsd3;
|
||||
description = "A general, open source, retargetable decompiler";
|
||||
maintainers = with maintainers; [ dtzWill ];
|
||||
};
|
||||
}
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 5851256422a4debc34c956439d8129a4d5f80722 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Thu, 30 Mar 2017 10:06:03 -0500
|
||||
Subject: [PATCH] cmake: add install bits
|
||||
|
||||
---
|
||||
CMakeLists.txt | 3 +++
|
||||
loader/CMakeLists.txt | 2 ++
|
||||
ui/CMakeLists.txt | 2 ++
|
||||
3 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 826fe307..740861db 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -113,3 +113,6 @@ SET_PROPERTY(TARGET boom_base PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
ADD_SUBDIRECTORY(loader)
|
||||
ADD_SUBDIRECTORY(ui)
|
||||
+
|
||||
+INSTALL(DIRECTORY signatures DESTINATION share/boomerang)
|
||||
+INSTALL(DIRECTORY frontend/machine DESTINATION share/boomerang/frontend)
|
||||
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
|
||||
index b371d366..dcf715fd 100644
|
||||
--- a/loader/CMakeLists.txt
|
||||
+++ b/loader/CMakeLists.txt
|
||||
@@ -6,6 +6,8 @@ macro(BOOMERANG_ADD_LOADER name)
|
||||
endif()
|
||||
qt5_use_modules(${target_name} Core)
|
||||
set_target_properties(${target_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/out/lib")
|
||||
+ install(TARGETS "${target_name}"
|
||||
+ LIBRARY DESTINATION lib)
|
||||
endmacro()
|
||||
|
||||
BOOMERANG_ADD_LOADER(Elf elf/ElfBinaryFile.cpp elf/ElfBinaryFile.h)
|
||||
diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt
|
||||
index f6fe3271..8729b522 100644
|
||||
--- a/ui/CMakeLists.txt
|
||||
+++ b/ui/CMakeLists.txt
|
||||
@@ -26,3 +26,5 @@ boom_base frontend db type boomerang_DSLs codegen util boom_base
|
||||
${CMAKE_THREAD_LIBS_INIT} boomerang_passes
|
||||
)
|
||||
qt5_use_modules(boomerang Core Xml Widgets)
|
||||
+
|
||||
+INSTALL(TARGETS boomerang DESTINATION bin)
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,24 +0,0 @@
|
||||
From f3f5f888a1b1fe72ea8fc8cc96ef4ee386011e1c Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Thu, 30 Mar 2017 11:21:38 -0500
|
||||
Subject: [PATCH] don't default to writing to program directory
|
||||
|
||||
---
|
||||
boomerang.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/boomerang.cpp b/boomerang.cpp
|
||||
index 5951ed91..b592f482 100644
|
||||
--- a/boomerang.cpp
|
||||
+++ b/boomerang.cpp
|
||||
@@ -601,7 +601,6 @@ int Boomerang::processCommand(QStringList &args) {
|
||||
*/
|
||||
void Boomerang::setProgPath(const QString &p) {
|
||||
progPath = p + "/";
|
||||
- outputPath = progPath + "/output/"; // Default output path (can be overridden with -o below)
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.11.0
|
||||
|
@ -813,7 +813,7 @@ with pkgs;
|
||||
|
||||
borgbackup = callPackage ../tools/backup/borg { };
|
||||
|
||||
boomerang = callPackage ../development/tools/boomerang { };
|
||||
boomerang = libsForQt5.callPackage ../development/tools/boomerang { };
|
||||
|
||||
boost-build = callPackage ../development/tools/boost-build { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user