Commit a5274bca authored by Flavien Bridault's avatar Flavien Bridault
Browse files

Add new patch to not use git while configuring

This compiled fine when building from the git repository, but this failed when compiling outside, for instance from a pbuilder chroot
parent fa9d074a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ sight (19.0.0-1) UNRELEASED; urgency=medium

  * New upstream version
  * d/p/: updated patches
  * d/p/fix_version_getter.patch: add patch to not use git during configuring

 -- Flavien Bridault <fbridault@ircad.fr>  Mon, 02 Sep 2019 06:41:05 +0000

+104 −0
Original line number Diff line number Diff line
Author: Flavien Bridault <fbridault@ircad.fr>
Description: Sight version should be passed from the build parameters and not from the git repository.

--- sight.orig/CMake/build/macros.cmake
+++ sight/CMake/build/macros.cmake
@@ -32,7 +32,10 @@
 include(${FWCMAKE_BUILD_FILES_DIR}/plugin_config.cmake)
 include(${FWCMAKE_BUILD_FILES_DIR}/profile_config.cmake)
 include(${FWCMAKE_INSTALL_FILES_DIR}/generic_install.cmake)
-include(${FWCMAKE_INSTALL_FILES_DIR}/get_git_rev.cmake)
+
+if(NOT FW_BUILD_EXTERNAL)
+    include(${FWCMAKE_INSTALL_FILES_DIR}/get_git_rev.cmake)
+endif()
 
 file(REMOVE "${CMAKE_BINARY_DIR}/cmake/SightRequirements.cmake")
 
@@ -1051,4 +1054,4 @@
             target_compile_options(${PROJECT} PRIVATE "-Werror")
         endif ()
     endif()
-endmacro()
\ No newline at end of file
+endmacro()
--- sight.orig/CMake/install/get_git_rev.cmake
+++ sight/CMake/install/get_git_rev.cmake
@@ -6,41 +6,44 @@
 # - hash of the last commit on the current branch
 # - date of the last commit on the current branch
 
-# finds name of the current branch
-execute_process(
-    COMMAND git rev-parse --abbrev-ref HEAD
-    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
-    OUTPUT_VARIABLE GIT_BRANCH
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-
-# finds hash of the last commit on the current branch
-execute_process(
-    COMMAND git log -1 --format=%h
-    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
-    OUTPUT_VARIABLE GIT_COMMIT_HASH
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-
-# finds date of the last commit on the current branch
-execute_process(
-    COMMAND git log -1 --format=%ai
-    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
-    OUTPUT_VARIABLE GIT_COMMIT_DATE
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-
-# finds last tag name if you are exactly on (annotated) tag,
-# or <tag>-<n>-g<shortened sha-1> if not
-# where <n> is number of commits since <tag>
-execute_process(
-    COMMAND git describe --tags
-    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
-    OUTPUT_VARIABLE GIT_TAG
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-)
+if(NOT GIT_TAG)
+    # finds name of the current branch
+    execute_process(
+        COMMAND git rev-parse --abbrev-ref HEAD
+        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+        OUTPUT_VARIABLE GIT_BRANCH
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+
+    # finds hash of the last commit on the current branch
+    execute_process(
+        COMMAND git log -1 --format=%h
+        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+        OUTPUT_VARIABLE GIT_COMMIT_HASH
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+
+    # finds date of the last commit on the current branch
+    execute_process(
+        COMMAND git log -1 --format=%ai
+        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+        OUTPUT_VARIABLE GIT_COMMIT_DATE
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+
+    # finds last tag name if you are exactly on (annotated) tag,
+    # or <tag>-<n>-g<shortened sha-1> if not
+    # where <n> is number of commits since <tag>
+    execute_process(
+        COMMAND git describe --tags
+        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
+        OUTPUT_VARIABLE GIT_TAG
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+endif()
 
 # parse GIT_TAG information into pieces.
 string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" GIT_TAG_MAJOR "${GIT_TAG}")
 string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" GIT_TAG_MINOR "${GIT_TAG}")
 string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.(.*)" "\\1" GIT_TAG_PATCH "${GIT_TAG}")
+
+1 −1
Original line number Diff line number Diff line
Author: Flavien Bridault <fbridault@ircad.fr>
Description: Revert QVTKOpenGLWidget usage that do no exist in VTK 6.3
Description: Revert QVTKOpenGLWidget usage that do no exist in VTK 7.1

 diff --git i/Bundles/visu/visuVTKQt/include/visuVTKQt/Plugin.hpp w/Bundles/visu/visuVTKQt/include/visuVTKQt/Plugin.hpp
 index b8916f5..71e3ed3 100644
+1 −0
Original line number Diff line number Diff line
skip_conan_deps.patch
fix_version_getter.patch
fix_launcher_library_path.patch
fix_dcmtk_scp_cfg.patch
revert_qVTK_widget.patch
+3 −21
Original line number Diff line number Diff line
Author: Flavien Bridault <fbridault@ircad.fr>
Description: Do not install Conan dependencies since we use system libraries

--- sight.orig/CMake/install/linux_install.cmake
+++ sight/CMake/install/linux_install.cmake
@@ -49,24 +49,26 @@
@@ -77,24 +80,3 @@
         if(APPLE)
             osx_install(${FWPROJECT_NAME})
         elseif(WIN32)
--- sight.orig/CMake/build/macros.cmake
+++ sight/CMake/build/macros.cmake
@@ -32,7 +32,10 @@
 include(${FWCMAKE_BUILD_FILES_DIR}/plugin_config.cmake)
 include(${FWCMAKE_BUILD_FILES_DIR}/profile_config.cmake)
 include(${FWCMAKE_INSTALL_FILES_DIR}/generic_install.cmake)
-include(${FWCMAKE_INSTALL_FILES_DIR}/get_git_rev.cmake)
+
+if(NOT FW_BUILD_EXTERNAL)
+    include(${FWCMAKE_INSTALL_FILES_DIR}/get_git_rev.cmake)
+endif()
 
 file(REMOVE "${CMAKE_BINARY_DIR}/cmake/SightRequirements.cmake")
 
@@ -1051,4 +1054,4 @@
             target_compile_options(${PROJECT} PRIVATE "-Werror")
         endif ()
     endif()
-endmacro()
\ No newline at end of file
+endmacro()
Loading