]> code.ossystems Code Review - openembedded-core.git/commitdiff
libav: Correctly handle prefix=""
authorMike Crowe <mac@mcrowe.com>
Wed, 2 Dec 2015 15:54:08 +0000 (15:54 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Dec 2015 10:20:08 +0000 (10:20 +0000)
libav's build system seems to think that prefix="" means that it should
use its default of /usr/local. Setting a prefix of "/" appears to be
sufficient to make it do the right thing.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-multimedia/libav/libav.inc

index e55038c2c296a34e67e19c95b53e810e5709b643..a7da107dfd5a40f6bf1213a0b797feafad6061ff 100644 (file)
@@ -57,13 +57,17 @@ PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
 # Check codecs that require --enable-nonfree
 USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
 
+# libav will install in /usr/local if prefix is empty. Luckily,
+# passing just "/" instead does the right thing.
+nonempty_prefix = "${@bb.data.getVar('prefix', d, True) or '/'}"
+
 EXTRA_OECONF = " \
     --enable-shared \
     --enable-pthreads \
     ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
     \
     --cross-prefix=${TARGET_PREFIX} \
-    --prefix=${prefix} \
+    --prefix=${nonempty_prefix} \
     \
     --ld="${CCLD}" \
     --arch=${TARGET_ARCH} \