summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-01-15 13:56:01 -0600
committerDudemanguy <random342@airmail.cc>2023-01-18 14:56:37 +0000
commita5caba288ff9a9b4f5bc63451c4a3cf7abc5d2a1 (patch)
treecb220dbd2b7e6b1ebf28ef4b1828bb81ab100c17
parente04847453088fb2e029af9a5c501ff1b4dea2b0a (diff)
downloadmpv-build-a5caba288ff9a9b4f5bc63451c4a3cf7abc5d2a1.tar.bz2
mpv-build-a5caba288ff9a9b4f5bc63451c4a3cf7abc5d2a1.tar.xz
configure/build: default to meson
Waf was officially deprecated in mpv, so we should make these scripts use meson by default instead. Waf support is still there for now via the BUILDSYSTEM=waf environment variable (meson no longer requires any special variable to use). The README is adjusted a little to reflect this.
-rw-r--r--README.rst20
-rwxr-xr-xscripts/mpv-build6
-rwxr-xr-xscripts/mpv-config6
-rwxr-xr-xscripts/mpv-install6
-rwxr-xr-xscripts/mpv-uninstall6
5 files changed, 23 insertions, 21 deletions
diff --git a/README.rst b/README.rst
index cf814be..d355d7f 100644
--- a/README.rst
+++ b/README.rst
@@ -39,21 +39,23 @@ statically linked with mpv when using the provided scripts, and no ffmpeg or
libass libraries are/need to be installed. There are no required config or
data files either.
-Meson Support
+**Note**: Building mpv with meson (the default) requires a version of 0.63 or
+greater in order to use the ``prefer-static`` option. If you are on debian, you may
+need to install meson from backports in order to get a non-ancient version.
+Alternatively, you can install it from PyPi.
+
+Waf Support
=============
-These scripts do have support for building with mpv's meson build. They are not
-used by default. To invoke them, you must pass an additional environment variable,
-BUILDSYSTEM=meson to your commands. For example::
+These scripts do have support for building with mpv's deprecated waf build. It is
+not used by default. To invoke it, you must pass an additional environment variable,
+BUILDSYSTEM=waf to your commands. For example::
- BUILDSYSTEM=meson ./rebuild -j4
+ BUILDSYSTEM=waf ./rebuild -j4
-The arguments that you pass should conform to meson conventions and not the waf
+The arguments that you pass should conform to waf conventions and not the meson
ones.
-**Note**: The meson scripts specifically invoke the new ``prefer_static`` built-in
-option. This requires a meson version of 0.63 or greater.
-
Dependencies
============
diff --git a/scripts/mpv-build b/scripts/mpv-build
index 7515003..9f9f74b 100755
--- a/scripts/mpv-build
+++ b/scripts/mpv-build
@@ -2,8 +2,8 @@
set -e
cd mpv
-if [ "$BUILDSYSTEM" = "meson" ]; then
- meson compile -C build "$@"
-else
+if [ "$BUILDSYSTEM" = "waf" ]; then
python3 ./waf build "$@"
+else
+ meson compile -C build "$@"
fi
diff --git a/scripts/mpv-config b/scripts/mpv-config
index 8169053..fcbab2c 100755
--- a/scripts/mpv-config
+++ b/scripts/mpv-config
@@ -24,13 +24,13 @@ echo Using mpv options: "$@"
cd "$BUILD"/mpv
-if [ "$BUILDSYSTEM" = "meson" ]; then
- meson setup build -Dprefer_static=true -Dbuildtype=release "$@"
-else
+if [ "$BUILDSYSTEM" = "waf" ]; then
# add missing private dependencies from libass.pc
# this is necessary due to the hybrid static / dynamic nature of the build
# need to link against stdc++ in case libplacebo was built with glslang,
# which requires that
export LDFLAGS="$LDFLAGS $(pkg-config --libs fontconfig harfbuzz fribidi) -lstdc++"
python3 ./waf configure "$@"
+else
+ meson setup build -Dprefer_static=true -Dbuildtype=release "$@"
fi
diff --git a/scripts/mpv-install b/scripts/mpv-install
index 0a3a30f..ae321f4 100755
--- a/scripts/mpv-install
+++ b/scripts/mpv-install
@@ -2,8 +2,8 @@
set -e
cd mpv
-if [ "$BUILDSYSTEM" = "meson" ]; then
- meson install -C build
-else
+if [ "$BUILDSYSTEM" = "waf" ]; then
python3 ./waf install
+else
+ meson install -C build
fi
diff --git a/scripts/mpv-uninstall b/scripts/mpv-uninstall
index 777db4b..7207515 100755
--- a/scripts/mpv-uninstall
+++ b/scripts/mpv-uninstall
@@ -2,8 +2,8 @@
set -e
cd mpv
-if [ "$BUILDSYSTEM" = "meson" ]; then
- ninja uninstall -C build
-else
+if [ "$BUILDSYSTEM" = "waf" ]; then
python3 ./waf uninstall
+else
+ ninja uninstall -C build
fi