Skip to contentSkip to conversation

xbmc: Fix serveral build errors and install missing dependencies

PATCH In review Otavio Salvador 1 participant 2 messages Oct 11, 2012 – Oct 15, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xbmc: Fix serveral build errors and install missing dependencies

This allow the package to build fine. On the test board it didn't show anything in display but it seems to be hardware specific issue.

---
 .../xbmc/configure.in-Avoid-running-code.patch     |   32 ++++++++++++++++++++
 .../recipes-mediacentre/xbmc/xbmc_git.bb           |   28 +++++++++++------
 2 files changed, 50 insertions(+), 10 deletions(-)
 create mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch new file +32 -0
new file mode 100644
index 0000000..5c14059
@@ -0,0 +1,32 @@
+From cfd851660a594801a591e80dc820c65cb7bd7836 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <[email protected]>
+Date: Sat, 6 Oct 2012 06:40:03 -0300
+Subject: [PATCH] configure.in: Avoid running code or we break cross-compile
+
+Upstream-Status: Backport [similar change done for 12.0]
+
+Signed-off-by: Otavio Salvador <[email protected]>
+---
+ configure.in |    6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ef94683..d7efcb0 100755
+--- a/configure.in
++++ b/configure.in
+@@ -1246,11 +1246,7 @@ if test "$use_external_ffmpeg" = "yes"; then
+   AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
+ 
+   # Disable vdpau support if external libavcodec doesn't have it
+-  AC_RUN_IFELSE(
+-    AC_LANG_PROGRAM([[#include <libavcodec/avcodec.h>]],
+-      [[avcodec_register_all();
+-        AVCodec *codec = avcodec_find_decoder_by_name("vc1_vdpau");
+-        return (codec) ? 0 : 1;]]),,
++  AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
+     [if test "x$use_vdpau" = "xyes"; then
+       AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
+     else
+-- 
+1.7.2.5
+
meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb +18 -10
index f0ce7cf..74bf710 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "XBMC Media Center"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=6eb631b6da7fdb01508a80213ffc35ff"
 
-DEPENDS = "libusb1 libcec libplist expat yajl gperf-native libxmu fribidi mpeg2dec ffmpeg samba fontconfig curl python libass libmodplug libmicrohttpd wavpack libmms cmake-native libsdl-image libsdl-mixer virtual/egl mysql5 sqlite3 libmms faad2 libcdio libpcre boost lzo enca avahi libsamplerate0 libxinerama libxrandr libxtst bzip2 virtual/libsdl jasper zip-native zlib"
+DEPENDS = "libusb1 libcec libplist expat yajl gperf-native libxmu fribidi mpeg2dec ffmpeg samba fontconfig curl python libass libmodplug libmicrohttpd wavpack libmms cmake-native libsdl-image libsdl-mixer virtual/egl mysql5 sqlite3 libmms faad2 libcdio libpcre boost lzo enca avahi libsamplerate0 libxinerama libxrandr libxtst bzip2 virtual/libsdl jasper zip-native zlib libtinyxml"
 #require recipes/egl/egl.inc
 
 SRCREV = "82388d55dae79cbb2e486e307e23202e76a43efa"
@@ -15,12 +15,17 @@ SRC_URI = "git://github.com/xbmc/xbmc.git;branch=eden;protocol=git \
            file://0001-configure-don-t-run-python-distutils-to-find-STAGING.patch \
            file://0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch \
            file://0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch \
+           file://configure.in-Avoid-running-code.patch \
           "
 
 inherit autotools gettext python-dir
 
 S = "${WORKDIR}/git"
 
+CACHED_CONFIGUREVARS += " \
+ ac_cv_path_PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" \
+"
+
 EXTRA_OECONF = " \
  --disable-rpath \
  --enable-gles \
@@ -30,6 +35,11 @@ EXTRA_OECONF = " \
  --enable-external-libraries \
 "
 
+FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
+BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
+
+EXTRA_OECONF_append_armv7a = "--cpu=cortex-a8"
+
 # for python modules
 export HOST_SYS
 export BUILD_SYS
@@ -45,19 +55,17 @@ do_configure() {
 PARALLEL_MAKE = ""
 
 do_compile_prepend() {
-
-	sed -i -e 's:-rpath \$(libdir)::g' lib/libid3tag/libid3tag/Makefile
-
 	for i in $(find . -name "Makefile") ; do
-		sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${STAGING_LIBDIR}:g' $i
+		sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
 	done
 
-	for i in $(find . -name "*.mak*") ; do
-		sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir)::g' $i
+	for i in $(find . -name "*.mak*" -o	-name "Makefile") ; do
+		sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
 	done
-	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir)::g' ${S}/Makefile	
 }
 
+INSANE_SKIP_${PN} = "rpaths"
+
 # on ARM architectures xbmc will use GLES which will make the regular wrapper fail, so start it directly
 do_install_append_arm() {
 	sed -i -e 's:Exec=xbmc:Exec=${libdir}/xbmc/xbmc.bin:g' ${D}${datadir}/applications/xbmc.desktop
@@ -71,7 +79,7 @@ RRECOMMENDS_${PN}_append = " libcec \
                              python \
                              python-lang \
                              python-re \
+                             python-netclient \
+                             libcurl \
                              "
 RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 glibc-gconv-ibm850"
-
-
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Otavio Salvador

This allow the package to build fine. On the test board it didn't show anything in display but it seems to be hardware specific issue.

ping?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br