92 lines
3.4 KiB
Ruby
92 lines
3.4 KiB
Ruby
class Wownero < Formula
|
|
desc "Official wallet and node software for the Wownero cryptocurrency"
|
|
homepage "https://wownero.org"
|
|
url "https://git.wownero.com/wownero/wownero.git",
|
|
tag: "v0.10.1.0",
|
|
revision: "8ab87421d9321d0b61992c924cfa6e3918118ad0"
|
|
license "BSD-3-Clause"
|
|
revision 3
|
|
|
|
# The `strategy` code below can be removed if/when this software exceeds
|
|
# version 10.0.0. Until then, it's used to omit a malformed tag that would
|
|
# always be treated as newest.
|
|
livecheck do
|
|
url :stable
|
|
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
|
strategy :git do |tags, regex|
|
|
malformed_tags = ["10.0.0"].freeze
|
|
tags.map do |tag|
|
|
next if malformed_tags.include?(tag)
|
|
|
|
tag[regex, 1]
|
|
end
|
|
end
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_monterey: "0646ba9aeaef3204b5e26d0879f7e98026e61e43bd17cafa41103b41a4ce15e2"
|
|
sha256 cellar: :any, arm64_big_sur: "c1ad435035722aecd7a6fe0638f0c9b0422dc3012e264e0e2f08384cdb5a689c"
|
|
sha256 cellar: :any, monterey: "482dffad2aa48520403a157ea6ec528efb5b6717f3575873f21377fd470fac60"
|
|
sha256 cellar: :any, big_sur: "58e407effcf1443a4c57e4f2c940aaf9435680cbcc8514601d2899002aa31f8f"
|
|
sha256 cellar: :any, catalina: "615bd23d5418a2e1619fa33eb17f40736771b83a22e60f378d28a09047a09267"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "bb8eb6d58f4bb2824323831665bcf16a247a5b7b7c3bf855a80267e572966fdb"
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost"
|
|
depends_on "hidapi"
|
|
depends_on "libsodium"
|
|
depends_on "openssl@1.1"
|
|
depends_on "protobuf"
|
|
depends_on "readline"
|
|
depends_on "unbound"
|
|
depends_on "zeromq"
|
|
|
|
conflicts_with "monero", because: "both install a wallet2_api.h header"
|
|
|
|
# Boost 1.76 compatibility
|
|
# https://github.com/loqs/monero/commit/5e902e5e32c672661dfe5677c4a950c4dd409198
|
|
patch :DATA
|
|
|
|
def install
|
|
# Need to help CMake find `readline` when not using /usr/local prefix
|
|
system "cmake", ".", *std_cmake_args, "-DReadline_ROOT_DIR=#{Formula["readline"].opt_prefix}"
|
|
system "make", "install"
|
|
|
|
# Fix conflict with miniupnpc.
|
|
# This has been reported at https://github.com/monero-project/monero/issues/3862
|
|
rm lib/"libminiupnpc.a"
|
|
end
|
|
|
|
service do
|
|
run [opt_bin/"wownerod", "--non-interactive"]
|
|
end
|
|
|
|
test do
|
|
cmd = "yes '' | #{bin}/wownero-wallet-cli --restore-deterministic-wallet " \
|
|
"--password brew-test --restore-height 238084 --generate-new-wallet wallet " \
|
|
"--electrum-seed 'maze vixen spiders luggage vibrate western nugget older " \
|
|
"emails oozed frown isolated ledge business vaults budget " \
|
|
"saucepan faxed aloof down emulate younger jump legion saucepan'" \
|
|
"--command address"
|
|
address = "Wo3YLuTzJLTQjSkyNKPQxQYz5JzR6xi2CTS1PPDJD6nQAZ1ZCk1TDEHHx8CRjHNQ9JDmwCDGhvGF3CZXmmX1sM9a1YhmcQPJM"
|
|
assert_equal address, shell_output(cmd).lines.last.split[1]
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/contrib/epee/include/storages/portable_storage.h b/contrib/epee/include/storages/portable_storage.h
|
|
index f77e89cb6..066e12878 100644
|
|
--- a/contrib/epee/include/storages/portable_storage.h
|
|
+++ b/contrib/epee/include/storages/portable_storage.h
|
|
@@ -39,6 +39,8 @@
|
|
#include "span.h"
|
|
#include "int-util.h"
|
|
|
|
+#include <boost/mpl/contains.hpp>
|
|
+
|
|
namespace epee
|
|
{
|
|
class byte_slice;
|