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