diff --git a/net-p2p/xmrig/Makefile b/net-p2p/xmrig/Makefile index 4867f6c7b049..330693d4674d 100644 --- a/net-p2p/xmrig/Makefile +++ b/net-p2p/xmrig/Makefile @@ -1,49 +1,47 @@ PORTNAME= xmrig PORTVERSION= 6.19.0 DISTVERSIONPREFIX= v CATEGORIES= net-p2p MAINTAINER= ehaupt@FreeBSD.org COMMENT= High performance Monero (XMR) CPU miner WWW= https://github.com/xmrig/xmrig LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_powerpc64= fails to compile: g++9: error: unrecognized command line option '-maes'; did you mean '-mads'? BROKEN_riscv64= fails to compile: /nxb-bin/usr/lib/clang/11.0.0/include/cpuid.h:11:2: error: this header is for x86 only -# See: https://github.com/xmrig/xmrig/issues/3212 -BROKEN_FreeBSD_14_i386= fails to compile with llvm15 on i386 USES= cmake compiler:c++11-lang ssl USE_GITHUB= yes USE_RC_SUBR= ${PORTNAME} SUB_FILES= pkg-message SUB_LIST= PORTNAME=${PORTNAME} \ USERS=${USERS} USERS= xmrig OPTIONS_DEFINE= HWLOC MICROHTTPD STATIC OPTIONS_DEFAULT= HWLOC MICROHTTPD HWLOC_DESC= Portable hardware locality MICROHTTPD_DESC= Build with libmicrohttpd support HWLOC_LIB_DEPENDS+= libhwloc.so.15:devel/hwloc2 HWLOC_CMAKE_OFF= -DWITH_HWLOC=OFF MICROHTTPD_LIB_DEPENDS+= libmicrohttpd.so:www/libmicrohttpd \ libuv.so:devel/libuv MICROHTTPD_CMAKE_OFF= -DWITH_HTTPD=OFF STATIC_PREVENTS= HWLOC MICROHTTPD STATIC_PREVENTS_MSG= hwloc and libmicrohttpd support cannot be built static STATIC_BUILD_DEPENDS+= ${LOCALBASE}/lib/libuv.a:devel/libuv STATIC_CMAKE_ON= -DBUILD_STATIC=ON do-install: ${INSTALL_PROGRAM} ${WRKDIR}/.build/${PORTNAME} ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/src/config.json ${STAGEDIR}${ETCDIR}/config.json.sample .include diff --git a/net-p2p/xmrig/files/patch-src_crypto_cn_CryptoNight__x86.h b/net-p2p/xmrig/files/patch-src_crypto_cn_CryptoNight__x86.h new file mode 100644 index 000000000000..97b199971b98 --- /dev/null +++ b/net-p2p/xmrig/files/patch-src_crypto_cn_CryptoNight__x86.h @@ -0,0 +1,11 @@ +--- src/crypto/cn/CryptoNight_x86.h.orig 2023-02-02 04:51:11 UTC ++++ src/crypto/cn/CryptoNight_x86.h +@@ -80,7 +80,7 @@ static inline void do_skein_hash(const uint8_t *input, + void (* const extra_hashes[4])(const uint8_t *, size_t, uint8_t *) = {do_blake_hash, do_groestl_hash, do_jh_hash, do_skein_hash}; + + +-#if defined(__i386__) || defined(_M_IX86) ++#if (defined(__i386__) || defined(_M_IX86)) && !(defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 15)) + static inline int64_t _mm_cvtsi128_si64(__m128i a) + { + return ((uint64_t)(uint32_t)_mm_cvtsi128_si32(a) | ((uint64_t)(uint32_t)_mm_cvtsi128_si32(_mm_srli_si128(a, 4)) << 32));