aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeel Chauhan <nc@FreeBSD.org>2022-01-13 20:58:42 +0000
committerNeel Chauhan <nc@FreeBSD.org>2022-01-13 20:58:42 +0000
commit56b72f9ebb5406d3536a9f81b01835ee4d88f9ce (patch)
tree753fd5304ee947b3521370b361446e6e780757f1
parent8c62d72d9fe5a5c5f4d638329bcb0eb5454177fb (diff)
downloadports-56b72f9ebb5406d3536a9f81b01835ee4d88f9ce.tar.gz
ports-56b72f9ebb5406d3536a9f81b01835ee4d88f9ce.zip
net-p2p/ethash: New port: C/C++ implementation of Ethash and ProgPoW
-rw-r--r--net-p2p/Makefile1
-rw-r--r--net-p2p/ethash/Makefile22
-rw-r--r--net-p2p/ethash/distinfo3
-rw-r--r--net-p2p/ethash/files/patch-lib_ethash_endianness.hpp11
-rw-r--r--net-p2p/ethash/pkg-descr3
-rw-r--r--net-p2p/ethash/pkg-plist17
6 files changed, 57 insertions, 0 deletions
diff --git a/net-p2p/Makefile b/net-p2p/Makefile
index a747f3945409..4eb6b19463b1 100644
--- a/net-p2p/Makefile
+++ b/net-p2p/Makefile
@@ -31,6 +31,7 @@
SUBDIR += eiskaltdcpp-data
SUBDIR += eiskaltdcpp-gtk
SUBDIR += eiskaltdcpp-lib
+ SUBDIR += ethash
SUBDIR += frost
SUBDIR += go-ethereum
SUBDIR += go-prysm
diff --git a/net-p2p/ethash/Makefile b/net-p2p/ethash/Makefile
new file mode 100644
index 000000000000..6eacfae84d55
--- /dev/null
+++ b/net-p2p/ethash/Makefile
@@ -0,0 +1,22 @@
+PORTNAME= ethash
+PORTVERSION= 0.8.0
+DISTVERSIONPREFIX= v
+CATEGORIES= net-p2p
+
+MAINTAINER= nc@FreeBSD.org
+COMMENT= C/C++ implementation of Ethash and ProgPoW
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libbenchmark.so:devel/benchmark \
+ libgtest.so:devel/googletest
+
+USES= cmake
+USE_GITHUB= yes
+GH_ACCOUNT= chfast
+
+CMAKE_OFF= HUNTER_ENABLED
+
+.include <bsd.port.mk>
+
diff --git a/net-p2p/ethash/distinfo b/net-p2p/ethash/distinfo
new file mode 100644
index 000000000000..b64115f52a75
--- /dev/null
+++ b/net-p2p/ethash/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1642107104
+SHA256 (chfast-ethash-v0.8.0_GH0.tar.gz) = c53a39cd7b4687f1fcc6e4a561a0aaaab9ec0438ae818860dd4e98bb4ad2f153
+SIZE (chfast-ethash-v0.8.0_GH0.tar.gz) = 103991
diff --git a/net-p2p/ethash/files/patch-lib_ethash_endianness.hpp b/net-p2p/ethash/files/patch-lib_ethash_endianness.hpp
new file mode 100644
index 000000000000..4a7546acd522
--- /dev/null
+++ b/net-p2p/ethash/files/patch-lib_ethash_endianness.hpp
@@ -0,0 +1,11 @@
+--- lib/ethash/endianness.hpp.orig 2021-11-09 08:29:42 UTC
++++ lib/ethash/endianness.hpp
+@@ -24,7 +24,7 @@
+ #endif
+ #endif
+
+-#if __has_builtin(__builtin_bswap64) || defined(__GNUC__)
++#if (__has_builtin(__builtin_bswap64) || defined(__GNUC__)) && !defined(__FreeBSD__)
+ #define bswap32 __builtin_bswap32
+ #define bswap64 __builtin_bswap64
+ #elif defined(_MSC_VER)
diff --git a/net-p2p/ethash/pkg-descr b/net-p2p/ethash/pkg-descr
new file mode 100644
index 000000000000..258d166fcc22
--- /dev/null
+++ b/net-p2p/ethash/pkg-descr
@@ -0,0 +1,3 @@
+C/C++ implementation of Ethash - the Ethereum Proof of Work algorithm.
+
+WWW: https://github.com/chfast/ethash
diff --git a/net-p2p/ethash/pkg-plist b/net-p2p/ethash/pkg-plist
new file mode 100644
index 000000000000..864574db3151
--- /dev/null
+++ b/net-p2p/ethash/pkg-plist
@@ -0,0 +1,17 @@
+include/ethash/ethash.h
+include/ethash/ethash.hpp
+include/ethash/global_context.h
+include/ethash/global_context.hpp
+include/ethash/hash_types.h
+include/ethash/hash_types.hpp
+include/ethash/keccak.h
+include/ethash/keccak.hpp
+include/ethash/progpow.hpp
+include/ethash/version.h
+lib/cmake/ethash/ethashConfig.cmake
+lib/cmake/ethash/ethashConfigVersion.cmake
+lib/cmake/ethash/ethashTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/ethash/ethashTargets.cmake
+lib/libethash-global-context.a
+lib/libethash.a
+lib/libkeccak.a