[med-svn] [Git][med-team/sight][master] Add new patch to not use git while configuring
Flavien Bridault
gitlab at salsa.debian.org
Thu Sep 5 16:46:24 BST 2019
Flavien Bridault pushed to branch master at Debian Med / sight
Commits:
a5274bca by Flavien Bridault at 2019-09-05T15:45:47Z
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
- - - - -
6 changed files:
- debian/changelog
- + debian/patches/fix_version_getter.patch
- debian/patches/revert_qVTK_widget.patch
- debian/patches/series
- debian/patches/skip_conan_deps.patch
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -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 at ircad.fr> Mon, 02 Sep 2019 06:41:05 +0000
=====================================
debian/patches/fix_version_getter.patch
=====================================
@@ -0,0 +1,104 @@
+Author: Flavien Bridault <fbridault at 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}")
++
=====================================
debian/patches/revert_qVTK_widget.patch
=====================================
@@ -1,5 +1,5 @@
Author: Flavien Bridault <fbridault at 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
=====================================
debian/patches/series
=====================================
@@ -1,4 +1,5 @@
skip_conan_deps.patch
+fix_version_getter.patch
fix_launcher_library_path.patch
fix_dcmtk_scp_cfg.patch
revert_qVTK_widget.patch
=====================================
debian/patches/skip_conan_deps.patch
=====================================
@@ -1,3 +1,6 @@
+Author: Flavien Bridault <fbridault at 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()
=====================================
debian/rules
=====================================
@@ -6,6 +6,7 @@ export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/pkg-info.mk
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
@@ -16,7 +17,7 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
dh $@
override_dh_auto_configure:
- dh_auto_configure -- -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE -DUSE_SYSTEM_LIB=ON -DPROJECTS_TO_BUILD="VRRender" -DPROJECTS_TO_INSTALL="VRRender" -DCMAKE_INSTALL_RPATH="/usr/lib/$(DEB_HOST_MULTIARCH)/sight" -Wno-dev -DENABLE_PCH=OFF -DBUILD_TESTS=OFF -DBUILD_SDK=ON -DCMAKE_BUILD_TYPE=Release
+ dh_auto_configure -- -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE -DUSE_SYSTEM_LIB=ON -DPROJECTS_TO_BUILD="VRRender" -DPROJECTS_TO_INSTALL="VRRender" -DCMAKE_INSTALL_RPATH="/usr/lib/$(DEB_HOST_MULTIARCH)/sight" -Wno-dev -DENABLE_PCH=OFF -DBUILD_TESTS=OFF -DBUILD_SDK=ON -DGIT_TAG=$(DEB_VERSION_UPSTREAM) -DCMAKE_BUILD_TYPE=Release
override_dh_auto_test:
echo "test disabled"
View it on GitLab: https://salsa.debian.org/med-team/sight/commit/a5274bca99db9800d561f5c028c97b270c36c1b0
--
View it on GitLab: https://salsa.debian.org/med-team/sight/commit/a5274bca99db9800d561f5c028c97b270c36c1b0
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/20190905/a9c53b3c/attachment-0001.html>
More information about the debian-med-commit
mailing list