net-p2p/dogecoin-qt: avx2 intel support and patch

- Adding avx2 intel support with intel patch check at pkg_pretend phase
- Removed duplicate gcc13 patch file

Signed-off-by: Victor Skovorodnikov <victor3.14@yandex.com>
This commit is contained in:
Victor Skovorodnikov
2023-10-01 09:42:24 -07:00
parent 6a4c8c116f
commit 5e67e9544d
3 changed files with 26 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ LICENSE="MIT"
SLOT="0"
DB_VER="5.3"
KEYWORDS="~amd64 ~arm64"
IUSE="dogecoind +pie +prune +ssp tests utils +wallet zmq"
IUSE="cpu_flags_x86_avx2 dogecoind +pie +prune +ssp tests utils +wallet zmq"
REQUIRED_USE="dogecoind? ( utils )"
DOGEDIR="/opt/${PN}"
DEPEND="
@@ -30,6 +30,7 @@ DEPEND="
dev-qt/qtnetwork
dev-qt/qtprintsupport
dev-qt/linguist-tools:=
cpu_flags_x86_avx2? ( app-crypt/intel-ipsec-mb )
wallet? ( media-gfx/qrencode )
zmq? ( net-libs/cppzmq )
"
@@ -50,6 +51,16 @@ PATCHES=(
WORKDIR_="${WORKDIR}/dogecoin-${PV}"
S=${WORKDIR_}
pkg_pretend() {
if use cpu_flags_x86_avx2 && [[ ! -e "${ROOT}"/etc/portage/patches/app-crypt/intel-ipsec-mb/remove_digest_init.patch ]]; then
eerror "${ROOT}/etc/portage/patches/app-crypt/intel-ipsec-mb/remove_digest_init.patch does not exist!"
eerror "To build with avx2 intel support, please create ${ROOT}/etc/portage/patches/app-crypt/intel-ipsec-mb directory"
eerror "and copy patch from package net-p2p/dogecoin-qt/files/intel-ipsec-mb/remove_digest_init.patch into that directory"
die
fi
}
src_prepare() {
if use pie && use ssp ; then
@@ -74,6 +85,7 @@ src_configure() {
--bindir="${DOGEDIR}/bin"
--with-gui=qt5
--disable-bench
$(use_with cpu_flags_x86_avx2 intel-avx2)
$(use_with dogecoind daemon)
$(use_with utils utils)
$(use_enable wallet)

View File

@@ -1,13 +0,0 @@
# Fixes error when building with gcc13
diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp
index ccebbe8..9d57846 100644
--- a/src/support/lockedpool.cpp
+++ b/src/support/lockedpool.cpp
@@ -5,6 +5,7 @@
#include "support/lockedpool.h"
#include "support/cleanse.h"
+#include <stdexcept>
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"

View File

@@ -0,0 +1,13 @@
diff -dur a/lib/include/sha_generic.h b/lib/include/sha_generic.h
index 3752546..77efd91 100644
--- a/lib/include/sha_generic.h
+++ b/lib/include/sha_generic.h
@@ -308,7 +308,7 @@ void sha_generic_1block(const void *data, void *digest,
if (data == NULL || digest == NULL)
return;
#endif
- sha_generic_init(digest, sha_type);
+// sha_generic_init(digest, sha_type);
sha_generic_one_block(data, digest, is_avx, sha_type);
#ifdef SAFE_DATA
clear_scratch_gps();