Merge pull request #34021 from dtzWill/update/boomerang-20180118

boomerang: switch to new active fork, cleanup, maintain

authored by Jörg Thalheim and committed by GitHub b3e42e60 5c0e310e

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