rtabmap: unstable-2022-09-24 -> 0.21.0; unbreak

+30 -161
-139
pkgs/applications/video/rtabmap/0001-remove-printer-support.patch
··· 1 - From c04ce502d29f7769efbff730d1f9060b8c24629a Mon Sep 17 00:00:00 2001 2 - From: ckie <git-525ff67@ckie.dev> 3 - Date: Tue, 8 Feb 2022 19:18:49 +0200 4 - Subject: [PATCH] remove printer support 5 - 6 - --- 7 - app/src/CMakeLists.txt | 4 ++-- 8 - guilib/src/CMakeLists.txt | 4 ++-- 9 - guilib/src/GraphViewer.cpp | 12 +----------- 10 - guilib/src/ImageView.cpp | 16 ---------------- 11 - guilib/src/utilite/UPlot.cpp | 9 --------- 12 - 5 files changed, 5 insertions(+), 40 deletions(-) 13 - 14 - diff --git a/app/src/CMakeLists.txt b/app/src/CMakeLists.txt 15 - index b20a07d4..2cad8c1e 100644 16 - --- a/app/src/CMakeLists.txt 17 - +++ b/app/src/CMakeLists.txt 18 - @@ -63,9 +63,9 @@ ENDIF() 19 - TARGET_LINK_LIBRARIES(rtabmap rtabmap_core rtabmap_gui rtabmap_utilite ${LIBRARIES}) 20 - IF(Qt5_FOUND) 21 - IF(Qt5Svg_FOUND) 22 - - QT5_USE_MODULES(rtabmap Widgets Core Gui Svg PrintSupport) 23 - + QT5_USE_MODULES(rtabmap Widgets Core Gui Svg) 24 - ELSE() 25 - - QT5_USE_MODULES(rtabmap Widgets Core Gui PrintSupport) 26 - + QT5_USE_MODULES(rtabmap Widgets Core Gui) 27 - ENDIF() 28 - ENDIF(Qt5_FOUND) 29 - 30 - diff --git a/guilib/src/CMakeLists.txt b/guilib/src/CMakeLists.txt 31 - index 3711205b..a393aa25 100644 32 - --- a/guilib/src/CMakeLists.txt 33 - +++ b/guilib/src/CMakeLists.txt 34 - @@ -208,9 +208,9 @@ ADD_LIBRARY(rtabmap_gui ${SRC_FILES}) 35 - TARGET_LINK_LIBRARIES(rtabmap_gui rtabmap_core rtabmap_utilite ${LIBRARIES}) 36 - IF(Qt5_FOUND) 37 - IF(Qt5Svg_FOUND) 38 - - QT5_USE_MODULES(rtabmap_gui Widgets Core Gui Svg PrintSupport) 39 - + QT5_USE_MODULES(rtabmap_gui Widgets Core Gui Svg) 40 - ELSE() 41 - - QT5_USE_MODULES(rtabmap_gui Widgets Core Gui PrintSupport) 42 - + QT5_USE_MODULES(rtabmap_gui Widgets Core Gui) 43 - ENDIF() 44 - ENDIF(Qt5_FOUND) 45 - 46 - diff --git a/guilib/src/GraphViewer.cpp b/guilib/src/GraphViewer.cpp 47 - index 58907c34..7b41061f 100644 48 - --- a/guilib/src/GraphViewer.cpp 49 - +++ b/guilib/src/GraphViewer.cpp 50 - @@ -38,7 +38,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51 - #include <QtGui/QDesktopServices> 52 - #include <QtGui/QContextMenuEvent> 53 - #include <QColorDialog> 54 - -#include <QPrinter> 55 - #include <QFileDialog> 56 - #ifdef QT_SVG_LIB 57 - #include <QtSvg/QSvgGenerator> 58 - @@ -2011,16 +2010,7 @@ void GraphViewer::contextMenuEvent(QContextMenuEvent * event) 59 - this->scene()->setSceneRect(this->scene()->itemsBoundingRect()); // Re-shrink the scene to it's bounding contents 60 - QSize sceneSize = this->scene()->sceneRect().size().toSize(); 61 - 62 - - if(QFileInfo(filePath).suffix().compare("pdf") == 0) 63 - - { 64 - - QPrinter printer(QPrinter::HighResolution); 65 - - printer.setOrientation(QPrinter::Portrait); 66 - - printer.setOutputFileName( filePath ); 67 - - QPainter p(&printer); 68 - - scene()->render(&p); 69 - - p.end(); 70 - - } 71 - - else if(QFileInfo(filePath).suffix().compare("svg") == 0) 72 - + if(QFileInfo(filePath).suffix().compare("svg") == 0) 73 - { 74 - #ifdef QT_SVG_LIB 75 - QSvgGenerator svgGen; 76 - diff --git a/guilib/src/ImageView.cpp b/guilib/src/ImageView.cpp 77 - index 714f2d36..887e7bdc 100644 78 - --- a/guilib/src/ImageView.cpp 79 - +++ b/guilib/src/ImageView.cpp 80 - @@ -37,7 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 81 - #include <QInputDialog> 82 - #include <QVBoxLayout> 83 - #include <QColorDialog> 84 - -#include <QPrinter> 85 - #include <QGraphicsRectItem> 86 - #include "rtabmap/utilite/ULogger.h" 87 - #include "rtabmap/gui/KeypointItem.h" 88 - @@ -843,21 +842,6 @@ void ImageView::contextMenuEvent(QContextMenuEvent * e) 89 - } 90 - 91 - _savedFileName = text; 92 - - if(QFileInfo(text).suffix().compare("pdf") == 0) 93 - - { 94 - - QPrinter printer(QPrinter::HighResolution); 95 - - printer.setOrientation(QPrinter::Portrait); 96 - - printer.setOutputFileName( text ); 97 - - QPainter p(&printer); 98 - - p.begin(&printer); 99 - - double xscale = printer.pageRect().width()/double(_graphicsView->sceneRect().width()); 100 - - double yscale = printer.pageRect().height()/double(_graphicsView->sceneRect().height()); 101 - - double scale = qMin(xscale, yscale); 102 - - p.scale(scale, scale); 103 - - _graphicsView->scene()->render(&p, _graphicsView->sceneRect(), _graphicsView->sceneRect()); 104 - - p.end(); 105 - - } 106 - - else 107 - { 108 - QImage img(_graphicsView->sceneRect().width(), _graphicsView->sceneRect().height(), QImage::Format_ARGB32_Premultiplied); 109 - QPainter p(&img); 110 - diff --git a/guilib/src/utilite/UPlot.cpp b/guilib/src/utilite/UPlot.cpp 111 - index 1b11c65e..8bf94841 100644 112 - --- a/guilib/src/utilite/UPlot.cpp 113 - +++ b/guilib/src/utilite/UPlot.cpp 114 - @@ -42,7 +42,6 @@ 115 - #include <QFileDialog> 116 - #include <QtGui/QClipboard> 117 - #include <QApplication> 118 - -#include <QPrinter> 119 - #include <QColorDialog> 120 - #include <QToolTip> 121 - #ifdef QT_SVG_LIB 122 - @@ -2849,14 +2848,6 @@ void UPlot::contextMenuEvent(QContextMenuEvent * event) 123 - else 124 - { 125 - #endif 126 - - if(QFileInfo(text).suffix().compare("pdf") == 0) 127 - - { 128 - - QPrinter printer; 129 - - printer.setOutputFormat(QPrinter::PdfFormat); 130 - - printer.setOutputFileName(text); 131 - - this->render(&printer); 132 - - } 133 - - else 134 - { 135 - QPixmap figure = QPixmap::grabWidget(this); 136 - figure.save(text); 137 - -- 138 - 2.34.1 139 -
+29 -21
pkgs/applications/video/rtabmap/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, pkg-config, cmake, opencv, pcl, libusb1, eigen 2 - , wrapQtAppsHook, qtbase, g2o, ceres-solver, libpointmatcher, octomap, freenect 3 - , libdc1394, librealsense, libGL, libGLU, vtk_8_withQt5, wrapGAppsHook, liblapack 4 - , xorg }: 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , pkg-config 5 + , cmake 6 + , opencv 7 + , pcl 8 + , libusb1 9 + , eigen 10 + , wrapQtAppsHook 11 + , qtbase 12 + , g2o 13 + , ceres-solver 14 + , libpointmatcher 15 + , octomap 16 + , freenect 17 + , libdc1394 18 + , librealsense 19 + , libGL 20 + , libGLU 21 + , vtkWithQt5 22 + , wrapGAppsHook 23 + , liblapack 24 + , xorg 25 + }: 5 26 6 27 stdenv.mkDerivation rec { 7 28 pname = "rtabmap"; 8 - version = "unstable-2022-09-24"; 29 + version = "0.21.0"; 9 30 10 31 src = fetchFromGitHub { 11 32 owner = "introlab"; 12 33 repo = "rtabmap"; 13 - rev = "fa31affea0f0bd54edf1097b8289209c7ac0548e"; 14 - sha256 = "sha256-kcY+o31fSmwxBcvF/e+Wu6OIqiQzLKgEJJxcj+g3qDM="; 34 + rev = "refs/tags/${version}"; 35 + hash = "sha256-1xb8O3VrErldid2OgAUMG28mSUO7QBUsPuSz8p03tSI"; 15 36 }; 16 37 17 - patches = [ 18 - # Our Qt5 seems to be missing PrintSupport.. I think? 19 - ./0001-remove-printer-support.patch 20 - ]; 21 - 22 38 nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook wrapGAppsHook ]; 23 39 buildInputs = [ 24 40 ## Required ··· 41 57 qtbase 42 58 libGL 43 59 libGLU 44 - vtk_8_withQt5 60 + vtkWithQt5 45 61 ]; 46 62 47 63 # Disable warnings that are irrelevant to us as packagers 48 64 cmakeFlags = [ "-Wno-dev" ]; 49 65 50 - # We run one of the executables we build while the build is 51 - # still running (and patchelf hasn't been invoked) which means 52 - # the RPATH is not set correctly. This hacks around that error: 53 - # 54 - # build/bin/rtabmap-res_tool: error while loading shared libraries: librtabmap_utilite.so.0.20: cannot open shared object file: No such file or directory 55 - LD_LIBRARY_PATH = "/build/source/build/bin"; 56 - 57 66 meta = with lib; { 58 67 description = "Real-Time Appearance-Based 3D Mapping"; 59 68 homepage = "https://introlab.github.io/rtabmap/"; 60 69 license = licenses.bsd3; 61 70 maintainers = with maintainers; [ ckie ]; 62 71 platforms = with platforms; linux; 63 - broken = true; 64 72 }; 65 73 }
+1 -1
pkgs/top-level/all-packages.nix
··· 11484 11484 rocket = libsForQt5.callPackage ../tools/graphics/rocket { }; 11485 11485 11486 11486 rtabmap = libsForQt5.callPackage ../applications/video/rtabmap/default.nix { 11487 - pcl = pcl.override { vtk = vtk_8_withQt5; }; 11487 + pcl = pcl.override { vtk = vtkWithQt5; }; 11488 11488 }; 11489 11489 11490 11490 rtaudio = callPackage ../development/libraries/audio/rtaudio {