1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-31 05:41:08 +00:00

misc/randomx: New port: Proof of work algorithm based on random code execution

This commit is contained in:
Yuri Victorovich 2023-09-04 10:40:20 -07:00
parent aa9c959a28
commit 4d3be3c0d9
5 changed files with 55 additions and 0 deletions

View File

@ -502,6 +502,7 @@
SUBDIR += qt6-examples
SUBDIR += qt6ct
SUBDIR += quantum++
SUBDIR += randomx
SUBDIR += raspberrypi-gpioshutdown
SUBDIR += raspberrypi-userland
SUBDIR += raspbsd-led

30
misc/randomx/Makefile Normal file
View File

@ -0,0 +1,30 @@
PORTNAME= randomx
DISTVERSIONPREFIX= v
DISTVERSION= 1.1.10-28
DISTVERSIONSUFFIX= -g67ea010
CATEGORIES= misc
MAINTAINER= yuri@FreeBSD.org
COMMENT= Proof of work algorithm based on random code execution
WWW= https://github.com/tevador/RandomX
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cmake:testing compiler:c++11-lang
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= tevador
GH_PROJECT= RandomX
CMAKE_ON= BUILD_SHARED_LIBS
CMAKE_TESTING_TARGET=
PLIST_FILES= include/randomx.h \
lib/librandomx.so
post-test: # run tests
@cd ${BUILD_WRKSRC} && ./randomx-tests
.include <bsd.port.mk>

3
misc/randomx/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1693848545
SHA256 (tevador-RandomX-v1.1.10-28-g67ea010_GH0.tar.gz) = 4ee0eda587b91b7812ab638a9d8d68b637f105145945dab7ddbcfc126e52c8d5
SIZE (tevador-RandomX-v1.1.10-28-g67ea010_GH0.tar.gz) = 165919

View File

@ -0,0 +1,17 @@
--- CMakeLists.txt.orig 2023-09-04 17:31:42 UTC
+++ CMakeLists.txt
@@ -192,6 +192,8 @@ install(TARGETS randomx
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+if (${BUILD_TESTING})
+
add_executable(randomx-tests
src/tests/tests.cpp)
target_link_libraries(randomx-tests
@@ -234,3 +236,5 @@ if(NOT HAVE_CXX_ATOMICS)
endif()
set_property(TARGET randomx-benchmark PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET randomx-benchmark PROPERTY CXX_STANDARD 11)
+
+endif()

4
misc/randomx/pkg-descr Normal file
View File

@ -0,0 +1,4 @@
RandomX is a proof-of-work (PoW) algorithm that is optimized for general-purpose
CPUs. RandomX uses random code execution (hence the name) together with several
memory-hard techniques to minimize the efficiency advantage of specialized
hardware.