forked from iina/homebrew-mpv-iina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
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: 7f2a47765ca095c20173d9937a86dbd1d28aae2a
# 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.1.tar.gz"
sha256 "32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746"
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 "python@3.9" => :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["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", test_fixtures("test.wav")
end
end