From 4c566bd6acff30e698da3514f19098eb051a4f3e Mon Sep 17 00:00:00 2001 From: K Henriksson Date: Tue, 14 Jan 2025 20:02:53 -0800 Subject: [PATCH] libcdio-paranoia 10.2-2.0.2 (new formula) This is a cross-platform version of cdparanoia using libcdio for disc access. Unlike cdparanoia (now removed from Homebrew), it is maintained. Testing is challenging since functionality requires the disc drive. Per advice in https://docs.brew.sh/Formula-Cookbook#add-a-test-to-the-formula, this simply tests that the error is correct. This is a redo of #27347 and #114860. --- Formula/lib/libcdio-paranoia.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Formula/lib/libcdio-paranoia.rb diff --git a/Formula/lib/libcdio-paranoia.rb b/Formula/lib/libcdio-paranoia.rb new file mode 100644 index 0000000000000..98f5264c9f92f --- /dev/null +++ b/Formula/lib/libcdio-paranoia.rb @@ -0,0 +1,23 @@ +class LibcdioParanoia < Formula + desc "CD paranoia on top of libcdio" + homepage "https://github.com/libcdio/libcdio-paranoia" + url "https://github.com/libcdio/libcdio-paranoia/releases/download/release-10.2%2B2.0.2/libcdio-paranoia-10.2+2.0.2.tar.gz" + # Plus sign is not a valid version character + version "10.2-2.0.2" + sha256 "99488b8b678f497cb2e2f4a1a9ab4a6329c7e2537a366d5e4fef47df52907ff6" + license "GPL-3.0-only" + + depends_on "pkgconf" => :build + depends_on "libcdio" + + def install + system "./configure", *std_configure_args + system "make", "install" + end + + test do + assert_match(/^cdparanoia /, shell_output("#{bin}/cd-paranoia -V 2>&1")) + # Ensure it errors properly with no disc drive. + assert_match(/Unable find or access a CD-ROM drive/, shell_output("#{bin}/cd-paranoia -BX 2>&1", 1)) + end +end