Add recipe for cpuminer (#9716)

This commit is contained in:
Stefano Ceccherini
2023-10-31 12:56:47 +01:00
committed by GitHub
parent 74bb3a86de
commit 304ca93b32
2 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
SUMMARY="CPU miner for Litecoin and Bitcoin"
DESCRIPTION="This is a multi-threaded CPU miner for Litecoin and Bitcoin, \
fork of Jeff Garzik's reference cpuminer."
HOMEPAGE="https://bitcointalk.org/index.php?topic=55038.0"
COPYRIGHT="2010-2020 pooler"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/pooler/cpuminer/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="eac6bfc4e1924a5743ce5dec79c9502fe15f2181b22d205e320cb8d64d0bd39c"
SOURCE_DIR="cpuminer-$portVersion"
PATCHES="cpuminer-$portVersion.patch"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cpuminer$secondaryArchSuffix = $portVersion
cmd:minerd = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autom4te
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
./autogen.sh
./nomacro.pl
runConfigure --omit-dirs "binDir" ./configure \
CFLAGS="-O3" --bindir=$prefix/bin
make LDFLAGS="-lnetwork" $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -0,0 +1,20 @@
diff --git a/miner.h b/miner.h
index 3f9b2f4..4a0b5be 100644
--- a/miner.h
+++ b/miner.h
@@ -83,6 +83,7 @@ static inline uint32_t swab32(uint32_t v)
#endif
#if !HAVE_DECL_BE32DEC
+#define be32dec be32dec_haiku
static inline uint32_t be32dec(const void *pp)
{
const uint8_t *p = (uint8_t const *)pp;
@@ -101,6 +102,7 @@ static inline uint32_t le32dec(const void *pp)
#endif
#if !HAVE_DECL_BE32ENC
+#define be32enc be32enc_haiku
static inline void be32enc(void *pp, uint32_t x)
{
uint8_t *p = (uint8_t *)pp;