67 lines
2.0 KiB
Ruby
67 lines
2.0 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.32.0.tar.gz"
|
|
sha256 "9163f64832226d22e24bbc4874ebd6ac02372cd717bef15c28a0aa858c5fe592"
|
|
license "GPL-2.0"
|
|
revision 5
|
|
head "https://github.com/mpv-player/mpv.git"
|
|
|
|
bottle do
|
|
sha256 "b5ee75305e024dda4255af1c113e22c9dcafa7d3c3979f90ddf99a042335a1f2" => :catalina
|
|
sha256 "10dc99da93819fb90252d5e28fc89cbefaa670274fec72f87f6c4d64876142b0" => :mojave
|
|
sha256 "59ed6368c7afcd763040459c00f0bc985ee1df86fcd0857279ff5fede14c30fc" => :high_sierra
|
|
end
|
|
|
|
depends_on "docutils" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "python@3.8" => :build
|
|
depends_on xcode: :build
|
|
|
|
depends_on "ffmpeg"
|
|
depends_on "jpeg"
|
|
depends_on "libarchive"
|
|
depends_on "libass"
|
|
depends_on "little-cms2"
|
|
depends_on "lua@5.1"
|
|
depends_on "mujs"
|
|
depends_on "uchardet"
|
|
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"
|
|
|
|
# libarchive is keg-only
|
|
ENV.prepend_path "PKG_CONFIG_PATH", Formula["libarchive"].opt_lib/"pkgconfig"
|
|
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--enable-html-build
|
|
--enable-javascript
|
|
--enable-libmpv-shared
|
|
--enable-lua
|
|
--enable-libarchive
|
|
--enable-uchardet
|
|
--confdir=#{etc}/mpv
|
|
--datadir=#{pkgshare}
|
|
--mandir=#{man}
|
|
--docdir=#{doc}
|
|
--zshdir=#{zsh_completion}
|
|
--lua=51deb
|
|
]
|
|
|
|
system Formula["python@3.8"].opt_bin/"python3", "bootstrap.py"
|
|
system Formula["python@3.8"].opt_bin/"python3", "waf", "configure", *args
|
|
system Formula["python@3.8"].opt_bin/"python3", "waf", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"mpv", "--ao=null", test_fixtures("test.wav")
|
|
assert_match "vapoursynth", shell_output(bin/"mpv --vf=help")
|
|
end
|
|
end
|