diff --git a/math/polymake/Makefile b/math/polymake/Makefile index f771c693f797..55312ff415cd 100644 --- a/math/polymake/Makefile +++ b/math/polymake/Makefile @@ -1,5 +1,6 @@ PORTNAME= polymake DISTVERSION= 4.13 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/V${DISTVERSION}/ \ https://polymake.org/lib/exe/fetch.php/download/ diff --git a/math/polymake/files/patch-external_permlib_include_permlib_bsgs.h b/math/polymake/files/patch-external_permlib_include_permlib_bsgs.h new file mode 100644 index 000000000000..176060a8a967 --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_bsgs.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/bsgs.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/bsgs.h +@@ -461,7 +461,7 @@ template + * stabilizer chain are next to each other. + */ + template +-class StrongGeneratingSetSorter : public std::binary_function { ++class StrongGeneratingSetSorter { + public: + /** + * @param baseBegin begin-iterator(dom_int) to the base relative to which the strong generating set is to be sorted diff --git a/math/polymake/files/patch-external_permlib_include_permlib_predicate_identity__predicate.h b/math/polymake/files/patch-external_permlib_include_permlib_predicate_identity__predicate.h new file mode 100644 index 000000000000..0f8e6404edf9 --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_predicate_identity__predicate.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/predicate/identity_predicate.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/predicate/identity_predicate.h +@@ -39,7 +39,7 @@ template + + /// predicate matching a permutation if it stabilizes a given list of points pointwise + template +-class IdentityPredicate : public std::unary_function { ++class IdentityPredicate { + public: + /// evaluate predicate + bool operator()(const typename PERM::ptr &p) const { diff --git a/math/polymake/files/patch-external_permlib_include_permlib_predicate_pointwise__stabilizer__predicate.h b/math/polymake/files/patch-external_permlib_include_permlib_predicate_pointwise__stabilizer__predicate.h new file mode 100644 index 000000000000..176cdb17ca29 --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_predicate_pointwise__stabilizer__predicate.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/predicate/pointwise_stabilizer_predicate.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/predicate/pointwise_stabilizer_predicate.h +@@ -39,7 +39,7 @@ template + + /// predicate matching a permutation if it stabilizes a given list of points pointwise + template +-class PointwiseStabilizerPredicate : public std::unary_function { ++class PointwiseStabilizerPredicate { + public: + /// constructor + /** diff --git a/math/polymake/files/patch-external_permlib_include_permlib_predicate_stabilizes__point__predicate.h b/math/polymake/files/patch-external_permlib_include_permlib_predicate_stabilizes__point__predicate.h new file mode 100644 index 000000000000..311db4d802ed --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_predicate_stabilizes__point__predicate.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/predicate/stabilizes_point_predicate.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/predicate/stabilizes_point_predicate.h +@@ -39,7 +39,7 @@ template + + /// predicate matching points that are stabilized by given permutations + template +-class StabilizesPointPredicate : public std::unary_function { ++class StabilizesPointPredicate { + public: + /// constructor + /** diff --git a/math/polymake/files/patch-external_permlib_include_permlib_predicate_subgroup__predicate.h b/math/polymake/files/patch-external_permlib_include_permlib_predicate_subgroup__predicate.h new file mode 100644 index 000000000000..93ca0a5b9a9e --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_predicate_subgroup__predicate.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/predicate/subgroup_predicate.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/predicate/subgroup_predicate.h +@@ -42,7 +42,7 @@ template + + /// abstract base class for subgroup (and coset) predicates + template +-class SubgroupPredicate : public std::unary_function { ++class SubgroupPredicate { + public: + /// virtual destructor + virtual ~SubgroupPredicate() {} diff --git a/math/polymake/files/patch-external_permlib_include_permlib_search_partition_backtrack__refinement.h b/math/polymake/files/patch-external_permlib_include_permlib_search_partition_backtrack__refinement.h new file mode 100644 index 000000000000..4ac79394f799 --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_search_partition_backtrack__refinement.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/search/partition/backtrack_refinement.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/search/partition/backtrack_refinement.h +@@ -67,7 +67,7 @@ class BacktrackRefinement : public Refinement { + + typedef typename Refinement::RefinementPtr RefinementPtr; + +- struct RefinementSorter : public std::binary_function { ++ struct RefinementSorter { + RefinementSorter(const BaseSorterByReference& sorter, const Partition* pi) : m_sorter(sorter), m_pi(pi) {} + + bool operator()(RefinementPtr a, RefinementPtr b) const { diff --git a/math/polymake/files/patch-external_permlib_include_permlib_sorter_base__sorter.h b/math/polymake/files/patch-external_permlib_include_permlib_sorter_base__sorter.h new file mode 100644 index 000000000000..2c7604b05d84 --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_sorter_base__sorter.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/sorter/base_sorter.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/sorter/base_sorter.h +@@ -39,7 +39,7 @@ template + + /// A sorter that sorts a sequence with respect to a given input ordering + template +-class OrderedSorter : public std::binary_function { ++class OrderedSorter { + public: + /// true iff a preceeds b in given sequence + bool operator() (unsigned long a, unsigned long b) const { diff --git a/math/polymake/files/patch-external_permlib_include_permlib_sorter_group__sorter.h b/math/polymake/files/patch-external_permlib_include_permlib_sorter_group__sorter.h new file mode 100644 index 000000000000..7cf655ca5d21 --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_sorter_group__sorter.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/sorter/group_sorter.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/sorter/group_sorter.h +@@ -39,7 +39,7 @@ template + + /// A sorter that sorts a sequence of permutations with respect to a ordering induced by a base + template +-class GroupSorter : public std::binary_function{ ++class GroupSorter { + public: + /// constructor + /** diff --git a/math/polymake/files/patch-external_permlib_include_permlib_sorter_trivial__sorter.h b/math/polymake/files/patch-external_permlib_include_permlib_sorter_trivial__sorter.h new file mode 100644 index 000000000000..dcc9ea434dbb --- /dev/null +++ b/math/polymake/files/patch-external_permlib_include_permlib_sorter_trivial__sorter.h @@ -0,0 +1,11 @@ +--- external/permlib/include/permlib/sorter/trivial_sorter.h.orig 2024-09-24 09:32:47 UTC ++++ external/permlib/include/permlib/sorter/trivial_sorter.h +@@ -36,7 +36,7 @@ namespace permlib { + namespace permlib { + + /// A sorter that sorts a sequence in natural numerical order (1 < 2 < 3 < ...) +-class TrivialSorter : public std::binary_function{ ++class TrivialSorter { + public: + /// true iff a < b + bool operator() (unsigned long a, unsigned long b) const { diff --git a/math/polymake/files/patch-lib_core_include_ContainerChain.h b/math/polymake/files/patch-lib_core_include_ContainerChain.h new file mode 100644 index 000000000000..bff622bf092a --- /dev/null +++ b/math/polymake/files/patch-lib_core_include_ContainerChain.h @@ -0,0 +1,131 @@ +--- lib/core/include/ContainerChain.h.orig 2024-09-24 09:32:47 UTC ++++ lib/core/include/ContainerChain.h +@@ -1128,15 +1128,15 @@ class modified_container_tuple_impl (public) + + Int size() const + { +- return this->manip_top().template get_container(size_constant()).size(); ++ return this->manip_top().get_container(size_constant()).size(); + } + Int dim() const + { +- return get_dim(this->manip_top().template get_container(size_constant())); ++ return get_dim(this->manip_top().get_container(size_constant())); + } + bool empty() const + { +- return this->manip_top().template get_container(size_constant()).empty(); ++ return this->manip_top().get_container(size_constant()).empty(); + } + + decltype(auto) front() +@@ -1153,40 +1153,40 @@ class modified_container_tuple_impl (public) + iterator make_begin(std::index_sequence, mlist) + { + return iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).begin()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).begin()...); + } + + template + iterator make_end(std::index_sequence, mlist) + { + return iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).end()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).end()...); + } + + template + const_iterator make_begin(std::index_sequence, mlist) const + { + return const_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).begin()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).begin()...); + } + + template + const_iterator make_end(std::index_sequence, mlist) const + { + return const_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).end()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).end()...); + } + + template + decltype(auto) make_front(std::index_sequence) + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant()).front()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant()).front()... ); + } + + template + decltype(auto) make_front(std::index_sequence) const + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant()).front()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant()).front()... ); + } + }; + +@@ -1230,40 +1230,40 @@ class modified_container_tuple_impl, mlist) + { + return reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).rbegin()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).rbegin()...); + } + + template + reverse_iterator make_rend(std::index_sequence, mlist) + { + return reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).rend()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).rend()...); + } + + template + const_reverse_iterator make_rbegin(std::index_sequence, mlist) const + { + return const_reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).rbegin()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).rbegin()...); + } + + template + const_reverse_iterator make_rend(std::index_sequence, mlist) const + { + return const_reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant()), muntag_t()).rend()...); ++ ensure(this->manip_top().get_container(size_constant()), muntag_t()).rend()...); + } + + template + decltype(auto) make_back(std::index_sequence) + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant()).back()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant()).back()... ); + } + + template + decltype(auto) make_back(std::index_sequence) const + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant()).back()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant()).back()... ); + } + }; + +@@ -1285,13 +1285,13 @@ class modified_container_tuple_impl + decltype(auto) make_random(Int i, std::index_sequence) + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant())[i]... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant())[i]... ); + } + + template + decltype(auto) make_random(Int i, std::index_sequence) const + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant())[i]... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant())[i]... ); + } + }; + diff --git a/math/polymake/files/patch-lib_core_include_GenericMatrix.h b/math/polymake/files/patch-lib_core_include_GenericMatrix.h new file mode 100644 index 000000000000..62ade36b0d90 --- /dev/null +++ b/math/polymake/files/patch-lib_core_include_GenericMatrix.h @@ -0,0 +1,17 @@ +--- lib/core/include/GenericMatrix.h.orig 2024-09-24 09:32:47 UTC ++++ lib/core/include/GenericMatrix.h +@@ -1525,12 +1525,12 @@ class ConcatRows< BlockMatrix + decltype(auto) get_container(size_constant) + { +- return concat_rows(this->hidden().template get_container(size_constant())); ++ return concat_rows(this->hidden().get_container(size_constant())); + } + template + decltype(auto) get_container(size_constant) const + { +- return concat_rows(this->hidden().template get_container(size_constant())); ++ return concat_rows(this->hidden().get_container(size_constant())); + } + + ConcatRows& operator= (const ConcatRows& other) { return ConcatRows::generic_type::operator=(other); } diff --git a/math/polymake/files/patch-lib_core_include_internal_pool__allocator.h b/math/polymake/files/patch-lib_core_include_internal_pool__allocator.h new file mode 100644 index 000000000000..f4c4252e2d86 --- /dev/null +++ b/math/polymake/files/patch-lib_core_include_internal_pool__allocator.h @@ -0,0 +1,14 @@ +--- lib/core/include/internal/pool_allocator.h.orig 2024-09-24 09:32:47 UTC ++++ lib/core/include/internal/pool_allocator.h +@@ -34,7 +34,11 @@ class allocator : public PM_ALLOCATOR_BASE { (pu + public: + void* allocate(std::size_t n) + { ++#if __cplusplus < 201703L + return base_t::allocate(n, nullptr); ++#else ++ return base_t::allocate(n); ++#endif + } + void deallocate(void* p, std::size_t n) + { diff --git a/math/polymake/files/patch-lib_core_include_optional b/math/polymake/files/patch-lib_core_include_optional new file mode 100644 index 000000000000..cb7d9756dc41 --- /dev/null +++ b/math/polymake/files/patch-lib_core_include_optional @@ -0,0 +1,38 @@ +--- lib/core/include/optional.orig 2024-09-24 09:32:47 UTC ++++ lib/core/include/optional +@@ -7,6 +7,8 @@ + // Moreover, older clangs produce strange errors even in combination with libstdc++. + // For this configuration, we include a minimal implementation just covering our needs. + ++#if __cplusplus < 201703L ++ + #if defined(__clang__) && (defined(_LIBCPP_STD_VER) || __clang_major__ < 4) + + #include "polymake/internal/type_union.h" +@@ -76,8 +78,6 @@ using pm::make_optional; + + #else // GCC or clang >= 4 + +-#if __cplusplus < 201703L +- + # include + + namespace polymake { +@@ -91,6 +91,8 @@ using std::experimental::make_optional; + using std::experimental::make_optional; + } + ++#endif ++ + #else + + #include +@@ -105,8 +107,6 @@ using std::make_optional; + using std::nullopt; + using std::make_optional; + } +- +-#endif + + #endif +