2019-07-21 18:14:47 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
FFMPEG_SYSROOT="${HOME}/deps/sysroot"
|
|
|
|
MPV_INSTALL_PREFIX="${HOME}/out/mpv"
|
|
|
|
MPV_VARIANT="${TRAVIS_OS_NAME}"
|
|
|
|
|
|
|
|
if [[ -d "./build/${MPV_VARIANT}" ]] ; then
|
|
|
|
rm -rf "./build/${MPV_VARIANT}"
|
|
|
|
fi
|
|
|
|
|
2021-11-07 19:29:11 +00:00
|
|
|
if [[ $1 = "meson" ]]; then
|
|
|
|
PKG_CONFIG_PATH="${FFMPEG_SYSROOT}/lib/pkgconfig/" CC="${CC}" CXX="${CXX}" \
|
2022-10-29 02:40:53 +00:00
|
|
|
meson setup build \
|
2021-11-07 19:29:11 +00:00
|
|
|
-Dprefix="${MPV_INSTALL_PREFIX}" \
|
|
|
|
-Dlibmpv=true \
|
|
|
|
-D{gl,iconv,lcms2,lua,jpeg,plain-gl,zlib}=enabled \
|
|
|
|
-D{cocoa,coreaudio,gl-cocoa,macos-cocoa-cb,macos-touchbar,videotoolbox-gl}=enabled
|
|
|
|
|
|
|
|
meson compile -C build -j4
|
|
|
|
|
|
|
|
meson install -C build
|
|
|
|
./build/mpv
|
2019-07-21 18:14:47 +00:00
|
|
|
fi
|
|
|
|
|
2021-11-07 19:29:11 +00:00
|
|
|
if [[ $1 = "waf" ]]; then
|
|
|
|
if [[ ! -e "./waf" ]] ; then
|
|
|
|
python3 ./bootstrap.py
|
|
|
|
fi
|
2019-07-21 18:14:47 +00:00
|
|
|
|
2021-11-07 19:29:11 +00:00
|
|
|
PKG_CONFIG_PATH="${FFMPEG_SYSROOT}/lib/pkgconfig/" CC="${CC}" CXX="${CXX}" python3 \
|
|
|
|
./waf configure \
|
|
|
|
--variant="${MPV_VARIANT}" \
|
|
|
|
--prefix="${MPV_INSTALL_PREFIX}" \
|
|
|
|
--enable-{gl,iconv,lcms2,libmpv-shared,lua,jpeg,plain-gl,zlib} \
|
|
|
|
--enable-{cocoa,coreaudio,gl-cocoa,macos-cocoa-cb,macos-touchbar,videotoolbox-gl} \
|
|
|
|
--swift-flags="${CI_SWIFT_FLAGS}"
|
2019-07-21 18:14:47 +00:00
|
|
|
|
2021-11-07 19:29:11 +00:00
|
|
|
python3 ./waf build --variant="${MPV_VARIANT}" -j4
|
|
|
|
|
|
|
|
python3 ./waf install --variant="${MPV_VARIANT}"
|
|
|
|
./build/mpv
|
|
|
|
fi
|