Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] gstreamer: gst-ffmpeg: fix build issues for libav
@ 2012-08-02 21:15 Yao Zhao
  2012-08-04 18:57 ` Derek Buitenhuis
  0 siblings, 1 reply; 10+ messages in thread
From: Yao Zhao @ 2012-08-02 21:15 UTC (permalink / raw)
  To: openembedded-core

1.The included libav configure is not generated by autotools
  patch use-correct-toolchain.patch patched its configure to
use correct toolchain wrapper.

2.add bzip2 dependency explicitly.
  or configure will detect whether libbz2 is installed, if bzip2
is triggered earlier then it will be detected, if not then won't

3.detect whether toolchain supports altivec, if not then add
disable-altivec to libav's configure line or configure will fail

4.move the GSTREAMER_DEBUG to libav's configure, it is not the
option for the main configure.

Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
---
 .../gst-ffmpeg-0.10.13/use-correct-toolchain.patch |   26 ++++++++++++++++++++
 .../gstreamer/gst-ffmpeg_0.10.13.bb                |   26 ++++++++++++++++++--
 2 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/use-correct-toolchain.patch

diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/use-correct-toolchain.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/use-correct-toolchain.patch
new file mode 100644
index 0000000..4e04789
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/use-correct-toolchain.patch
@@ -0,0 +1,26 @@
+use correct toolchain wrapper for libav
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com> 
+
+--- a/gst-libs/ext/libav/configure
++++ b/gst-libs/ext/libav/configure
+@@ -1885,6 +1885,17 @@
+ tmpfile TMPSH .sh
+ tmpfile TMPASM .asm
+ 
++# What we really want to use.  Note that
++# ld should be cc or we will get "unknown options"
++# errors while linking.
++#
++cc=$CC
++as=$CC
++ld=$CC
++nm=$NM
++ar=$AR
++ranlib=$RANLIB
++
+ unset -f mktemp
+ 
+ chmod +x $TMPE
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
index a166290..168232a 100644
--- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
                     file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
 HOMEPAGE = "http://www.gstreamer.net/"
-DEPENDS = "gstreamer gst-plugins-base zlib"
+DEPENDS = "gstreamer gst-plugins-base zlib bzip2"
 
 inherit autotools pkgconfig
 
@@ -19,6 +19,7 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://lower-rank.diff \
            file://configure-fix.patch \
            file://h264_qpel_mmx.patch \
+           file://use-correct-toolchain.patch \
 "
 
 SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
@@ -27,7 +28,28 @@ SRC_URI[sha256sum] = "76fca05b08e00134e3cb92fa347507f42cbd48ddb08ed3343a912def18
 PR = "r3"
 
 GSTREAMER_DEBUG ?= "--disable-debug"
-EXTRA_OECONF = "--with-ffmpeg-extra-configure=\"--target-os=linux\" ${GSTREAMER_DEBUG}"
+
+FFMPEG_EXTRA_CONFIGURE = "--with-ffmpeg-extra-configure"
+FFMPEG_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
+  ${GSTREAMER_DEBUG}"
+FFMPEG_EXTRA_CONFIGURE_COMMON = \
+'${FFMPEG_EXTRA_CONFIGURE}="${FFMPEG_EXTRA_CONFIGURE_COMMON_ARG}"'
+
+EXTRA_OECONF = "${FFMPEG_EXTRA_CONFIGURE_COMMON}"
+# if no altivec support on some powerpc arch
+# return -1 if no found or found !-1
+def arch_feature_find(d, feature, bbvar="CC"):
+       v = d.getVar(bbvar, True)
+       if v is None:
+               return -1
+
+       return v.find(feature)
+
+FFMPEG_EXTRA_PPC = '${FFMPEG_EXTRA_CONFIGURE}=" \
+${FFMPEG_EXTRA_CONFIGURE_COMMON_ARG}\
+${@" --disable-altivec" if arch_feature_find(d, '-mno-altivec') != -1 else ''} \
+"'
+EXTRA_OECONF_append_powerpc = " ${FFMPEG_EXTRA_PPC} "
 
 # yasm not found, use --disable-yasm for a crippled build for libav
 EXTRA_OECONF_append_x86-64 = " --disable-yasm "
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-08-07 20:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 21:15 [PATCH] gstreamer: gst-ffmpeg: fix build issues for libav Yao Zhao
2012-08-04 18:57 ` Derek Buitenhuis
2012-08-05 11:52   ` Koen Kooi
2012-08-05 16:27     ` Derek Buitenhuis
2012-08-05 17:31       ` Koen Kooi
2012-08-05 19:11         ` Khem Raj
2012-08-05 22:16           ` Derek Buitenhuis
2012-08-07 15:24   ` Yao Zhao
2012-08-07 17:00     ` Derek Buitenhuis
2012-08-07 20:06       ` Derek Buitenhuis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox