summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/gridcoin')
-rw-r--r--net-p2p/gridcoin/Manifest7
-rw-r--r--net-p2p/gridcoin/files/gridcoin-5.4.8.0-fix_upnp_call.patch11
-rw-r--r--net-p2p/gridcoin/files/gridcoin.init13
-rw-r--r--net-p2p/gridcoin/files/gridcoin.service12
-rw-r--r--net-p2p/gridcoin/files/gridcoinresearch.conf78
-rw-r--r--net-p2p/gridcoin/gridcoin-5.4.8.0-r2.ebuild139
-rw-r--r--net-p2p/gridcoin/metadata.xml31
7 files changed, 291 insertions, 0 deletions
diff --git a/net-p2p/gridcoin/Manifest b/net-p2p/gridcoin/Manifest
new file mode 100644
index 0000000..aa65814
--- /dev/null
+++ b/net-p2p/gridcoin/Manifest
@@ -0,0 +1,7 @@
+AUX gridcoin-5.4.8.0-fix_upnp_call.patch 385 BLAKE2B 7e0c6c380a811e9f8ee2a3a579aa09a7972be5f2d097d077ecefa22f91c30d1b3dd4323e2e8e1bbaa1dda95fddd6fa007d61ebf10d88c2dbdb9067011f7e2362 SHA512 a452007387fdd4bb0b0bb506665d39d96be4343300951693d547e260e1b1e69b88363c6a808f89bdfc39da9abc32172059057fb0bc78a518d83a65dd9b1ddf6b
+AUX gridcoin.init 313 BLAKE2B c816b1726418146e786e9d78802e0dd0e5cd9177d93a791488bb2a5c919bf37cf785b3a51da03754f732f1c69b49ef334d82e62eda0838b9a049764e22660c65 SHA512 1bc3cfb07ecc01563ab5aaf53d02c6b70b8516d60ec54c4a0df5e2738568af6b1146095c5d673b716b95540bb65385b63c28ded041a09c841c8a37f556122f80
+AUX gridcoin.service 191 BLAKE2B c828c4d95b3bc11da42221a8f3118d4a9af841fc19408e24d5aa657796e6e7697039f65e4fbd86287d35f81fef07af8157877dac5958f89c8acd4732a6e9359c SHA512 f892a5edbd9f2351e24adc6af4dcd35b5d450098c3eacd4a795ed959aef9e041c0a72aada59ef4a2076222fcedba7cef0f05f1726a2c5af970ec537665b6f81d
+AUX gridcoinresearch.conf 2880 BLAKE2B 75e768979cd317eff2cc9739e7eb11187f0330880121cecf025f6240164e1a0ccdd2e31d7614553ec8bdd5cade038809d53364c8fa868582b8b96d0361ffcc68 SHA512 bce85a30232fac19b8e207f4fa95acb388835ea12d9d7b9a461788898a3651d0d11dff3a208c28692b4d1f7cd2ec82421948e03b2130e72796ade6d53a31733d
+DIST gridcoin-5.4.8.0.tar.gz 42846011 BLAKE2B 915500d6b953d1fe2b735092d6c3e5e72d3ce64a6f3f4d1cb94bd8561969663dc98ca3b784b0ea643e9fb7bb70e0439abc122b9382bec073fe0eff4ad3715a8b SHA512 2e37d982ee257e87241d7545e5b15d4d756813089ff029c5c53863f791805942c0f4fb78c2d92684967ca9b5623c530d234e17d1c1f12a48fac8e6119f3f2957
+EBUILD gridcoin-5.4.8.0-r2.ebuild 4559 BLAKE2B 852b0e62a54ba923d5f49ab567c70c36dd07354e821291033e686c89e31a48e1118ab7ec347e9b6d86566b4dcf4ebe9543eab20067119cc212705f9c87142308 SHA512 5236437529878b914754922bf221b008783477209354c217060574047a196b4db8d2b72d83624712e0628146f931cbce5808d20ffb1f0584337dcfa5eb449a34
+MISC metadata.xml 1398 BLAKE2B e29c901a967957b8cb3e9cccd96eb471df56a63f628f720325dfc6271c8fab9e87c065eaa91061abe6d6d3b98d3b6e6fab885076bfb84d74ca4f0fd5680bcf0d SHA512 0c03e4802731b2ffccf5ac438dd2dc6b493c72d38c4f396de55cf0315a2701213040d10afda4705a421ab1d2c33eddfe85e9e8876c326c97266b55be0e21019b
diff --git a/net-p2p/gridcoin/files/gridcoin-5.4.8.0-fix_upnp_call.patch b/net-p2p/gridcoin/files/gridcoin-5.4.8.0-fix_upnp_call.patch
new file mode 100644
index 0000000..7583b6b
--- /dev/null
+++ b/net-p2p/gridcoin/files/gridcoin-5.4.8.0-fix_upnp_call.patch
@@ -0,0 +1,11 @@
+--- a/src/net.cpp 2024-06-14 12:31:22.686604342 +0200
++++ b/src/net.cpp 2024-06-14 12:32:33.422604941 +0200
+@@ -1167,7 +1167,7 @@
+ struct IGDdatas data;
+ int r;
+
+- r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
++ r = UPNP_GetValidIGD(devlist, &urls, &data, nullptr, 0, lanaddr, sizeof(lanaddr));
+ if (r == 1)
+ {
+ if (fDiscover) {
diff --git a/net-p2p/gridcoin/files/gridcoin.init b/net-p2p/gridcoin/files/gridcoin.init
new file mode 100644
index 0000000..2409cc5
--- /dev/null
+++ b/net-p2p/gridcoin/files/gridcoin.init
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ after logger
+}
+
+command="/usr/bin/gridcoinresearchd"
+command_background="yes"
+command_user="gridcoin"
+description="Gridcoin Wallet Daemon"
+pidfile="/run/gridcoin.pid"
diff --git a/net-p2p/gridcoin/files/gridcoin.service b/net-p2p/gridcoin/files/gridcoin.service
new file mode 100644
index 0000000..ea3fbee
--- /dev/null
+++ b/net-p2p/gridcoin/files/gridcoin.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Gridcoin Wallet Daemon
+After=network.target
+
+[Service]
+Type=forking
+User=gridcoin
+Group=gridcoin
+ExecStart=/usr/bin/gridcoinresearchd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/gridcoin/files/gridcoinresearch.conf b/net-p2p/gridcoin/files/gridcoinresearch.conf
new file mode 100644
index 0000000..7c4882a
--- /dev/null
+++ b/net-p2p/gridcoin/files/gridcoinresearch.conf
@@ -0,0 +1,78 @@
+#############################################################################
+#################### Example gridcoinresearch.conf file #####################
+#############################################################################
+##
+## For further details on this configuration file please see:
+## http://wiki.gridcoin.us/Gridcoinresearch_config_file
+##
+## Default gridcoinresearch.conf location:
+##
+## Win: %AppData%\GridcoinResearch\
+## Linux: ~/.GridcoinResearch/
+## MacOS: /Users/USERNAME/Library/Application/Support/GridcoinResearch/
+##
+## Single # lines are commands, remove the # in Front of the Command to use it
+## Double ## lines are comments
+##
+#############################################################################
+####################### Required Settings (All OS's) ########################
+#############################################################################
+
+## Community provided list of addnodes available at
+## http://wiki.gridcoin.us/List_of_Addnodes
+#~~~~~Copy & Paste Addnodes here~~~~~
+
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+## BOINC account settings, i.e. your BOINC CPID & E-Mail
+## Use INVESTOR for Investor or Pool Mining
+PrimaryCPID=INVESTOR
+email=INVESTOR
+
+## Port 32749/TCP required for Inbound Connections
+## (Not required but highly recommended)
+listen=1
+
+## Required for Headless set-ups
+#daemon=1
+
+#############################################################################
+############# RPC Settings for Remote Access and Headless Users #############
+############ Warning: Set a Good Password and Secure Your System ############
+#############################################################################
+
+#server=1
+#rpcallowip=127.0.0.1
+#rpcallowip=<IP Address of Remote System>
+#rpcport=<Port for RPC Communication>
+#rpcuser=<A Username for RPC>
+#rpcpassword=<A GOOD Password for RPC>
+
+#############################################################################
+######################## Optional BOINC settings ############################
+########### (Required if BOINC installed to non-default location) ###########
+#############################################################################
+
+## Windows (Note the double backslashes are neccessary)
+#boincdatadir=C:\\ProgramData\\BOINC\\
+#boincappdir=C:\\Program Files\\BOINC\\
+
+## Linux
+#boincdatadir=/var/lib/boinc/
+
+## MacOS
+#boincdatadir=/Library/Application Support/BOINC Data/
+
+#############################################################################
+######################## Optional Network settings ##########################
+#############################################################################
+
+## Maximum number of inbound+outbound connections.Default 125
+maxconnections=125
+## Maximum number of outbound connections.Default 8
+maxoutboundconnections=8
+## Manually Set-up Ports
+#upnp=false
+#externalip=<Your IP Address>
+#port=32748
diff --git a/net-p2p/gridcoin/gridcoin-5.4.8.0-r2.ebuild b/net-p2p/gridcoin/gridcoin-5.4.8.0-r2.ebuild
new file mode 100644
index 0000000..a9a4288
--- /dev/null
+++ b/net-p2p/gridcoin/gridcoin-5.4.8.0-r2.ebuild
@@ -0,0 +1,139 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic systemd desktop
+
+DESCRIPTION="Gridcoin Proof-of-Stake based crypto-currency that rewards BOINC computation"
+HOMEPAGE="https://gridcoin.us/"
+SRC_URI="https://github.com/${PN}-community/${PN^}-Research/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN^}-Research-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE_GUI="dbus qt5"
+IUSE_DAEMON="daemon"
+IUSE_OPTIONAL="+bench +boinc +ccache debug +harden +libraries pic +qrcode static test +upnp +utils systemd"
+IUSE="${IUSE_GUI} ${IUSE_DAEMON} ${IUSE_OPTIONAL}"
+
+RESTRICT="!test? ( test )"
+
+# Note: The client *CAN* *NOT* connect to the daemon like the BOINC client does.
+# Therefore either run the daemon or the GUI client. Furthermore starting the GUI client while
+# the daemon is running will kill the latter.
+# See: https://www.reddit.com/r/gridcoin/comments/9x0zsy/comment/e9r85vf/
+# "The GUI instance will not RPC to another wallet process."
+REQUIRED_USE="
+ ?? ( daemon qt5 )
+ dbus? ( qt5 )
+ qrcode? ( qt5 )
+"
+
+RDEPEND="
+ >=dev-libs/libevent-2.1.12
+ daemon? (
+ acct-group/gridcoin
+ acct-user/gridcoin[boinc=]
+ )
+ dev-libs/boost
+ dev-libs/openssl-compat:1.1.1
+ dev-libs/libzip
+ sys-libs/db:5.3[cxx]
+ dbus? ( dev-qt/qtdbus:5 )
+ qt5? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 dev-qt/qtconcurrent:5 dev-qt/qtcharts:5 )
+ qrcode? ( media-gfx/qrencode )
+ upnp? ( net-libs/miniupnpc )
+ boinc? ( sci-misc/boinc )
+ utils? ( >=net-p2p/bitcoin-core-27[cli] )
+"
+DEPEND="
+ ${RDEPEND}
+ qt5? ( dev-qt/linguist-tools:5 )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix_upnp_call.patch
+)
+
+pkg_setup() {
+ BDB_VER="$(best_version sys-libs/db:5.3)"
+ export BDB_CFLAGS="-I/usr/include/db${BDB_VER:12:3}"
+ export BDB_LIBS="-ldb_cxx-${BDB_VER:12:3}"
+}
+
+src_prepare() {
+ if use debug && [[ ! $(portageq envvar FEATURES) =~ .*(splitdebug|nostrip).* ]]; then
+ ewarn "You have enabled debug flags and macros during compilation."
+ ewarn "For these to be useful, you should also have Portage retain debug symbols."
+ ewarn "See https://wiki.gentoo.org/wiki/Debugging on configuring your environment"
+ ewarn "and set your desired FEATURES before (re-)building this package."
+ fi
+ default
+ ./autogen.sh
+}
+
+src_configure() {
+ use harden && append-flags -Wa,--noexecstack
+ econf \
+ $(use_enable bench) \
+ $(use_enable ccache ) \
+ $(use_enable debug) \
+ $(use_enable harden hardening) \
+ $(use_enable static) \
+ $(use_enable test tests) \
+ $(use_with daemon) \
+ $(use_with dbus qtdbus) \
+ $(use_with libraries libs) \
+ $(use_with pic) \
+ $(use_with qrcode qrencode) \
+ $(use_with qt5 gui qt5) \
+ $(use_with upnp miniupnpc) \
+ $(use_with utils)
+}
+
+src_install() {
+ if use daemon ; then
+ newbin src/gridcoinresearchd gridcoinresearchd
+ newman doc/gridcoinresearchd.1 gridcoinresearchd.1
+ newinitd "${FILESDIR}"/gridcoin.init gridcoin
+ if use systemd ; then
+ systemd_dounit "${FILESDIR}"/gridcoin.service
+ fi
+ diropts -o${PN} -g${PN}
+ keepdir /var/lib/${PN}/.GridcoinResearch/
+ newconfd "${FILESDIR}"/gridcoinresearch.conf gridcoinresearch
+ fowners gridcoin:gridcoin /etc/conf.d/gridcoinresearch
+ fperms 0660 /etc/conf.d/gridcoinresearch
+ dosym ../../../../etc/conf.d/gridcoinresearch /var/lib/${PN}/.GridcoinResearch/gridcoinresearch.conf
+ fi
+ if use qt5 ; then
+ newbin src/qt/gridcoinresearch gridcoinresearch
+ newman doc/gridcoinresearch.1 gridcoinresearch.1
+ domenu contrib/gridcoinresearch.desktop
+ for size in 16 22 24 32 48 64 128 256 ; do
+ doicon -s "${size}" "share/icons/hicolor/${size}x${size}/apps/gridcoinresearch.png"
+ done
+ doicon -s scalable "share/icons/hicolor/scalable/apps/gridcoinresearch.svg"
+ fi
+ dodoc README.md CHANGELOG.md doc/build-unix.md
+
+}
+
+pkg_postinst() {
+ elog
+ elog "You are using a source compiled version of gridcoin."
+ use daemon && elog "The daemon can be found at /usr/bin/gridcoinresearchd"
+ use qt5 && elog "The graphical wallet can be found at /usr/bin/gridcoinresearch"
+ elog
+ elog "You need to configure this node with a few basic details to do anything"
+ elog "useful with gridcoin. The wallet configuration file is located at:"
+ use daemon && elog " /etc/conf.d/gridcoinresearch"
+ use qt5 && elog " \$HOME/.GridcoinResearch"
+ elog "The wiki for this configuration file is located at:"
+ elog " http://wiki.gridcoin.us/Gridcoinresearch_config_file"
+ elog
+}
diff --git a/net-p2p/gridcoin/metadata.xml b/net-p2p/gridcoin/metadata.xml
new file mode 100644
index 0000000..4351465
--- /dev/null
+++ b/net-p2p/gridcoin/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sven.eden@prydeworx.com</email>
+ <name>Sven Eden</name>
+ </maintainer>
+ <longdescription lang="en">
+ Gridcoin crypto-currency wallet that rewards BOINC computation
+ https://gridcoin.us/
+ https://github.com/gridcoin/Gridcoin-Research
+ </longdescription>
+ <upstream>
+ <remote-id type="github">gridcoin-community/Gridcoin-Research</remote-id>
+ </upstream>
+ <use>
+ <flag name="bench">Compile benchmarks</flag>
+ <flag name="boinc">Enable research wallet functions for BOINC mining</flag>
+ <flag name="ccache">Use ccache for building</flag>
+ <flag name="daemon">Build research wallet daemon</flag>
+ <flag name="dbus">Enable desktop notifications via DBus</flag>
+ <flag name="debug">Use debug compiler flags and macros</flag>
+ <flag name="harden">Attempt to harden the resulting executables</flag>
+ <flag name="libraries">Build extra libraries</flag>
+ <flag name="pic">Disable optimized assembly code that is not PIC friendly</flag>
+ <flag name="qrcode">Enable generation of QR Codes for receiving payments with media-gfx/qrencode</flag>
+ <flag name="qt5">Build the Qt GUI</flag>
+ <flag name="upnp">Enable Universal Plug and Play</flag>
+ <flag name="utils">Build bitcoin-core with 'cli' USE flag</flag>
+ </use>
+</pkgmetadata>