From nobody Sun Dec 18 17:43:52 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NZqvX4YsWz1Gm81; Sun, 18 Dec 2022 17:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NZqvX3qS2z4JQg; Sun, 18 Dec 2022 17:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671385432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KZ3KKCcb9e0Wo00i4BsB8BLwEUNdf8xkpebrm2WVFRw=; b=OCCSTcOvzbGev8rlsYs1wX0fM5pt3+G0XnWPyTlp6WQWt7a4Pbp1aorMgyr2swcfYhldQr wdPKT38EUCJiEydMRXok7UnrszX1DVgJ0x1OZUD3TcH0Uq3pn1ei3Jrhf2U+avLLFHmXpK 0APx4/UcVI5yGBqlpelPGqRYYKpCeWZIQJ5MCtSzQ7zR5fLHtZ08Q5osCWk05eheeURr6l dCpERmPfTavccG67qDzY74tCncdbZtN6aJp1/24wvUcZBntD4jqiKjz2TclzU6LZOOqELY v4K3N9ugWtyiz6cOyUnmBKDU41idj5Rs/SfsaPyAXpNFCp5xvgFiN0jseerY6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671385432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KZ3KKCcb9e0Wo00i4BsB8BLwEUNdf8xkpebrm2WVFRw=; b=k9wZlakaXNRN7GDGNj0qIneqqruYq2dI1aS9YltG2ksMbk9L/5rNCnStaZy5VxnnugKI6+ WvqIFa3EvJn55go8khwO1ezu02wrj8Qt2vfAtmWpnm/tjlLzqggqYFf3EGalplGG366dvK NdfFOAC/usCUZPVkGT9fexfOUFNvAhs999LyZRbdL99p5dVlxRo/EixGuGXoPJC98LIoGq ODz6CLrDarMQRTa7tZUZU0xFNpOnV+M1ommhVs6Z23Rlalq9zREsQ4AuMlUA4fliXpwRUl l/ZO2IbPTxxmh9U3PFUrnkte4AHvsZUpTBnoQVBYsxLc2RBdUkn6/Ny3axDC2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671385432; a=rsa-sha256; cv=none; b=HFYm5JIQn+g+/kOBc3M1Nl9HoXwME1RwrLjXQovDIH0qczjoup0PIU8zYxJTFeq30hwigW WJKYRt3wRNLgj3kiaZdXz+HJyXoC05J2iKT+qU67w5uqe+z3SL4BVDIBL3rFZTLLjDgZmf FZNn64rqIxlVwlfNN416KYgj0Ek4PJuFhFBQM/57HFaQC1hXbW7kQWaeoqDfPnzBv3SyEE YIaQF5gdtzu37L380qZFQqTpYeKPd+c3B0BsWPYezhTVGCykcNQyziQSC8NI9qre3wOODE 9ThnCi7StZin3D3jn1dtG4UtNvqhTpi/Ip1A/7gxgsCzH0tp215/hB22tycnHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NZqvX2b7dzPfj; Sun, 18 Dec 2022 17:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BIHhq5w006495; Sun, 18 Dec 2022 17:43:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BIHhqCY006494; Sun, 18 Dec 2022 17:43:52 GMT (envelope-from git) Date: Sun, 18 Dec 2022 17:43:52 GMT Message-Id: <202212181743.2BIHhqCY006494@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 2db1448ebd06 - main - math/R-cran-isoband: fix build with clang/libc++ 15 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2db1448ebd06a798d05b71de18e2718eac691f28 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=2db1448ebd06a798d05b71de18e2718eac691f28 commit 2db1448ebd06a798d05b71de18e2718eac691f28 Author: Dimitry Andric AuthorDate: 2022-12-12 17:34:48 +0000 Commit: Dimitry Andric CommitDate: 2022-12-18 17:34:51 +0000 math/R-cran-isoband: fix build with clang/libc++ 15 During an exp-run for llvm 15 (see bug 265425), it turned out that math/R-cran-isoband failed to build with clang and libc++ 15: In file included from test-runner.cpp:8: In file included from testthat/testthat.h:65: In file included from testthat/vendor/catch.h:377: In file included from /usr/include/c++/v1/sstream:186: In file included from /usr/include/c++/v1/istream:165: In file included from /usr/include/c++/v1/ostream:168: In file included from /usr/include/c++/v1/bitset:128: In file included from /usr/include/c++/v1/string:551: In file included from /usr/include/c++/v1/string_view:222: In file included from /usr/include/c++/v1/algorithm:1851: In file included from /usr/include/c++/v1/__algorithm/ranges_sample.h:13: In file included from /usr/include/c++/v1/__algorithm/sample.h:18: /usr/include/c++/v1/__random/uniform_int_distribution.h:235:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng::value': static_assert(__libcpp_random_is_valid_urng<_URNG>::value, ""); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/v1/__algorithm/shuffle.h:154:35: note: in instantiation of function template specialization 'std::uniform_int_distribution<>::operator()' requested here difference_type __i = __uid(__g, _Pp(0, __d)); ^ /usr/include/c++/v1/__algorithm/shuffle.h:166:14: note: in instantiation of function template specialization 'std::__shuffle, std::__wrap_iter, Catch::RandomNumberGenerator &>' requested here (void)std::__shuffle<_ClassicAlgPolicy>( ^ testthat/vendor/catch.h:7189:18: note: in instantiation of function template specialization 'std::shuffle, Catch::RandomNumberGenerator &>' requested here std::shuffle( vector.begin(), vector.end(), rng ); ^ testthat/vendor/catch.h:7207:44: note: in instantiation of function template specialization 'Catch::RandomNumberGenerator::shuffle>' requested here RandomNumberGenerator::shuffle( sorted ); ^ This was fixed in https://github.com/r-lib/testthat/commit/81dfbed7 by upstream. PR: 268337 Approved by: portmgr (tcberner) MFH: 2022Q4 --- math/R-cran-isoband/files/patch-commit-81dfbed7 | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/math/R-cran-isoband/files/patch-commit-81dfbed7 b/math/R-cran-isoband/files/patch-commit-81dfbed7 new file mode 100644 index 000000000000..84871ffb9554 --- /dev/null +++ b/math/R-cran-isoband/files/patch-commit-81dfbed7 @@ -0,0 +1,48 @@ +commit 81dfbed7428a526acf7c97937902fc36d7eaeb21 +Author: Kevin Ushey +Date: Wed Sep 21 15:50:44 2022 -0700 + + Use compatible RNG with shuffle (#1688) + + Fixes #1687 + +diff --git src/testthat/vendor/catch.h src/testthat/vendor/catch.h +index e8a10b07..83818641 100644 +--- src/testthat/vendor/catch.h ++++ src/testthat/vendor/catch.h +@@ -7165,27 +7165,23 @@ namespace Catch { + // #included from: catch_test_case_registry_impl.hpp + #define TWOBLUECUBES_CATCH_TEST_CASE_REGISTRY_IMPL_HPP_INCLUDED + +-#include ++#include + #include + #include +-#include ++#include ++ ++#ifdef CATCH_CONFIG_CPP11_SHUFFLE ++#include ++#endif + + namespace Catch { + + struct RandomNumberGenerator { +- typedef std::ptrdiff_t result_type; +- +- result_type operator()( result_type n ) const { return rand() % n; } +- +-#ifdef CATCH_CONFIG_CPP11_SHUFFLE +- static constexpr result_type min() { return 0; } +- static constexpr result_type max() { return 1000000; } +- result_type operator()() const { return rand() % max(); } +-#endif + template + static void shuffle( V& vector ) { +- RandomNumberGenerator rng; + #ifdef CATCH_CONFIG_CPP11_SHUFFLE ++ std::random_device device; ++ std::mt19937 rng( device() ); + std::shuffle( vector.begin(), vector.end(), rng ); + #else + random_shuffle( vector.begin(), vector.end(), rng );