forked from iina/homebrew-mpv-iina
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mpv-iina.rb
68 lines (58 loc) · 2.09 KB
/
mpv-iina.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
67
68
# Last check with upstream: 356dc6f78059f1706bc8c6c44545c262dca43c3e
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/mpv.rb
class MpvIina < 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"
head "https://github.com/mpv-player/mpv.git"
keg_only "it is intended to only be used for building IINA. This formula is not recommended for daily use"
depends_on "docutils" => :build
depends_on "pkg-config" => :build
depends_on "[email protected]" => :build
depends_on xcode: :build
depends_on "ffmpeg-iina"
depends_on "jpeg"
depends_on "libarchive"
depends_on "libass"
depends_on "little-cms2"
depends_on "luajit-openresty"
depends_on "libbluray"
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"
# luajit-openresty is key-only
ENV.prepend_path "PKG_CONFIG_PATH", Formula["luajit-openresty"].opt_lib/"pkgconfig"
args = %W[
--prefix=#{prefix}
--enable-javascript
--enable-libmpv-shared
--enable-lua
--enable-libarchive
--enable-uchardet
--enable-libbluray
--disable-swift
--disable-debug-build
--disable-macos-media-player
--confdir=#{etc}/mpv
--datadir=#{pkgshare}
--mandir=#{man}
--docdir=#{doc}
--lua=luajit
]
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