summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-11-28 12:02:45 +0200
committeravih <avih@users.noreply.github.com>2021-12-01 11:00:05 +0200
commit68c3be3e67a76712e7ffb1d55424e59071fc9348 (patch)
tree8e69af9d6523d0c31bd410d9051db244ff3e3e87
parent9c71bdca222dfd9c48332e5606f16fd9d950429b (diff)
downloadmpv-build-68c3be3e67a76712e7ffb1d55424e59071fc9348.tar.bz2
mpv-build-68c3be3e67a76712e7ffb1d55424e59071fc9348.tar.xz
README: echo -> printf, explain NAME_options handling
Some implementations of "echo" can interpret the value as option to echo itself if it begins with "-", while "printf" avoid this issue. Also, add a section which explains how the options files are handled. It doesn't contradict any prior/existing docs, but makes it clearer.
-rw-r--r--README.rst32
1 files changed, 28 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index 18b2a41..04686c1 100644
--- a/README.rst
+++ b/README.rst
@@ -72,16 +72,40 @@ if the dependencies are not available.)
You can put additional ffmpeg configure flags into ffmpeg_options. For
example, to enable some dependencies needed for encoding::
- echo --enable-libx264 >> ffmpeg_options
+ printf "%s\n" --enable-libx264 >> ffmpeg_options
- echo --enable-libmp3lame >> ffmpeg_options
+ printf "%s\n" --enable-libmp3lame >> ffmpeg_options
- echo --enable-libfdk-aac >> ffmpeg_options
+ printf "%s\n" --enable-libfdk-aac >> ffmpeg_options
Do this in the mpv-build top-level directory (the same that contains
the build scripts and this readme file). It must be done prior running
./build or ./rebuild.
+NAME_options files (where NAME is ffmpeg/mpv/libass/fribidi)
+============================================================
+
+These files can hold custom configure options which are passed to the
+respective configure scripts.
+
+Empty lines are ignored, and every non-empty line becomes a single verbatim
+argument (including leading and/or trailing spaces) when invoking the
+respective configure script.
+
+This means that shell quotes should *not* be placed at these files, and the
+values should not be indented.
+
+The files can hold arbitrary values, except empty values and values which
+contain newline[s].
+
+Except empty/with-newlines, any list of configure arguments, for instance::
+
+ ./configure --thing=foo --libs="-L/bar -lbaz" -x abc +z
+
+can also be added to the file, like so::
+
+ printf "%s\n" --thing=foo --libs="-L/bar -lbaz" -x abc +z >> ffmpeg_options
+
Instructions for Debian / Ubuntu package
========================================
@@ -172,7 +196,7 @@ Building libmpv
You can enable building libmpv by enabling the configure option::
- echo --enable-libmpv-shared > mpv_options
+ printf "%s\n" --enable-libmpv-shared > mpv_options
Note that this will make the mpv-build scripts also enable PIC for all used
libraries. For this reason, be sure to run ``./clean`` before rebuilding.