# Copyright 2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 CMAKE_MAKEFILE_GENERATOR="emake" inherit git-r3 cmake systemd DESCRIPTION="Decentralized pool for Monero mining" HOMEPAGE="https://github.com/SChernykh/p2pool" EGIT_REPO_URI="https://github.com/SChernykh/${PN}" EGIT_COMMIT="v${PV}" EGIT_SUBMODULES=( external/src/RandomX external/src/miniupnp external/src/robin-hood-hashing ) LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64" IUSE="lto upnp" DEPEND="net-libs/zeromq:=[sodium] net-libs/cppzmq:= dev-libs/libuv:= net-misc/curl:=" RDEPEND="${DEPEND} acct-user/p2pool acct-group/p2pool" PATCHES=( "${FILESDIR}/${PV}-build-disable-strip.patch" "${FILESDIR}/${PV}-build-randomx-static.patch" ) src_configure () { local mycmakeargs=( -DSTATIC_BINARY=OFF -DSTATIC_LIBS=OFF -DWITH_RANDOMX=ON -DDEV_TEST_SYNC=OFF -DDEV_WITH_ASAN=OFF -DDEV_WITH_MSAN=OFF -DDEV_WITH_TSAN=OFF -DDEV_WITH_UBSAN=OFF -DDEV_CLANG_TIDY=OFF -DDEV_TRACK_MEMORY=OFF -DWITH_LTO=$(usex lto) -DWITH_UPNP=$(usex upnp) ) cmake_src_configure } src_install () { dobin "${BUILD_DIR}/p2pool" insinto "/usr/share/${PN}" doins -r "${S}/docs/html" systemd_newunit "${FILESDIR}/${PN}.service" "${PN}@.service" systemd_newunit "${FILESDIR}/${PN}.socket" "${PN}@.socket" }