[OE-core] [PATCH] libav: Correctly handle prefix=""

Mike Crowe mac at mcrowe.com
Wed Dec 2 15:54:08 UTC 2015


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 at mcrowe.com>
---
 meta/recipes-multimedia/libav/libav.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/libav/libav.inc
index e55038c..a7da107 100644
--- a/meta/recipes-multimedia/libav/libav.inc
+++ b/meta/recipes-multimedia/libav/libav.inc
@@ -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} \
-- 
2.1.4




More information about the Openembedded-core mailing list