summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-11-28 11:09:25 +0200
committeravih <avih@users.noreply.github.com>2021-12-01 11:00:05 +0200
commit9c71bdca222dfd9c48332e5606f16fd9d950429b (patch)
treeac664149cf3ccf002b6f61c380f9cd323e1dd394
parent3de25ed5c50ba0f86495bc22919c86e059a0ea48 (diff)
downloadmpv-build-9c71bdca222dfd9c48332e5606f16fd9d950429b.tar.bz2
mpv-build-9c71bdca222dfd9c48332e5606f16fd9d950429b.tar.xz
NAME_options files: allow values with spaces
Previously these files were split into arguments based on default IFS (space, tab, newline), which means that they couldn't hold whitespaces. Now they're split by newlines, so the entire line is a single value. Like before, values with newline[s] or empty can't be stored at the file, but other than these the files can now hold arbitrary values. This is potentially a breaking change, because while it was documented that there should be one value per line (and the example didn't add leading/trailing spaces), in practice it was possible to place several values per line, and leading/trailing spaces were ignored. So this will break for users who placed several options per line and/or expect whitespaces to be ignored. Also, libass and fribidi didn't support *_options files, now they do.
-rwxr-xr-xscripts/ffmpeg-config4
-rwxr-xr-xscripts/fribidi-config8
-rwxr-xr-xscripts/libass-config8
-rwxr-xr-xscripts/mpv-config4
4 files changed, 24 insertions, 0 deletions
diff --git a/scripts/ffmpeg-config b/scripts/ffmpeg-config
index 49d68f1..64ac613 100755
--- a/scripts/ffmpeg-config
+++ b/scripts/ffmpeg-config
@@ -2,9 +2,13 @@
set -e
BUILD="$(pwd)"
+newline="
+"
if test -f "$BUILD"/ffmpeg_options ; then
+ IFS=$newline
set -- $(cat "$BUILD"/ffmpeg_options) "$@"
+ unset -v IFS
fi
OPTIONS="--enable-gpl --disable-debug --disable-doc"
diff --git a/scripts/fribidi-config b/scripts/fribidi-config
index f9e7be6..3855248 100755
--- a/scripts/fribidi-config
+++ b/scripts/fribidi-config
@@ -1,6 +1,14 @@
#!/bin/sh
set -e
BUILD="$(pwd)"
+newline="
+"
+
+if test -f "$BUILD"/fribidi_options ; then
+ IFS=$newline
+ set -- $(cat "$BUILD"/fribidi_options) "$@"
+ unset -v IFS
+fi
OPTIONS=
if "$BUILD"/scripts/test-libmpv ; then
diff --git a/scripts/libass-config b/scripts/libass-config
index 1a6e56e..82cfe6c 100755
--- a/scripts/libass-config
+++ b/scripts/libass-config
@@ -1,6 +1,14 @@
#!/bin/sh
set -e
BUILD="$(pwd)"
+newline="
+"
+
+if test -f "$BUILD"/libass_options ; then
+ IFS=$newline
+ set -- $(cat "$BUILD"/libass_options) "$@"
+ unset -v IFS
+fi
OPTIONS=
if "$BUILD"/scripts/test-libmpv ; then
diff --git a/scripts/mpv-config b/scripts/mpv-config
index 126fdcf..c83f22d 100755
--- a/scripts/mpv-config
+++ b/scripts/mpv-config
@@ -2,9 +2,13 @@
set -e
BUILD="$(pwd)"
+newline="
+"
if test -f "$BUILD"/mpv_options ; then
+ IFS=$newline
set -- $(cat "$BUILD"/mpv_options) "$@"
+ unset -v IFS
fi
case "$PKG_CONFIG_PATH" in