summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-20 15:53:40 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:20 +0900
commit1f815558b8a04ed2fc334ca7731e775679f8697d (patch)
treeee535732e15852df96ae7e3709aacc6f058f15e0
parenta0de98871ba4c2596a967589e44736369561bb88 (diff)
downloadmpv-1f815558b8a04ed2fc334ca7731e775679f8697d.tar.bz2
mpv-1f815558b8a04ed2fc334ca7731e775679f8697d.tar.xz
build: reduce worst case with mismatching FFmpeg pkg-config files
Handles mismatching libavfilter/libavdevice and libavcodec slightly better. libavfilter and libavdevice are optional, and thus are checked separately and at a later point of the build. But if a user system has at least 2 FFmpeg installations, and one of them lacks libavfilter or libavdevice, the build script will pick up the libavfilter/libavdevice package of the "other" FFmpeg installation. The moment waf picks these up, all include paths will start pointing at the "wrong" FFmpeg, and the FFmpeg API checks done earlier might be wrong too, leading to obscure and hard to explain compilation failures. Just moving the libavfilter/libavdevice checks before the FFmpeg API checks somewhat deals with this issue. Certainly not a proper solution, but since the change is harmless, and there is no proper solution, and the change doesn't actually add anything new, why not. Conflicts: wscript
-rw-r--r--wscript24
1 files changed, 12 insertions, 12 deletions
diff --git a/wscript b/wscript
index 00e0357d64..09bb04d2fb 100644
--- a/wscript
+++ b/wscript
@@ -392,6 +392,18 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'req': True,
'fmsg': 'No resampler found. Install libavresample or libswresample (FFmpeg).'
}, {
+ 'name': '--libavfilter',
+ 'desc': 'libavfilter',
+ 'func': check_pkg_config('libavfilter', '>= 3.90.100'),
+ }, {
+ 'name': '--libavdevice',
+ 'desc': 'libavdevice',
+ 'func': check_pkg_config('libavdevice', '>= 54.0.0'),
+ }, {
+ 'name': '--libpostproc',
+ 'desc': 'libpostproc',
+ 'func': check_pkg_config('libpostproc', '>= 52.2.100'),
+ }, {
'name': 'avcodec-chroma-pos-api',
'desc': 'libavcodec avcodec_enum_to_chroma_pos API',
'func': check_statement('libavcodec/avcodec.h', """int x, y;
@@ -416,18 +428,6 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'AVVDPAUContext *x = av_vdpau_alloc_context()',
use='libav')
}, {
- 'name': '--libavfilter',
- 'desc': 'libavfilter',
- 'func': check_pkg_config('libavfilter', '>= 3.90.100'),
- }, {
- 'name': '--libavdevice',
- 'desc': 'libavdevice',
- 'func': check_pkg_config('libavdevice', '>= 54.0.0'),
- }, {
- 'name': '--libpostproc',
- 'desc': 'libpostproc',
- 'func': check_pkg_config('libpostproc', '>= 52.2.100'),
- }, {
'name': 'avcodec-metadata-update-side-data',
'desc': 'libavcodec AV_PKT_DATA_METADATA_UPDATE side data type',
'func': check_statement('libavcodec/avcodec.h',