Date: Fri, 27 Oct 2023 06:34:06 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: 7e25442cf735 - main - devel/quickcpplib: fix on 32 bit platforms Message-ID: <202310270634.39R6Y6vC089803@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=7e25442cf7355486041ebb30c77a7c815aa3e701 commit 7e25442cf7355486041ebb30c77a7c815aa3e701 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-10-24 05:10:22 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-10-27 06:32:58 +0000 devel/quickcpplib: fix on 32 bit platforms 128 bit integers are only supported on 64 bit platforms. Test for them using the correct feature test macro to enable the port there. Approved by: portmgr (build fix blanket) MFH: 2023Q4 See also: https://github.com/ned14/quickcpplib/issues/50 --- devel/quickcpplib/Makefile | 3 +- .../files/patch-include_quickcpplib_uint128.hpp | 65 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/devel/quickcpplib/Makefile b/devel/quickcpplib/Makefile index d729a65f7ea2..be416b9a4fdd 100644 --- a/devel/quickcpplib/Makefile +++ b/devel/quickcpplib/Makefile @@ -1,5 +1,6 @@ PORTNAME= quickcpplib DISTVERSION= g20230614 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org @@ -9,8 +10,6 @@ WWW= https://github.com/ned14/quickcpplib LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/Licence.txt -BROKEN_i386= complation fails: __int128 is not supported on this target - USES= cmake:testing USE_GITHUB= yes diff --git a/devel/quickcpplib/files/patch-include_quickcpplib_uint128.hpp b/devel/quickcpplib/files/patch-include_quickcpplib_uint128.hpp new file mode 100644 index 000000000000..42004d9b622d --- /dev/null +++ b/devel/quickcpplib/files/patch-include_quickcpplib_uint128.hpp @@ -0,0 +1,65 @@ +--- include/quickcpplib/uint128.hpp.orig 2023-10-24 05:06:15 UTC ++++ include/quickcpplib/uint128.hpp +@@ -53,7 +53,7 @@ namespace integers128 + #if defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) + __m128i as_m128i; + #endif +-#if defined(__GNUC__) || defined(__clang__) ++#if defined(__SIZEOF_INT128__) + unsigned __int128 as_uint128; + #endif + //! Default constructor, no bits set +@@ -100,7 +100,7 @@ namespace integers128 + } + uint128 operator+=(const uint128 &v) noexcept + { +-#if defined(__GNUC__) || defined(__clang__) ++#if defined(__SIZEOF_INT128__) + as_uint128 += v.as_uint128; + return *this; + #endif +@@ -118,7 +118,7 @@ namespace integers128 + } + uint128 operator-=(const uint128 &v) noexcept + { +-#if defined(__GNUC__) || defined(__clang__) ++#if defined(__SIZEOF_INT128__) + as_uint128 -= v.as_uint128; + return *this; + #endif +@@ -146,7 +146,7 @@ namespace integers128 + { + if(!b) + throw std::domain_error("divide by zero"); +-#if defined(__GNUC__) || defined(__clang__) ++#if defined(__SIZEOF_INT128__) + as_uint128 %= b.as_uint128; + return *this; + #endif +@@ -169,7 +169,7 @@ namespace integers128 + { + if(!b) + throw std::domain_error("divide by zero"); +-#if defined(__GNUC__) || defined(__clang__) ++#if defined(__SIZEOF_INT128__) + as_uint128 %= b; + return *this; + #endif +@@ -215,7 +215,7 @@ namespace integers128 + } + uint128 operator<<=(uint8_t v) noexcept + { +-#if defined(__GNUC__) || defined(__clang__) ++#if defined(__SIZEOF_INT128__) + as_uint128 <<= v; + return *this; + #endif +@@ -232,7 +232,7 @@ namespace integers128 + } + uint128 operator>>=(uint8_t v) noexcept + { +-#if defined(__GNUC__) || defined(__clang__) ++#if defined(__SIZEOF_INT128__) + as_uint128 >>= v; + return *this; + #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310270634.39R6Y6vC089803>