45bd03b2cc
Closes #6342. Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
74 lines
2.3 KiB
Ruby
74 lines
2.3 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.21.0.tar.gz"
|
|
sha256 "d05f8ece859c500ef1649cdfea911ec1529df1898b8fda3e217766dc28dc9bd3"
|
|
revision 1
|
|
head "https://github.com/mpv-player/mpv.git"
|
|
|
|
bottle do
|
|
sha256 "3ec8078747693087cef5725fcd438324a884aeb7b5e69e87b559361c3b74858f" => :sierra
|
|
sha256 "e85ab51f0fb24bc3e5ffdfd69cffc6ca19f65e7e2cfee40b5cd5d2f539ead8f6" => :el_capitan
|
|
sha256 "b656e199209da9d88d4fc5033b2dd44a343f4453a5a5db7e3e5155a30e607f66" => :yosemite
|
|
end
|
|
|
|
option "with-bundle", "Enable compilation of the .app bundle."
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "docutils" => :build
|
|
depends_on :python3 => :build
|
|
|
|
depends_on "libass"
|
|
depends_on "ffmpeg"
|
|
|
|
depends_on "jpeg" => :recommended
|
|
depends_on "little-cms2" => :recommended
|
|
depends_on "lua" => :recommended
|
|
depends_on "youtube-dl" => :recommended
|
|
|
|
depends_on "libarchive" => :optional
|
|
depends_on "libcaca" => :optional
|
|
depends_on "libdvdread" => :optional
|
|
depends_on "libdvdnav" => :optional
|
|
depends_on "libbluray" => :optional
|
|
depends_on "libaacs" => :optional
|
|
depends_on "pulseaudio" => :optional
|
|
depends_on "vapoursynth" => :optional
|
|
depends_on "uchardet" => :optional
|
|
depends_on :x11 => :optional
|
|
|
|
depends_on :macos => :mountain_lion
|
|
|
|
def install
|
|
# LANG is unset by default on osx 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-zsh-comp
|
|
--enable-libmpv-shared
|
|
--confdir=#{etc}/mpv
|
|
--datadir=#{pkgshare}
|
|
--mandir=#{man}
|
|
--docdir=#{doc}
|
|
--zshdir=#{zsh_completion}
|
|
]
|
|
args << "--enable-libarchive" if build.with? "libarchive"
|
|
args << "--enable-pulse" if build.with? "pulseaudio"
|
|
|
|
system "./bootstrap.py"
|
|
system "python3", "waf", "configure", *args
|
|
system "python3", "waf", "install"
|
|
|
|
if build.with? "bundle"
|
|
system "python3", "TOOLS/osxbundle.py", "build/mpv"
|
|
prefix.install "build/mpv.app"
|
|
end
|
|
end
|
|
|
|
test do
|
|
system bin/"mpv", "--ao=null", test_fixtures("test.wav")
|
|
end
|
|
end
|