[med-svn] [fw4spl] 06/11: Added patch to fix installation.

Flavien Bridault fbridault-guest at moszumanska.debian.org
Thu Nov 24 07:50:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

fbridault-guest pushed a commit to branch master
in repository fw4spl.

commit 837c17c91785b20d50a792e38da4fa7fb48e15c4
Author: Flavien Bridault <fbridault at ircad.fr>
Date:   Tue Nov 22 12:16:42 2016 +0100

    Added patch to fix installation.
---
 debian/patches/fix_install.patch    | 249 ++++++++++++++++++++++++++++++++++++
 debian/patches/fix_unit_tests.patch |  64 ---------
 debian/patches/series               |   1 +
 debian/rules                        |   2 +-
 4 files changed, 251 insertions(+), 65 deletions(-)

diff --git a/debian/patches/fix_install.patch b/debian/patches/fix_install.patch
new file mode 100644
index 0000000..4da718c
--- /dev/null
+++ b/debian/patches/fix_install.patch
@@ -0,0 +1,249 @@
+--- fw4spl.orig/CMake/install/linux/template.sh.in
++++ fw4spl/CMake/install/linux/template.sh.in
+@@ -18,7 +18,7 @@
+     esac
+ }
+ 
+-me=`which "$0"` # Search $PATH if necessary
++me=@CMAKE_INSTALL_PREFIX@
+ if test -L "$me"; then
+     # Try readlink(1)
+     readlink=`type readlink 2>/dev/null` || readlink=
+@@ -33,16 +33,12 @@
+     fi
+ fi
+ #Find the directories
+-bindir=`dirname "$me"`
+-libdir=`cd "$bindir/lib" ; pwd`
+-bundledir=`cd "$bindir/@BUNDLE_PREFIX@"; pwd`
+-fontdir=`cd "$libdir/fonts"; pwd`
++bindir="$me/bin"
++libdir=`cd "$me/lib" ; pwd`
++bundledir=`cd "$me/@BUNDLE_PREFIX@"; pwd`
+ 
+ #export LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=$libdir:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ export LD_LIBRARY_PATH
+-#export the path to the fonts (mandatory for Qt)
+-QT_QPA_FONTDIR=$fontdir
+-export QT_QPA_FONTDIR
+ #Use CMAKE Variable of fwlauncher and Profile.xml path
+-exec "$bindir/@LAUNCHER@" "$bundledir/@PROFILE_PATH@" "-B" "$bundledir" "--rwd" "$bindir/.."
++exec "$bindir/@LAUNCHER@" "$bundledir/@PROFILE_PATH@" "-B" "$bundledir" "--rwd" "$me"
+--- fw4spl.orig/CMake/install/linux_install.cmake
++++ fw4spl/CMake/install/linux_install.cmake
+@@ -50,8 +50,9 @@
+     set(CPACK_PACKAGE_VERSION "${VERSION}")
+ 
+     if("${${PRJ_NAME}_TYPE}" STREQUAL  "APP")
+-        configure_file(${FWCMAKE_RESOURCE_PATH}/install/linux/template.sh.in ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}_${DASH_VERSION}.sh @ONLY)
+-        install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}_${DASH_VERSION}.sh DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
++        string(TOLOWER ${PRJ_NAME} APP_NAME)
++        configure_file(${FWCMAKE_RESOURCE_PATH}/install/linux/template.sh.in ${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME} @ONLY)
++        install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
+     endif()
+ 
+ 
+--- fw4spl.orig/SrcLib/io/fwItkIO/CMakeLists.txt
++++ fw4spl/SrcLib/io/fwItkIO/CMakeLists.txt
+@@ -4,22 +4,12 @@
+ find_package(JPEG REQUIRED)
+ find_package(ZLIB REQUIRED )
+ 
+-find_library(VGL_ALGO_LIBRARY   vgl_algo )
+-find_library(VNL_ALGO_LIBRARY   vnl_algo )
+-find_library(VNL_LIBRARY        vnl )
+-find_library(VCL_LIBRARY        vcl )
+-find_library(V3P_NETLIB_LIBRARY v3p_netlib )
+ find_library(JPEG_LIBRARY libjpeg)
+-find_path(VNL_INCLUDE_PATH  vxl/core/vnl/vnl_alloc.h)
+ 
+ fwInclude(${ZLIB_INCLUDE_DIRS})
+ 
+ fwForwardInclude(
+     ${ITK_INCLUDE_DIRS}
+-    ${VNL_INCLUDE_PATH}
+-    ${VNL_INCLUDE_PATH}/vxl
+-    ${VNL_INCLUDE_PATH}/vxl/core
+-    ${VNL_INCLUDE_PATH}/vxl/vcl
+ )
+ 
+ fwLink(
+@@ -29,12 +19,6 @@
+ 
+ # Since ITK is template-based, this make sense to force the link for dependencies
+ fwForwardLink(
+-    ${VNL_LIBRARY}
+-    ${VNL_ALGO_LIBRARY}
+-    ${VCL_LIBRARY}
+-    ${VGL_ALGO_LIBRARY}
+-    ${V3P_NETLIB_LIBRARY}
+-
+     ITKCommon
+     ITKIOImageBase
+     ITKIOJPEG
+--- fw4spl.orig/SrcLib/visu/fwRenderVTK/CMakeLists.txt
++++ fw4spl/SrcLib/visu/fwRenderVTK/CMakeLists.txt
+@@ -23,7 +23,7 @@
+             vtkInteractionStyle
+             vtkRenderingCore
+             vtkRenderingAnnotation
+-            vtkRenderingFreeTypeOpenGL
++            vtkRenderingFreeType
+             vtkRenderingVolumeOpenGL
+         REQUIRED
+         NO_MODULE)
+--- fw4spl.orig/CMakeLists.txt
++++ fw4spl/CMakeLists.txt
+@@ -70,6 +70,7 @@
+ endif()
+ 
+ set(BUNDLE_PREFIX "Bundles")
++set(RC_PREFIX "share")
+ 
+ # Set warning level and function export visibility on Unix
+ if(UNIX)
+@@ -84,8 +85,9 @@
+ 
+         #To make a debian package we should install our bundle in /usr/share/...
+         if(DEBIAN_INSTALL)
+-            set(BUNDLE_PREFIX "share/Bundles")
+-        endif()
++            set(BUNDLE_PREFIX "share/fw4spl")
++	    set(RC_PREFIX "share/fw4spl")
++         endif()
+ 
+     endif()
+     # Color for ninja and Clang on Linux and OSX
+@@ -145,6 +147,7 @@
+ endif()
+ 
+ add_definitions(-DBUNDLE_PREFIX="${BUNDLE_PREFIX}")
++add_definitions(-DRC_PREFIX="${RC_PREFIX}")
+ 
+ macro(groupMaker FWPROJECT_NAME)
+     file(GLOB_RECURSE PRJ_SOURCES "${${FWPROJECT_NAME}_DIR}/*")
+@@ -336,7 +339,7 @@
+         add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
+ 
+         if(${FWPROJECT_NAME}_INSTALL)
+-            createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "share/${FWPROJECT_NAME}_${DASH_VERSION}" )
++            createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${RC_PREFIX}/${FWPROJECT_NAME}_${DASH_VERSION}" )
+         endif()
+     endif()
+ 
+@@ -390,7 +393,7 @@
+         add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
+ 
+         if(${FWPROJECT_NAME}_INSTALL)
+-            createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "share/tu_exec_${DIRNAME}_${DASH_VERSION}" )
++		createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${RC_PREFIX}/tu_exec_${DIRNAME}_${DASH_VERSION}" )
+         endif()
+     endif()
+ 
+@@ -448,7 +451,7 @@
+         add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
+ 
+         if(${FWPROJECT_NAME}_INSTALL)
+-            createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "share/${FWPROJECT_NAME}_${DASH_VERSION}" )
++		createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${RC_PREFIX}/${FWPROJECT_NAME}_${DASH_VERSION}" )
+         endif()
+ 
+     endif()
+@@ -564,7 +567,7 @@
+     endif()
+ 
+     if(${FWPROJECT_NAME}_INSTALL)
+-        createResourcesInstallTarget( "${BUNDLE_DIR}" ${BUNDLE_PREFIX}/${FWPROJECT_NAME}_${DASH_VERSION} )
++        createResourcesInstallTarget( "${BUNDLE_DIR}" ${RC_PREFIX}/${FWPROJECT_NAME}_${DASH_VERSION} )
+     endif()
+     fwBundleExtra()
+ endmacro()
+--- fw4spl.orig/SrcLib/core/fwDataIO/src/fwDataIO/reader/DictionaryReader.cpp
++++ fw4spl/SrcLib/core/fwDataIO/src/fwDataIO/reader/DictionaryReader.cpp
+@@ -362,7 +362,7 @@
+ 
+ ::boost::filesystem::path DictionaryReader::getDefaultDictionaryPath()
+ {
+-    std::string dicoPath = std::string("./share/") + PRJ_NAME +"_"+ FWDATAIO_VER + "/OrganDictionary.dic";
++    std::string dicoPath = RC_PREFIX "/" PRJ_NAME "_" FWDATAIO_VER "/OrganDictionary.dic";
+     return dicoPath;
+ }
+ 
+--- fw4spl.orig/SrcLib/core/fwRuntime/src/io/BundleDescriptorReader.cpp
++++ fw4spl/SrcLib/core/fwRuntime/src/io/BundleDescriptorReader.cpp
+@@ -103,7 +103,7 @@
+ 
+     // Validation
+     std::ostringstream fileLocation;
+-    fileLocation << "share/fwRuntime_" <<  FWRUNTIME_VER << "/plugin.xsd";
++    fileLocation << RC_PREFIX << "/fwRuntime_" <<  FWRUNTIME_VER << "/plugin.xsd";
+     const ::boost::filesystem::path pluginXSDLocation(
+         ::fwRuntime::Runtime::getDefault()->getWorkingPath() / fileLocation.str() );
+ 
+@@ -175,7 +175,7 @@
+ 
+     // Validation
+     std::ostringstream fileLocation;
+-    fileLocation << "share/fwRuntime_" <<  FWRUNTIME_VER << "/plugin.xsd";
++    fileLocation << RC_PREFIX << "/fwRuntime_" <<  FWRUNTIME_VER << "/plugin.xsd";
+     const ::boost::filesystem::path pluginXSDLocation(
+         ::fwRuntime::Runtime::getDefault()->getWorkingPath() / fileLocation.str() );
+ 
+--- fw4spl.orig/SrcLib/core/fwRuntime/src/io/ProfileReader.cpp
++++ fw4spl/SrcLib/core/fwRuntime/src/io/ProfileReader.cpp
+@@ -52,7 +52,7 @@
+ 
+     // Validation
+     std::ostringstream fileLocation;
+-    fileLocation << "share/fwRuntime_" <<  FWRUNTIME_VER << "/profile.xsd";
++    fileLocation << RC_PREFIX << "/fwRuntime_" <<  FWRUNTIME_VER << "/profile.xsd";
+     const ::boost::filesystem::path profileXSDLocation(
+         ::fwRuntime::Runtime::getDefault()->getWorkingPath() / fileLocation.str() );
+ 
+--- fw4spl.orig/SrcLib/io/fwDcmtkTools/src/fwDcmtkTools/Dictionary.cpp
++++ fw4spl/SrcLib/io/fwDcmtkTools/src/fwDcmtkTools/Dictionary.cpp
+@@ -25,7 +25,7 @@
+     if (!dcmDataDict.isDictionaryLoaded())
+     {
+         ::boost::filesystem::path full_path(::boost::filesystem::initial_path< ::boost::filesystem::path >());
+-        std::string dicoPath = full_path.string() + "/share/fwDcmtkTools_0-1/dicom.dic";
++        std::string dicoPath = RC_PREFIX "/fwDcmtkTools_0-1/dicom.dic";
+         bool loaded          = dcmDataDict.wrlock().loadDictionary(dicoPath.c_str());
+         dcmDataDict.unlock();
+         SLM_ERROR_IF("Unable to load DICOM dictionary !", loaded);
+--- fw4spl.orig/SrcLib/io/fwGdcmIO/src/fwGdcmIO/writer/ie/Surface.cpp
++++ fw4spl/SrcLib/io/fwGdcmIO/src/fwGdcmIO/writer/ie/Surface.cpp
+@@ -57,7 +57,7 @@
+     // Ready the dictionary
+     ::fwDataIO::reader::DictionaryReader::sptr dictionaryReader = ::fwDataIO::reader::DictionaryReader::New();
+     dictionaryReader->setObject(m_structureDictionary);
+-    dictionaryReader->setFile("./share/fwDataIO_0-2/OrganDictionary.dic");
++    dictionaryReader->setFile(RC_PREFIX "/fwDataIO_0-2/OrganDictionary.dic");
+     try
+     {
+         dictionaryReader->read();
+--- fw4spl.orig/SrcLib/io/fwPacsIO/src/fwPacsIO/SeriesRetriever.cpp
++++ fw4spl/SrcLib/io/fwPacsIO/src/fwPacsIO/SeriesRetriever.cpp
+@@ -62,7 +62,7 @@
+ 
+     // Load configuration
+     ::boost::filesystem::path cfgPath(::boost::filesystem::initial_path< ::boost::filesystem::path >());
+-    cfgPath = cfgPath / "share/fwPacsIO_0-1/storescp.cfg";
++    cfgPath = cfgPath / RC_PREFIX "/fwPacsIO_0-1/storescp.cfg";
+     SLM_ASSERT("storescp.cfg not found !", ::boost::filesystem::exists(cfgPath));
+     this->loadAssociationCfgFile(cfgPath.string().c_str());
+     this->setAndCheckAssociationProfile("Default");
+--- fw4spl.orig/SrcLib/patch/fwMDSemanticPatch/src/fwMDSemanticPatch/PatchLoader.cpp
++++ fw4spl/SrcLib/patch/fwMDSemanticPatch/src/fwMDSemanticPatch/PatchLoader.cpp
+@@ -14,8 +14,8 @@
+ void PatchLoader::loadPatches()
+ {
+     SPTR(::fwAtomsPatch::VersionsManager) versionManager = ::fwAtomsPatch::VersionsManager::getDefault();
+-    versionManager->buildVersionTable("./share/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
+-    versionManager->buildLinkTable("./share/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
++    versionManager->buildVersionTable(RC_PREFIX "/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
++    versionManager->buildLinkTable(RC_PREFIX "/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
+ }
+ 
+ //------------------------------------------------------------------------------
diff --git a/debian/patches/fix_unit_tests.patch b/debian/patches/fix_unit_tests.patch
index f673dfc..38ccbc9 100644
--- a/debian/patches/fix_unit_tests.patch
+++ b/debian/patches/fix_unit_tests.patch
@@ -4,48 +4,6 @@ Forwarded: no
 Last-Update: 2015-01-05
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- fw4spl.orig/CMakeLists.txt
-+++ fw4spl/CMakeLists.txt
-@@ -84,7 +84,7 @@
- 
-         #To make a debian package we should install our bundle in /usr/share/...
-         if(DEBIAN_INSTALL)
--            set(BUNDLE_PREFIX "share/Bundles")
-+            set(BUNDLE_PREFIX "share/fw4spl")
-         endif()
- 
-     endif()
-@@ -390,7 +390,7 @@
-         add_dependencies( ${FWPROJECT_NAME} ${FWPROJECT_NAME}_rc )
- 
-         if(${FWPROJECT_NAME}_INSTALL)
--            createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "share/tu_exec_${DIRNAME}_${DASH_VERSION}" )
-+		createResourcesInstallTarget( "${${FWPROJECT_NAME}_RC_BUILD_DIR}" "${SHARE_OUTPUT_DIR}/share/tu_exec_${DIRNAME}_${DASH_VERSION}" )
-         endif()
-     endif()
- 
---- fw4spl.orig/SrcLib/core/fwRuntime/include/fwRuntime/io/ProfileReader.hpp
-+++ fw4spl/SrcLib/core/fwRuntime/include/fwRuntime/io/ProfileReader.hpp
-@@ -52,7 +52,7 @@
-      * @param[in]   path    a path to an xml profile file
-      */
-     FWRUNTIME_API static std::shared_ptr< ::fwRuntime::profile::Profile > createProfile(
--        const boost::filesystem::path & path );
-+        const boost::filesystem::path & path, bool isUnitTest=false );
- 
- 
- 
---- fw4spl.orig/CMake/cppunit/cppunit_main.cpp
-+++ fw4spl/CMake/cppunit/cppunit_main.cpp
-@@ -53,7 +53,7 @@
-         }
- 
- 
--        m_profile = ::fwRuntime::io::ProfileReader::createProfile(profilePath);
-+        m_profile = ::fwRuntime::io::ProfileReader::createProfile(profilePath,true);
-         ::fwRuntime::profile::setCurrentProfile(m_profile);
- 
-         m_profile->setParams(0, NULL);
 --- fw4spl.orig/SrcLib/core/fwActivities/test/tu/src/builder/ActivitySeriesBuilderTest.cpp
 +++ fw4spl/SrcLib/core/fwActivities/test/tu/src/builder/ActivitySeriesBuilderTest.cpp
 @@ -18,6 +18,9 @@
@@ -89,25 +47,3 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
      m_pimpl->bundle                  = ::fwRuntime::io::BundleDescriptorReader::createBundle(plugin);
  
      m_pimpl->activities = fwActivities::registry::Activities::New();
---- fw4spl.orig/SrcLib/patch/fwMDSemanticPatch/src/fwMDSemanticPatch/PatchLoader.cpp
-+++ fw4spl/SrcLib/patch/fwMDSemanticPatch/src/fwMDSemanticPatch/PatchLoader.cpp
-@@ -6,6 +6,8 @@
- 
- #include <fwAtomsPatch/VersionsManager.hpp>
- 
-+#include <boost/filesystem/operations.hpp>
-+
- #include "fwMDSemanticPatch/PatchLoader.hpp"
- 
- namespace fwMDSemanticPatch
-@@ -14,8 +16,8 @@
- void PatchLoader::loadPatches()
- {
-     SPTR(::fwAtomsPatch::VersionsManager) versionManager = ::fwAtomsPatch::VersionsManager::getDefault();
--    versionManager->buildVersionTable("./share/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
--    versionManager->buildLinkTable("./share/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
-+    versionManager->buildVersionTable("./share/fw4spl/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
-+    versionManager->buildLinkTable("./share/fw4spl/fwMDSemanticPatch_" FWMDSEMANTICPATCH_VER "/");
- }
- 
- //------------------------------------------------------------------------------
diff --git a/debian/patches/series b/debian/patches/series
index 85c2fd8..86b2bac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+fix_install.patch
 fix_unit_tests.patch
diff --git a/debian/rules b/debian/rules
index 13a7057..f34238b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
 	dh $@ --parallel
 
 override_dh_auto_configure:
-	dh_auto_configure -- -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE -CMAKE_BUILD_TYPE=Release -DDEBIAN_INSTALL=ON -DUSE_SYSTEM_LIB=ON -DPROJECTS_TO_BUILD="VRRender" -DPROJECTS_TO_INSTALL="VRRender" -DEXTERNAL_LIBRARIES=/usr -DCMAKE_INSTALL_RPATH="/usr/lib/fw4spl" -Wno-dev
+	dh_auto_configure -- -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE -DDEBIAN_INSTALL=ON -DUSE_SYSTEM_LIB=ON -DPROJECTS_TO_BUILD="VRRender" -DPROJECTS_TO_INSTALL="VRRender" -DCMAKE_INSTALL_RPATH="/usr/lib/fw4spl" -Wno-dev
 
 override_dh_auto_install:
 	dh_auto_install --destdir=debian/fw4spl

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/fw4spl.git



More information about the debian-med-commit mailing list