-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmpv.rb
66 lines (57 loc) · 1.95 KB
/
mpv.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# typed: false
# frozen_string_literal: true
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"
revision 4
head "https://github.com/mpv-player/mpv.git"
bottle do
sha256 catalina: "31a266861581541259febc854141b8bfe7d2a3d9f4093817ace56cf9d7be8c37"
sha256 mojave: "79293ea402914b0063cc79cab13198e564a9b136edd22dcb911c7c586cb45525"
sha256 high_sierra: "dff49871ba198a445b63a53cb1d5ffab6a9a8eb42803830aeccebab9e3ca4f10"
end
depends_on "docutils" => :build
depends_on "pkg-config" => :build
depends_on "[email protected]" => :build
depends_on xcode: :build
depends_on "ffmpeg"
depends_on "jpeg"
depends_on "libarchive"
depends_on "libass"
depends_on "little-cms2"
depends_on "[email protected]"
depends_on "mujs"
depends_on "uchardet"
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["[email protected]"].opt_bin/"python3", "bootstrap.py"
system Formula["[email protected]"].opt_bin/"python3", "waf", "configure", *args
system Formula["[email protected]"].opt_bin/"python3", "waf", "install"
end
test do
system bin/"mpv", "--ao=null", test_fixtures("test.wav")
end
end