shithub: dav1d

Download patch

ref: 098a565c551cbe41b5749f6e1d896df0daab96d1
parent: 0040d92bfaa89967f5757f0efca5ee0edd28aec8
author: Marvin Scholz <epirat07@gmail.com>
date: Tue Jun 4 18:55:02 EDT 2019

meson: Fix nasm detection

nasm -v can actually fail for example on macOS, where nasm could be a
stub executable that forwards commands to the real nasm, but if the real
nasm is not installed, fails.
This would lead to a confusing error message due to the out of bounds
array access, to avoid that, explicitly check the exit code.

--- a/meson.build
+++ b/meson.build
@@ -339,6 +339,11 @@
     # check NASM version
     if nasm.found()
         nasm_r = run_command(nasm, '-v')
+
+        if nasm_r.returncode() != 0
+            error('failed running nasm to obtain its version')
+        endif
+
         out = nasm_r.stdout().strip().split()
         if out[1].to_lower() == 'version'
             if out[2].version_compare('<2.13.02')