[oe-commits] org.oe.dev mythtv: update to 0.20

pb commit openembedded-commits at lists.openembedded.org
Fri Jan 19 16:06:49 UTC 2007


mythtv: update to 0.20

Author: pb at openembedded.org
Branch: org.openembedded.dev
Revision: 0e20cbcc9ba06c7bd3c4e91957ad42ba442df128
ViewMTN: http://monotone.openembedded.org/revision.psp?id=0e20cbcc9ba06c7bd3c4e91957ad42ba442df128
Files:
1
packages/mythtv/mythtv-0.20
packages/mythtv/mythtv-0.20/configure.patch
packages/mythtv/mythtv-0.20/libmyth-libdir.patch
packages/mythtv/mythtv_0.20.bb
Diffs:

#
# mt diff -r58456f9a4247ec9c9845612d1b87c8180e321ae8 -r0e20cbcc9ba06c7bd3c4e91957ad42ba442df128
#
# 
# 
# add_dir "packages/mythtv/mythtv-0.20"
# 
# add_file "packages/mythtv/mythtv-0.20/configure.patch"
#  content [c39de0a443ff304bf4582249e29ab74ce2b0f7a3]
# 
# add_file "packages/mythtv/mythtv-0.20/libmyth-libdir.patch"
#  content [38b7b41cf2ebe9c918fcbb2fa5c3706571b3568b]
# 
# add_file "packages/mythtv/mythtv_0.20.bb"
#  content [44caf2569263f90e6eb84a4607674e8063ed4ccd]
# 
============================================================
--- packages/mythtv/mythtv-0.20/configure.patch	c39de0a443ff304bf4582249e29ab74ce2b0f7a3
+++ packages/mythtv/mythtv-0.20/configure.patch	c39de0a443ff304bf4582249e29ab74ce2b0f7a3
@@ -0,0 +1,90 @@
+--- mythtv-0.20/configure	2006-08-28 17:18:08.000000000 +0100
++++ mythtv-0.20/configure	2007-01-16 14:42:18.000000000 +0000
+@@ -1225,49 +1225,50 @@
+ 
+ has_library()
+ {
+-    if test -f /etc/ld.so.conf ; then
+-        LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
++    lib=`echo $1 | sed 's/^lib//'`
++    tmpfile=/tmp/conftest.$$
++    rm -f $tmpfile $tmpfile.c
++    cat >$tmpfile.c <<EOF
++int main() { return 0; }
++EOF
++    echo "cc=$cc $LDFLAGS"
++    echo -n "checking for lib$lib... "
++    if $cc $LDFLAGS -o $tmpfile $tmpfile.c -l$lib; then
++      echo "yes"
++      result=0
+     else
+-        LIBPATHS=''
++      echo "no"
++      result=1
+     fi
+-    LIBPATHS="$LIBPATHS `echo $LD_LIBRARY_PATH | sed s/':'/' '/g` "
+-    # Mac OS X has a different variable for this:
+-    LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
+-
+-    # recurse down just one level, should be enough in most cases
+-    if test -f /etc/ld.so.conf ; then
+-        INCL=`cat /etc/ld.so.conf | grep -v "#" | grep  "^include"`
+-        SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
+-        for x in $SRCH ; do
+-            LP_APPEND=`cat $x | grep -v "#" | grep -v "^include"`
+-            LIBPATHS="$LIBPATHS $LP_APPEND"
+-        done
+-    fi
+-
+-    LIBPATHS="`echo $LIBPATHS /$libdir_name /usr/$libdir_name /usr/local/$libdir_name /usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
+-
+-    HAS_IT="no"
+-    for LIBPATH in $LIBPATHS ; do
+-        if test x`ls $LIBPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
+-            HAS_IT="yes"
+-        fi
+-    done
+-    expr $HAS_IT : "yes" > /dev/null
++    rm -f $tmpfile $tmpfile.c
++    return $result
+ }
+ 
+ has_header()
+ {
+-    HPATHS="/usr/local/include /usr/include /usr/include/g++-v3 /usr/X11R6/include"
+-    INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g`
+-    HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` "
+-
+-    HAS_IT="no"
+-    for HPATH in $HPATHS ; do
+-        if test x`ls $HPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
+-            HAS_IT="yes"
+-        fi
+-    done
+-    expr $HAS_IT : "yes" > /dev/null
++    header=$1
++    tmpfile=/tmp/conftest.$$
++    rm -f $tmpfile.o $tmpfile.c
++    case $header in
++    X11/*) extra_incs="#include <X11/Xlib.h>" ;;
++    *) extra_incs="" ;;
++    esac
++    cat >$tmpfile.c <<EOF
++$extra_incs
++#include <$header>
++int main() { return 0; }
++EOF
++    echo "cc=$cc $CPPFLAGS $CFLAGS"
++    echo -n "checking for <$header>... "
++    if $cc $CPPFLAGS $CFLAGS -c -o $tmpfile.o $tmpfile.c; then
++      echo "yes"
++      result=0
++    else
++      echo "no"
++      result=1
++    fi
++    rm -f $tmpfile.o $tmpfile.c
++    return $result
+ }
+ 
+ CCONFIG="$CCONFIG $compile_type"
============================================================
--- packages/mythtv/mythtv-0.20/libmyth-libdir.patch	38b7b41cf2ebe9c918fcbb2fa5c3706571b3568b
+++ packages/mythtv/mythtv-0.20/libmyth-libdir.patch	38b7b41cf2ebe9c918fcbb2fa5c3706571b3568b
@@ -0,0 +1,11 @@
+--- mythtv-0.20/libs/libmyth/libmyth.pro	2006-08-20 07:45:34.000000000 +0100
++++ mythtv-0.20/libs/libmyth/libmyth.pro	2007-01-16 14:54:59.000000000 +0000
+@@ -33,6 +33,8 @@
+ SOURCES += DisplayResScreen.cpp util-x11.cpp qmdcodec.cpp
+ SOURCES += virtualkeyboard.cpp mythobservable.cpp mythsocket.cpp
+ 
++DEFINES += LIBDIR=\"$${LIBDIR}\"
++
+ INCLUDEPATH += ../libmythsamplerate ../libmythsoundtouch ../.. ../
+ DEPENDPATH += ../libmythsamplerate ../libmythsoundtouch ../ ../libmythui
+ 
============================================================
--- packages/mythtv/mythtv_0.20.bb	44caf2569263f90e6eb84a4607674e8063ed4ccd
+++ packages/mythtv/mythtv_0.20.bb	44caf2569263f90e6eb84a4607674e8063ed4ccd
@@ -0,0 +1,92 @@
+DESCRIPTION = "A full featured personal video recorder system."
+HOMEPAGE = "http://www.mythtv.org"
+LICENSE = "GPL"
+SECTION = "x11/multimedia"
+DEPENDS = "libxinerama lame libxv libxxf86vm libxvmc lirc qt-x11-free openchrome"
+PR = "r0"
+
+SRC_URI = "http://www.mythtv.org/mc/mythtv-${PV}.tar.bz2 \
+	file://configure.patch;patch=1 \
+	file://libmyth-libdir.patch;patch=1"
+
+inherit qmake qt3x11
+
+# there is a -march=586 somewhere in the source tree
+COMPATIBLE_HOST = 'i.86.*-linux'
+
+QMAKE_PROFILES = "mythtv.pro"
+
+mythlibs = "mythavutil mythavcodec mythavformat myth mythtv mythui mythfreemheg mythupnp mythlivemedia"
+PACKAGES =+ "mythtv-backend mythtv-frontend mythtv-bin mythtv-filters mythtv-data"
+
+FILES_mythtv-backend = "${bindir}/mythbackend ${bindir}/mythcommflag ${bindir}/mythfilldatabase ${bindir}/mythtranscode"
+FILES_mythtv-frontend = "${bindir}/mythfrontend ${datadir}/mythtv/i18n/mythfrontend_* ${datadir}/mythtv/*.ttf"
+RDEPENDS_mythtv-frontend = "qt-x11-plugins-sqldrivers qt-x11-plugins-imageformats"
+FILES_mythtv-bin = "${bindir}"
+FILES_mythtv-filters = "${libdir}/mythtv/filters"
+FILES_mythtv-data = "${datadir}"
+RDEPENDS_${PN} = "mythtv-backend mythtv-frontend mythtv-bin mythtv-filters mythtv-data"
+ALLOW_EMPTY_${PN} = "1"
+
+python __anonymous () {
+    import bb
+
+    mythlibs = bb.data.getVar('mythlibs', d).split()
+    pv = bb.data.expand(bb.data.getVar("PV", d), d)
+
+    for m in mythlibs:
+        bb.data.setVar("FILES_lib%s%s" % (m, pv), "${libdir}/lib%s-%s.so.*" % (m, pv), d)
+        bb.data.setVar("FILES_lib%s%s-dev" % (m, pv), "${libdir}/lib%s-%s.*" % (m, pv), d)
+
+    packages = " ".join(map(lambda x: "lib%s%s lib%s%s-dev" % (x, pv, x, pv), mythlibs) + bb.data.getVar("PACKAGES", d).split())
+
+    bb.data.setVar("PACKAGES", packages, d)
+}
+
+def mythtv_arch(d):
+        import bb, re
+        arch = bb.data.getVar('TARGET_ARCH', d, 1)
+        if re.match("^i.86$", arch):
+                arch = "x86"
+        elif arch == "x86_64":
+                arch = "x86"
+        elif arch == "arm":
+                arch = "armv4l"
+        return arch
+
+MYTHTV_ARCH := "${@mythtv_arch(d)}"
+
+do_configure_prepend() {
+# it's not autotools anyway, so we call ./configure directly
+	find . -name "Makefile"|xargs rm -f
+	./configure	--prefix=/usr		\
+			--mandir=/usr/man 	\
+			--cpu=${MYTHTV_ARCH}	\
+			--enable-mmx		\
+			--disable-altivec	\
+			--enable-v4l		\
+			--enable-audio-oss	\
+			--enable-proc-opt	\
+			--enable-xvmc		\
+			--enable-xvmc-pro	\
+			--enable-dvb		\
+			--dvb-path=${STAGING_INCDIR}
+
+	sed 's!PREFIX =.*!PREFIX = ${prefix}!;/INCLUDEPATH += $${PREFIX}\/include/d' < settings.pro > settings.pro.new
+	mv settings.pro.new settings.pro
+}
+
+do_install() {
+	oe_runmake INSTALL_ROOT=${D} install
+}
+
+python populate_packages_prepend () {
+	new_packages = []
+
+	def the_hook(file, pkg, pattern, format, basename):
+		new_packages.append(pkg)
+
+	do_split_packages(d, root=bb.data.expand('${datadir}/mythtv/themes', d), file_regex='(.*)', output_pattern='mythtv-theme-%s', description='MythTV theme %s', allow_dirs=True, hook=the_hook, prepend=True)
+
+	bb.data.setVar("RDEPENDS_${PN}", "%s %s" % (bb.data.getVar("RDEPENDS_${PN}", d), " ".join(new_packages)), d)
+}






More information about the Openembedded-commits mailing list