44 lines
1.3 KiB
Ruby
44 lines
1.3 KiB
Ruby
class VorbisTools < Formula
|
|
desc "Ogg Vorbis CODEC tools"
|
|
homepage "https://github.com/xiph/vorbis-tools"
|
|
url "https://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz"
|
|
sha256 "a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc"
|
|
revision 2
|
|
|
|
bottle do
|
|
cellar :any
|
|
rebuild 1
|
|
sha256 "71a81bbeec2d79ddd7f39858cf66a450fac9d542824c30a064298229d6637594" => :catalina
|
|
sha256 "c3e402519ad170a0a37d80d394d8afbe905985784f8ea5d93fcc84a4486a9977" => :mojave
|
|
sha256 "e929c31331ffcb58d21cb086184ed747185dd8d0f4b7ee1b98134cabe44490bc" => :high_sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "flac"
|
|
depends_on "libao"
|
|
depends_on "libogg"
|
|
depends_on "libvorbis"
|
|
|
|
def install
|
|
# Fix `brew linkage --test` "Missing libraries: /usr/lib/libnetwork.dylib"
|
|
# Prevent bogus linkage to the libnetwork.tbd in Xcode 7's SDK
|
|
ENV.delete("SDKROOT") if MacOS.version == :yosemite
|
|
|
|
args = %W[
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--disable-nls
|
|
--prefix=#{prefix}
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"oggenc", test_fixtures("test.wav"), "-o", "test.ogg"
|
|
assert_predicate testpath/"test.ogg", :exist?
|
|
output = shell_output("#{bin}/ogginfo test.ogg")
|
|
assert_match "20.625000 kb/s", output
|
|
end
|
|
end
|