changeset 558:6b9d09cc9e9d laaw

mainline -> laaw integration
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 23 Sep 2013 17:19:52 +0200
parents ffedcc8f0938 (current diff) 11fee43c5861 (diff)
children ded40a9e8cc8
files CMakeLists.txt Resources/CMake/LibCurlConfiguration.cmake Resources/CMake/OpenSslConfiguration.cmake Resources/CMake/ZlibConfiguration.cmake
diffstat 17 files changed, 77 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Fri Sep 20 17:47:59 2013 +0200
+++ b/NEWS	Mon Sep 23 17:19:52 2013 +0200
@@ -1,6 +1,12 @@
 Pending changes in the mainline
 ===============================
 
+* Switch to Boost 1.54.0 (cf. issue #9)
+
+
+Version 0.6.1 (2013/09/16)
+==========================
+
 * Detection of stable patients/studies/series
 * C-Find SCU at the instance level
 * Link from modified to original resource in Orthanc Explorer
--- a/Resources/CMake/BoostConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/BoostConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -39,14 +39,16 @@
 
 
 if (BOOST_STATIC)
-  SET(BOOST_NAME boost_1_49_0)
+  # Parameters for Boost 1.54.0
+  SET(BOOST_NAME boost_1_54_0)
+  SET(BOOST_MD5 "cee688c35a9c7775b7305587e782e3f5")
+  SET(BOOST_FILESYSTEM_SOURCES_DIR "${BOOST_NAME}/libs/filesystem/src")
+  
   SET(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})
   DownloadPackage(
-    "e0defc8c818e4f1c5bbb29d0292b76ca"
-    "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/${BOOST_NAME}.tar.gz"
-    "${BOOST_SOURCES_DIR}" "${BOOST_PRELOADED}" 
-    # Only uncompress the Boost modules we need
-    "${BOOST_NAME}/boost ${BOOST_NAME}/libs/thread/src ${BOOST_NAME}/libs/system/src ${BOOST_NAME}/libs/filesystem/v3/src ${BOOST_NAME}/libs/locale/src ${BOOST_NAME}/libs/date_time/src"
+    "${BOOST_MD5}"
+    "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/${BOOST_NAME}_bcpdigest.tar.gz"
+    "${BOOST_SOURCES_DIR}"
     )
 
   set(BOOST_SOURCES)
@@ -68,7 +70,7 @@
       ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp
       ${BOOST_SOURCES_DIR}/libs/thread/src/win32/thread.cpp
       ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_pe.cpp
-      ${BOOST_SOURCES_DIR}/libs/filesystem/v3/src/windows_file_codecvt.cpp
+      ${BOOST_FILESYSTEM_SOURCES_DIR}/windows_file_codecvt.cpp
       )
     add_definitions(
       -DBOOST_LOCALE_WITH_WCONV=1
@@ -79,10 +81,10 @@
 
   list(APPEND BOOST_SOURCES
     ${BOOST_SOURCES_DIR}/libs/date_time/src/gregorian/greg_month.cpp
-    ${BOOST_SOURCES_DIR}/libs/filesystem/v3/src/codecvt_error_category.cpp
-    ${BOOST_SOURCES_DIR}/libs/filesystem/v3/src/operations.cpp
-    ${BOOST_SOURCES_DIR}/libs/filesystem/v3/src/path.cpp
-    ${BOOST_SOURCES_DIR}/libs/filesystem/v3/src/path_traits.cpp
+    ${BOOST_FILESYSTEM_SOURCES_DIR}/codecvt_error_category.cpp
+    ${BOOST_FILESYSTEM_SOURCES_DIR}/operations.cpp
+    ${BOOST_FILESYSTEM_SOURCES_DIR}/path.cpp
+    ${BOOST_FILESYSTEM_SOURCES_DIR}/path_traits.cpp
     ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp
     ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
     )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/CMake/BoostConfiguration.sh	Mon Sep 23 17:19:52 2013 +0200
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -e
+set -u
+
+## Starting with version 0.6.2, Orthanc is shipped with a subset of the
+## Boost libraries that is generated with the BCP tool:
+##
+## http://www.boost.org/doc/libs/1_54_0/tools/bcp/doc/html/index.html
+##
+## This script generates this subset.
+
+rm -rf /tmp/boost_1_54_0
+rm -rf /tmp/bcp/boost_1_54_0
+
+cd /tmp
+echo "Uncompressing the source of Boost 1.54.0..."
+tar xfz boost_1_54_0.tar.gz 
+
+echo "Generating the subset..."
+mkdir -p /tmp/bcp/boost_1_54_0
+bcp --boost=/tmp/boost_1_54_0 thread system locale date_time filesystem math/special_functions algorithm /tmp/bcp/boost_1_54_0
+cd /tmp/bcp
+
+echo "Compressing the subset..."
+tar cfz boost_1_54_0_bcpdigest.tar.gz boost_1_54_0
+ls -l boost_1_54_0_bcpdigest.tar.gz
+md5sum boost_1_54_0_bcpdigest.tar.gz
--- a/Resources/CMake/DcmtkConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -6,7 +6,7 @@
   DownloadPackage(
     "219ad631b82031806147e4abbfba4fa4"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/dcmtk-3.6.0.zip" 
-    "${DCMTK_SOURCES_DIR}" "" "")
+    "${DCMTK_SOURCES_DIR}")
 
   IF(CMAKE_CROSSCOMPILING)
     SET(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.")
--- a/Resources/CMake/DownloadPackage.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/DownloadPackage.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -10,20 +10,16 @@
 endmacro()
 
 
-macro(DownloadPackage MD5 Url TargetDirectory PreloadedVariable UncompressArguments)
+macro(DownloadPackage MD5 Url TargetDirectory)
   if (NOT IS_DIRECTORY "${TargetDirectory}")
     GetUrlFilename(TMP_FILENAME "${Url}")
-    if ("${PreloadedVariable}" STREQUAL "")
-      set(TMP_PATH "${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/${TMP_FILENAME}")
-      if (NOT EXISTS "${TMP_PATH}")
-        message("Downloading ${Url}")
-        file(DOWNLOAD "${Url}" "${TMP_PATH}" SHOW_PROGRESS EXPECTED_MD5 "${MD5}")
-      else()
-        message("Using local copy of ${Url}")
-      endif()
+
+    set(TMP_PATH "${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/${TMP_FILENAME}")
+    if (NOT EXISTS "${TMP_PATH}")
+      message("Downloading ${Url}")
+      file(DOWNLOAD "${Url}" "${TMP_PATH}" SHOW_PROGRESS EXPECTED_MD5 "${MD5}")
     else()
-      message("Using preloaded archive ${PreloadedVariable} for ${Url}")
-      set(TMP_PATH "${PreloadedVariable}")
+      message("Using local copy of ${Url}")
     endif()
 
     GetUrlExtension(TMP_EXTENSION "${Url}")
@@ -48,37 +44,18 @@
           message(FATAL_ERROR "Error while running the uncompression tool")
         endif()
 
-        set(ARGS ${UncompressArguments})
-        SEPARATE_ARGUMENTS(ARGS)
-        list(LENGTH ARGS TMP_LENGTH)
-
         if ("${TMP_EXTENSION}" STREQUAL "tgz")
           string(REGEX REPLACE ".tgz$" ".tar" TMP_FILENAME2 "${TMP_FILENAME}")
         else()
           string(REGEX REPLACE ".gz$" "" TMP_FILENAME2 "${TMP_FILENAME}")
         endif()
 
-        if (TMP_LENGTH EQUAL 0)
-          execute_process(
-            COMMAND ${ZIP_EXECUTABLE} x -y ${TMP_FILENAME2}
-            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-            RESULT_VARIABLE Failure
-            OUTPUT_QUIET
-            )
-        else()
-          foreach(SUBDIR ${ARGS})
-            execute_process(
-              COMMAND ${ZIP_EXECUTABLE} x -y "-i!${SUBDIR}" "${TMP_FILENAME2}"
-              WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-              RESULT_VARIABLE Failure
-              OUTPUT_QUIET
-              )
-
-            if (Failure)
-              message(FATAL_ERROR "Error while running the uncompression tool")
-            endif()
-          endforeach()
-        endif()
+        execute_process(
+          COMMAND ${ZIP_EXECUTABLE} x -y ${TMP_FILENAME2}
+          WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+          RESULT_VARIABLE Failure
+          OUTPUT_QUIET
+          )
       elseif ("${TMP_EXTENSION}" STREQUAL "zip")
         execute_process(
           COMMAND ${ZIP_EXECUTABLE} x -y ${TMP_PATH}
@@ -93,20 +70,20 @@
     else()
       if ("${TMP_EXTENSION}" STREQUAL "zip")
         execute_process(
-          COMMAND sh -c "unzip -q ${TMP_PATH} ${UncompressArguments}"
+          COMMAND sh -c "unzip -q ${TMP_PATH}"
           WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
           RESULT_VARIABLE Failure
         )
       elseif (("${TMP_EXTENSION}" STREQUAL "gz") OR ("${TMP_EXTENSION}" STREQUAL "tgz"))
-        #message("tar xvfz ${TMP_PATH} ${UncompressArguments}")
+        #message("tar xvfz ${TMP_PATH}")
         execute_process(
-          COMMAND sh -c "tar xfz ${TMP_PATH} ${UncompressArguments}"
+          COMMAND sh -c "tar xfz ${TMP_PATH}"
           WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
           RESULT_VARIABLE Failure
           )
       elseif ("${TMP_EXTENSION}" STREQUAL "bz2")
         execute_process(
-          COMMAND sh -c "tar xfj ${TMP_PATH} ${UncompressArguments}"
+          COMMAND sh -c "tar xfj ${TMP_PATH}"
           WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
           RESULT_VARIABLE Failure
           )
@@ -124,4 +101,3 @@
     endif()
   endif()
 endmacro()
-
--- a/Resources/CMake/GoogleLogConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/GoogleLogConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -3,13 +3,7 @@
   DownloadPackage(
     "897fbff90d91ea2b6d6e78c8cea641cc"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/glog-0.3.2.tar.gz"
-    "${GOOGLE_LOG_SOURCES_DIR}" "" "")
-
-  #SET(GOOGLE_LOG_SOURCES_DIR ${CMAKE_BINARY_DIR}/glog-0.3.3)
-  #DownloadPackage(
-  #  "a6fd2c22f8996846e34c763422717c18"
-  #  "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/glog-0.3.3.tar.gz"
-  #  "${GOOGLE_LOG_SOURCES_DIR}" "" "")
+    "${GOOGLE_LOG_SOURCES_DIR}")
 
   set(GOOGLE_LOG_HEADERS
     ${GOOGLE_LOG_SOURCES_DIR}/src/glog/logging.h
--- a/Resources/CMake/GoogleTestConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/GoogleTestConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -12,7 +12,7 @@
   DownloadPackage(
     "4577b49f2973c90bf9ba69aa8166b786"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/gtest-1.6.0.zip"
-    "${GTEST_SOURCES_DIR}" "" "")
+    "${GTEST_SOURCES_DIR}")
 
   include_directories(
     ${GTEST_SOURCES_DIR}/include
--- a/Resources/CMake/JsonCppConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/JsonCppConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -12,7 +12,7 @@
   DownloadPackage(
     "363e2f4cbd3aeb63bf4e571f377400fb"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/jsoncpp-src-0.6.0-rc2.tar.gz"
-    "${JSONCPP_SOURCES_DIR}" "" "")
+    "${JSONCPP_SOURCES_DIR}")
 
   list(APPEND THIRD_PARTY_SOURCES
     ${JSONCPP_SOURCES_DIR}/src/lib_json/json_reader.cpp
--- a/Resources/CMake/LibCurlConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/LibCurlConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -3,7 +3,7 @@
   DownloadPackage(
     "3fa4d5236f2a36ca5c3af6715e837691"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/curl-7.26.0.tar.gz"
-    "${CURL_SOURCES_DIR}" "" "")
+    "${CURL_SOURCES_DIR}")
 
   include_directories(${CURL_SOURCES_DIR}/include)
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES)
--- a/Resources/CMake/LibPngConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/LibPngConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -3,7 +3,7 @@
   DownloadPackage(
     "8ea7f60347a306c5faf70b977fa80e28"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/libpng-1.5.12.tar.gz"
-    "${LIBPNG_SOURCES_DIR}" "${LIBPNG_PRELOADED}" "")
+    "${LIBPNG_SOURCES_DIR}")
 
   include_directories(
     ${LIBPNG_SOURCES_DIR}
--- a/Resources/CMake/LuaConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/LuaConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -3,7 +3,7 @@
   DownloadPackage(
     "2e115fe26e435e33b0d5c022e4490567"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/lua-5.1.5.tar.gz"
-    "${LUA_SOURCES_DIR}" "" "")
+    "${LUA_SOURCES_DIR}")
 
   add_definitions(
     #-DLUA_LIB=1
--- a/Resources/CMake/MongooseConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/MongooseConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -3,7 +3,7 @@
   DownloadPackage(
     "e718fc287b4eb1bd523be3fa00942bb0"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/mongoose-3.1.tgz"
-    "${MONGOOSE_SOURCES_DIR}" "" "")
+    "${MONGOOSE_SOURCES_DIR}")
 
   # Patch mongoose
   execute_process(
--- a/Resources/CMake/OpenSslConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/OpenSslConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -3,7 +3,7 @@
   DownloadPackage(
     "ae412727c8c15b67880aef7bd2999b2e"
     "www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/openssl-1.0.1c.tar.gz"
-    "${OPENSSL_SOURCES_DIR}" "" "")
+    "${OPENSSL_SOURCES_DIR}")
 
   if (NOT EXISTS "${OPENSSL_SOURCES_DIR}/include/PATCHED")
     if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
--- a/Resources/CMake/SQLiteConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/SQLiteConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -3,7 +3,7 @@
   DownloadPackage(
     "5fbeff9645ab035a1f580e90b279a16d"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/sqlite-amalgamation-3071300.zip"
-    "${SQLITE_SOURCES_DIR}" "" "")
+    "${SQLITE_SOURCES_DIR}")
 
   list(APPEND THIRD_PARTY_SOURCES
     ${SQLITE_SOURCES_DIR}/sqlite3.c
--- a/Resources/CMake/ZlibConfiguration.cmake	Fri Sep 20 17:47:59 2013 +0200
+++ b/Resources/CMake/ZlibConfiguration.cmake	Mon Sep 23 17:19:52 2013 +0200
@@ -9,7 +9,7 @@
   DownloadPackage(
     "60df6a37c56e7c1366cca812414f7b85"
     "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/zlib-1.2.7.tar.gz"
-    "${ZLIB_SOURCES_DIR}" "${ZLIB_PRELOADED}" "")
+    "${ZLIB_SOURCES_DIR}")
 
   include_directories(
     ${ZLIB_SOURCES_DIR}
--- a/THANKS	Fri Sep 20 17:47:59 2013 +0200
+++ b/THANKS	Mon Sep 23 17:19:52 2013 +0200
@@ -17,6 +17,7 @@
   handling of series with temporal positions (fMRI and dynamic PET).
 * Ryan Walklin (ryanwalklin@gmail.com), for Mac OS X build.
 * Peter Somlo (peter.somlo@gmail.com), for ClearCanvas support.
+* 12maksqwe@gmail.com, for fixing issue #8.
 
 
 Artwork
--- a/UnitTests/Versions.cpp	Fri Sep 20 17:47:59 2013 +0200
+++ b/UnitTests/Versions.cpp	Mon Sep 23 17:19:52 2013 +0200
@@ -57,7 +57,7 @@
 
 TEST(Versions, BoostStatic)
 {
-  ASSERT_STREQ("1_49", BOOST_LIB_VERSION);
+  ASSERT_STREQ("1_54", BOOST_LIB_VERSION);
 }
 
 TEST(Versions, CurlStatic)