Add -const-map-key and -boolvec patches to fix FTBFS.
This commit is contained in:
parent
07dd7c22d0
commit
41f1400177
|
@ -0,0 +1,13 @@
|
|||
--- a/src/element.cpp 2021-02-28 03:52:04.236061261 -0700
|
||||
+++ b/src/element.cpp 2022-01-22 11:00:19.087122439 -0700
|
||||
@@ -96,8 +96,8 @@ namespace libsemigroups {
|
||||
void BooleanMat::transpose_in_place() {
|
||||
for (size_t i = 0; i < this->degree() - 1; ++i) {
|
||||
for (size_t j = i + 1; j < this->degree(); ++j) {
|
||||
- std::swap(_vector[i * this->degree() + j],
|
||||
- _vector[j * this->degree() + i]);
|
||||
+ std::vector<bool>::swap(_vector[i * this->degree() + j],
|
||||
+ _vector[j * this->degree() + i]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
--- a/include/libsemigroups/action.hpp 2021-02-28 03:52:04.216166472 -0700
|
||||
+++ b/include/libsemigroups/action.hpp 2022-01-22 15:01:49.054474507 -0700
|
||||
@@ -163,6 +163,10 @@ namespace libsemigroups {
|
||||
//! parameter \p TPointType.
|
||||
using point_type = TPointType;
|
||||
|
||||
+ //! This is the type of a reference to a Action::point_type.
|
||||
+ using reference_point_type =
|
||||
+ typename detail::BruidhinnTraits<TPointType>::reference;
|
||||
+
|
||||
//! This is the type of a const reference to a Action::point_type.
|
||||
using const_reference_point_type =
|
||||
typename detail::BruidhinnTraits<TPointType>::const_reference;
|
||||
@@ -374,7 +378,7 @@ namespace libsemigroups {
|
||||
//! \complexity
|
||||
//! Constant.
|
||||
index_type position(const_reference_point_type pt) const {
|
||||
- auto it = _map.find(this->to_internal_const(pt));
|
||||
+ auto it = _map.find(this->to_internal(const_cast<reference_point_type>(pt)));
|
||||
if (it != _map.end()) {
|
||||
return (*it).second;
|
||||
} else {
|
||||
@@ -704,7 +708,7 @@ namespace libsemigroups {
|
||||
|
||||
std::vector<element_type> _gens;
|
||||
ActionDigraph<size_t> _graph;
|
||||
- std::unordered_map<internal_const_point_type,
|
||||
+ std::unordered_map<internal_point_type,
|
||||
size_t,
|
||||
InternalHash,
|
||||
InternalEqualTo>
|
||||
--- a/include/libsemigroups/froidure-pin.hpp 2021-02-28 03:52:04.222895918 -0700
|
||||
+++ b/include/libsemigroups/froidure-pin.hpp 2022-01-22 11:07:21.703044390 -0700
|
||||
@@ -278,7 +278,7 @@ namespace libsemigroups {
|
||||
}
|
||||
};
|
||||
|
||||
- using map_type = std::unordered_map<internal_const_element_type,
|
||||
+ using map_type = std::unordered_map<internal_element_type,
|
||||
element_index_type,
|
||||
InternalHash,
|
||||
InternalEqualTo>;
|
||||
--- a/include/libsemigroups/froidure-pin-impl.hpp 2021-02-28 03:52:04.222400437 -0700
|
||||
+++ b/include/libsemigroups/froidure-pin-impl.hpp 2022-01-22 14:46:27.934085204 -0700
|
||||
@@ -256,7 +256,7 @@ namespace libsemigroups {
|
||||
return UNDEFINED;
|
||||
}
|
||||
|
||||
- auto it = _map.find(this->to_internal_const(x));
|
||||
+ auto it = _map.find(this->to_internal(const_cast<reference>(x)));
|
||||
return (it == _map.end() ? UNDEFINED : it->second);
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ namespace libsemigroups {
|
||||
}
|
||||
|
||||
while (true) {
|
||||
- auto it = _map.find(this->to_internal_const(x));
|
||||
+ auto it = _map.find(this->to_internal(const_cast<reference>(x)));
|
||||
if (it != _map.end()) {
|
||||
return it->second;
|
||||
}
|
||||
@@ -561,7 +561,7 @@ namespace libsemigroups {
|
||||
size_t nr_new_elements = 0;
|
||||
|
||||
for (auto it_coll = first; it_coll < last; ++it_coll) {
|
||||
- auto it = _map.find(this->to_internal_const(*it_coll));
|
||||
+ auto it = _map.find(this->to_internal(const_cast<reference>(*it_coll)));
|
||||
if (it == _map.end()) {
|
||||
// new generator
|
||||
nr_new_elements++;
|
|
@ -1,11 +0,0 @@
|
|||
# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON
|
||||
# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors
|
||||
|
||||
# The dictionary is missing some technical terms
|
||||
addFilter(r'W: spelling-error .* (congruences|multithreaded|(S|s)emigroups?|(sub)?monoids?)')
|
||||
|
||||
# The documentation is in the doc subpackage
|
||||
addFilter(r'libsemigroups-devel\.[^:]+: W: no-documentation')
|
||||
|
||||
# The Requires ensure the links do not dangle
|
||||
addFilter(r'libsemigroups-doc\.noarch: W: dangling-symlink')
|
|
@ -10,6 +10,12 @@ Source0: https://github.com/libsemigroups/libsemigroups/releases/download
|
|||
Patch0: %{name}-autoconf.patch
|
||||
# Adapt to sphinxcontrib-bibtex 2.x
|
||||
Patch1: %{name}-sphinxcontrib-bibtex.patch
|
||||
# Change map keys from const to non-const
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2043767
|
||||
Patch2: %{name}-const-map-key.patch
|
||||
# Use a portable way of swapping boolean vector elements
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2043774
|
||||
Patch3: %{name}-boolvec.patch
|
||||
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc-c++
|
||||
|
@ -166,6 +172,9 @@ LD_LIBRARY_PATH=$PWD/.libs make check
|
|||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Sat Jan 22 2022 Jerry James <loganjerry@gmail.com> - 1.3.7-4
|
||||
- Add -const-map-key and -boolvec patches to fix FTBFS
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue