summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn M. Harris Jr. <johnmh@johnmh.me>2024-11-01 17:15:37 -0700
committerJohn M. Harris Jr. <johnmh@johnmh.me>2024-11-01 17:15:37 -0700
commitd01cc0a8801c1da6a0a65e27484b9de1dc9cd842 (patch)
tree568aa428d2000f99f2106394355688940bbe36f6 /net-p2p
parentmedia-sound/strawberry: treeclean (diff)
downloadjohnmh-d01cc0a8801c1da6a0a65e27484b9de1dc9cd842.tar.gz
johnmh-d01cc0a8801c1da6a0a65e27484b9de1dc9cd842.tar.bz2
johnmh-d01cc0a8801c1da6a0a65e27484b9de1dc9cd842.zip
net-p2p/p2pool: new package, add 4.2
Signed-off-by: John M. Harris Jr. <johnmh@johnmh.me>
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/p2pool/Manifest6
-rw-r--r--net-p2p/p2pool/files/SChernykh.asc52
-rw-r--r--net-p2p/p2pool/files/flags.cmake37
-rw-r--r--net-p2p/p2pool/metadata.xml11
-rw-r--r--net-p2p/p2pool/p2pool-4.2.ebuild82
5 files changed, 188 insertions, 0 deletions
diff --git a/net-p2p/p2pool/Manifest b/net-p2p/p2pool/Manifest
new file mode 100644
index 0000000..025ddbf
--- /dev/null
+++ b/net-p2p/p2pool/Manifest
@@ -0,0 +1,6 @@
+AUX SChernykh.asc 3139 BLAKE2B 97d27eea4ae8a7822acbf0b5c1470dc711d66c461a35b4d6ea7737cb173d706466e75262c97581222bbb218838070f048840274dd4dfdb400b64a7be45429855 SHA512 d7674c286dd628e0f4a3146cd2b16dab690752db89713630dd1be43febca159be18623b25cdef15273de4c8c0eb16b289203c0130ef7ac03f0371b3767bcd121
+AUX flags.cmake 1289 BLAKE2B 6ca1cf99b270d2284c46c619339b34675741d0d5ad9a5429030f67d5de22532809650ef620aa18a0840a849608e437244138b0e67bf0e6ebea0b82daf15100e2 SHA512 0c8aec7e861cbf0a6f32a3fb50ccc32aa560f54bb56df0a64f2bacb2db183765a71a4984f60188007a208c94cff4fdf6497761a2b37f063836e5d4fb122b96c6
+DIST p2pool-4.2.tar.xz 121447812 BLAKE2B 9dfb0c5b0ad343a621a58d5a6a158a4a767628281b8a8c08699c879c2b7e0b0765e353bba289922b0d3ab91ae046fed195f9f4f87c58983abacf71169af58b16 SHA512 abc5f737ac00bc5db673a15e06ed81cad307d12872ff8d85ccab985d6b82c828f488c450e35fdf818d41ad663783c41f895cd7cfe4c2b458271acb6f3b40ac2b
+DIST p2pool-4.2_shasums.asc 2007 BLAKE2B 0a401e95a592a16a8ff64a53d5a9d8b22ab79e26c6c60a567771419ba36bd3f885082086d94adac782bc1a4c23399ec278a522ba7e5ff5827f9ae2f9d0fd35fd SHA512 3e3df42ea813ace80a4657295e3fcd752762dc221b583adde38621cbae56455a75ef1b5008edd5a789357ded2df2c0b97141d02d43b56d019371bc9eca6303b1
+EBUILD p2pool-4.2.ebuild 2405 BLAKE2B 4cd0f073fc7626b9fcbb9673fbc0e64bf3d84325399da899911ff9fa936eb5709214fa6496481512f277a3f6adf38947e89fbf99911f15d0c33ad7b6d0b360f0 SHA512 1d741f7deecf9730111ba297fd85a7b648d6f07831916a6330daf7dc247e3f7ca0e8cc54591b5447cdf9dc4bfd5d92442fceb7a74c765e741d722831c3595b54
+MISC metadata.xml 333 BLAKE2B 0c027c873212fa73a268b6e43f581ba2d717b14493652cd4d4bc3d9f3ed6a71ee8637fac430809e548dba118ab7b16b72de04f11d734a6057461d4313f2697b1 SHA512 f84e0adfddeda1b93539e1de7858267abe961dde66fa3582d54a6d2fbc4a54cef3d9ebe374c807c489581d0125f960ee8bb056f3f1128750d000c0a61e5d64d1
diff --git a/net-p2p/p2pool/files/SChernykh.asc b/net-p2p/p2pool/files/SChernykh.asc
new file mode 100644
index 0000000..e6e61ce
--- /dev/null
+++ b/net-p2p/p2pool/files/SChernykh.asc
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBGBwYcABEADd2hZKkoLqx3S+HifsDrnETw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MySkELDdDNkSRUA9qZEW3dLsQOFD424l9RTjPpBSrYTsYxpe
+BRfRCejQ/PZL9VULRQsQZCbtBDrSeKQ0J2Dp5zJl6A+17lUUSv1FBLEeDt6MotAA
+2Mqm96kAEQEAAYkCNgQYAQoAIBYhBB/Kq009wzENFsvVCMR/grVNqHrfBQJgcGHA
+AhsMAAoJEMR/grVNqHrfQF0P/1udspDo+omDz9uWeWod/7shFpuX8CweI7j/4Efk
+cFTc2bQ0zAjqBLiVo67Zncrrikn4gBhQGmcj1kKXdUdFTaKwjfSk0MSA/VIo7vwh
+2iYTrEuYUvTmVoQ5SYg0ekKzwA/9BSow4NZvIL3NC06RNxbyeJ9gBhsWZfUPJ8BS
+wxTCcHQfbI9ZDkgVxI2CZf/DbBdsmqVB+VlDcq8uQj4jpRjTX+xWMRcy5WrfvH1r
+W5JpG7ULyEv5B5ocD3+Gbos0kxQzWoKqCZsu44W+0nPpwDe1CXkjrMmtoRtuNtJc
+mX1+zfjE4Xn4foOiunbpMVNFHahD1n9rk0/4sMQ79GpD1iwOBsMh6wq3gYqh+ycf
+vEOEHH7ERa9ryNWXVDeci6KLRuFI7vDxZez++4uospQ4LZW2n9hiLaj2rJHcYYEM
+x229L5SeRye0YFXX805mwtqcYxmrMitoaSreSKpnOKvF2i0gN/N0JXeHb5P3QQcY
+bocA9ZZvYIEovlpnsPVLtDIwjysI3668mEGDqNEikVqi/9btpYygS6CjTbiB6b3O
+m4sV4vlQtg8u6M863LyLuqaaj9b+vWVZy3K5esiLKaIsIARVqLnBeQDOIqtAFlcG
+AHSiuPpC49NkwV6YJNJw9XP2QknIXpE0fRdoSQune0rKRZgnbj7VOZX6nCkT34EA
+fo0a
+=YlLc
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/net-p2p/p2pool/files/flags.cmake b/net-p2p/p2pool/files/flags.cmake
new file mode 100644
index 0000000..367863e
--- /dev/null
+++ b/net-p2p/p2pool/files/flags.cmake
@@ -0,0 +1,37 @@
+set(GENERAL_FLAGS "-pthread")
+if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
+
+ if (ARMv8)
+ set(GENERAL_FLAGS "${GENERAL_FLAGS} -mfix-cortex-a53-835769 -mfix-cortex-a53-843419")
+ endif()
+
+ set(WARNING_FLAGS "-Wall -Wextra -Wcast-qual -Wlogical-op -Wundef -Wformat=2 -Wpointer-arith -Werror")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.5.0)
+ set(WARNING_FLAGS "${WARNING_FLAGS} -Wstrict-overflow=2")
+ endif()
+
+ if (STATIC_BINARY)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
+ else()
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
+ endif()
+
+elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
+
+ if (ARMv8)
+ set(GENERAL_FLAGS "${GENERAL_FLAGS} -mfix-cortex-a53-835769")
+ endif()
+
+ set(WARNING_FLAGS "-Wall -Wextra -Wno-undefined-internal -Wunreachable-code-aggressive -Wmissing-prototypes -Wmissing-variable-declarations -Werror")
+
+endif()
+
+if (DISABLE_WARNINGS)
+ set(WARNING_FLAGS "-w")
+endif()
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GENERAL_FLAGS} ${WARNING_FLAGS}")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${GENERAL_FLAGS} ${WARNING_FLAGS}")
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GENERAL_FLAGS} ${WARNING_FLAGS}")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${GENERAL_FLAGS} ${WARNING_FLAGS}")
diff --git a/net-p2p/p2pool/metadata.xml b/net-p2p/p2pool/metadata.xml
new file mode 100644
index 0000000..94bdee9
--- /dev/null
+++ b/net-p2p/p2pool/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>johnmh@johnmh.me</email>
+ <name>John M. Harris, Jr.</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">SChernykh/p2pool</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/p2pool/p2pool-4.2.ebuild b/net-p2p/p2pool/p2pool-4.2.ebuild
new file mode 100644
index 0000000..0b1c5ce
--- /dev/null
+++ b/net-p2p/p2pool/p2pool-4.2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+#TODO: enable/fix GRPC dependency and add it as USE flag (https://github.com/SChernykh/p2pool/issues/313)
+
+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.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"
+
+DEPEND="
+ dev-libs/libsodium
+ net-libs/czmq
+"
+BDEPEND="
+ 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} "${WORKDIR}"/${P} || die
+}
+
+src_prepare(){
+ rm "${S}/cmake/flags.cmake" || die
+ cp "${FILESDIR}/flags.cmake" "${S}/cmake/flags.cmake" || die
+ cmake_src_prepare
+ default_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_RANDOMX=OFF
+ -DWITH_GRPC=OFF
+ #-DWITH_GRPC=$(usex grpc)
+ )
+ cmake_src_configure
+}
+
+src_install(){
+ dobin "${BUILD_DIR}/p2pool"
+}
+
+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."
+}