diff options
-rw-r--r-- | net-misc/xmrig/Manifest | 1 | ||||
-rw-r--r-- | net-misc/xmrig/xmrig-6.19.1.ebuild | 66 |
2 files changed, 67 insertions, 0 deletions
diff --git a/net-misc/xmrig/Manifest b/net-misc/xmrig/Manifest index 66829e55c39f..2363c78cb435 100644 --- a/net-misc/xmrig/Manifest +++ b/net-misc/xmrig/Manifest @@ -1,2 +1,3 @@ DIST xmrig-6.18.1.tar.gz 2394259 BLAKE2B 4d7ed3ce7b6c9dce9b25da7c316df4542046b014167ce090c5c2ec4dbf61607e4238ce8a8407a396f1eb47dc76cbfac08e0131835d9c4bbff8f4e5920d2f19a6 SHA512 bb297b17f820ad38f0c68aebfe1be8e82e85aede99a9e2a7692935ed57dab06a36566d13c16f850123dc6e829dfb56bc9253c46b94e6a703fe169a0126feb37b DIST xmrig-6.19.0.tar.gz 2409845 BLAKE2B 4798b40555b2ea57a76fedfc0a86dd27f035389b9709d71205c10a2da92e6738243c76d5b67ecefe3d66c597859db9191ff90893e50f8f89194c5c6454d3c02b SHA512 7dadab1c30dc76349148ab62968c999fdc01ac92e184c81b8693e90829aaff3d8be147996aae36efebb2d767f792cda30f365226942758620f6bfce3531b3f97 +DIST xmrig-6.19.1.tar.gz 2410643 BLAKE2B c3cf133826b5e6aa1c4b95cd149d654464fba92b6de27b74afa47089944256a642cb9b6cc33b4f988b0c0fdbd96e2f9c9d16c44a7afb99b88fd8f0f8335ab09f SHA512 2089ab48a44de0032f4db39a6668b1cd70f0dfbb14d1bda0d351bb2b4c39a0efdd993825ed896f0250cfac70e63cf88be3bcfd989b784712401bae99487aa4bf diff --git a/net-misc/xmrig/xmrig-6.19.1.ebuild b/net-misc/xmrig/xmrig-6.19.1.ebuild new file mode 100644 index 000000000000..7a4ceae89308 --- /dev/null +++ b/net-misc/xmrig/xmrig-6.19.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd + +DESCRIPTION="RandomX, CryptoNight, KawPow, AstroBWT, and Argon2 CPU/GPU miner" +HOMEPAGE="https://xmrig.com https://github.com/xmrig/xmrig" + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/xmrig/xmrig/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64" +fi + +LICENSE="Apache-2.0 GPL-3+ MIT" +SLOT="0" +IUSE="cpu_flags_x86_sse4_1 donate hwloc opencl +ssl" + +DEPEND=" + dev-libs/libuv:= + hwloc? ( >=sys-apps/hwloc-2.5.0:= ) + opencl? ( virtual/opencl ) + ssl? ( dev-libs/openssl:= ) +" +RDEPEND=" + ${DEPEND} + !arm64? ( sys-apps/msr-tools ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-6.12.2-nonotls.patch + "${FILESDIR}"/${PN}-6.18.1-gcc-13.patch +) + +src_prepare() { + if ! use donate ; then + sed -i 's/1;/0;/g' src/donate.h || die + fi + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DWITH_SSE4_1=$(usex cpu_flags_x86_sse4_1) + -DWITH_HWLOC=$(usex hwloc) + -DWITH_TLS=$(usex ssl) + -DWITH_OPENCL=$(usex opencl) + -DWITH_CUDA=OFF + ) + + cmake_src_configure +} + +src_install() { + default + keepdir /etc/xmrig + systemd_dounit "${FILESDIR}"/xmrig.service + dobin "${BUILD_DIR}/xmrig" + dobin "${S}/scripts/enable_1gb_pages.sh" + dobin "${S}/scripts/randomx_boost.sh" +} |