[gentoo-commits] repo/proj/guru:master commit in: net-misc/xmrig-mo/files/, net-misc/xmrig-mo/

2024-03-30 Thread Julien Roy
commit: aa40135a3e3177827ea140f2dfe6875723f80e40
Author: Kevin Thomas  kevinthomas  dev>
AuthorDate: Sat Mar 30 06:25:18 2024 +
Commit: Julien Roy  jroy  ca>
CommitDate: Sat Mar 30 06:25:18 2024 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=aa40135a

net-misc/xmrig-mo: add patch for xmrig-mo-6.21.2

Signed-off-by: Kevin Thomas  kevinthomas.dev>

 .../files/xmrig-mo-6.21.2-fix-length-error.patch| 17 +
 net-misc/xmrig-mo/xmrig-mo-6.21.2.ebuild|  1 +
 2 files changed, 18 insertions(+)

diff --git a/net-misc/xmrig-mo/files/xmrig-mo-6.21.2-fix-length-error.patch 
b/net-misc/xmrig-mo/files/xmrig-mo-6.21.2-fix-length-error.patch
new file mode 100644
index 00..55a9bde7a6
--- /dev/null
+++ b/net-misc/xmrig-mo/files/xmrig-mo-6.21.2-fix-length-error.patch
@@ -0,0 +1,17 @@
+From: Kay Thomas 
+Date: Sat Mar 30 02:14:43 2024 -0400
+
+Fix length_error
+
+diff --git a/src/backend/opencl/runners/OclRyoRunner.cpp 
b/src/backend/opencl/runners/OclRyoRunner.cpp
+index eff7f392..56edf1a4 100644
+--- a/src/backend/opencl/runners/OclRyoRunner.cpp
 b/src/backend/opencl/runners/OclRyoRunner.cpp
+@@ -34,6 +34,7 @@
+ #include "base/io/log/Log.h"
+ #include "base/net/stratum/Job.h"
+ #include "crypto/cn/CnAlgo.h"
++#include 
+ 
+ 
+ xmrig::OclRyoRunner::OclRyoRunner(size_t index, const OclLaunchData ) : 
OclBaseRunner(index, data)

diff --git a/net-misc/xmrig-mo/xmrig-mo-6.21.2.ebuild 
b/net-misc/xmrig-mo/xmrig-mo-6.21.2.ebuild
index 776fee69e2..828e71adeb 100644
--- a/net-misc/xmrig-mo/xmrig-mo-6.21.2.ebuild
+++ b/net-misc/xmrig-mo/xmrig-mo-6.21.2.ebuild
@@ -29,6 +29,7 @@ RDEPEND="
 
 PATCHES=(
"${FILESDIR}"/${PN}-6.12.2-nonotls.patch
+   "${FILESDIR}"/${PN}-6.21.2-fix-length-error.patch
 )
 
 S="${WORKDIR}/xmrig-${PV}-${MO_PV}"



[gentoo-commits] repo/proj/guru:master commit in: net-misc/xmrig-mo/files/, net-misc/xmrig-mo/

2021-12-30 Thread Florian Schmaus
commit: 5aac9034bba11e6fea4ad9752fffbac87ef4ff9e
Author: Kevin Thomas  kevinthomas  dev>
AuthorDate: Thu Dec 30 09:23:39 2021 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Thu Dec 30 09:23:39 2021 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5aac9034

net-misc/xmrig-mo: add 6.16.2

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Kevin Thomas  kevinthomas.dev>

 net-misc/xmrig-mo/Manifest |  1 +
 .../xmrig-mo/files/xmrig-mo-6.12.2-nonotls.patch   | 23 +
 net-misc/xmrig-mo/metadata.xml | 26 ++
 net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild   | 59 ++
 4 files changed, 109 insertions(+)

diff --git a/net-misc/xmrig-mo/Manifest b/net-misc/xmrig-mo/Manifest
new file mode 100644
index 0..24b36b119
--- /dev/null
+++ b/net-misc/xmrig-mo/Manifest
@@ -0,0 +1 @@
+DIST xmrig-mo-6.16.2-mo2.tar.gz 2480342 BLAKE2B 
cfb1078f67913f3719dd929a1a41ef2040fdf5c7696baca990e3d9f869566e609406b4d592db50d00024adc5da05427382688e826523a9a407c0a79b554d3f5a
 SHA512 
961e52c8ac3de9a55cbbdc11d282fc65c1827e87ac55b5f892866e5193509b23ca4bc9eeb869c019d1b025be14a877142e3b55c7485b6ded6673c832df8c36c3

diff --git a/net-misc/xmrig-mo/files/xmrig-mo-6.12.2-nonotls.patch 
b/net-misc/xmrig-mo/files/xmrig-mo-6.12.2-nonotls.patch
new file mode 100644
index 0..a5337d9c8
--- /dev/null
+++ b/net-misc/xmrig-mo/files/xmrig-mo-6.12.2-nonotls.patch
@@ -0,0 +1,23 @@
+From ee98bfe01a94d021d81ed4c2bb11ec91c0bd81c8 Mon Sep 17 00:00:00 2001
+From: Matt Smith 
+Date: Sun, 7 Jun 2020 13:20:04 +0100
+Subject: [PATCH] Don't suffix binary with -notls
+
+---
+ cmake/OpenSSL.cmake | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/cmake/OpenSSL.cmake b/cmake/OpenSSL.cmake
+index 89805301..c01c940a 100644
+--- a/cmake/OpenSSL.cmake
 b/cmake/OpenSSL.cmake
+@@ -59,6 +59,4 @@ else()
+ src/base/net/http/HttpServer.h
+ )
+ endif()
+-
+-set(CMAKE_PROJECT_NAME "${CMAKE_PROJECT_NAME}-notls")
+ endif()
+-- 
+2.27.0
+

diff --git a/net-misc/xmrig-mo/metadata.xml b/net-misc/xmrig-mo/metadata.xml
new file mode 100644
index 0..3ee763e1f
--- /dev/null
+++ b/net-misc/xmrig-mo/metadata.xml
@@ -0,0 +1,26 @@
+
+https://www.gentoo.org/dtd/metadata.dtd;>
+
+  
+m...@kevinthomas.dev
+Kevin Thomas
+  
+  
+MoneroOcean fork of XMRig - a RandomX, CryptoNight, KawPow,
+AstroBWT, and Argon2 CPU/GPU miner that supports algo switching.
+  
+  
+
+  Set the default donation level to 1% instead of 0
+
+
+  Use sys-apps/hwloc for CPU affinity support
+
+
+  Enable OpenCL support
+
+  
+  
+MoneroOcean/xmrig
+  
+

diff --git a/net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild 
b/net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild
new file mode 100644
index 0..5f75b991d
--- /dev/null
+++ b/net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+MO_PV="mo2"
+DESCRIPTION="MoneroOcean fork of xmrig that supports algo switching"
+HOMEPAGE="https://github.com/MoneroOcean/xmrig;
+SRC_URI="https://github.com/MoneroOcean/xmrig/archive/v${PV}-${MO_PV}.tar.gz 
-> ${P}-${MO_PV}.tar.gz"
+KEYWORDS="~amd64 ~arm64"
+
+LICENSE="Apache-2.0 GPL-3+ MIT"
+SLOT="0"
+IUSE="cpu_flags_x86_sse4_1 donate hwloc opencl +ssl"
+
+DEPEND="
+   dev-libs/libuv:=
+   hwloc? ( sys-apps/hwloc:= )
+   opencl? ( virtual/opencl )
+   ssl? ( dev-libs/openssl:= )
+"
+
+RDEPEND="
+   ${DEPEND}
+   !arm64? ( sys-apps/msr-tools )
+"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-6.12.2-nonotls.patch
+)
+
+S="${WORKDIR}/xmrig-${PV}-${MO_PV}"
+
+src_prepare() {
+   if ! use donate ; then
+   sed -i 's/1;/0;/g' src/donate.h || die
+   fi
+
+   cmake_src_prepare
+}
+
+src_configure() {
+   local mycmakeargs=(
+   -DWITH_SSE4_1=$(usex cpu_flags_x86_sse4_1)
+   -DWITH_HWLOC=$(usex hwloc)
+   -DWITH_TLS=$(usex ssl)
+   -DWITH_OPENCL=$(usex opencl)
+   -DWITH_CUDA=OFF
+   )
+
+   cmake_src_configure
+}
+
+src_install() {
+   default
+   newbin "${BUILD_DIR}/xmrig" xmrig-mo
+}