diff options
author | Alexey Sokolov <alexey+gentoo@asokolov.org> | 2022-07-11 01:03:00 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-12 03:46:21 +0100 |
commit | 9d536043e793f5d49230620422cec37094a1871e (patch) | |
tree | 4af796ee604389a5dba7647a92e234478aceb7a4 /dev-cpp | |
parent | www-client/w3mmee: Remove libressl support (diff) | |
download | gentoo-9d536043e793f5d49230620422cec37094a1871e.tar.gz gentoo-9d536043e793f5d49230620422cec37094a1871e.tar.bz2 gentoo-9d536043e793f5d49230620422cec37094a1871e.zip |
dev-cpp/range-v3: version 0.12.0
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Closes: https://github.com/gentoo/gentoo/pull/26337
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r-- | dev-cpp/range-v3/Manifest | 1 | ||||
-rw-r--r-- | dev-cpp/range-v3/files/0.12.0-fix-any-1.patch | 31 | ||||
-rw-r--r-- | dev-cpp/range-v3/files/0.12.0-fix-any-2.patch | 156 | ||||
-rw-r--r-- | dev-cpp/range-v3/range-v3-0.12.0.ebuild | 46 |
4 files changed, 234 insertions, 0 deletions
diff --git a/dev-cpp/range-v3/Manifest b/dev-cpp/range-v3/Manifest index 6fafedbb109f..4d3df61de18e 100644 --- a/dev-cpp/range-v3/Manifest +++ b/dev-cpp/range-v3/Manifest @@ -1,2 +1,3 @@ DIST range-v3-0.10.0.tar.gz 525765 BLAKE2B 7dd3aed9b35920e058fe43bccd364831a52ad8d50179d1057ab7a37cdef82df021bb09a9913018ae78982fe136c855ba4101e31d35cfc21747af994d0103b95e SHA512 4db089dcbf638eb30fa20dcf6785dd460c5a074a8912984a484592753cfee9f5b9a0e2c56b5bc5921d1b6120877aa2c83ac0a6fe428088ef2854033a635e9723 DIST range-v3-0.11.0.tar.gz 533136 BLAKE2B d325b14a9d812cb7a600a947126bcecf9384bec987edbad42eec38560415d075815ab92e3f92dad291029fc3e1b1afa1ceaf54443b4a536078047fd32d344394 SHA512 9d6cdcbc1e50104206ba731c3bdc9aab3acfcf69cd83f0e0b4de18b88df2a9e73d64e55638421768d4433c542b6619f6e5af6b17cccd3090cf8b4d4efe9863e4 +DIST range-v3-0.12.0.tar.gz 582834 BLAKE2B 252066fae70aae76450226f2c17248662de4778dcebcd7dbaa2bf757c1bfe3e7441f65e41e3110c1ae83ae93a41c54d6c006dbf5482ffbe09a3aa4f51d02df9c SHA512 b8b632b8e0f2a3234ef61813212c237f648cd741e816ca57bd86f82f6459f7d755e2b70361d2aa43847874fb546a31a792ab1c3ba90292818ae7313438dc62d0 diff --git a/dev-cpp/range-v3/files/0.12.0-fix-any-1.patch b/dev-cpp/range-v3/files/0.12.0-fix-any-1.patch new file mode 100644 index 000000000000..00eb457b5dcb --- /dev/null +++ b/dev-cpp/range-v3/files/0.12.0-fix-any-1.patch @@ -0,0 +1,31 @@ +From 64fe7d738bb2c2aa8e9ba24d170a8548519156a7 Mon Sep 17 00:00:00 2001 +From: Eric Niebler <eniebler@nvidia.com> +Date: Wed, 22 Jun 2022 17:06:16 -0700 +Subject: [PATCH] avoid constraint recursion with ranges::any ctor/assign + +--- + include/range/v3/utility/any.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/range/v3/utility/any.hpp b/include/range/v3/utility/any.hpp +index 0d2889264..5feb2f8cd 100644 +--- a/include/range/v3/utility/any.hpp ++++ b/include/range/v3/utility/any.hpp +@@ -123,7 +123,7 @@ namespace ranges + public: + any() noexcept = default; + template(typename TRef, typename T = detail::decay_t<TRef>)( +- requires copyable<T> AND (!same_as<T, any>)) // ++ requires (!same_as<T, any>) AND copyable<T>) // + any(TRef && t) + : ptr_(new impl<T>(static_cast<TRef &&>(t))) + {} +@@ -138,7 +138,7 @@ namespace ranges + return *this; + } + template(typename TRef, typename T = detail::decay_t<TRef>)( +- requires copyable<T> AND (!same_as<T, any>)) // ++ requires (!same_as<T, any>) AND copyable<T>) // + any & operator=(TRef && t) + { + any{static_cast<TRef &&>(t)}.swap(*this); diff --git a/dev-cpp/range-v3/files/0.12.0-fix-any-2.patch b/dev-cpp/range-v3/files/0.12.0-fix-any-2.patch new file mode 100644 index 000000000000..94898cc21a52 --- /dev/null +++ b/dev-cpp/range-v3/files/0.12.0-fix-any-2.patch @@ -0,0 +1,156 @@ +From 390a35e5815d1cb4e40e87d332df711de379a852 Mon Sep 17 00:00:00 2001 +From: Eric Niebler <eniebler@nvidia.com> +Date: Wed, 22 Jun 2022 22:56:28 -0700 +Subject: [PATCH] work around strange gcc bug causing constraint recursion in + ranges::any + +--- + include/range/v3/detail/config.hpp | 8 ++--- + include/range/v3/utility/any.hpp | 58 +++++++++++++++++------------- + 2 files changed, 36 insertions(+), 30 deletions(-) + +diff --git a/include/range/v3/detail/config.hpp b/include/range/v3/detail/config.hpp +index f8015f436..d29dada10 100644 +--- a/include/range/v3/detail/config.hpp ++++ b/include/range/v3/detail/config.hpp +@@ -351,9 +351,6 @@ namespace ranges + #define RANGES_WORKAROUND_CLANG_43400 // template friend is redefinition of itself + #endif + #else // __GNUC__ +-#if __GNUC__ < 6 +-#define RANGES_WORKAROUND_GCC_UNFILED0 /* Workaround old GCC name lookup bug */ +-#endif + #if __GNUC__ == 7 || __GNUC__ == 8 + #define RANGES_WORKAROUND_GCC_91525 /* Workaround strange GCC ICE */ + #endif +@@ -724,8 +721,9 @@ namespace ranges + #endif + #endif // RANGES_CONSTEXPR_IF + +-#if !defined(RANGES_BROKEN_CPO_LOOKUP) && !defined(RANGES_DOXYGEN_INVOKED) && \ +- (defined(RANGES_WORKAROUND_GCC_UNFILED0) || defined(RANGES_WORKAROUND_MSVC_895622)) ++#if !defined(RANGES_BROKEN_CPO_LOOKUP) && \ ++ !defined(RANGES_DOXYGEN_INVOKED) && \ ++ defined(RANGES_WORKAROUND_MSVC_895622) + #define RANGES_BROKEN_CPO_LOOKUP 1 + #endif + #ifndef RANGES_BROKEN_CPO_LOOKUP +diff --git a/include/range/v3/utility/any.hpp b/include/range/v3/utility/any.hpp +index 5feb2f8cd..7a3807499 100644 +--- a/include/range/v3/utility/any.hpp ++++ b/include/range/v3/utility/any.hpp +@@ -61,25 +61,9 @@ namespace ranges + template<typename T> + T const * any_cast(any const *) noexcept; + +- struct any ++ namespace _any_ + { +- private: +- template<typename T> +- friend meta::if_c<std::is_reference<T>() || (bool)copyable<T>, T> any_cast(any &); +- +- template<typename T> +- friend meta::if_c<std::is_reference<T>() || (bool)copyable<T>, T> any_cast( +- any const &); +- +- template<typename T> +- friend meta::if_c<std::is_reference<T>() || (bool)copyable<T>, T> any_cast( +- any &&); +- +- template<typename T> +- friend T * any_cast(any *) noexcept; +- +- template<typename T> +- friend T const * any_cast(any const *) noexcept; ++ struct _base {}; + + struct interface + { +@@ -117,15 +101,39 @@ namespace ranges + return typeid(T); + } + }; ++ } // namespace _any_ ++ ++ struct any ++ #if RANGES_BROKEN_CPO_LOOKUP ++ : private _any_::_base ++ #endif ++ { ++ private: ++ template<typename T> ++ friend meta::if_c<std::is_reference<T>() || (bool)copyable<T>, T> any_cast(any &); ++ ++ template<typename T> ++ friend meta::if_c<std::is_reference<T>() || (bool)copyable<T>, T> any_cast( ++ any const &); ++ ++ template<typename T> ++ friend meta::if_c<std::is_reference<T>() || (bool)copyable<T>, T> any_cast( ++ any &&); ++ ++ template<typename T> ++ friend T * any_cast(any *) noexcept; ++ ++ template<typename T> ++ friend T const * any_cast(any const *) noexcept; + +- std::unique_ptr<interface> ptr_; ++ std::unique_ptr<_any_::interface> ptr_; + + public: + any() noexcept = default; + template(typename TRef, typename T = detail::decay_t<TRef>)( + requires (!same_as<T, any>) AND copyable<T>) // + any(TRef && t) +- : ptr_(new impl<T>(static_cast<TRef &&>(t))) ++ : ptr_(new _any_::impl<T>(static_cast<TRef &&>(t))) + {} + any(any &&) noexcept = default; + any(any const & that) +@@ -185,7 +193,7 @@ namespace ranges + { + if(x.type() != typeid(detail::decay_t<T>)) + throw bad_any_cast{}; +- return static_cast<any::impl<detail::decay_t<T>> *>(x.ptr_.get())->get(); ++ return static_cast<_any_::impl<detail::decay_t<T>> *>(x.ptr_.get())->get(); + } + + /// \overload +@@ -194,7 +202,7 @@ namespace ranges + { + if(x.type() != typeid(detail::decay_t<T>)) + throw bad_any_cast{}; +- return static_cast<any::impl<detail::decay_t<T>> const *>(x.ptr_.get())->get(); ++ return static_cast<_any_::impl<detail::decay_t<T>> const *>(x.ptr_.get())->get(); + } + + /// \overload +@@ -203,7 +211,7 @@ namespace ranges + { + if(x.type() != typeid(detail::decay_t<T>)) + throw bad_any_cast{}; +- return static_cast<any::impl<detail::decay_t<T>> *>(x.ptr_.get())->get(); ++ return static_cast<_any_::impl<detail::decay_t<T>> *>(x.ptr_.get())->get(); + } + + /// \overload +@@ -211,7 +219,7 @@ namespace ranges + T * any_cast(any * p) noexcept + { + if(p && p->ptr_) +- if(any::impl<T> * q = dynamic_cast<any::impl<T> *>(p->ptr_.get())) ++ if(_any_::impl<T> * q = dynamic_cast<_any_::impl<T> *>(p->ptr_.get())) + return &q->get(); + return nullptr; + } +@@ -221,7 +229,7 @@ namespace ranges + T const * any_cast(any const * p) noexcept + { + if(p && p->ptr_) +- if(any::impl<T> const * q = dynamic_cast<any::impl<T> const *>(p->ptr_.get())) ++ if(_any_::impl<T> const * q = dynamic_cast<_any_::impl<T> const *>(p->ptr_.get())) + return &q->get(); + return nullptr; + } diff --git a/dev-cpp/range-v3/range-v3-0.12.0.ebuild b/dev-cpp/range-v3/range-v3-0.12.0.ebuild new file mode 100644 index 000000000000..e3e0a4cc2eea --- /dev/null +++ b/dev-cpp/range-v3/range-v3-0.12.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Range library for C++14/17/20, basis for C++20's std::ranges" +HOMEPAGE="https://github.com/ericniebler/range-v3" +SRC_URI="https://github.com/ericniebler/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Boost-1.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}/0.12.0-fix-any-1.patch" + "${FILESDIR}/0.12.0-fix-any-2.patch" +) + +src_prepare() { + # header-only libraries go to arch-independent dirs + sed -i -e 's@CMAKE_INSTALL_LIBDIR@CMAKE_INSTALL_DATADIR@g' CMakeLists.txt || die + rm include/module.modulemap || die # https://bugs.gentoo.org/755740 + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DRANGES_BUILD_CALENDAR_EXAMPLE=OFF + -DRANGES_NATIVE=OFF + -DRANGES_DEBUG_INFO=OFF + -DRANGES_NATIVE=OFF + -DRANGES_ENABLE_WERROR=OFF + -DRANGES_VERBOSE_BUILD=ON + -DRANGE_V3_EXAMPLES=OFF + -DRANGE_V3_PERF=OFF + -DRANGE_V3_DOCS=OFF + -DRANGE_V3_HEADER_CHECKS="$(usex test ON OFF)" + -DRANGE_V3_TESTS=$(usex test ON OFF) + #TODO: clang support + -DRANGES_MODULES=yes + ) + cmake_src_configure +} |