Skip to content

Commit

Permalink
dev-ros/hector_geotiff: port to qt5
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/644564
Package-Manager: Portage-2.3.31, Repoman-2.3.9
  • Loading branch information
aballier committed Apr 28, 2018
1 parent 0f0cba7 commit e8504e0
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 3 deletions.
91 changes: 91 additions & 0 deletions dev-ros/hector_geotiff/files/qt5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
Index: hector_geotiff/CMakeLists.txt
===================================================================
--- hector_geotiff.orig/CMakeLists.txt
+++ hector_geotiff/CMakeLists.txt
@@ -9,7 +9,7 @@ find_package(catkin REQUIRED COMPONENTS
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)

-find_package(Qt4 4.6 COMPONENTS QtCore QtGui REQUIRED)
+find_package(Qt5 5.7 COMPONENTS Core Gui Widgets REQUIRED)

# Find Eigen3 (from http://wiki.ros.org/jade/Migration)
find_package(Eigen3)
@@ -24,8 +24,7 @@ else()
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()

-include(${QT_USE_FILE})
-
+add_compile_options(-fPIC)

## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
@@ -82,10 +81,14 @@ include_directories(include include/hect
include_directories(
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Widgets_INCLUDE_DIRS}
+ ${Qt5Gui_INCLUDE_DIRS}
)

add_library(geotiff_writer src/geotiff_writer/geotiff_writer.cpp)
-target_link_libraries(geotiff_writer ${catkin_LIBRARIES} ${QT_LIBRARIES})
+target_link_libraries(geotiff_writer ${catkin_LIBRARIES} ${Qt5Core_LIBRARIES}
+ ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES})
add_dependencies(geotiff_writer ${catkin_EXPORTED_TARGETS})

add_executable(geotiff_saver src/geotiff_saver.cpp)
Index: hector_geotiff/include/hector_geotiff/geotiff_writer.h
===================================================================
--- hector_geotiff.orig/include/hector_geotiff/geotiff_writer.h
+++ hector_geotiff/include/hector_geotiff/geotiff_writer.h
@@ -37,7 +37,7 @@
#include <nav_msgs/MapMetaData.h>

#include <QtGui/QImage>
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include <QtGui/QFont>
#include <QtGui/QPen>

Index: hector_geotiff/src/geotiff_node.cpp
===================================================================
--- hector_geotiff.orig/src/geotiff_node.cpp
+++ hector_geotiff/src/geotiff_node.cpp
@@ -40,7 +40,7 @@

#include <Eigen/Geometry>

-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>

#include <hector_map_tools/HectorMapTools.h>

Index: hector_geotiff/src/geotiff_saver.cpp
===================================================================
--- hector_geotiff.orig/src/geotiff_saver.cpp
+++ hector_geotiff/src/geotiff_saver.cpp
@@ -34,7 +34,7 @@

#include <Eigen/Geometry>

-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>

#include <hector_map_tools/HectorMapTools.h>

Index: hector_geotiff/src/geotiff_writer/geotiff_writer.cpp
===================================================================
--- hector_geotiff.orig/src/geotiff_writer/geotiff_writer.cpp
+++ hector_geotiff/src/geotiff_writer/geotiff_writer.cpp
@@ -31,7 +31,7 @@

#include <QtGui/QPainter>
#include <QtGui/QImageWriter>
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include <QtCore/QFile>
//#include <QtCore/QDateTime>
#include <QtCore/QTime>
33 changes: 33 additions & 0 deletions dev-ros/hector_geotiff/hector_geotiff-0.3.5-r2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5
ROS_REPO_URI="https://github.com/tu-darmstadt-ros-pkg/hector_slam"
KEYWORDS="~amd64 ~arm"
ROS_SUBDIR=${PN}

inherit ros-catkin

DESCRIPTION="Node to save occupancy grid map, robot trajectory and object of interest data to GeoTiff images"
LICENSE="BSD"
SLOT="0"
IUSE=""

RDEPEND="
dev-ros/hector_map_tools
dev-ros/hector_nav_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
dev-ros/nav_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
dev-ros/pluginlib
dev-libs/tinyxml2:=
dev-libs/console_bridge:=
dev-ros/roscpp
dev-ros/std_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
dev-libs/boost:=
"
DEPEND="${RDEPEND}
dev-cpp/eigen:3"

PATCHES=( "${FILESDIR}/qt5.patch" )
9 changes: 6 additions & 3 deletions dev-ros/hector_geotiff/hector_geotiff-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5
Expand All @@ -22,9 +22,12 @@ RDEPEND="
dev-libs/console_bridge:=
dev-ros/roscpp
dev-ros/std_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
dev-qt/qtcore:4
dev-qt/qtgui:4
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
dev-libs/boost:=
"
DEPEND="${RDEPEND}
dev-cpp/eigen:3"

PATCHES=( "${FILESDIR}/qt5.patch" )

0 comments on commit e8504e0

Please sign in to comment.