Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: net-misc/xmrig-mo/files/, net-misc/xmrig-mo/
Date: Thu, 30 Dec 2021 14:34:44
Message-Id: 1640856219.5aac9034bba11e6fea4ad9752fffbac87ef4ff9e.flow@gentoo
1 commit: 5aac9034bba11e6fea4ad9752fffbac87ef4ff9e
2 Author: Kevin Thomas <me <AT> kevinthomas <DOT> dev>
3 AuthorDate: Thu Dec 30 09:23:39 2021 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 30 09:23:39 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5aac9034
7
8 net-misc/xmrig-mo: add 6.16.2
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Kevin Thomas <me <AT> kevinthomas.dev>
12
13 net-misc/xmrig-mo/Manifest | 1 +
14 .../xmrig-mo/files/xmrig-mo-6.12.2-nonotls.patch | 23 +++++++++
15 net-misc/xmrig-mo/metadata.xml | 26 ++++++++++
16 net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild | 59 ++++++++++++++++++++++
17 4 files changed, 109 insertions(+)
18
19 diff --git a/net-misc/xmrig-mo/Manifest b/net-misc/xmrig-mo/Manifest
20 new file mode 100644
21 index 000000000..24b36b119
22 --- /dev/null
23 +++ b/net-misc/xmrig-mo/Manifest
24 @@ -0,0 +1 @@
25 +DIST xmrig-mo-6.16.2-mo2.tar.gz 2480342 BLAKE2B cfb1078f67913f3719dd929a1a41ef2040fdf5c7696baca990e3d9f869566e609406b4d592db50d00024adc5da05427382688e826523a9a407c0a79b554d3f5a SHA512 961e52c8ac3de9a55cbbdc11d282fc65c1827e87ac55b5f892866e5193509b23ca4bc9eeb869c019d1b025be14a877142e3b55c7485b6ded6673c832df8c36c3
26
27 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
28 new file mode 100644
29 index 000000000..a5337d9c8
30 --- /dev/null
31 +++ b/net-misc/xmrig-mo/files/xmrig-mo-6.12.2-nonotls.patch
32 @@ -0,0 +1,23 @@
33 +From ee98bfe01a94d021d81ed4c2bb11ec91c0bd81c8 Mon Sep 17 00:00:00 2001
34 +From: Matt Smith <matt@×××××××××.uk>
35 +Date: Sun, 7 Jun 2020 13:20:04 +0100
36 +Subject: [PATCH] Don't suffix binary with -notls
37 +
38 +---
39 + cmake/OpenSSL.cmake | 2 --
40 + 1 file changed, 2 deletions(-)
41 +
42 +diff --git a/cmake/OpenSSL.cmake b/cmake/OpenSSL.cmake
43 +index 89805301..c01c940a 100644
44 +--- a/cmake/OpenSSL.cmake
45 ++++ b/cmake/OpenSSL.cmake
46 +@@ -59,6 +59,4 @@ else()
47 + src/base/net/http/HttpServer.h
48 + )
49 + endif()
50 +-
51 +- set(CMAKE_PROJECT_NAME "${CMAKE_PROJECT_NAME}-notls")
52 + endif()
53 +--
54 +2.27.0
55 +
56
57 diff --git a/net-misc/xmrig-mo/metadata.xml b/net-misc/xmrig-mo/metadata.xml
58 new file mode 100644
59 index 000000000..3ee763e1f
60 --- /dev/null
61 +++ b/net-misc/xmrig-mo/metadata.xml
62 @@ -0,0 +1,26 @@
63 +<?xml version="1.0" encoding="UTF-8"?>
64 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
65 +<pkgmetadata>
66 + <maintainer type="person" proxied="yes">
67 + <email>me@×××××××××××.dev</email>
68 + <name>Kevin Thomas</name>
69 + </maintainer>
70 + <longdescription lang="en">
71 + MoneroOcean fork of XMRig - a RandomX, CryptoNight, KawPow,
72 + AstroBWT, and Argon2 CPU/GPU miner that supports algo switching.
73 + </longdescription>
74 + <use>
75 + <flag name="donate">
76 + Set the default donation level to 1% instead of 0
77 + </flag>
78 + <flag name="hwloc">
79 + Use <pkg>sys-apps/hwloc</pkg> for CPU affinity support
80 + </flag>
81 + <flag name="opencl">
82 + Enable OpenCL support
83 + </flag>
84 + </use>
85 + <upstream>
86 + <remote-id type="github">MoneroOcean/xmrig</remote-id>
87 + </upstream>
88 +</pkgmetadata>
89
90 diff --git a/net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild b/net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild
91 new file mode 100644
92 index 000000000..5f75b991d
93 --- /dev/null
94 +++ b/net-misc/xmrig-mo/xmrig-mo-6.16.2.ebuild
95 @@ -0,0 +1,59 @@
96 +# Copyright 1999-2021 Gentoo Authors
97 +# Distributed under the terms of the GNU General Public License v2
98 +
99 +EAPI=7
100 +
101 +inherit cmake
102 +
103 +MO_PV="mo2"
104 +DESCRIPTION="MoneroOcean fork of xmrig that supports algo switching"
105 +HOMEPAGE="https://github.com/MoneroOcean/xmrig"
106 +SRC_URI="https://github.com/MoneroOcean/xmrig/archive/v${PV}-${MO_PV}.tar.gz -> ${P}-${MO_PV}.tar.gz"
107 +KEYWORDS="~amd64 ~arm64"
108 +
109 +LICENSE="Apache-2.0 GPL-3+ MIT"
110 +SLOT="0"
111 +IUSE="cpu_flags_x86_sse4_1 donate hwloc opencl +ssl"
112 +
113 +DEPEND="
114 + dev-libs/libuv:=
115 + hwloc? ( sys-apps/hwloc:= )
116 + opencl? ( virtual/opencl )
117 + ssl? ( dev-libs/openssl:= )
118 +"
119 +
120 +RDEPEND="
121 + ${DEPEND}
122 + !arm64? ( sys-apps/msr-tools )
123 +"
124 +
125 +PATCHES=(
126 + "${FILESDIR}"/${PN}-6.12.2-nonotls.patch
127 +)
128 +
129 +S="${WORKDIR}/xmrig-${PV}-${MO_PV}"
130 +
131 +src_prepare() {
132 + if ! use donate ; then
133 + sed -i 's/1;/0;/g' src/donate.h || die
134 + fi
135 +
136 + cmake_src_prepare
137 +}
138 +
139 +src_configure() {
140 + local mycmakeargs=(
141 + -DWITH_SSE4_1=$(usex cpu_flags_x86_sse4_1)
142 + -DWITH_HWLOC=$(usex hwloc)
143 + -DWITH_TLS=$(usex ssl)
144 + -DWITH_OPENCL=$(usex opencl)
145 + -DWITH_CUDA=OFF
146 + )
147 +
148 + cmake_src_configure
149 +}
150 +
151 +src_install() {
152 + default
153 + newbin "${BUILD_DIR}/xmrig" xmrig-mo
154 +}