72 lines
2.5 KiB
Ruby
72 lines
2.5 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.34.0.tar.gz"
|
|
sha256 "f654fb6275e5178f57e055d20918d7d34e19949bc98ebbf4a7371902e88ce309"
|
|
license :cannot_represent
|
|
revision 1
|
|
head "https://github.com/mpv-player/mpv.git", branch: "master"
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "4083cfb8a3d0908c63c62c23951932d663703ba66ef91df47002af8864e6edac"
|
|
sha256 arm64_big_sur: "d6bca807a546f8b3505734b5ac62eb65cd466fcba2ce57e96eba28ffe3e1ba66"
|
|
sha256 monterey: "d5c641939402378abb3c47b4a9c4ea3e6a105ea19d1d6726d6488b8ffc49f51f"
|
|
sha256 big_sur: "62a615dfaafea9a9d387ca3f4ee482926a7d30b1946f0ca8b7d08d61634f7e0c"
|
|
sha256 catalina: "53eaaf54ab725c8752b1a1e7355aedc27830d35606f3de743f526d4f9762d820"
|
|
sha256 x86_64_linux: "1290a1aef5db97fb730405394fdcae19ac6fb9c88b56180ba0727beef7343cb0"
|
|
end
|
|
|
|
depends_on "docutils" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "python@3.9" => :build
|
|
depends_on xcode: :build
|
|
|
|
depends_on "ffmpeg"
|
|
depends_on "jpeg"
|
|
depends_on "libarchive"
|
|
depends_on "libass"
|
|
depends_on "little-cms2"
|
|
depends_on "luajit-openresty"
|
|
depends_on "mujs"
|
|
depends_on "uchardet"
|
|
depends_on "vapoursynth"
|
|
depends_on "yt-dlp"
|
|
|
|
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"
|
|
# luajit-openresty is keg-only
|
|
ENV.prepend_path "PKG_CONFIG_PATH", Formula["luajit-openresty"].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=luajit
|
|
]
|
|
|
|
system Formula["python@3.9"].opt_bin/"python3", "bootstrap.py"
|
|
system Formula["python@3.9"].opt_bin/"python3", "waf", "configure", *args
|
|
system Formula["python@3.9"].opt_bin/"python3", "waf", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"mpv", "--ao=null", "--vo=null", test_fixtures("test.wav")
|
|
assert_match "vapoursynth", shell_output(bin/"mpv --vf=help")
|
|
end
|
|
end
|