Skip to content

[ENH][packages/slicer] Introduce external packages #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions guix-systole/packages/openigtlink.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
(define-module (guix-systole packages openigtlink)
#:use-module ((guix licenses)
#:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (gnu packages algebra)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages geo)
#:use-module (gnu packages gl)
#:use-module (gnu packages image)
#:use-module (gnu packages xml)
#:use-module (gnu packages gnome)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages pdf)
#:use-module (gnu packages qt)
#:use-module (gnu packages serialization)
#:use-module (gnu packages tbb)
#:use-module (gnu packages xiph)
#:use-module (guix-systole packages)
#:use-module (guix-systole packages vtk)
#:use-module (guix-systole packages ctk))

(define-public openigtlink
(package
(name "openigtlink")
(version "c512727") ;version used by PlusBuild (Plus 2.8)
(source
(origin
(method url-fetch)
(uri
"https://github.com/openigtlink/OpenIGTLink/archive/c512727425c2b7a594fabb9cd1fbfac512bf376e.tar.gz")
(sha256
(base32 "0s2rxa4igs2d354205vnp57bf81yj5fpqh91hy5v3zz34gri46j5"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags (list "-DBUILD_EXAMPLES:BOOL=OFF"
"-DBUILD_TESTING:BOOL=OFF"
"-DOpenIGTLink_SUPERBUILD:BOOL=OFF"
"-DOpenIGTLink_PROTOCOL_VERSION_2:BOOL=OFF"
"-DOpenIGTLink_PROTOCOL_VERSION_3:BOOL=ON"
"-DOpenIGTLink_ENABLE_VIDEOSTREAMING:BOOL=ON"
"-DOpenIGTLink_USE_VP9:BOOL=OFF"

"-DOpenIGTLink_INSTALL_PACKAGE_DIR:PATH=lib/cmake/OpenIGTLink"

"-DBUILD_SHARED_LIBS:BOOL=ON")
#:tests? #f))
(inputs (list glew))
(home-page "openigtlink.org")
(synopsis
"Free, open-source network communication library for image-guided therapy")
(description
"The OpenIGTLink Library is a C/C++ implementation of The OpenIGTLink
Protocol. OpenIGTLink is an open-source network communication interface
specifically designed for image-guided interventions. It aims to provide a
plug-and-play unified real-time communications (URTC) in operating rooms (ORs)
for image-guided interventions, where imagers, sensors, surgical robots,and
computers from different vendors work cooperatively. This URTC will ensure the
seamless data flow among those components and enable a closed-loop process of
planning, control, delivery, and feedback. The specification of OpenIGTLink is
open, and can be used without any license fee; hence OpenIGTLink is suitable for
both industrial and academic developers.")
(license license:bsd-3)))

(define-public openigtlinkio
(package
(name "openigtlinkio")
(version "a262c1f")
(source
(origin
(method url-fetch)
(uri
"https://github.com/IGSIO/OpenIGTLinkIO/archive/a262c1f5e63c00831cbf67d5284f4734f8a7b143.tar.gz")
(sha256
(base32 "01y6nhv7c5m57clpql8vg1g43k4k37mvb0bvasl28r90mqm4dvsm"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags (list "-DBUILD_TESTING:BOOL=OFF"
"-DIGTLIO_USE_EXAMPLES:BOOL=OFF"
"-DBUILD_SHARED_LIBS:BOOL=ON")
#:tests? #f))
(inputs (list double-conversion
eigen
expat
ctk
freetype
glew
gl2ps
glew
hdf5
jsoncpp
libharu
libjpeg-turbo
libtheora
libxml++
lz4
mpich
netcdf
openigtlink
proj
qtbase-5
qtx11extras
tbb
vtk-slicer))
(home-page "openigtlink.org")
(synopsis
"Library for interfacing to openigtlink/OpenIGTLink, dependent on VTK and Qt. Based on openigtlink/OpenIGTLinkIF ")
(description
"Library for interfacing to openigtlink/OpenIGTLink, dependent on VTK and Qt. Based on openigtlink/OpenIGTLinkIF.")
(license license:asl2.0)))

(define-public sliceropenigtlinkif-src
(package
(name "openigtlinkif-src")
(version "6fbdadf")
(source
(origin
(method url-fetch)
(uri
"https://github.com/openigtlink/SlicerOpenIGTLink/archive/73df3c26e169f539123de54096c2eff8de0871c9.tar.gz")
(sha256
(base32 "053vczsadhxm2c9nqg1bmjx7lbzkzpsjqx9jj2jyqypcc9ry31mx"))
(patches (search-patches
"0019-COMP-packages-slicer-Port-OpenIGTLinkIF-to-slicer.patch"))))
(build-system copy-build-system)
(arguments
`(#:install-plan '(("." "/"))
#:phases (modify-phases %standard-phases
(delete 'build))))
(home-page
"https://slicer.readthedocs.io/en/latest/user_guide/modules/plots.html")
(synopsis "OpenIGTLink interface module for 3D Slicer 4.x ")
(description "OpenIGTLink interface module for 3D Slicer 4.x ")
(license license:bsd-2)))
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt
index 3f6fa9eab4..a29305d328 100644
--- a/Modules/CMakeLists.txt
+++ b/Modules/CMakeLists.txt
@@ -12,3 +12,6 @@ endif()
if(Slicer_BUILD_CLI_SUPPORT AND Slicer_BUILD_CLI)
add_subdirectory(CLI)
endif()
+
+# Build external modules
+add_subdirectory(External)
diff --git a/Modules/External/CMakeLists.txt b/Modules/External/CMakeLists.txt
new file mode 100644
index 0000000000..fde9267043
--- /dev/null
+++ b/Modules/External/CMakeLists.txt
@@ -0,0 +1,11 @@
+## External dependencies can be added to this directory. Slicer will
+## automatically build them.
+
+file(GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} */)
+
+foreach(child ${children})
+ if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${child}" AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${child}/CMakeLists.txt")
+ add_subdirectory(${child})
+ endif()
+endforeach()
+
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/Modules/Loadable/CMakeLists.txt b/Modules/Loadable/CMakeLists.txt
index 606011bac6..745232e19b 100644
--- a/Modules/Loadable/CMakeLists.txt
+++ b/Modules/Loadable/CMakeLists.txt
@@ -18,7 +18,7 @@ set(qtmodules
Transforms
Data
Models
- Plots
+ #Plots
Segmentations
Sequences
SlicerWelcome
diff --git a/Modules/Loadable/Plots/CMakeLists.txt b/Modules/Loadable/Plots/CMakeLists.txt
index 4685399f1f..4a8c56dee6 100644
--- a/Modules/Loadable/Plots/CMakeLists.txt
+++ b/Modules/Loadable/Plots/CMakeLists.txt
@@ -2,6 +2,7 @@
#-----------------------------------------------------------------------------
set(MODULE_NAME Plots)

+include(${Slicer_CMAKE_DIR}/SlicerMacroBuildLoadableModule.cmake)
string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)

#-----------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f43133..4f0b8b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,8 +17,8 @@ set(SUPERBUILD_TOPLEVEL_PROJECT inner)

#-----------------------------------------------------------------------------
# Extension dependencies
-find_package(Slicer REQUIRED)
-include(${Slicer_USE_FILE})
+#find_package(Slicer REQUIRED)
+#include(${Slicer_USE_FILE})
mark_as_superbuild(Slicer_DIR)

#-----------------------------------------------------------------------------
@@ -30,10 +30,10 @@ mark_as_superbuild(SlicerOpenIGTLink_USE_VP9)
# SuperBuild setup
option(${EXTENSION_NAME}_SUPERBUILD "Build ${EXTENSION_NAME} and the projects it depends on." ON)
mark_as_advanced(${EXTENSION_NAME}_SUPERBUILD)
-if(${EXTENSION_NAME}_SUPERBUILD)
- include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
- return()
-endif()
+#if(${EXTENSION_NAME}_SUPERBUILD)
+# include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
+# return()
+#endif()

#-----------------------------------------------------------------------------
# Extension modules
@@ -55,11 +55,11 @@ include(${Slicer_EXTENSION_GENERATE_CONFIG})

#-----------------------------------------------------------------------------
# Packaging
-set(EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS)
-list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS "${OpenIGTLink_DIR};OpenIGTLink;RuntimeLibraries;/")
-list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS "${OpenIGTLinkIO_DIR};OpenIGTLinkIO;RuntimeLibraries;/")
-set(${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS "${EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS}" CACHE STRING "List of external projects to install" FORCE)
-list(APPEND CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")
-list(APPEND CPACK_INSTALL_CMAKE_PROJECTS "${${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS}")
-include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/SlicerBlockInstallVP9.cmake)
-include(${Slicer_EXTENSION_CPACK})
+#set(EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS)
+#list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS "${OpenIGTLink_DIR};OpenIGTLink;RuntimeLibraries;/")
+#list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS "${OpenIGTLinkIO_DIR};OpenIGTLinkIO;RuntimeLibraries;/")
+#set(${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS "${EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS}" CACHE STRING "List of external projects to install" FORCE)
+#list(APPEND CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")
+#list(APPEND CPACK_INSTALL_CMAKE_PROJECTS "${${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS}")
+#include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/SlicerBlockInstallVP9.cmake)
+#include(${Slicer_EXTENSION_CPACK})
Loading