summaryrefslogtreecommitdiff
path: root/dev-libs/boost/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-03 22:19:54 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-03 22:19:54 +0100
commit71f9cc21aab4168093940b3d2e267444d712bff5 (patch)
tree15406e14be0cd3cfbafe191468b8825b3ccc1855 /dev-libs/boost/files
parent312456186919deebd1ea3b34b9e26b1e15ebd5b6 (diff)
gentoo auto-resync : 03:09:2022 - 22:19:54
Diffstat (limited to 'dev-libs/boost/files')
-rw-r--r--dev-libs/boost/files/boost-1.80.0-disable_icu_rpath.patch13
-rw-r--r--dev-libs/boost/files/boost-1.80.0-fix-mips1-transition.patch24
-rw-r--r--dev-libs/boost/files/boost-1.80.0-unordered-fix.patch192
3 files changed, 229 insertions, 0 deletions
diff --git a/dev-libs/boost/files/boost-1.80.0-disable_icu_rpath.patch b/dev-libs/boost/files/boost-1.80.0-disable_icu_rpath.patch
new file mode 100644
index 000000000000..1f4ec29fcf00
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.80.0-disable_icu_rpath.patch
@@ -0,0 +1,13 @@
+--- a/libs/locale/build/Jamfile.v2
++++ b/libs/locale/build/Jamfile.v2
+@@ -82,8 +82,8 @@ ICU_LINK ?= [ modules.peek : ICU_LINK_LOCALE ] ;
+
+ if $(ICU_LINK)
+ {
+- ICU_OPTS = <include>$(icu-path)/include <linkflags>$(ICU_LINK) <dll-path>$(icu-path)/bin <runtime-link>shared ;
+- ICU64_OPTS = <include>$(icu-path)/include <linkflags>$(ICU_LINK) <dll-path>$(icu-path)/bin64 <runtime-link>shared ;
++ ICU_OPTS = <include>$(icu_path)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
++ ICU64_OPTS = <include>$(icu_path)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
+ } else
+ {
+ searched-lib icuuc : : <name>icuuc
diff --git a/dev-libs/boost/files/boost-1.80.0-fix-mips1-transition.patch b/dev-libs/boost/files/boost-1.80.0-fix-mips1-transition.patch
new file mode 100644
index 000000000000..4f5e81c925b3
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.80.0-fix-mips1-transition.patch
@@ -0,0 +1,24 @@
+--- a/boostcpp.jam
++++ b/boostcpp.jam
+@@ -634,7 +634,7 @@ rule address-model ( )
+ return <conditional>@boostcpp.deduce-address-model ;
+ }
+
+-local deducable-architectures = arm mips1 power riscv s390x sparc x86 combined ;
++local deducable-architectures = arm mips power riscv s390x sparc x86 combined ;
+ feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
+ for a in $(deducable-architectures)
+ {
+@@ -645,10 +645,10 @@ rule deduce-architecture ( properties * )
+ {
+ local result ;
+ local filtered = [ toolset-properties $(properties) ] ;
+- local names = arm mips1 power riscv s390x sparc x86 combined ;
++ local names = arm mips power riscv s390x sparc x86 combined ;
+ local idx = [ configure.find-builds "default architecture" : $(filtered)
+ : /boost/architecture//arm
+- : /boost/architecture//mips1
++ : /boost/architecture//mips
+ : /boost/architecture//power
+ : /boost/architecture//riscv
+ : /boost/architecture//s390x
diff --git a/dev-libs/boost/files/boost-1.80.0-unordered-fix.patch b/dev-libs/boost/files/boost-1.80.0-unordered-fix.patch
new file mode 100644
index 000000000000..51776094386e
--- /dev/null
+++ b/dev-libs/boost/files/boost-1.80.0-unordered-fix.patch
@@ -0,0 +1,192 @@
+From f9eae4153f4ea9aac4b6c46e660ec92824d5827f Mon Sep 17 00:00:00 2001
+From: Christian Mazakas <christian.mazakas@gmail.com>
+Date: Tue, 16 Aug 2022 14:34:58 -0700
+Subject: [PATCH] Update code to be valid when the internal `buckets_` data
+ member is moved-from
+
+---
+ boost/unordered/detail/fca.hpp | 18 +++++--
+ .../boost/unordered/detail/implementation.hpp | 49 +++++++++++--------
+ boost/unordered/unordered_map.hpp | 8 +++
+ boost/unordered/unordered_set.hpp | 8 +++
+ 4 files changed, 58 insertions(+), 25 deletions(-)
+
+diff --git a/boost/unordered/detail/fca.hpp b/boost/unordered/detail/fca.hpp
+index 19fafe739..a1d14d957 100644
+--- a/boost/unordered/detail/fca.hpp
++++ b/boost/unordered/detail/fca.hpp
+@@ -646,7 +646,7 @@ namespace boost {
+
+ size_type bucket_count() const { return size_; }
+
+- iterator begin() const { return ++at(size_); }
++ iterator begin() const { return size_ == 0 ? end() : ++at(size_); }
+
+ iterator end() const
+ {
+@@ -660,6 +660,10 @@ namespace boost {
+
+ local_iterator begin(size_type n) const
+ {
++ if (size_ == 0) {
++ return this->end(n);
++ }
++
+ return local_iterator(
+ (buckets + static_cast<difference_type>(n))->next);
+ }
+@@ -670,12 +674,16 @@ namespace boost {
+
+ iterator at(size_type n) const
+ {
+- std::size_t const N = group::N;
++ if (size_ > 0) {
++ std::size_t const N = group::N;
+
+- iterator pbg(buckets + static_cast<difference_type>(n),
+- groups + static_cast<difference_type>(n / N));
++ iterator pbg(buckets + static_cast<difference_type>(n),
++ groups + static_cast<difference_type>(n / N));
+
+- return pbg;
++ return pbg;
++ } else {
++ return this->end();
++ }
+ }
+
+ span<Bucket> raw()
+diff --git a/boost/unordered/detail/implementation.hpp b/boost/unordered/detail/implementation.hpp
+index 2cc27c5d4..373236754 100644
+--- a/boost/unordered/detail/implementation.hpp
++++ b/boost/unordered/detail/implementation.hpp
+@@ -2054,12 +2054,14 @@ namespace boost {
+
+ std::size_t bucket_size(std::size_t index) const
+ {
+- bucket_iterator itb = buckets_.at(index);
+- node_pointer n = itb->next;
+ std::size_t count = 0;
+- while (n) {
+- ++count;
+- n = n->next;
++ if (size_ > 0) {
++ bucket_iterator itb = buckets_.at(index);
++ node_pointer n = itb->next;
++ while (n) {
++ ++count;
++ n = n->next;
++ }
+ }
+ return count;
+ }
+@@ -2420,11 +2422,14 @@ namespace boost {
+ node_pointer find_node_impl(
+ Key const& x, bucket_iterator itb) const
+ {
+- key_equal const& pred = this->key_eq();
+- node_pointer p = itb->next;
+- for (; p; p = p->next) {
+- if (pred(x, extractor::extract(p->value()))) {
+- break;
++ node_pointer p = node_pointer();
++ if (itb != buckets_.end()) {
++ key_equal const& pred = this->key_eq();
++ p = itb->next;
++ for (; p; p = p->next) {
++ if (pred(x, extractor::extract(p->value()))) {
++ break;
++ }
+ }
+ }
+ return p;
+@@ -2453,11 +2458,13 @@ namespace boost {
+ inline iterator transparent_find(
+ Key const& k, Hash const& h, Pred const& pred) const
+ {
+- std::size_t const key_hash = h(k);
+- bucket_iterator itb = buckets_.at(buckets_.position(key_hash));
+- for (node_pointer p = itb->next; p; p = p->next) {
+- if (BOOST_LIKELY(pred(k, extractor::extract(p->value())))) {
+- return iterator(p, itb);
++ if (size_ > 0) {
++ std::size_t const key_hash = h(k);
++ bucket_iterator itb = buckets_.at(buckets_.position(key_hash));
++ for (node_pointer p = itb->next; p; p = p->next) {
++ if (BOOST_LIKELY(pred(k, extractor::extract(p->value())))) {
++ return iterator(p, itb);
++ }
+ }
+ }
+
+@@ -2467,11 +2474,13 @@ namespace boost {
+ template <class Key>
+ node_pointer* find_prev(Key const& key, bucket_iterator itb)
+ {
+- key_equal pred = this->key_eq();
+- for (node_pointer* pp = boost::addressof(itb->next); *pp;
+- pp = boost::addressof((*pp)->next)) {
+- if (pred(key, extractor::extract((*pp)->value()))) {
+- return pp;
++ if (size_ > 0) {
++ key_equal pred = this->key_eq();
++ for (node_pointer* pp = boost::addressof(itb->next); *pp;
++ pp = boost::addressof((*pp)->next)) {
++ if (pred(key, extractor::extract((*pp)->value()))) {
++ return pp;
++ }
+ }
+ }
+ typedef node_pointer* node_pointer_pointer;
+diff --git a/boost/unordered/unordered_map.hpp b/boost/unordered/unordered_map.hpp
+index 97908fb65..3e25a28a2 100644
+--- a/boost/unordered/unordered_map.hpp
++++ b/boost/unordered/unordered_map.hpp
+@@ -2069,6 +2069,10 @@ namespace boost {
+ template <class K, class T, class H, class P, class A>
+ float unordered_map<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
+ {
++ if (table_.size_ == 0) {
++ return 0.0f;
++ }
++
+ BOOST_ASSERT(table_.bucket_count() != 0);
+ return static_cast<float>(table_.size_) /
+ static_cast<float>(table_.bucket_count());
+@@ -2506,6 +2510,10 @@ namespace boost {
+ template <class K, class T, class H, class P, class A>
+ float unordered_multimap<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
+ {
++ if (table_.size_ == 0) {
++ return 0.0f;
++ }
++
+ BOOST_ASSERT(table_.bucket_count() != 0);
+ return static_cast<float>(table_.size_) /
+ static_cast<float>(table_.bucket_count());
+diff --git a/boost/unordered/unordered_set.hpp b/boost/unordered/unordered_set.hpp
+index 8721a68a0..82d323c6e 100644
+--- a/boost/unordered/unordered_set.hpp
++++ b/boost/unordered/unordered_set.hpp
+@@ -1586,6 +1586,10 @@ namespace boost {
+ template <class T, class H, class P, class A>
+ float unordered_set<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
+ {
++ if (table_.size_ == 0) {
++ return 0.0f;
++ }
++
+ BOOST_ASSERT(table_.bucket_count() != 0);
+ return static_cast<float>(table_.size_) /
+ static_cast<float>(table_.bucket_count());
+@@ -1986,6 +1990,10 @@ namespace boost {
+ template <class T, class H, class P, class A>
+ float unordered_multiset<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
+ {
++ if (table_.size_ == 0) {
++ return 0.0f;
++ }
++
+ BOOST_ASSERT(table_.bucket_count() != 0);
+ return static_cast<float>(table_.size_) /
+ static_cast<float>(table_.bucket_count());