From owner-dev-commits-ports-all@freebsd.org Mon Sep 20 10:45:22 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A95F267C4E5; Mon, 20 Sep 2021 10:45:22 +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 4HCh6B2vYYz4nsG; Mon, 20 Sep 2021 10:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4445372F3; Mon, 20 Sep 2021 10:45:22 +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 18KAjMD9047889; Mon, 20 Sep 2021 10:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18KAjM18047888; Mon, 20 Sep 2021 10:45:22 GMT (envelope-from git) Date: Mon, 20 Sep 2021 10:45:22 GMT Message-Id: <202109201045.18KAjM18047888@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Pietro Cerutti Subject: git: 3b74b3446c06 - main - math/libtommath: enable mp_set_double MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gahr X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b74b3446c069a4e2d88e23021c83434ea53728c Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2021 10:45:22 -0000 The branch main has been updated by gahr: URL: https://cgit.FreeBSD.org/ports/commit/?id=3b74b3446c069a4e2d88e23021c83434ea53728c commit 3b74b3446c069a4e2d88e23021c83434ea53728c Author: Pietro Cerutti AuthorDate: 2021-09-20 10:14:39 +0000 Commit: Pietro Cerutti CommitDate: 2021-09-20 10:45:19 +0000 math/libtommath: enable mp_set_double Reported by: Sébastien Santoro Obtained from: https://github.com/libtom/libtommath/pull/476 --- math/libtommath/Makefile | 2 +- math/libtommath/files/patch-c1cf80 | 57 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/math/libtommath/Makefile b/math/libtommath/Makefile index 2886d7f16922..1fafd2c6243c 100644 --- a/math/libtommath/Makefile +++ b/math/libtommath/Makefile @@ -1,6 +1,6 @@ PORTNAME= libtommath DISTVERSION= 1.2.0 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= https://github.com/libtom/libtommath/releases/download/v${DISTVERSION}/ DISTNAME= ltm-${DISTVERSION} diff --git a/math/libtommath/files/patch-c1cf80 b/math/libtommath/files/patch-c1cf80 new file mode 100644 index 000000000000..a6137942d9f0 --- /dev/null +++ b/math/libtommath/files/patch-c1cf80 @@ -0,0 +1,57 @@ +From c1cf80738219dbd70cba0c0c1244698aad842ec7 Mon Sep 17 00:00:00 2001 +From: Steffen Jaeckel +Date: Thu, 5 Mar 2020 13:57:07 +0100 +Subject: [PATCH] introduce MP_HAS_SET_DOUBLE + +--- + demo/test.c | 4 ++-- + mp_set_double.c | 2 +- + tommath_private.h | 7 +++++++ + 3 files changed, 10 insertions(+), 3 deletions(-) + +--- demo/test.c.orig 2019-10-22 09:44:44.000000000 +0000 ++++ demo/test.c 2021-09-20 10:02:00.103699000 +0000 +@@ -625,7 +625,7 @@ + + } + +-#if defined(__STDC_IEC_559__) || defined(__GCC_IEC_559) ++#if defined(MP_HAS_SET_DOUBLE) + static int test_mp_set_double(void) + { + int i; +@@ -2461,7 +2461,7 @@ + T1(mp_read_write_sbin, MP_TO_SBIN), + T1(mp_reduce_2k, MP_REDUCE_2K), + T1(mp_reduce_2k_l, MP_REDUCE_2K_L), +-#if defined(__STDC_IEC_559__) || defined(__GCC_IEC_559) ++#if defined(MP_HAS_SET_DOUBLE) + T1(mp_set_double, MP_SET_DOUBLE), + #endif + T1(mp_signed_rsh, MP_SIGNED_RSH), +--- bn_mp_set_double.c.orig 2019-10-22 09:44:44.000000000 +0000 ++++ bn_mp_set_double.c 2021-09-20 10:05:36.466235000 +0000 +@@ -3,7 +3,7 @@ + /* LibTomMath, multiple-precision integer library -- Tom St Denis */ + /* SPDX-License-Identifier: Unlicense */ + +-#if defined(__STDC_IEC_559__) || defined(__GCC_IEC_559) ++#if defined(MP_HAS_SET_DOUBLE) + mp_err mp_set_double(mp_int *a, double b) + { + uint64_t frac; +--- tommath_private.h.orig ++++ tommath_private.h +@@ -164,6 +164,13 @@ MP_STATIC_ASSERT(prec_geq_min_prec, MP_DEFAULT_DIGIT_COUNT >= MP_MIN_DIGIT_COUNT + */ + #define MP_MAX_DIGIT_COUNT ((INT_MAX - 2) / MP_DIGIT_BIT) + ++#if defined(__STDC_IEC_559__) || defined(__GCC_IEC_559) \ ++ || defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) \ ++ || defined(__i386__) || defined(_M_X86) \ ++ || defined(__aarch64__) || defined(__arm__) ++#define MP_HAS_SET_DOUBLE ++#endif ++ + /* random number source */ + extern MP_PRIVATE mp_err(*s_mp_rand_source)(void *out, size_t size);