[med-svn] [Git][med-team/fast][master] 2 commits: Use system openigtlink library

Shayan Doust gitlab at salsa.debian.org
Thu Aug 8 20:26:30 BST 2019



Shayan Doust pushed to branch master at Debian Med / fast


Commits:
b8f58964 by Shayan Doust at 2019-08-08T19:17:58Z
Use system openigtlink library

- - - - -
8cc83f99 by Shayan Doust at 2019-08-08T19:25:23Z
Add a description to this new patch and add missing dependency to debian/control

- - - - -


5 changed files:

- debian/control
- + debian/patches/fix_source_openigtlink.patch
- debian/patches/prevent_cmake_downloading.patch
- debian/patches/series
- debian/patches/use_system_libs.patch


Changes:

=====================================
debian/control
=====================================
@@ -14,6 +14,7 @@ Build-Depends: debhelper-compat (= 12),
                opencl-c-headers,
                ocl-icd-opencl-dev,
                libopenslide-dev,
+	       libopenigtlink-dev,
 	       git
 Standards-Version: 4.3.0
 Vcs-Browser: https://salsa.debian.org/med-team/fast


=====================================
debian/patches/fix_source_openigtlink.patch
=====================================
@@ -0,0 +1,99 @@
+Description: modify source files to use correct include directory
+ For some reason, the source files use igtl as the directory for the openigtlink library, however for the packaged alternative of openigtlink, openigtlink directory must be used instead.
+Author: Shayan Doust <hello at shayandoust.me>
+Last-Update: 2019-08-08
+---
+
+Index: fast/source/FAST/Streamers/OpenIGTLinkStreamer.cpp
+===================================================================
+--- fast.orig/source/FAST/Streamers/OpenIGTLinkStreamer.cpp	2019-08-08 20:20:52.599054344 +0100
++++ fast/source/FAST/Streamers/OpenIGTLinkStreamer.cpp	2019-08-08 20:20:52.591054278 +0100
+@@ -1,14 +1,14 @@
+ #include "OpenIGTLinkStreamer.hpp"
+ #include "FAST/Data/Image.hpp"
+ #include "FAST/AffineTransformation.hpp"
+-#include <igtl/igtlOSUtil.h>
+-#include <igtl/igtlMessageHeader.h>
+-#include <igtl/igtlTransformMessage.h>
+-#include <igtl/igtlPositionMessage.h>
+-#include <igtl/igtlImageMessage.h>
+-#include <igtl/igtlStatusMessage.h>
+-#include <igtl/igtlStringMessage.h>
+-#include <igtl/igtlClientSocket.h>
++#include <openigtlink/igtlOSUtil.h>
++#include <openigtlink/igtlMessageHeader.h>
++#include <openigtlink/igtlTransformMessage.h>
++#include <openigtlink/igtlPositionMessage.h>
++#include <openigtlink/igtlImageMessage.h>
++#include <openigtlink/igtlStatusMessage.h>
++#include <openigtlink/igtlStringMessage.h>
++#include <openigtlink/igtlClientSocket.h>
+ #include <chrono>
+ 
+ namespace fast {
+Index: fast/source/FAST/Streamers/Tests/DummyIGTLServer.cpp
+===================================================================
+--- fast.orig/source/FAST/Streamers/Tests/DummyIGTLServer.cpp	2019-08-08 20:20:52.599054344 +0100
++++ fast/source/FAST/Streamers/Tests/DummyIGTLServer.cpp	2019-08-08 20:20:52.595054312 +0100
+@@ -1,9 +1,9 @@
+ #include "DummyIGTLServer.hpp"
+ 
+-#include <igtl/igtlServerSocket.h>
+-#include <igtl/igtlImageMessage.h>
+-#include <igtl/igtlTransformMessage.h>
+-#include <igtl/igtlOSUtil.h>
++#include <openigtlink/igtlServerSocket.h>
++#include <openigtlink/igtlImageMessage.h>
++#include <openigtlink/igtlTransformMessage.h>
++#include <openigtlink/igtlOSUtil.h>
+ #include "FAST/Tests/DummyObjects.hpp"
+ #include "FAST/Data/Image.hpp"
+ 
+Index: fast/source/FAST/Tools/OpenIGTLinkServer/GUI.cpp
+===================================================================
+--- fast.orig/source/FAST/Tools/OpenIGTLinkServer/GUI.cpp	2019-08-08 20:20:52.599054344 +0100
++++ fast/source/FAST/Tools/OpenIGTLinkServer/GUI.cpp	2019-08-08 20:20:52.595054312 +0100
+@@ -7,9 +7,9 @@
+ #include <QMessageBox>
+ #include <QListWidget>
+ #include <QFileDialog>
+-#include <igtl/igtlImageMessage.h>
+-#include <igtl/igtlTransformMessage.h>
+-#include <igtl/igtlOSUtil.h>
++#include <openigtlink/igtlImageMessage.h>
++#include <openigtlink/igtlTransformMessage.h>
++#include <openigtlink/igtlOSUtil.h>
+ #include <FAST/Streamers/ImageFileStreamer.hpp>
+ #include <FAST/Data/Image.hpp>
+ #include <QMetaType>
+@@ -287,4 +287,4 @@
+     mFPS = fps;
+ }
+ 
+-}
+\ No newline at end of file
++}
+Index: fast/source/FAST/Tools/OpenIGTLinkServer/GUI.hpp
+===================================================================
+--- fast.orig/source/FAST/Tools/OpenIGTLinkServer/GUI.hpp	2019-08-08 20:20:52.599054344 +0100
++++ fast/source/FAST/Tools/OpenIGTLinkServer/GUI.hpp	2019-08-08 20:20:52.595054312 +0100
+@@ -2,7 +2,7 @@
+ #define FAST_OPENIGTLINKSERVER_GUI_HPP_
+ 
+ #include "FAST/Visualization/Window.hpp"
+-#include <igtl/igtlServerSocket.h>
++#include <openigtlink/igtlServerSocket.h>
+ #include <thread>
+ 
+ 
+Index: fast/source/FAST/Tools/OpenIGTLinkServer/main.cpp
+===================================================================
+--- fast.orig/source/FAST/Tools/OpenIGTLinkServer/main.cpp	2019-08-08 20:20:52.599054344 +0100
++++ fast/source/FAST/Tools/OpenIGTLinkServer/main.cpp	2019-08-08 20:20:52.595054312 +0100
+@@ -23,4 +23,4 @@
+     Reporter::setGlobalReportMethod(Reporter::COUT);
+     window->getReporter().setReportMethod(Reporter::COUT);
+     window->start();
+-}
+\ No newline at end of file
++}


=====================================
debian/patches/prevent_cmake_downloading.patch
=====================================
@@ -6,8 +6,8 @@ Last-Update: 2019-08-08
 
 Index: fast/cmake/ExternalEigen.cmake
 ===================================================================
---- fast.orig/cmake/ExternalEigen.cmake	2019-08-08 16:04:41.462374017 +0100
-+++ fast/cmake/ExternalEigen.cmake	2019-08-08 16:04:41.458373984 +0100
+--- fast.orig/cmake/ExternalEigen.cmake	2019-08-08 19:27:20.692513417 +0100
++++ fast/cmake/ExternalEigen.cmake	2019-08-08 19:27:20.684513350 +0100
 @@ -1,21 +1,21 @@
  # Download and set up Eigen
  
@@ -50,8 +50,8 @@ Index: fast/cmake/ExternalEigen.cmake
 +#list(APPEND FAST_EXTERNAL_DEPENDENCIES eigen)
 Index: fast/cmake/ExternalOpenSlide.cmake
 ===================================================================
---- fast.orig/cmake/ExternalOpenSlide.cmake	2019-08-08 16:04:41.462374017 +0100
-+++ fast/cmake/ExternalOpenSlide.cmake	2019-08-08 16:04:41.458373984 +0100
+--- fast.orig/cmake/ExternalOpenSlide.cmake	2019-08-08 19:27:20.692513417 +0100
++++ fast/cmake/ExternalOpenSlide.cmake	2019-08-08 19:27:20.684513350 +0100
 @@ -1,17 +1,17 @@
  # Download and set up OpenSlide
  
@@ -85,8 +85,8 @@ Index: fast/cmake/ExternalOpenSlide.cmake
 +#endif()
 Index: fast/cmake/ExternalZlib.cmake
 ===================================================================
---- fast.orig/cmake/ExternalZlib.cmake	2019-08-08 16:04:41.462374017 +0100
-+++ fast/cmake/ExternalZlib.cmake	2019-08-08 16:04:41.458373984 +0100
+--- fast.orig/cmake/ExternalZlib.cmake	2019-08-08 19:27:20.692513417 +0100
++++ fast/cmake/ExternalZlib.cmake	2019-08-08 19:27:20.688513383 +0100
 @@ -1,24 +1,24 @@
  # Download and set up zlib
  
@@ -134,3 +134,65 @@ Index: fast/cmake/ExternalZlib.cmake
 +#endif(WIN32)
 +#list(APPEND LIBRARIES ${ZLIB_LIBRARY})
 +#list(APPEND FAST_EXTERNAL_DEPENDENCIES zlib)
+Index: fast/cmake/ExternalOpenIGTLink.cmake
+===================================================================
+--- fast.orig/cmake/ExternalOpenIGTLink.cmake	2019-08-08 19:21:36.965659511 +0100
++++ fast/cmake/ExternalOpenIGTLink.cmake	2019-08-08 19:27:50.364759670 +0100
+@@ -1,30 +1,30 @@
+ # Download and set up zlib
+ 
+-include(cmake/Externals.cmake)
++#include(cmake/Externals.cmake)
+ 
+-ExternalProject_Add(OpenIGTLink
+-        PREFIX ${FAST_EXTERNAL_BUILD_DIR}/OpenIGTLink
+-        BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/OpenIGTLink
+-        GIT_REPOSITORY "https://github.com/openigtlink/OpenIGTLink.git"
+-        GIT_TAG "v2.1"
+-        CMAKE_ARGS
+-            -DBUILD_SHARED_LIBS=ON
+-            -DBUILD_TESTING=OFF
+-            -DBUILD_EXAMPLES=OFF
+-            -DLIBRARY_OUTPUT_PATH=${FAST_EXTERNAL_INSTALL_DIR}/lib/
+-            -DCMAKE_MACOSX_RPATH=ON
+-            -DOpenIGTLink_INSTALL_LIB_DIR=${FAST_EXTERNAL_INSTALL_DIR}/lib/
+-        CMAKE_CACHE_ARGS
+-            -DCMAKE_BUILD_TYPE:STRING=Release
+-            -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
+-            -DCMAKE_INSTALL_MESSAGE:BOOL=LAZY
+-            -DCMAKE_INSTALL_PREFIX:STRING=${FAST_EXTERNAL_INSTALL_DIR}
+-)
++#ExternalProject_Add(OpenIGTLink
++#       PREFIX ${FAST_EXTERNAL_BUILD_DIR}/OpenIGTLink
++#       BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/OpenIGTLink
++#       GIT_REPOSITORY "https://github.com/openigtlink/OpenIGTLink.git"
++#       GIT_TAG "v2.1"
++#       CMAKE_ARGS
++#           -DBUILD_SHARED_LIBS=ON
++#           -DBUILD_TESTING=OFF
++#           -DBUILD_EXAMPLES=OFF
++#           -DLIBRARY_OUTPUT_PATH=${FAST_EXTERNAL_INSTALL_DIR}/lib/
++#           -DCMAKE_MACOSX_RPATH=ON
++#           -DOpenIGTLink_INSTALL_LIB_DIR=${FAST_EXTERNAL_INSTALL_DIR}/lib/
++#       CMAKE_CACHE_ARGS
++#           -DCMAKE_BUILD_TYPE:STRING=Release
++#           -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
++#           -DCMAKE_INSTALL_MESSAGE:BOOL=LAZY
++#           -DCMAKE_INSTALL_PREFIX:STRING=${FAST_EXTERNAL_INSTALL_DIR}
++#)
+ 
+-if(WIN32)
+-set(OpenIGTLink_LIBRARY OpenIGTLink.lib)
+-else()
+-set(OpenIGTLink_LIBRARY ${CMAKE_SHARED_LIBRARY_PREFIX}OpenIGTLink${CMAKE_SHARED_LIBRARY_SUFFIX})
+-endif()
+-list(APPEND LIBRARIES ${OpenIGTLink_LIBRARY})
+-list(APPEND FAST_EXTERNAL_DEPENDENCIES OpenIGTLink)
+\ No newline at end of file
++#if(WIN32)
++#set(OpenIGTLink_LIBRARY OpenIGTLink.lib)
++#else()
++#set(OpenIGTLink_LIBRARY ${CMAKE_SHARED_LIBRARY_PREFIX}OpenIGTLink${CMAKE_SHARED_LIBRARY_SUFFIX})
++#endif()
++#list(APPEND LIBRARIES ${OpenIGTLink_LIBRARY})
++#list(APPEND FAST_EXTERNAL_DEPENDENCIES OpenIGTLink)


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+fix_source_openigtlink.patch
 prevent_cmake_downloading.patch
 remove_unneeded_installs.patch
 use_system_libs.patch


=====================================
debian/patches/use_system_libs.patch
=====================================
@@ -5,9 +5,9 @@ Author: Shayan Doust <hello at shayandoust.me>
 
 Index: fast/CMakeLists.txt
 ===================================================================
---- fast.orig/CMakeLists.txt	2019-08-08 15:58:30.391366851 +0100
-+++ fast/CMakeLists.txt	2019-08-08 15:58:30.387366819 +0100
-@@ -170,6 +170,12 @@
+--- fast.orig/CMakeLists.txt	2019-08-08 19:28:18.008989077 +0100
++++ fast/CMakeLists.txt	2019-08-08 19:28:40.589176448 +0100
+@@ -170,6 +170,13 @@
      qt5_use_modules(FAST Widgets OpenGL) # Add Qt 5 modules
  endif()
  
@@ -16,6 +16,7 @@ Index: fast/CMakeLists.txt
 +target_link_libraries(FAST PUBLIC Eigen3::Eigen)
 +target_link_libraries(FAST PUBLIC openslide)
 +target_link_libraries(FAST PUBLIC z)
++target_link_libraries(FAST PUBLIC OpenIGTLink)
 +
  ## Build test executable
  if(FAST_BUILD_TESTS)



View it on GitLab: https://salsa.debian.org/med-team/fast/compare/645750571a7072770ecd29353f5e76512b4ded2b...8cc83f9935d1c947a292bb10c4a55d631cdc0237

-- 
View it on GitLab: https://salsa.debian.org/med-team/fast/compare/645750571a7072770ecd29353f5e76512b4ded2b...8cc83f9935d1c947a292bb10c4a55d631cdc0237
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190808/2a632a08/attachment-0001.html>


More information about the debian-med-commit mailing list