xmrig-6.5.0.ebuild (1300B)
1 # Copyright 1999-2021 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=7 5 6 inherit cmake 7 8 DESCRIPTION="RandomX, CryptoNight, KawPow, AstroBWT, and Argon2 CPU/GPU miner" 9 HOMEPAGE="https://xmrig.com https://github.com/xmrig/xmrig" 10 SRC_URI="https://github.com/xmrig/xmrig/archive/v${PV}.tar.gz -> ${P}.tar.gz" 11 12 LICENSE="GPL-3+" 13 SLOT="0" 14 KEYWORDS="~amd64" 15 IUSE="donate libressl ssl" 16 17 DEPEND=" 18 dev-libs/libuv:= 19 sys-apps/hwloc:= 20 ssl? ( 21 !libressl? ( dev-libs/openssl:= ) 22 libressl? ( dev-libs/libressl:= ) 23 )" 24 25 PATCHES=("${FILESDIR}/${PN}-5.11.2-nonotls.patch") 26 27 src_prepare() { 28 use donate || eapply "${FILESDIR}/${PN}-6.3.3-nodonate.patch" 29 30 cmake_src_prepare 31 } 32 33 src_configure() { 34 local mycmakeargs=( 35 # TODO: Create expanded USE flag for all of the PoW algos. 36 37 -DWITH_TLS=$(usex ssl) 38 39 # TODO: opencl USE flag. 40 -DWITH_OPENCL=OFF 41 42 # TODO: cuda USE flag. 43 -DWITH_CUDA=OFF 44 ) 45 46 cmake_src_configure 47 } 48 49 src_install() { 50 dobin "${BUILD_DIR}/xmrig" 51 } 52 53 pkg_postinst() { 54 einfo "Install sys-apps/msr-tools and load the msr kernel module so that" 55 einfo "XMRig can perform CPU specific tweaks like disabling the instruction" 56 einfo "prefetcher. Also remember to increase the vm.nr_hugepages sysctl" 57 einfo "value so that XMRig can allocate with huge pages." 58 }