changeset 5500:7c5d30a3d5d2

upgraded boost to 1.84.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Jan 2024 16:46:55 +0100
parents e4294feb0a3a
children 8b96d1d17831
files NEWS OrthancFramework/Resources/CMake/BoostConfiguration.cmake OrthancFramework/Resources/CMake/BoostConfiguration.sh OrthancFramework/Resources/Patches/boost-1.83.0-emscripten.patch OrthancFramework/Resources/Patches/boost-1.84.0-emscripten.patch OrthancFramework/Sources/Logging.cpp
diffstat 6 files changed, 136 insertions(+), 133 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Jan 23 17:04:31 2024 +0100
+++ b/NEWS	Wed Jan 24 16:46:55 2024 +0100
@@ -11,6 +11,7 @@
 -----------
 
 * Upgraded dependencies for static builds:
+  - boost 1.84.0
   - dcmtk 3.6.8
 
 
--- a/OrthancFramework/Resources/CMake/BoostConfiguration.cmake	Tue Jan 23 17:04:31 2024 +0100
+++ b/OrthancFramework/Resources/CMake/BoostConfiguration.cmake	Wed Jan 24 16:46:55 2024 +0100
@@ -90,10 +90,10 @@
   ## Parameters for static compilation of Boost 
   ##
   
-  set(BOOST_NAME boost_1_83_0)
-  set(BOOST_VERSION 1.83.0)
-  set(BOOST_BCP_SUFFIX bcpdigest-1.12.2)
-  set(BOOST_MD5 "6a9c4af273635301ed1e221054c34c69")
+  set(BOOST_NAME boost_1_84_0)
+  set(BOOST_VERSION 1.84.0)
+  set(BOOST_BCP_SUFFIX bcpdigest-1.12.3)
+  set(BOOST_MD5 "af64830e570249076a0f024ae4654b59")
   set(BOOST_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/${BOOST_NAME}_${BOOST_BCP_SUFFIX}.tar.gz")
   set(BOOST_SOURCES_DIR ${CMAKE_BINARY_DIR}/${BOOST_NAME})
 
@@ -114,7 +114,7 @@
   if (FirstRun)
     execute_process(
       COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
-      ${CMAKE_CURRENT_LIST_DIR}/../Patches/boost-1.83.0-emscripten.patch
+      ${CMAKE_CURRENT_LIST_DIR}/../Patches/boost-1.84.0-emscripten.patch
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
       RESULT_VARIABLE Failure
       )
--- a/OrthancFramework/Resources/CMake/BoostConfiguration.sh	Tue Jan 23 17:04:31 2024 +0100
+++ b/OrthancFramework/Resources/CMake/BoostConfiguration.sh	Wed Jan 24 16:46:55 2024 +0100
@@ -24,10 +24,11 @@
 ##   - Orthanc between 1.5.5 and 1.11.1: Boost 1.69.0
 ##   - Orthanc between 1.11.2 and 1.12.0: Boost 1.80.0
 ##   - Orthanc 1.12.1: Boost 1.82.0
-##   - Orthanc > 1.12.1: Boost 1.83.0
+##   - Orthanc 1.12.2: Boost 1.83.0
+##   - Orthanc > 1.12.3: Boost 1.84.0
 
-BOOST_VERSION=1_83_0
-ORTHANC_VERSION=1.12.2
+BOOST_VERSION=1_84_0
+ORTHANC_VERSION=1.12.3
 
 rm -rf /tmp/boost_${BOOST_VERSION}
 rm -rf /tmp/bcp/boost_${BOOST_VERSION}
--- a/OrthancFramework/Resources/Patches/boost-1.83.0-emscripten.patch	Tue Jan 23 17:04:31 2024 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-diff -urEb boost_1_83_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp boost_1_83_0/libs/locale/src/boost/locale/shared/date_time.cpp
---- boost_1_83_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp	2023-10-11 14:35:14.000000000 +0200
-+++ boost_1_83_0/libs/locale/src/boost/locale/shared/date_time.cpp	2023-10-11 15:10:23.949459131 +0200
-@@ -7,8 +7,10 @@
- #include <boost/locale/date_time.hpp>
- #include <boost/locale/formatting.hpp>
- #include <boost/core/exchange.hpp>
--#include <boost/thread/locks.hpp>
--#include <boost/thread/mutex.hpp>
-+#if !defined(__EMSCRIPTEN__)
-+#  include <boost/thread/locks.hpp>
-+#  include <boost/thread/mutex.hpp>
-+#endif
- #include <cmath>
- 
- namespace boost { namespace locale {
-@@ -394,6 +396,7 @@
-         return impl_->get_option(abstract_calendar::is_dst) != 0;
-     }
- 
-+#if !defined(__EMSCRIPTEN__)
-     namespace time_zone {
-         boost::mutex& tz_mutex()
-         {
-@@ -416,5 +419,6 @@
-             return boost::exchange(tz_id(), new_id);
-         }
-     } // namespace time_zone
-+#endif
- 
- }} // namespace boost::locale
-diff -urEb boost_1_83_0.orig/libs/locale/src/boost/locale/shared/generator.cpp boost_1_83_0/libs/locale/src/boost/locale/shared/generator.cpp
---- boost_1_83_0.orig/libs/locale/src/boost/locale/shared/generator.cpp	2023-10-11 14:35:14.000000000 +0200
-+++ boost_1_83_0/libs/locale/src/boost/locale/shared/generator.cpp	2023-10-11 15:10:01.301651695 +0200
-@@ -7,8 +7,11 @@
- #include <boost/locale/encoding.hpp>
- #include <boost/locale/generator.hpp>
- #include <boost/locale/localization_backend.hpp>
--#include <boost/thread/locks.hpp>
--#include <boost/thread/mutex.hpp>
-+
-+#if !defined(__EMSCRIPTEN__)
-+#  include <boost/thread/locks.hpp>
-+#  include <boost/thread/mutex.hpp>
-+#endif
- #include <algorithm>
- #include <map>
- #include <vector>
-@@ -21,7 +24,9 @@
-         {}
- 
-         mutable std::map<std::string, std::locale> cached;
-+#if !defined(__EMSCRIPTEN__)
-         mutable boost::mutex cached_lock;
-+#endif
- 
-         category_t cats;
-         char_facet_t chars;
-@@ -101,7 +106,9 @@
-     std::locale generator::generate(const std::locale& base, const std::string& id) const
-     {
-         if(d->caching_enabled) {
-+#if !defined(__EMSCRIPTEN__)
-             boost::unique_lock<boost::mutex> guard(d->cached_lock);
-+#endif
-             const auto p = d->cached.find(id);
-             if(p != d->cached.end())
-                 return p->second;
-@@ -126,7 +133,9 @@
-                 result = backend->install(result, facet, char_facet_t::nochar);
-         }
-         if(d->caching_enabled) {
-+#if !defined(__EMSCRIPTEN__)
-             boost::unique_lock<boost::mutex> guard(d->cached_lock);
-+#endif
-             const auto p = d->cached.find(id);
-             if(p == d->cached.end())
-                 d->cached[id] = result;
-diff -urEb boost_1_83_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp boost_1_83_0/libs/locale/src/boost/locale/shared/localization_backend.cpp
---- boost_1_83_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp	2023-10-11 14:35:14.000000000 +0200
-+++ boost_1_83_0/libs/locale/src/boost/locale/shared/localization_backend.cpp	2023-10-11 15:11:11.549053453 +0200
-@@ -5,8 +5,10 @@
- // https://www.boost.org/LICENSE_1_0.txt
- 
- #include <boost/locale/localization_backend.hpp>
--#include <boost/thread/locks.hpp>
--#include <boost/thread/mutex.hpp>
-+#if !defined(__EMSCRIPTEN__)
-+#  include <boost/thread/locks.hpp>
-+#  include <boost/thread/mutex.hpp>
-+#endif
- #include <functional>
- #include <memory>
- #include <vector>
-@@ -211,11 +213,13 @@
-             return mgr;
-         }
- 
-+#if !defined(__EMSCRIPTEN__)
-         boost::mutex& localization_backend_manager_mutex()
-         {
-             static boost::mutex the_mutex;
-             return the_mutex;
-         }
-+#endif
-         localization_backend_manager& localization_backend_manager_global()
-         {
-             static localization_backend_manager the_manager = make_default_backend_mgr();
-@@ -225,12 +229,16 @@
- 
-     localization_backend_manager localization_backend_manager::global()
-     {
-+#if !defined(__EMSCRIPTEN__)
-         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
-+#endif
-         return localization_backend_manager_global();
-     }
-     localization_backend_manager localization_backend_manager::global(const localization_backend_manager& in)
-     {
-+#if !defined(__EMSCRIPTEN__)
-         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
-+#endif
-         return exchange(localization_backend_manager_global(), in);
-     }
- 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Resources/Patches/boost-1.84.0-emscripten.patch	Wed Jan 24 16:46:55 2024 +0100
@@ -0,0 +1,125 @@
+diff -urEb boost_1_84_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp boost_1_84_0/libs/locale/src/boost/locale/shared/date_time.cpp
+--- boost_1_84_0.orig/libs/locale/src/boost/locale/shared/date_time.cpp	2024-01-24 16:33:34.349801130 +0100
++++ boost_1_84_0/libs/locale/src/boost/locale/shared/date_time.cpp	2024-01-24 16:35:29.516750122 +0100
+@@ -12,8 +12,10 @@
+ #include <boost/locale/date_time.hpp>
+ #include <boost/locale/formatting.hpp>
+ #include <boost/core/exchange.hpp>
+-#include <boost/thread/locks.hpp>
+-#include <boost/thread/mutex.hpp>
++#if !defined(__EMSCRIPTEN__)
++#  include <boost/thread/locks.hpp>
++#  include <boost/thread/mutex.hpp>
++#endif
+ #include <cmath>
+ 
+ namespace boost { namespace locale {
+@@ -400,6 +402,7 @@
+         return impl_->get_option(abstract_calendar::is_dst) != 0;
+     }
+ 
++#if !defined(__EMSCRIPTEN__)
+     namespace time_zone {
+         boost::mutex& tz_mutex()
+         {
+@@ -422,6 +425,7 @@
+             return boost::exchange(tz_id(), new_id);
+         }
+     } // namespace time_zone
++#endif
+ 
+ }} // namespace boost::locale
+ 
+diff -urEb boost_1_84_0.orig/libs/locale/src/boost/locale/shared/generator.cpp boost_1_84_0/libs/locale/src/boost/locale/shared/generator.cpp
+--- boost_1_84_0.orig/libs/locale/src/boost/locale/shared/generator.cpp	2024-01-24 16:33:34.349801130 +0100
++++ boost_1_84_0/libs/locale/src/boost/locale/shared/generator.cpp	2024-01-24 16:36:33.212167880 +0100
+@@ -7,8 +7,10 @@
+ #include <boost/locale/encoding.hpp>
+ #include <boost/locale/generator.hpp>
+ #include <boost/locale/localization_backend.hpp>
+-#include <boost/thread/locks.hpp>
+-#include <boost/thread/mutex.hpp>
++#if !defined(__EMSCRIPTEN__)
++#  include <boost/thread/locks.hpp>
++#  include <boost/thread/mutex.hpp>
++#endif
+ #include <algorithm>
+ #include <map>
+ #include <vector>
+@@ -21,7 +23,9 @@
+         {}
+ 
+         mutable std::map<std::string, std::locale> cached;
++#if !defined(__EMSCRIPTEN__)
+         mutable boost::mutex cached_lock;
++#endif
+ 
+         category_t cats;
+         char_facet_t chars;
+@@ -101,7 +105,9 @@
+     std::locale generator::generate(const std::locale& base, const std::string& id) const
+     {
+         if(d->caching_enabled) {
++#if !defined(__EMSCRIPTEN__)
+             boost::unique_lock<boost::mutex> guard(d->cached_lock);
++#endif
+             const auto p = d->cached.find(id);
+             if(p != d->cached.end())
+                 return p->second;
+@@ -126,7 +132,9 @@
+                 result = backend->install(result, facet, char_facet_t::nochar);
+         }
+         if(d->caching_enabled) {
++#if !defined(__EMSCRIPTEN__)
+             boost::unique_lock<boost::mutex> guard(d->cached_lock);
++#endif
+             const auto p = d->cached.find(id);
+             if(p == d->cached.end())
+                 d->cached[id] = result;
+diff -urEb boost_1_84_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp boost_1_84_0/libs/locale/src/boost/locale/shared/localization_backend.cpp
+--- boost_1_84_0.orig/libs/locale/src/boost/locale/shared/localization_backend.cpp	2024-01-24 16:33:34.349801130 +0100
++++ boost_1_84_0/libs/locale/src/boost/locale/shared/localization_backend.cpp	2024-01-24 16:40:12.134162584 +0100
+@@ -5,8 +5,10 @@
+ // https://www.boost.org/LICENSE_1_0.txt
+ 
+ #include <boost/locale/localization_backend.hpp>
+-#include <boost/thread/locks.hpp>
+-#include <boost/thread/mutex.hpp>
++#if !defined(__EMSCRIPTEN__)
++#  include <boost/thread/locks.hpp>
++#  include <boost/thread/mutex.hpp>
++#endif
+ #include <functional>
+ #include <memory>
+ #include <vector>
+@@ -211,11 +213,13 @@
+             return mgr;
+         }
+ 
++#if !defined(__EMSCRIPTEN__)
+         boost::mutex& localization_backend_manager_mutex()
+         {
+             static boost::mutex the_mutex;
+             return the_mutex;
+         }
++#endif
+         localization_backend_manager& localization_backend_manager_global()
+         {
+             static localization_backend_manager the_manager = make_default_backend_mgr();
+@@ -225,12 +229,16 @@
+ 
+     localization_backend_manager localization_backend_manager::global()
+     {
++#if !defined(__EMSCRIPTEN__)
+         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
++#endif
+         return localization_backend_manager_global();
+     }
+     localization_backend_manager localization_backend_manager::global(const localization_backend_manager& in)
+     {
++#if !defined(__EMSCRIPTEN__)
+         boost::unique_lock<boost::mutex> lock(localization_backend_manager_mutex());
++#endif
+         return exchange(localization_backend_manager_global(), in);
+     }
+ 
--- a/OrthancFramework/Sources/Logging.cpp	Tue Jan 23 17:04:31 2024 +0100
+++ b/OrthancFramework/Sources/Logging.cpp	Wed Jan 24 16:46:55 2024 +0100
@@ -26,6 +26,7 @@
 
 #include "OrthancException.h"
 
+#include <cassert>
 #include <stdint.h>