Date: Mon, 6 Jan 2025 23:06:56 GMT From: Robert Clausecker <fuz@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: b9a02d30092f - main - math/polymake: fix build with clang 19 Message-ID: <202501062306.506N6ul9070055@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=b9a02d30092fd9f590b4cd38a80ca3cc46ffca03 commit b9a02d30092fd9f590b4cd38a80ca3cc46ffca03 Author: Philipp Ost <bsd@philippost.de> AuthorDate: 2025-01-04 18:19:36 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2025-01-06 23:06:15 +0000 math/polymake: fix build with clang 19 PR: 283827 MFH: 2025Q1 Obtained from: https://forum.polymake.org/viewtopic.php?p=4159 --- math/polymake/Makefile | 1 + .../patch-external_permlib_include_permlib_bsgs.h | 11 ++ ...include_permlib_predicate_identity__predicate.h | 11 ++ ...ib_predicate_pointwise__stabilizer__predicate.h | 11 ++ ...ermlib_predicate_stabilizes__point__predicate.h | 11 ++ ...include_permlib_predicate_subgroup__predicate.h | 11 ++ ...ermlib_search_partition_backtrack__refinement.h | 11 ++ ...l_permlib_include_permlib_sorter_base__sorter.h | 11 ++ ..._permlib_include_permlib_sorter_group__sorter.h | 11 ++ ...ermlib_include_permlib_sorter_trivial__sorter.h | 11 ++ .../files/patch-lib_core_include_ContainerChain.h | 131 +++++++++++++++++++++ .../files/patch-lib_core_include_GenericMatrix.h | 17 +++ ...tch-lib_core_include_internal_pool__allocator.h | 14 +++ .../polymake/files/patch-lib_core_include_optional | 38 ++++++ 14 files changed, 300 insertions(+) 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 <class PERM> + * stabilizer chain are next to each other. + */ + template <class PERM> +-class StrongGeneratingSetSorter : public std::binary_function<typename PERM::ptr, typename PERM::ptr, bool> { ++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 <class PERM> + + /// predicate matching a permutation if it stabilizes a given list of points pointwise + template <class PERM> +-class IdentityPredicate : public std::unary_function<typename PERM::ptr, bool> { ++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 <class PERM> + + /// predicate matching a permutation if it stabilizes a given list of points pointwise + template <class PERM> +-class PointwiseStabilizerPredicate : public std::unary_function<typename PERM::ptr, bool> { ++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 <class PERM> + + /// predicate matching points that are stabilized by given permutations + template <class PERM> +-class StabilizesPointPredicate : public std::unary_function<unsigned long, bool> { ++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 <class PERM> + + /// abstract base class for subgroup (and coset) predicates + template <class PERM> +-class SubgroupPredicate : public std::unary_function<PERM, bool> { ++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<PERM> { + + typedef typename Refinement<PERM>::RefinementPtr RefinementPtr; + +- struct RefinementSorter : public std::binary_function<RefinementPtr, RefinementPtr, bool> { ++ 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<class ORDER> + + /// A sorter that sorts a sequence with respect to a given input ordering + template<class ORDER> +-class OrderedSorter : public std::binary_function<unsigned long, unsigned long, bool> { ++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 <class PERM> + + /// A sorter that sorts a sequence of permutations with respect to a ordering induced by a base + template <class PERM> +-class GroupSorter : public std::binary_function<PERM, PERM, bool>{ ++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<unsigned long, unsigned long, bool>{ ++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<base_t::normal_it_pos>()).size(); ++ return this->manip_top().get_container(size_constant<base_t::normal_it_pos>()).size(); + } + Int dim() const + { +- return get_dim(this->manip_top().template get_container(size_constant<base_t::normal_it_pos>())); ++ return get_dim(this->manip_top().get_container(size_constant<base_t::normal_it_pos>())); + } + bool empty() const + { +- return this->manip_top().template get_container(size_constant<base_t::normal_it_pos>()).empty(); ++ return this->manip_top().get_container(size_constant<base_t::normal_it_pos>()).empty(); + } + + decltype(auto) front() +@@ -1153,40 +1153,40 @@ class modified_container_tuple_impl (public) + iterator make_begin(std::index_sequence<Index...>, mlist<Features...>) + { + return iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).begin()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).begin()...); + } + + template <size_t... Index, typename... Features> + iterator make_end(std::index_sequence<Index...>, mlist<Features...>) + { + return iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).end()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).end()...); + } + + template <size_t... Index, typename... Features> + const_iterator make_begin(std::index_sequence<Index...>, mlist<Features...>) const + { + return const_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).begin()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).begin()...); + } + + template <size_t... Index, typename... Features> + const_iterator make_end(std::index_sequence<Index...>, mlist<Features...>) const + { + return const_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).end()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).end()...); + } + + template <size_t... Index> + decltype(auto) make_front(std::index_sequence<Index...>) + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant<Index>()).front()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant<Index>()).front()... ); + } + + template <size_t... Index> + decltype(auto) make_front(std::index_sequence<Index...>) const + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant<Index>()).front()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant<Index>()).front()... ); + } + }; + +@@ -1230,40 +1230,40 @@ class modified_container_tuple_impl<Top, Params, std:: + reverse_iterator make_rbegin(std::index_sequence<Index...>, mlist<Features...>) + { + return reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).rbegin()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).rbegin()...); + } + + template <size_t... Index, typename... Features> + reverse_iterator make_rend(std::index_sequence<Index...>, mlist<Features...>) + { + return reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).rend()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).rend()...); + } + + template <size_t... Index, typename... Features> + const_reverse_iterator make_rbegin(std::index_sequence<Index...>, mlist<Features...>) const + { + return const_reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).rbegin()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).rbegin()...); + } + + template <size_t... Index, typename... Features> + const_reverse_iterator make_rend(std::index_sequence<Index...>, mlist<Features...>) const + { + return const_reverse_iterator(this->manip_top().get_operation(), +- ensure(this->manip_top().template get_container(size_constant<Index>()), muntag_t<Features>()).rend()...); ++ ensure(this->manip_top().get_container(size_constant<Index>()), muntag_t<Features>()).rend()...); + } + + template <size_t... Index> + decltype(auto) make_back(std::index_sequence<Index...>) + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant<Index>()).back()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant<Index>()).back()... ); + } + + template <size_t... Index> + decltype(auto) make_back(std::index_sequence<Index...>) const + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant<Index>()).back()... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant<Index>()).back()... ); + } + }; + +@@ -1285,13 +1285,13 @@ class modified_container_tuple_impl<Top, Params, std:: + template <size_t... Index> + decltype(auto) make_random(Int i, std::index_sequence<Index...>) + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant<Index>())[i]... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant<Index>())[i]... ); + } + + template <size_t... Index> + decltype(auto) make_random(Int i, std::index_sequence<Index...>) const + { +- return this->manip_top().get_operation()( this->manip_top().template get_container(size_constant<Index>())[i]... ); ++ return this->manip_top().get_operation()( this->manip_top().get_container(size_constant<Index>())[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<MatrixList, std::true_ty + template <size_t i> + decltype(auto) get_container(size_constant<i>) + { +- return concat_rows(this->hidden().template get_container(size_constant<i>())); ++ return concat_rows(this->hidden().get_container(size_constant<i>())); + } + template <size_t i> + decltype(auto) get_container(size_constant<i>) const + { +- return concat_rows(this->hidden().template get_container(size_constant<i>())); ++ return concat_rows(this->hidden().get_container(size_constant<i>())); + } + + 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<char> { (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 <experimental/optional> + + namespace polymake { +@@ -91,6 +91,8 @@ using std::experimental::make_optional; + using std::experimental::make_optional; + } + ++#endif ++ + #else + + #include <optional> +@@ -105,8 +107,6 @@ using std::make_optional; + using std::nullopt; + using std::make_optional; + } +- +-#endif + + #endif +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501062306.506N6ul9070055>