61 lines
1.7 KiB
Ruby
61 lines
1.7 KiB
Ruby
class Mpv < Formula
|
|
desc "Media player based on MPlayer and mplayer2"
|
|
homepage "https://mpv.io"
|
|
url "https://github.com/mpv-player/mpv/archive/v0.29.1.tar.gz"
|
|
sha256 "f9f9d461d1990f9728660b4ccb0e8cb5dce29ccaa6af567bec481b79291ca623"
|
|
revision 2
|
|
head "https://github.com/mpv-player/mpv.git"
|
|
|
|
bottle do
|
|
rebuild 1
|
|
sha256 "a7e67ef6a0e0b71320164167e14c9a1ce0d237a9ff822012372c2315ea08b159" => :mojave
|
|
sha256 "11cc6bad21c68054d6ea85fc0b91ba5e4f945107b93855c3a54933ceb81651ff" => :high_sierra
|
|
sha256 "30eacc0d71f4f3ee3be680aadc0a1426f3f8f8dd166e3198e3b475ae26bb0f22" => :sierra
|
|
end
|
|
|
|
depends_on "docutils" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "python" => :build
|
|
|
|
depends_on "ffmpeg"
|
|
depends_on "jpeg"
|
|
depends_on "libass"
|
|
depends_on "little-cms2"
|
|
depends_on "lua@5.1"
|
|
|
|
depends_on "mujs"
|
|
depends_on "vapoursynth"
|
|
depends_on "youtube-dl"
|
|
|
|
def install
|
|
# LANG is unset by default on macOS and causes issues when calling getlocale
|
|
# or getdefaultlocale in docutils. Force the default c/posix locale since
|
|
# that's good enough for building the manpage.
|
|
ENV["LC_ALL"] = "C"
|
|
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--enable-html-build
|
|
--enable-javascript
|
|
--enable-libmpv-shared
|
|
--enable-lua
|
|
--confdir=#{etc}/mpv
|
|
--datadir=#{pkgshare}
|
|
--mandir=#{man}
|
|
--docdir=#{doc}
|
|
--enable-zsh-comp
|
|
--zshdir=#{zsh_completion}
|
|
]
|
|
|
|
system "./bootstrap.py"
|
|
system "python3", "waf", "configure", *args
|
|
system "python3", "waf", "install"
|
|
|
|
system "python3", "TOOLS/osxbundle.py", "build/mpv"
|
|
prefix.install "build/mpv.app"
|
|
end
|
|
|
|
test do
|
|
system bin/"mpv", "--ao=null", test_fixtures("test.wav")
|
|
end
|
|
end
|