Merge pull request #207012 from Homebrew/bump-tailwindcss-4.0.5
[Homebrew/homebrew-core.git] / Formula / w / wownero.rb
blobb4f46527be0c8443e16918275c640e7786a3804b
1 class Wownero < Formula
2   desc "Official wallet and node software for the Wownero cryptocurrency"
3   homepage "https://wownero.org"
4   # TODO: Check if we can use unversioned `protobuf` at version bump
5   url "https://codeberg.org/wownero/wownero.git",
6       tag:      "v0.11.3.0",
7       revision: "3e302be710f4e6b4f58642989c8e47711362fa56"
8   license "BSD-3-Clause"
10   # The `strategy` code below can be removed if/when this software exceeds
11   # version 10.0.0. Until then, it's used to omit a malformed tag that would
12   # always be treated as newest.
13   livecheck do
14     url :stable
15     regex(/^v?(\d+(?:\.\d+)+)$/i)
16     strategy :git do |tags, regex|
17       malformed_tags = ["10.0.0"].freeze
18       tags.map do |tag|
19         next if malformed_tags.include?(tag)
21         tag[regex, 1]
22       end
23     end
24   end
26   bottle do
27     sha256 cellar: :any,                 arm64_sequoia: "e853a94c2180d3369de8bb4f5d04cf7ffea7736b3d1d53f17c69b7bfc3275982"
28     sha256 cellar: :any,                 arm64_sonoma:  "89cc4a6b275adf3f8e97f36e8cbfa545bf7b892f6e0f26575e47f936cc816fa9"
29     sha256 cellar: :any,                 arm64_ventura: "a7573258aa7a6c1aa62858fabdd590b4546d57e3c1c569ba5355361d7e9d7a47"
30     sha256 cellar: :any,                 sonoma:        "6f1149d4459630ab60f67a3d84a75e73d933b2dd2885ec215e2dbf05a37fbecf"
31     sha256 cellar: :any,                 ventura:       "b31910c666b6bba034ed47c3a6100f6b42ab5e15ab9f5213e4b831ffc2883d1d"
32     sha256 cellar: :any_skip_relocation, x86_64_linux:  "b579603a0d8d4e8f796ef7efb40e6ff5ceab8272bb585b95914991cc2538f720"
33   end
35   disable! date: "2025-05-11", because: "needs to use unmaintained `boost@1.85` and `protobuf@21`"
37   depends_on "cmake" => :build
38   depends_on "miniupnpc" => :build
39   depends_on "pkgconf" => :build
40   depends_on "boost@1.85"
41   depends_on "hidapi"
42   depends_on "libsodium"
43   depends_on "libusb"
44   depends_on "openssl@3"
45   depends_on "protobuf@21"
46   depends_on "readline"
47   depends_on "unbound"
48   depends_on "zeromq"
50   conflicts_with "monero", because: "both install a wallet2_api.h header"
52   def install
53     # Need to help CMake find `readline` when not using /usr/local prefix
54     args = %W[-DReadline_ROOT_DIR=#{Formula["readline"].opt_prefix}]
56     # Build a portable binary (don't set -march=native)
57     args << "-DARCH=default" if build.bottle?
59     system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
60     system "cmake", "--build", "build"
61     system "cmake", "--install", "build"
62   end
64   service do
65     run [opt_bin/"wownerod", "--non-interactive"]
66   end
68   test do
69     cmd = "yes '' | #{bin}/wownero-wallet-cli --restore-deterministic-wallet " \
70           "--password brew-test --restore-height 238084 --generate-new-wallet wallet " \
71           "--electrum-seed 'maze vixen spiders luggage vibrate western nugget older " \
72           "emails oozed frown isolated ledge business vaults budget " \
73           "saucepan faxed aloof down emulate younger jump legion saucepan'" \
74           "--command address"
75     address = "Wo3YLuTzJLTQjSkyNKPQxQYz5JzR6xi2CTS1PPDJD6nQAZ1ZCk1TDEHHx8CRjHNQ9JDmwCDGhvGF3CZXmmX1sM9a1YhmcQPJM"
76     assert_equal address, shell_output(cmd).lines.last.split[1]
77   end
78 end