|
| 1 | +class Mac < Formula |
| 2 | + desc "Monkey's Audio lossless codec" |
| 3 | + homepage "https://www.monkeysaudio.com" |
| 4 | + url "https://monkeysaudio.com/files/MAC_1096_SDK.zip" |
| 5 | + version "10.96" |
| 6 | + sha256 "73b25a517079bb015e2066b65854a7de0d8468f050b9b96025b7a3cb038f4dba" |
| 7 | + license "BSD-3-Clause" |
| 8 | + |
| 9 | + livecheck do |
| 10 | + url "https://www.monkeysaudio.com/versionhistory.html" |
| 11 | + regex(%r{<div\s+class="release">Version\s+(.*)\s+\(.*\)</div>}i) |
| 12 | + end |
| 13 | + |
| 14 | + bottle do |
| 15 | + sha256 cellar: :any, arm64_sequoia: "578d3d0a7968057c86d572cfcf29a76819899de23e9a9ab0abdaafd37f81a214" |
| 16 | + sha256 cellar: :any, arm64_sonoma: "0dcbb8881af07a7b8fffe8c11eea741eec5775a010ecccd3b825ad61740c98a3" |
| 17 | + sha256 cellar: :any, arm64_ventura: "db0479855c6cdb25ad011997b36e081496f7c336664e91d83d63b4bac7a5fdc2" |
| 18 | + sha256 cellar: :any, sonoma: "3e718d7aacc7d15046aa7fdd95e651a3119ccd5489325123ac07079a026ce7cf" |
| 19 | + sha256 cellar: :any, ventura: "4faf7f64d4a7d532ff27e349f06cf89f19329a17bb98dec19ca9f4bac29705f4" |
| 20 | + sha256 cellar: :any_skip_relocation, x86_64_linux: "9d22279e7212b6ee3b924609b33a8a7092bf2ffaf8d654c814c9197909e90ca7" |
| 21 | + end |
| 22 | + |
| 23 | + depends_on "cmake" => :build |
| 24 | + |
| 25 | + def install |
| 26 | + system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args |
| 27 | + system "cmake", "--build", "build" |
| 28 | + system "cmake", "--install", "build" |
| 29 | + end |
| 30 | + |
| 31 | + test do |
| 32 | + system bin/"mac", test_fixtures("test.wav"), "test.ape", "-c2000" |
| 33 | + system bin/"mac", "test.ape", "-V" |
| 34 | + system bin/"mac", "test.ape", "test.wav", "-d" |
| 35 | + assert_equal Digest::SHA256.hexdigest(test_fixtures("test.wav").read), |
| 36 | + Digest::SHA256.hexdigest((testpath/"test.wav").read) |
| 37 | + end |
| 38 | +end |
0 commit comments