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}" \
|
2023-02-26 19:05:49 +00:00
|
|
|
-D{libmpv,tests}=true \
|
2021-11-07 19:29:11 +00:00
|
|
|
-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
|
2023-02-26 17:22:27 +00:00
|
|
|
./build/mpv -v --no-config
|
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 \
|
2023-01-29 06:30:58 +00:00
|
|
|
--out=build_waf \
|
2021-11-07 19:29:11 +00:00
|
|
|
--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}"
|
2023-02-26 17:22:27 +00:00
|
|
|
${MPV_INSTALL_PREFIX}/bin/mpv -v --no-config
|
2021-11-07 19:29:11 +00:00
|
|
|
fi
|