[med-svn] [Git][med-team/fast][master] 3 commits: Use a more linear approach for patching.
Shayan Doust
gitlab at salsa.debian.org
Thu Aug 8 16:09:30 BST 2019
Shayan Doust pushed to branch master at Debian Med / fast
Commits:
376e1c1e by Shayan Doust at 2019-08-08T14:55:34Z
Use a more linear approach for patching.
Having lots of patches modifying the one cmake file seems to only introduce fuzzing issues.
- - - - -
1b8c90ee by Shayan Doust at 2019-08-08T15:00:47Z
Add descriptions to the new patches
- - - - -
64575057 by Shayan Doust at 2019-08-08T15:07:25Z
Prevent cmake third party downloads.
This patch still needs to prevent cmake from using git and downloading anything, however rectify what is available for patching or should use a packaged lib.
- - - - -
6 changed files:
- debian/patches/use_system_eigen.patch → debian/patches/prevent_cmake_downloading.patch
- + debian/patches/remove_unneeded_installs.patch
- debian/patches/series
- + debian/patches/use_system_libs.patch
- − debian/patches/use_system_openslide.cmake
- − debian/patches/use_system_zlib.patch
Changes:
=====================================
debian/patches/use_system_eigen.patch → debian/patches/prevent_cmake_downloading.patch
=====================================
@@ -1,13 +1,13 @@
-Description: use libeigen-dev
- This patch modifies some of the cmake files in order to use the system available libeigen-dev library instead of cmake downloading, building and linking.
+Description: prevent third party downloads
+ This patch will modify some of the cmake files to prevent cmake from using git and downloading third party libraries / files as these can be accomplished by either safely integrating as patches or by using a packaged library.
Author: Shayan Doust <hello at shayandoust.me>
Last-Update: 2019-08-08
---
Index: fast/cmake/ExternalEigen.cmake
===================================================================
---- fast.orig/cmake/ExternalEigen.cmake 2019-08-08 14:52:02.618696327 +0100
-+++ fast/cmake/ExternalEigen.cmake 2019-08-08 14:52:02.614696293 +0100
+--- 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
@@ -1,21 +1,21 @@
# Download and set up Eigen
@@ -48,44 +48,89 @@ Index: fast/cmake/ExternalEigen.cmake
\ No newline at end of file
+#list(APPEND FAST_INCLUDE_DIRS ${FAST_EXTERNAL_INSTALL_DIR}/include/eigen3/)
+#list(APPEND FAST_EXTERNAL_DEPENDENCIES eigen)
-Index: fast/cmake/InstallFAST.cmake
+Index: fast/cmake/ExternalOpenSlide.cmake
===================================================================
---- fast.orig/cmake/InstallFAST.cmake 2019-08-08 14:52:02.618696327 +0100
-+++ fast/cmake/InstallFAST.cmake 2019-08-08 14:52:02.614696293 +0100
-@@ -185,10 +185,10 @@
- )
+--- 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
+@@ -1,17 +1,17 @@
+ # Download and set up OpenSlide
- # Eigen
--file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/eigen/src/eigen/COPYING.*)
--install(FILES ${LICENSE_FILES}
-- DESTINATION fast/licenses/eigen/
+-include(cmake/Externals.cmake)
++#include(cmake/Externals.cmake)
+
+-if(WIN32)
++#if(WIN32)
+
+-ExternalProject_Add(openslide
+- PREFIX ${FAST_EXTERNAL_BUILD_DIR}/openslide
+- BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/openslide
+- URL "https://github.com/openslide/openslide-winbuild/releases/download/v20171122/openslide-win64-20171122.zip"
+- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/openslide/src/openslide/ ${FAST_EXTERNAL_INSTALL_DIR}
+- BUILD_COMMAND ""
+- INSTALL_COMMAND ""
-)
-+#file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/eigen/src/eigen/COPYING.*)
-+#install(FILES ${LICENSE_FILES}
-+# DESTINATION fast/licenses/eigen/
++#ExternalProject_Add(openslide
++# PREFIX ${FAST_EXTERNAL_BUILD_DIR}/openslide
++# BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/openslide
++# URL "https://github.com/openslide/openslide-winbuild/releases/download/v20171122/openslide-win64-20171122.zip"
++# CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/openslide/src/openslide/ ${FAST_EXTERNAL_INSTALL_DIR}
++# BUILD_COMMAND ""
++# INSTALL_COMMAND ""
+#)
- # zlib
- install(FILES ${FAST_EXTERNAL_BUILD_DIR}/zlib/src/zlib/README
- DESTINATION fast/licenses/zlib/
-Index: fast/CMakeLists.txt
+
+-list(APPEND FAST_EXTERNAL_DEPENDENCIES openslide)
+-endif()
+\ No newline at end of file
++#list(APPEND FAST_EXTERNAL_DEPENDENCIES openslide)
++#endif()
+Index: fast/cmake/ExternalZlib.cmake
===================================================================
---- fast.orig/CMakeLists.txt 2019-08-08 14:52:02.618696327 +0100
-+++ fast/CMakeLists.txt 2019-08-08 14:52:02.614696293 +0100
-@@ -153,7 +153,7 @@
- endif()
- endif()
+--- 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
+@@ -1,24 +1,24 @@
+ # Download and set up zlib
--
-+find_package(Eigen3 REQUIRED)
+-include(cmake/Externals.cmake)
++#include(cmake/Externals.cmake)
- #### Create FAST library and executables
- add_library(FAST SHARED ${FAST_SOURCE_FILES} ${HEADERS_MOC})
-@@ -169,7 +169,7 @@
- if(FAST_MODULE_Visualization AND FAST_BUILD_QT5)
- qt5_use_modules(FAST Widgets OpenGL) # Add Qt 5 modules
- endif()
--
-+target_link_libraries(FAST PUBLIC Eigen3::Eigen)
- ## Build test executable
- if(FAST_BUILD_TESTS)
- add_executable(testFAST ${FAST_TEST_SOURCE_FILES} source/FAST/Algorithms/CoherentPointDrift/Rigid.cpp source/FAST/Algorithms/CoherentPointDrift/Rigid.hpp source/FAST/Algorithms/CoherentPointDrift/Affine.cpp source/FAST/Algorithms/CoherentPointDrift/Affine.hpp)
+-ExternalProject_Add(zlib
+- PREFIX ${FAST_EXTERNAL_BUILD_DIR}/zlib
+- BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/zlib
+- GIT_REPOSITORY "https://github.com/madler/zlib.git"
+- GIT_TAG "v1.2.9"
+- CMAKE_ARGS
+- -DCMAKE_MACOSX_RPATH=ON
+- 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(ZLIB_LIBRARY debug zlibd.lib optimized zlib.lib)
+-else(WIN32)
+- set(ZLIB_LIBRARY ${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX})
+-endif(WIN32)
+-list(APPEND LIBRARIES ${ZLIB_LIBRARY})
+-list(APPEND FAST_EXTERNAL_DEPENDENCIES zlib)
+\ No newline at end of file
++#ExternalProject_Add(zlib
++# PREFIX ${FAST_EXTERNAL_BUILD_DIR}/zlib
++# BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/zlib
++# GIT_REPOSITORY "https://github.com/madler/zlib.git"
++# GIT_TAG "v1.2.9"
++# CMAKE_ARGS
++# -DCMAKE_MACOSX_RPATH=ON
++# 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(ZLIB_LIBRARY debug zlibd.lib optimized zlib.lib)
++#else(WIN32)
++# set(ZLIB_LIBRARY ${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX})
++#endif(WIN32)
++#list(APPEND LIBRARIES ${ZLIB_LIBRARY})
++#list(APPEND FAST_EXTERNAL_DEPENDENCIES zlib)
=====================================
debian/patches/remove_unneeded_installs.patch
=====================================
@@ -0,0 +1,39 @@
+Description: remove some unnecessary cmake installs
+ Cmake will try install non-existant files as we are prohibiting cmake from downloading and building the libraries itself.
+Author: Shayan Doust <hello at shayandoust.me>
+Last-Update: 2019-08-08
+---
+
+Index: fast/cmake/InstallFAST.cmake
+===================================================================
+--- fast.orig/cmake/InstallFAST.cmake 2019-08-08 15:56:39.374462089 +0100
++++ fast/cmake/InstallFAST.cmake 2019-08-08 15:56:39.374462089 +0100
+@@ -185,18 +185,18 @@
+ )
+
+ # Eigen
+-file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/eigen/src/eigen/COPYING.*)
+-install(FILES ${LICENSE_FILES}
+- DESTINATION fast/licenses/eigen/
+-)
++#file(GLOB LICENSE_FILES ${FAST_EXTERNAL_BUILD_DIR}/eigen/src/eigen/COPYING.*)
++#install(FILES ${LICENSE_FILES}
++#DESTINATION fast/licenses/eigen/
++ #)
+ # zlib
+-install(FILES ${FAST_EXTERNAL_BUILD_DIR}/zlib/src/zlib/README
+- DESTINATION fast/licenses/zlib/
+-)
++#install(FILES ${FAST_EXTERNAL_BUILD_DIR}/zlib/src/zlib/README
++# DESTINATION fast/licenses/zlib/
++#)
+ # OpenIGTLink
+-install(FILES ${FAST_EXTERNAL_BUILD_DIR}/OpenIGTLink/src/OpenIGTLink/LICENSE.txt
+- DESTINATION fast/licenses/OpenIGTLink/
+-)
++#install(FILES ${FAST_EXTERNAL_BUILD_DIR}/OpenIGTLink/src/OpenIGTLink/LICENSE.txt
++# DESTINATION fast/licenses/OpenIGTLink/
++#)
+ # DCMTK
+ install(FILES ${FAST_EXTERNAL_BUILD_DIR}/dcmtk/src/dcmtk/COPYRIGHT
+ DESTINATION fast/licenses/dcmtk/
=====================================
debian/patches/series
=====================================
@@ -1,4 +1,4 @@
-use_system_openslide.cmake
-use_system_eigen.patch
-use_system_zlib.patch
+prevent_cmake_downloading.patch
+remove_unneeded_installs.patch
+use_system_libs.patch
disable_tests.patch
=====================================
debian/patches/use_system_libs.patch
=====================================
@@ -0,0 +1,22 @@
+Description: modify cmake files to use system wide "apt" packaged libs
+ This patch will alter some of the cmake files in order to use the system-wide installable libs instead of allowing cmake to use git and download / build itself.
+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 @@
+ qt5_use_modules(FAST Widgets OpenGL) # Add Qt 5 modules
+ endif()
+
++find_package(Eigen3 REQUIRED)
++
++target_link_libraries(FAST PUBLIC Eigen3::Eigen)
++target_link_libraries(FAST PUBLIC openslide)
++target_link_libraries(FAST PUBLIC z)
++
+ ## Build test executable
+ if(FAST_BUILD_TESTS)
+ add_executable(testFAST ${FAST_TEST_SOURCE_FILES} source/FAST/Algorithms/CoherentPointDrift/Rigid.cpp source/FAST/Algorithms/CoherentPointDrift/Rigid.hpp source/FAST/Algorithms/CoherentPointDrift/Affine.cpp source/FAST/Algorithms/CoherentPointDrift/Affine.hpp)
=====================================
debian/patches/use_system_openslide.cmake deleted
=====================================
@@ -1,54 +0,0 @@
-Description: use libopenslide-dev
- This patch will modify some of the cmake files in order to build using libopenslide-dev available on the system instead of cmake downloading, compiling and static linking.
-Author: Shayan Doust <hello at shayandoust.me>
-Last-Update: 2019-08-08
----
-
-Index: fast/CMakeLists.txt
-===================================================================
---- fast.orig/CMakeLists.txt 2019-08-08 14:49:11.365300187 +0100
-+++ fast/CMakeLists.txt 2019-08-08 14:49:11.357300122 +0100
-@@ -162,7 +162,7 @@
- generate_export_header(FAST EXPORT_FILE_NAME FASTExport.hpp)
-
- include(cmake/OpenMP.cmake)
--
-+target_link_libraries(FAST PUBLIC openslide)
- ## Link everything
- message("-- LIBS: ${LIBRARIES} ${FAST_SYSTEM_LIBRARIES}")
- target_link_libraries(FAST PUBLIC ${LIBRARIES} ${FAST_SYSTEM_LIBRARIES})
-Index: fast/cmake/ExternalOpenSlide.cmake
-===================================================================
---- fast.orig/cmake/ExternalOpenSlide.cmake 2019-08-08 14:49:11.365300187 +0100
-+++ fast/cmake/ExternalOpenSlide.cmake 2019-08-08 14:49:11.357300122 +0100
-@@ -1,17 +1,17 @@
- # Download and set up OpenSlide
-
--include(cmake/Externals.cmake)
-+#include(cmake/Externals.cmake)
-
--if(WIN32)
-+#if(WIN32)
-
--ExternalProject_Add(openslide
-- PREFIX ${FAST_EXTERNAL_BUILD_DIR}/openslide
-- BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/openslide
-- URL "https://github.com/openslide/openslide-winbuild/releases/download/v20171122/openslide-win64-20171122.zip"
-- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/openslide/src/openslide/ ${FAST_EXTERNAL_INSTALL_DIR}
-- BUILD_COMMAND ""
-- INSTALL_COMMAND ""
--)
-+#ExternalProject_Add(openslide
-+# PREFIX ${FAST_EXTERNAL_BUILD_DIR}/openslide
-+# BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/openslide
-+# URL "https://github.com/openslide/openslide-winbuild/releases/download/v20171122/openslide-win64-20171122.zip"
-+# CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/openslide/src/openslide/ ${FAST_EXTERNAL_INSTALL_DIR}
-+# BUILD_COMMAND ""
-+# INSTALL_COMMAND ""
-+#)
-
--list(APPEND FAST_EXTERNAL_DEPENDENCIES openslide)
--endif()
-\ No newline at end of file
-+#list(APPEND FAST_EXTERNAL_DEPENDENCIES openslide)
-+#endif()
=====================================
debian/patches/use_system_zlib.patch deleted
=====================================
@@ -1,86 +0,0 @@
-Description: use system packaged libz
- This patch modifies some of the cmake files to use the system available zlib library instead of cmake downloading, compiling and linking.
-Author: Shayan Doust <hello at shayandoust.me>
-Last-Update: 2019-08-08
----
-
-Index: fast/cmake/ExternalZlib.cmake
-===================================================================
---- fast.orig/cmake/ExternalZlib.cmake 2019-08-08 14:54:10.139738764 +0100
-+++ fast/cmake/ExternalZlib.cmake 2019-08-08 14:54:10.135738732 +0100
-@@ -1,24 +1,24 @@
- # Download and set up zlib
-
--include(cmake/Externals.cmake)
-+#include(cmake/Externals.cmake)
-
--ExternalProject_Add(zlib
-- PREFIX ${FAST_EXTERNAL_BUILD_DIR}/zlib
-- BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/zlib
-- GIT_REPOSITORY "https://github.com/madler/zlib.git"
-- GIT_TAG "v1.2.9"
-- CMAKE_ARGS
-- -DCMAKE_MACOSX_RPATH=ON
-- 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(ZLIB_LIBRARY debug zlibd.lib optimized zlib.lib)
--else(WIN32)
-- set(ZLIB_LIBRARY ${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX})
--endif(WIN32)
--list(APPEND LIBRARIES ${ZLIB_LIBRARY})
--list(APPEND FAST_EXTERNAL_DEPENDENCIES zlib)
-\ No newline at end of file
-+#ExternalProject_Add(zlib
-+# PREFIX ${FAST_EXTERNAL_BUILD_DIR}/zlib
-+# BINARY_DIR ${FAST_EXTERNAL_BUILD_DIR}/zlib
-+# GIT_REPOSITORY "https://github.com/madler/zlib.git"
-+# GIT_TAG "v1.2.9"
-+# CMAKE_ARGS
-+# -DCMAKE_MACOSX_RPATH=ON
-+# 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(ZLIB_LIBRARY debug zlibd.lib optimized zlib.lib)
-+#else(WIN32)
-+#set(ZLIB_LIBRARY ${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX})
-+ #endif(WIN32)
-+list(APPEND LIBRARIES /usr/lib/x86_64-linux-gnu/libz.so)
-+#list(APPEND FAST_EXTERNAL_DEPENDENCIES zlib)
-Index: fast/CMakeLists.txt
-===================================================================
---- fast.orig/CMakeLists.txt 2019-08-08 14:54:10.139738764 +0100
-+++ fast/CMakeLists.txt 2019-08-08 14:54:10.135738732 +0100
-@@ -166,6 +166,7 @@
- ## Link everything
- message("-- LIBS: ${LIBRARIES} ${FAST_SYSTEM_LIBRARIES}")
- target_link_libraries(FAST PUBLIC ${LIBRARIES} ${FAST_SYSTEM_LIBRARIES})
-+target_link_libraries(FAST PUBLIC z)
- if(FAST_MODULE_Visualization AND FAST_BUILD_QT5)
- qt5_use_modules(FAST Widgets OpenGL) # Add Qt 5 modules
- endif()
-Index: fast/cmake/InstallFAST.cmake
-===================================================================
---- fast.orig/cmake/InstallFAST.cmake 2019-08-08 14:54:10.139738764 +0100
-+++ fast/cmake/InstallFAST.cmake 2019-08-08 14:54:10.135738732 +0100
-@@ -190,9 +190,9 @@
- # DESTINATION fast/licenses/eigen/
- #)
- # zlib
--install(FILES ${FAST_EXTERNAL_BUILD_DIR}/zlib/src/zlib/README
-- DESTINATION fast/licenses/zlib/
--)
-+#install(FILES ${FAST_EXTERNAL_BUILD_DIR}/zlib/src/zlib/README
-+# DESTINATION fast/licenses/zlib/
-+#)
- # OpenIGTLink
- install(FILES ${FAST_EXTERNAL_BUILD_DIR}/OpenIGTLink/src/OpenIGTLink/LICENSE.txt
- DESTINATION fast/licenses/OpenIGTLink/
View it on GitLab: https://salsa.debian.org/med-team/fast/compare/1c628ddf4e5fe6686798c3d2e4b2ddd0fbc2a90b...645750571a7072770ecd29353f5e76512b4ded2b
--
View it on GitLab: https://salsa.debian.org/med-team/fast/compare/1c628ddf4e5fe6686798c3d2e4b2ddd0fbc2a90b...645750571a7072770ecd29353f5e76512b4ded2b
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/b308f98b/attachment-0001.html>
More information about the debian-med-commit
mailing list