Skip to contentSkip to conversation

libav: Remove deprecated --disable-avserver

PATCH New Mike Crowe 1 participant 3 messages Dec 2, 2015

lore
Share & tools
lore

Mike Crowe

author
#0 lore raw

PATCH 1/2 libav: Remove deprecated --disable-avserver

./configure --help says:

--disable-avserver deprecated, does nothing

---
 meta/recipes-multimedia/libav/libav.inc | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-multimedia/libav/libav.inc +0 -1
index d3f4b1b..a8c78be 100644
@@ -63,7 +63,6 @@ EXTRA_OECONF = " \
     --cross-prefix=${TARGET_PREFIX} \
     --prefix=${prefix} \
     \
-    --enable-avserver \
     --enable-avplay \
     --ld="${CCLD}" \
     --arch=${TARGET_ARCH} \
Signature · 1 line
2.1.4
author
#1 lore raw

PATCH 2/2 libav: Add PACKAGECONFIG options: avdevice, avfilter, avplay, gpl

---
 meta/recipes-multimedia/libav/libav.inc | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
meta/recipes-multimedia/libav/libav.inc +8 -5
index a8c78be..e55038c 100644
@@ -34,9 +34,13 @@ BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
 EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
 EXTRA_FFCONF ?= ""
 
-PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ??= "avdevice avfilter avplay bzip2 gpl theora x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
+PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
+PACKAGECONFIG[avplay] = "--enable-avplay,--disable-avplay"
 PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
 PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
 PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
 PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
 PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
@@ -56,14 +60,11 @@ USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ],
 EXTRA_OECONF = " \
     --enable-shared \
     --enable-pthreads \
-    --enable-gpl \
     ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
-    --enable-avfilter \
     \
     --cross-prefix=${TARGET_PREFIX} \
     --prefix=${prefix} \
     \
-    --enable-avplay \
     --ld="${CCLD}" \
     --arch=${TARGET_ARCH} \
     --target-os="linux" \
@@ -87,7 +88,9 @@ do_configure() {
 }
 
 do_install_append() {
-    install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
+    if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'avfilter', 'yes', '', d)}" ]; then
+        install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
+    fi
 }
 
 PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
Signature · 1 line
2.1.4
author
#2 lore raw

PATCH 1/1 libav: Correctly handle prefix=""

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.

---
 meta/recipes-multimedia/libav/libav.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-multimedia/libav/libav.inc +5 -1
index e55038c..a7da107 100644
@@ -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} \
Signature · 1 line
2.1.4