commit:     8ff9a7f1fde36a9b7cd0b887e0961bb8abcab8ff
Author:     tea <tea+gentoo <AT> cuddleslut <DOT> fr>
AuthorDate: Sat Dec 27 10:31:25 2025 +0000
Commit:     Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
CommitDate: Sat Dec 27 10:31:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8ff9a7f1

net-p2p/p2pool: add 4.13

Signed-off-by: tea <tea+gentoo <AT> cuddleslut.fr>

 net-p2p/p2pool/Manifest           |   2 +
 net-p2p/p2pool/p2pool-4.13.ebuild | 107 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)

diff --git a/net-p2p/p2pool/Manifest b/net-p2p/p2pool/Manifest
index 4527c1e910..fbb958f11c 100644
--- a/net-p2p/p2pool/Manifest
+++ b/net-p2p/p2pool/Manifest
@@ -1,3 +1,5 @@
+DIST p2pool-4.13.tar.xz 125016432 BLAKE2B 
5261c6978aebe3e521aabcb97fdf445e06155aff334cac4744ed4cfc076bcf9ee764d4f6b4f5161e40db04ee14c30c2ec00dd32a3ae8a730bc9fb949ddf21444
 SHA512 
2dbe77c862e9a0e33a77fdf925011ba7bffb615ca477da828ae7bcba5f1c691064200e01522a9b9d57e841cb0a29474000656f236ac7489b38e7ff17a7aca4b7
+DIST p2pool-4.13_shasums.asc 2167 BLAKE2B 
e28695dec22e2118910fb888f2dc1f7e19fe9b53201bf4530f272cbca2e200d718dc9b30d5013dd8f9c17866ae4462d780bd372d46a5c73af0cc39c115e4dc59
 SHA512 
a39907166ffc477f943789795fe9aa5a3918912ae3d2bcd0dc5ac976971954059e0126361a0158612383d966ba0e19bee1131df9149bf6b1b6b4bab70825cdd6
 DIST p2pool-4.5.tar.xz 116891264 BLAKE2B 
70c878f17e679b152213aec26404bee66534c4261d37408af9d9f14b4a4c87c75640560e506246c04b877c792b01ab2c9383d6d9950fcb80615691dd284772f4
 SHA512 
5fa82d375fb68edfbeaf7b8c4d85df159c861cda8266fdb6541db40972ea4bed776a7e10eb3447c78218e9658a855a09908c1f02fc59703c4e05bafe2c243cbc
 DIST p2pool-4.5_shasums.asc 2007 BLAKE2B 
0fb2d4594a016bf5dae48c6c4fb549c0957bb80fac27b0053ddb098884c9ba90ba5f25e1e62b745ece64d561658aab4147c5fba872b2483bf27b8707ccac3ab7
 SHA512 
e8af1df9364065bfffc49cc46e278500719a5a431d76cf6124d047724fefda4ca0a52810c8a6f60c085074957b7f96235fb09b4658963a7d25b5e2fa6df4ddd1
 DIST p2pool-4.8.tar.xz 116005828 BLAKE2B 
19043dceb8ea47f22e51ee663959ee6d62a4dcef492c82bb3126c8e9f4093e953669807682e6f4baa24049a8bd24304ee019156dc8bbea01e5ea1375a6bbefa1
 SHA512 
e2c36b202316371d01a0e28cccbf2c46ce228e86cb1a15d756b6d28bf28aa63aee2bd3fa9c8096dac6f94cc595bf7316fa16be88404d679474a16eae12c03143

diff --git a/net-p2p/p2pool/p2pool-4.13.ebuild 
b/net-p2p/p2pool/p2pool-4.13.ebuild
new file mode 100644
index 0000000000..23dea2c3cc
--- /dev/null
+++ b/net-p2p/p2pool/p2pool-4.13.ebuild
@@ -0,0 +1,107 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+#TODO: enable/fix GRPC/TLS dependency and add it as USE flag 
(https://github.com/SChernykh/p2pool/issues/313)
+#      These features build fine in cmake outside of portage, I can't figure 
out how to link them here for the life of me.
+#      It's probably better to just re-write the CMakeLists.txt to 
dynamicially link with gRPC
+
+EAPI=8
+
+inherit cmake verify-sig
+
+DESCRIPTION="Decentralized pool for Monero mining"
+HOMEPAGE="https://p2pool.io";
+SRC_URI="
+       
https://github.com/SChernykh/p2pool/releases/download/v${PV}/p2pool_source-v${PV}.tar.xz
 -> ${P}.tar.xz
+       verify-sig? ( 
https://github.com/SChernykh/p2pool/releases/download/v${PV}/sha256sums.txt.asc 
-> ${P}_shasums.asc )
+"
+
+LICENSE="BSD GPL-3+ ISC LGPL-3+ MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+#IUSE="grpc tls"
+IUSE="daemon"
+
+DEPEND="
+       dev-libs/libsodium:=
+       dev-libs/libuv:=
+       dev-libs/randomx
+       net-libs/zeromq:=
+       net-misc/curl
+       daemon? (
+               acct-group/monero
+               acct-user/monero
+       )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+       dev-util/patchelf
+       verify-sig? ( sec-keys/openpgp-keys-schernykh )
+"
+
+src_unpack() {
+       if use verify-sig; then
+               local 
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/SChernykh.asc
+               pushd "${DISTDIR}" > /dev/null || die
+               verify-sig_verify_message ${P}_shasums.asc - | \
+                       tr \\r \\n | \
+                       tr '[:upper:]' '[:lower:]' | \
+                       sed -n '/p2pool_source/,$p' | \
+                       grep -m 1 sha256: | \
+                       sed "s/sha256: \(.*\)/\1 ${P}.tar.xz/" | \
+                       verify-sig_verify_unsigned_checksums - sha256 
${P}.tar.xz
+               assert
+               popd || die
+       fi
+       unpack ${P}.tar.xz
+       mv -T "${WORKDIR}"/{${PN},${P}} || die
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DSTATIC_BINARY=OFF
+               -DSTATIC_LIBS=OFF
+               -DWITH_GRPC=OFF #$(usex grpc)
+               -DWITH_TLS=OFF #$(usex tls)
+       )
+       cmake_src_configure
+}
+
+src_install(){
+       # remove insecure RUNPATHs
+       patchelf --remove-rpath "${BUILD_DIR}"/p2pool || die
+       dobin "${BUILD_DIR}"/p2pool
+
+       if use daemon; then
+               # data-dir
+               keepdir /var/lib/${PN}
+               fowners monero:monero /var/lib/${PN}
+               fperms 0755 /var/lib/${PN}
+
+               # OpenRC
+               newconfd "${FILESDIR}"/${PN}-4.5-r1.confd ${PN}
+               newinitd "${FILESDIR}"/${PN}-4.5-r1.initd ${PN}
+       fi
+}
+
+pkg_postinst() {
+       #Some important wisdom taken from P2Pool documentation
+       ewarn "P2Pool for Monero is now installed."
+       ewarn "You can run it by doing 'p2pool --host 127.0.0.1 --wallet 
YOUR_PRIMARY_ADDRESS'"
+       ewarn "Where 127.0.0.1 is the address of a local monero node (e.g. 
monerod)"
+       ewarn
+       ewarn "Once configured, point your RandomX miner (e.g. XMRig) at p2pool"
+       ewarn "For example 'xmrig -o 127.0.0.1:3333'"
+       ewarn
+       ewarn "You MUST use your primary address when using p2pool, just like 
solo mining."
+       ewarn "If you want privacy, create a new mainnet wallet for P2Pool 
mining."
+       ewarn
+       ewarn "Rewards will not be visible unless you use a wallet that 
supports P2Pool."
+       ewarn "See https://p2pool.io/#help and 
https://github.com/SChernykh/p2pool for more information."
+
+       if use daemon; then
+               einfo "p2pool supports just OpenRC daemon right now."
+               einfo "To launch it set your wallet address in 
/etc/conf.d/${PN} and run"
+               einfo "  # rc-service p2pool start"
+       fi
+}

Reply via email to