changeset 2930:8341256c6941

upgrade to Boost 1.68 in static builds
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Nov 2018 16:21:13 +0100
parents e0c620f964e5
children 89f2c302fc37
files NEWS Resources/CMake/BoostConfiguration.cmake Resources/CMake/BoostConfiguration.sh Resources/Patches/boost-1.68.0-linux-standard-base.patch UnitTestsSources/VersionsTests.cpp
diffstat 5 files changed, 87 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Nov 13 12:01:12 2018 +0100
+++ b/NEWS	Tue Nov 13 16:21:13 2018 +0100
@@ -33,6 +33,8 @@
 * Remove invalid characters from badly-encoded UTF-8 strings (impacts PostgreSQL)
 * Orthanc starts even if jobs from a previous execution cannot be unserialized
 * New CMake option "ENABLE_DCMTK_LOG" to disable logging internal to DCMTK
+* Upgraded dependencies for static and Windows builds:
+  - boost 1.68.0
 
 
 Version 1.4.2 (2018-09-20)
--- a/Resources/CMake/BoostConfiguration.cmake	Tue Nov 13 12:01:12 2018 +0100
+++ b/Resources/CMake/BoostConfiguration.cmake	Tue Nov 13 16:21:13 2018 +0100
@@ -53,10 +53,10 @@
   ## Parameters for static compilation of Boost 
   ##
   
-  set(BOOST_NAME boost_1_67_0)
-  set(BOOST_VERSION 1.67.0)
-  set(BOOST_BCP_SUFFIX bcpdigest-1.4.0)
-  set(BOOST_MD5 "fb3535a88e72c3d4c4d06b047b8e57fe")
+  set(BOOST_NAME boost_1_68_0)
+  set(BOOST_VERSION 1.68.0)
+  set(BOOST_BCP_SUFFIX bcpdigest-1.4.3)
+  set(BOOST_MD5 "2d272566a72343766c523e2e32313c65")
   set(BOOST_URL "http://www.orthanc-server.com/downloads/third-party/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz")
   set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})
 
--- a/Resources/CMake/BoostConfiguration.sh	Tue Nov 13 12:01:12 2018 +0100
+++ b/Resources/CMake/BoostConfiguration.sh	Tue Nov 13 16:21:13 2018 +0100
@@ -19,10 +19,11 @@
 ##   - Orthanc 1.3.0: Boost 1.64.0
 ##   - Orthanc 1.3.1: Boost 1.65.1
 ##   - Orthanc 1.3.2: Boost 1.66.0
-##   - Orthanc >= 1.4.0: Boost 1.67.0
+##   - Orthanc between 1.4.0 and 1.4.2: Boost 1.67.0
+##   - Orthanc >= 1.4.3: Boost 1.68.0
 
-BOOST_VERSION=1_67_0
-ORTHANC_VERSION=1.4.0
+BOOST_VERSION=1_68_0
+ORTHANC_VERSION=1.4.3
 
 rm -rf /tmp/boost_${BOOST_VERSION}
 rm -rf /tmp/bcp/boost_${BOOST_VERSION}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/Patches/boost-1.68.0-linux-standard-base.patch	Tue Nov 13 16:21:13 2018 +0100
@@ -0,0 +1,76 @@
+diff -urEb boost_1_68_0.orig/boost/move/adl_move_swap.hpp boost_1_68_0/boost/move/adl_move_swap.hpp
+--- boost_1_68_0.orig/boost/move/adl_move_swap.hpp	2018-11-13 16:08:32.214434915 +0100
++++ boost_1_68_0/boost/move/adl_move_swap.hpp	2018-11-13 16:09:03.558399048 +0100
+@@ -28,6 +28,8 @@
+ //Try to avoid including <algorithm>, as it's quite big
+ #if defined(_MSC_VER) && defined(BOOST_DINKUMWARE_STDLIB)
+    #include <utility>   //Dinkum libraries define std::swap in utility which is lighter than algorithm
++#elif defined(__LSB_VERSION__)
++#  include <utility>
+ #elif defined(BOOST_GNU_STDLIB)
+    //For non-GCC compilers, where GNUC version is not very reliable, or old GCC versions
+    //use the good old stl_algobase header, which is quite lightweight
+diff -urEb boost_1_68_0.orig/boost/thread/detail/config.hpp boost_1_68_0/boost/thread/detail/config.hpp
+--- boost_1_68_0.orig/boost/thread/detail/config.hpp	2018-11-13 16:08:32.210434920 +0100
++++ boost_1_68_0/boost/thread/detail/config.hpp	2018-11-13 16:10:03.386329911 +0100
+@@ -417,7 +417,7 @@
+   #define BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ #elif defined(BOOST_THREAD_CHRONO_MAC_API)
+   #define BOOST_THREAD_HAS_MONO_CLOCK
+-#elif defined(__ANDROID__)
++#elif defined(__LSB_VERSION__) || defined(__ANDROID__)
+   #define BOOST_THREAD_HAS_MONO_CLOCK
+   #if defined(__ANDROID_API__) && __ANDROID_API__ >= 21
+     #define BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+diff -urEb boost_1_68_0.orig/boost/type_traits/detail/has_postfix_operator.hpp boost_1_68_0/boost/type_traits/detail/has_postfix_operator.hpp
+--- boost_1_68_0.orig/boost/type_traits/detail/has_postfix_operator.hpp	2018-11-13 16:08:32.206434924 +0100
++++ boost_1_68_0/boost/type_traits/detail/has_postfix_operator.hpp	2018-11-13 16:11:08.374253901 +0100
+@@ -32,8 +32,11 @@
+ namespace boost {
+ namespace detail {
+ 
++// https://stackoverflow.com/a/15474269
++#ifndef Q_MOC_RUN
+ // This namespace ensures that argument-dependent name lookup does not mess things up.
+ namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
++#endif
+ 
+ // 1. a function to have an instance of type T without requiring T to be default
+ // constructible
+@@ -181,7 +184,9 @@
+    BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+ };
+ 
++#ifndef Q_MOC_RUN
+ } // namespace impl
++#endif
+ } // namespace detail
+ 
+ // this is the accessible definition of the trait to end user
+diff -urEb boost_1_68_0.orig/boost/type_traits/detail/has_prefix_operator.hpp boost_1_68_0/boost/type_traits/detail/has_prefix_operator.hpp
+--- boost_1_68_0.orig/boost/type_traits/detail/has_prefix_operator.hpp	2018-11-13 16:08:32.206434924 +0100
++++ boost_1_68_0/boost/type_traits/detail/has_prefix_operator.hpp	2018-11-13 16:14:30.278012856 +0100
+@@ -45,8 +45,11 @@
+ namespace boost {
+ namespace detail {
+ 
++// https://stackoverflow.com/a/15474269
++#ifndef Q_MOC_RUN
+ // This namespace ensures that argument-dependent name lookup does not mess things up.
+ namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
++#endif
+ 
+ // 1. a function to have an instance of type T without requiring T to be default
+ // constructible
+@@ -194,7 +197,10 @@
+    BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+ };
+ 
++
++#ifndef Q_MOC_RUN
+ } // namespace impl
++#endif
+ } // namespace detail
+ 
+ // this is the accessible definition of the trait to end user
+Only in boost_1_68_0/boost/type_traits/detail: has_prefix_operator.hpp~
--- a/UnitTestsSources/VersionsTests.cpp	Tue Nov 13 12:01:12 2018 +0100
+++ b/UnitTestsSources/VersionsTests.cpp	Tue Nov 13 16:21:13 2018 +0100
@@ -104,7 +104,7 @@
 
 TEST(Versions, BoostStatic)
 {
-  ASSERT_STREQ("1_67", BOOST_LIB_VERSION);
+  ASSERT_STREQ("1_68", BOOST_LIB_VERSION);
 }
 
 TEST(Versions, CurlStatic)