xmrig-mo-6.5.1.ebuild (1598B)
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 MO_PV="mo1" 9 DESCRIPTION="RandomX, CryptoNight, KawPow, AstroBWT and Argon2 miner for the MoneroOcean pool" 10 HOMEPAGE="https://xmrig.com https://moneroocean.stream/ https://github.com/MoneroOcean/xmrig" 11 SRC_URI="https://github.com/MoneroOcean/xmrig/archive/v${PV}-${MO_PV}.tar.gz -> ${P}.tar.gz" 12 13 LICENSE="GPL-3+" 14 SLOT="0" 15 KEYWORDS="~amd64" 16 IUSE="donate libressl +ssl" 17 REQUIRED_USE="libressl? ( ssl )" 18 19 DEPEND=" 20 dev-libs/libuv:= 21 sys-apps/hwloc:= 22 ssl? ( 23 !libressl? ( dev-libs/openssl:= ) 24 libressl? ( dev-libs/libressl:= ) 25 )" 26 27 S="${WORKDIR}/xmrig-${PV}-${MO_PV}" 28 29 PATCHES=("${FILESDIR}/${PN}-nonotls.patch") 30 31 src_prepare() { 32 use donate || PATCHES+=("${FILESDIR}/${PN}-no-default-donate.patch") 33 cmake_src_prepare 34 } 35 36 src_configure() { 37 local mycmakeargs=( 38 # TODO: Create expanded USE flag for all of the PoW algos. 39 40 -DWITH_TLS=$(usex ssl) 41 42 # TODO: opencl USE flag. 43 -DWITH_OPENCL=OFF 44 45 # TODO: cuda USE flag. 46 -DWITH_CUDA=OFF 47 ) 48 49 cmake_src_configure 50 } 51 52 src_install() { 53 newbin "${BUILD_DIR}/xmrig" "xmrig-mo" 54 } 55 56 pkg_postinst() { 57 einfo "Install sys-apps/msr-tools and load the msr kernel module so that" 58 einfo "XMRig can perform CPU specific tweaks like disabling the instruction" 59 einfo "prefetcher. Also remember to increase the vm.nr_hugepages sysctl" 60 einfo "value so that XMRig can allocate with huge pages." 61 einfo "" 62 einfo "XMRig-MoneroOcean has been installed as /usr/bin/xmrig-mo" 63 einfo "in order to differentiate between the original XMRig" 64 }