From patchwork Mon Nov 27 19:26:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saku Laesvuori X-Patchwork-Id: 56870 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D8EA627BBEA; Mon, 27 Nov 2023 19:28:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9715E27BBE2 for ; Mon, 27 Nov 2023 19:28:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7hGz-00075k-3t; Mon, 27 Nov 2023 14:28:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7hGu-00075G-QI for guix-patches@gnu.org; Mon, 27 Nov 2023 14:27:58 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7hGu-0007yc-99 for guix-patches@gnu.org; Mon, 27 Nov 2023 14:27:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r7hH0-0003x5-MS for guix-patches@gnu.org; Mon, 27 Nov 2023 14:28:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67493] [PATCH 5/6] gnu: Update range-v3 to 0.12.0 Resent-From: Saku Laesvuori Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Nov 2023 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67493 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67493@debbugs.gnu.org Cc: Saku Laesvuori Received: via spool by 67493-submit@debbugs.gnu.org id=B67493.170111323115099 (code B ref 67493); Mon, 27 Nov 2023 19:28:02 +0000 Received: (at 67493) by debbugs.gnu.org; 27 Nov 2023 19:27:11 +0000 Received: from localhost ([127.0.0.1]:44864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7hGA-0003vS-JD for submit@debbugs.gnu.org; Mon, 27 Nov 2023 14:27:11 -0500 Received: from vmi571514.contaboserver.net ([75.119.130.101]:41538 helo=mail.laesvuori.fi) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7hG7-0003vI-SH for 67493@debbugs.gnu.org; Mon, 27 Nov 2023 14:27:08 -0500 Received: from X-kone.lan (88-113-24-127.elisa-laajakaista.fi [88.113.24.127]) by mail.laesvuori.fi (Postfix) with ESMTPSA id D882B3400A9; Mon, 27 Nov 2023 20:28:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laesvuori.fi; s=mail; t=1701113292; bh=70pdBDF63dsehhOoV4qFYOzFLPqZVsPVTGYBgSrcrWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sYvk9HjyiDSGoWXR71lUlk4tvWyzNGi/4ZeBBrjQH1Ldh3gjRrbq51cXqsLz75pN4 tB6jVfQudqRqDRDQexJO7BzSC5kBfmilzAboK7Zz1dMix/e8KHc65s8z+yieT292KX 1zEySCZ9C//3xevDEQmlLBd77BJu+a8r4GuNr8Ms= Date: Mon, 27 Nov 2023 21:26:09 +0200 Message-ID: <51c27363d64b1c7498adffb451ca27cd25230fa2.1701112690.git.saku@laesvuori.fi> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Saku Laesvuori X-ACL-Warn: , Saku Laesvuori via Guix-patches X-Patchwork-Original-From: Saku Laesvuori via Guix-patches via From: Saku Laesvuori Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cpp.scm (range-v3): Update to 0.12.0 [patches]: Remove upstreamed patch. * gnu/packages/patches/range-v3-build-with-gcc10.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove deleted patch. Change-Id: I426caeef6c058b2015f564ed1485b7e107e061cc --- gnu/local.mk | 1 - gnu/packages/cpp.scm | 5 +- .../patches/range-v3-build-with-gcc10.patch | 122 ------------------ 3 files changed, 2 insertions(+), 126 deletions(-) delete mode 100644 gnu/packages/patches/range-v3-build-with-gcc10.patch diff --git a/gnu/local.mk b/gnu/local.mk index 023cd4b17f..ae332c6390 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1921,7 +1921,6 @@ dist_patch_DATA = \ %D%/packages/patches/qtwayland-cleanup-callbacks.patch \ %D%/packages/patches/ragel-char-signedness.patch \ %D%/packages/patches/randomjungle-disable-static-build.patch \ - %D%/packages/patches/range-v3-build-with-gcc10.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/ratpoints-sturm_and_rp_private.patch \ %D%/packages/patches/ratpoison-shell.patch \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index e35a17811e..0e4aa202e9 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -187,7 +187,7 @@ (define-public asmjit (define-public range-v3 (package (name "range-v3") - (version "0.11.0") + (version "0.12.0") (source (origin (method git-fetch) @@ -197,9 +197,8 @@ (define-public range-v3 (commit version))) (file-name (git-file-name name version)) - (patches (search-patches "range-v3-build-with-gcc10.patch")) (sha256 - (base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh")))) + (base32 "0r85s5rmp5ixmik2y5y4w760pa38j1sg9hbr1fss2flibzvrf53d")))) (build-system cmake-build-system) (arguments (list diff --git a/gnu/packages/patches/range-v3-build-with-gcc10.patch b/gnu/packages/patches/range-v3-build-with-gcc10.patch deleted file mode 100644 index a5d5b33523..0000000000 --- a/gnu/packages/patches/range-v3-build-with-gcc10.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 0487cca29e352e8f16bbd91fda38e76e39a0ed28 Mon Sep 17 00:00:00 2001 -From: Louis Dionne -Date: Tue, 15 Jun 2021 14:40:01 -0400 -Subject: [PATCH] Work around broken integration with latest libc++. (#1635) - -* Work around broken integration with latest libc++. - -In newer versions of libc++, the base template of std::iterator_traits -provides a member typedef called __primary_template which is an alias -to the std::iterator_traits specialization itself. This fix works with -both the old version of libc++ and the new one. - -Fixes issue #1633. - -* Fix is_std_iterator_traits_specialized_v on MSVC - -It used to pretend that std::iterator_traits is a user-defined -specialization, which isn't the case. This is due to MSVC's -iterator_traits specialization not posing as the base template. ---- - include/std/detail/associated_types.hpp | 22 +++++++++++----- - test/CMakeLists.txt | 1 + - test/bug1633.cpp | 34 +++++++++++++++++++++++++ - 3 files changed, 51 insertions(+), 6 deletions(-) - create mode 100644 test/bug1633.cpp - -diff --git a/include/std/detail/associated_types.hpp b/include/std/detail/associated_types.hpp -index b642166d4..449a3f91c 100644 ---- a/include/std/detail/associated_types.hpp -+++ b/include/std/detail/associated_types.hpp -@@ -265,11 +265,22 @@ namespace ranges - template - char is_std_iterator_traits_specialized_impl_(void *); - #elif defined(_LIBCPP_VERSION) -- template -- char ( -- &is_std_iterator_traits_specialized_impl_(std::__iterator_traits *))[2]; -+ // In older versions of libc++, the base template inherits from std::__iterator_traits. -+ template class IteratorTraitsBase, typename I, bool B> -+ char (&libcpp_iterator_traits_base_impl(IteratorTraitsBase *))[2]; -+ template class IteratorTraitsBase, typename I> -+ char libcpp_iterator_traits_base_impl(void *); -+ -+ // In newer versions, the base template has only one template parameter and provides the -+ // __primary_template typedef which aliases the iterator_traits specialization. -+ template class, typename I> -+ char (&libcpp_iterator_traits_base_impl(typename std::iterator_traits::__primary_template *))[2]; -+ template class, typename I> -+ char libcpp_iterator_traits_base_impl(void *); -+ - template -- char is_std_iterator_traits_specialized_impl_(void *); -+ auto is_std_iterator_traits_specialized_impl_(std::iterator_traits* traits) -+ -> decltype(libcpp_iterator_traits_base_impl(traits)); - #elif defined(_MSVC_STL_VERSION) - template - char (&is_std_iterator_traits_specialized_impl_( -@@ -287,14 +298,13 @@ namespace ranges - RANGES_INLINE_VAR constexpr bool is_std_iterator_traits_specialized_v = - 1 == sizeof(is_std_iterator_traits_specialized_impl_( - static_cast *>(nullptr))); -- -+#endif - // The standard iterator_traits specialization(s) do not count - // as user-specialized. This will no longer be necessary in C++20. - // This helps with `T volatile*` and `void *`. - template - RANGES_INLINE_VAR constexpr bool is_std_iterator_traits_specialized_v = - false; --#endif - } // namespace detail - /// \endcond - } // namespace ranges -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 889f314af..2c2b7c09c 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -19,3 +19,4 @@ rv3_add_test(test.bug474 bug474 bug474.cpp) - rv3_add_test(test.bug566 bug566 bug566.cpp) - rv3_add_test(test.bug1322 bug1322 bug1322.cpp) - rv3_add_test(test.bug1335 bug1335 bug1335.cpp) -+rv3_add_test(test.bug1633 bug1633 bug1633.cpp) -diff --git a/test/bug1633.cpp b/test/bug1633.cpp -new file mode 100644 -index 000000000..be52420ad ---- /dev/null -+++ b/test/bug1633.cpp -@@ -0,0 +1,34 @@ -+// Range v3 library -+// -+// Use, modification and distribution is subject to the -+// Boost Software License, Version 1.0. (See accompanying -+// file LICENSE_1_0.txt or copy at -+// http://www.boost.org/LICENSE_1_0.txt) -+// -+// Project home: https://github.com/ericniebler/range-v3 -+ -+#include -+#include -+#include -+ -+struct X { }; -+ -+namespace std { -+ template<> struct iterator_traits { }; -+} -+ -+struct Y { -+ using difference_type = std::ptrdiff_t; -+ using value_type = int; -+ using pointer = int*; -+ using reference = int&; -+ using iterator_category = std::forward_iterator_tag; -+}; -+ -+static_assert(ranges::detail::is_std_iterator_traits_specialized_v, ""); -+static_assert(!ranges::detail::is_std_iterator_traits_specialized_v, ""); -+static_assert(!ranges::detail::is_std_iterator_traits_specialized_v, ""); -+ -+int main() -+{ -+}