-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-mpv
executable file
·48 lines (38 loc) · 939 Bytes
/
build-mpv
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
#!/usr/bin/env bash -e
#
# mpv
# https://github.com/mpv-player/mpv.git
#
cd "$(dirname "$0")"
set -a; source build.env; set +a
pkgname="mpv"
pkgdir="${STOWDIR}/${pkgname}"
srcdir="src/mpv"
builddir="${TMPDIR:-/tmp}/build.${pkgname}"
if [ "$1" == "--bundle" ]; then
bundle=1
shift
fi
rm -rf "${builddir}"
meson setup "${builddir}" "${srcdir}" \
--prefix="${pkgdir}" \
-Dwrap_mode=nodownload \
-Dbuildtype=release \
-Db_lto=true \
-Db_lto_mode=thin \
-Dlua=luajit \
-Ddvdnav=enabled \
-Dgl=disabled \
-Dmacos-touchbar=disabled \
"$@"
meson compile -C "${builddir}"
if [ -n "${bundle}" ]; then
mkdir -p ~/.config/vulkan
ln -sfn "${PREFIX}"/etc/vulkan/icd.d ~/.config/vulkan/icd.d
meson compile -C "${builddir}" macos-bundle
tar -czvf mpv.tar.gz -C "${builddir}" mpv.app
fi
rm -rf "${pkgdir}"
meson install -C "${builddir}" --tags runtime,devel
stow -Rd "${STOWDIR}" "${pkgname}"
rm -rf "${builddir}"