diff options
author | Will Dietz <w@wdtz.org> | 2018-01-18 11:49:29 -0600 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-01-21 15:38:56 -0600 |
commit | 242ec8cba2437aad9fc760e1f7418767903cbcec (patch) | |
tree | 942e99c608deae048d64e395d8468467272252a3 /pkgs/development/tools/boomerang | |
parent | f12f2ed44c66ac65b0307f3562152e9a45251d11 (diff) |
boomerang: switch to new active fork, cleanup, maintain
Diffstat (limited to 'pkgs/development/tools/boomerang')
-rw-r--r-- | pkgs/development/tools/boomerang/default.nix | 53 | ||||
-rw-r--r-- | pkgs/development/tools/boomerang/fix-install.patch | 48 | ||||
-rw-r--r-- | pkgs/development/tools/boomerang/fix-output.patch | 24 |
3 files changed, 29 insertions, 96 deletions
diff --git a/pkgs/development/tools/boomerang/default.nix b/pkgs/development/tools/boomerang/default.nix index 6b9dd6393cb69..f83353034a8f1 100644 --- a/pkgs/development/tools/boomerang/default.nix +++ b/pkgs/development/tools/boomerang/default.nix @@ -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 ]; - - 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/\"" + nativeBuildInputs = [ cmake ]; + buildInputs = [ qtbase ]; + + 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 ]; }; } diff --git a/pkgs/development/tools/boomerang/fix-install.patch b/pkgs/development/tools/boomerang/fix-install.patch deleted file mode 100644 index bc656acfd6a5e..0000000000000 --- a/pkgs/development/tools/boomerang/fix-install.patch +++ /dev/null @@ -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 - diff --git a/pkgs/development/tools/boomerang/fix-output.patch b/pkgs/development/tools/boomerang/fix-output.patch deleted file mode 100644 index 18fbe74177b3d..0000000000000 --- a/pkgs/development/tools/boomerang/fix-output.patch +++ /dev/null @@ -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 - |