[oe-commits] org.oe.dev mythtv: start beating it into a state where it will crosscompile

koen commit oe at amethyst.openembedded.net
Tue Jul 22 09:25:48 UTC 2008


mythtv: start beating it into a state where it will crosscompile

Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: 719f01c7bedccc565279537ecbfdbf8a61bd9a4b
ViewMTN: http://monotone.openembedded.org/revision/info/719f01c7bedccc565279537ecbfdbf8a61bd9a4b
Files:
1
packages/mythtv/mythtv
packages/mythtv/mythtv/configure.patch
packages/mythtv/mythtv_0.21.bb
packages/mythtv/mythtv_svn.bb
packages/mythtv/mythtv.inc
Diffs:

#
# mt diff -r88061bae96ab13a099d1e2ec30bc62a82b27264e -r719f01c7bedccc565279537ecbfdbf8a61bd9a4b
#
#
#
# add_dir "packages/mythtv/mythtv"
# 
# add_file "packages/mythtv/mythtv/configure.patch"
#  content [7b3ee821f461fa62bac40df67d49b3192eedb52f]
# 
# add_file "packages/mythtv/mythtv_0.21.bb"
#  content [f29d4a96714e9f178504e26dc9f419a4b3f33db5]
# 
# add_file "packages/mythtv/mythtv_svn.bb"
#  content [3f0a3f18b7951f987c766de30111c8bf330990e1]
# 
# patch "packages/mythtv/mythtv.inc"
#  from [8018345c29d1b148d50191a1778ff38d9acf1886]
#    to [51e744d181f35e5c30426c6ee9fbac41c2d48a05]
#
============================================================
--- packages/mythtv/mythtv/configure.patch	7b3ee821f461fa62bac40df67d49b3192eedb52f
+++ packages/mythtv/mythtv/configure.patch	7b3ee821f461fa62bac40df67d49b3192eedb52f
@@ -0,0 +1,47 @@
+--- /tmp/configure	2008-07-22 10:27:56.000000000 +0200
++++ mythtv/configure	2008-07-22 10:54:24.000000000 +0200
+@@ -1714,7 +1714,7 @@
+ 
+ has_library()
+ {
+-    if test -f /etc/ld.so.conf ; then
++	if test -f /etc/ld.so.conf && disabled cross_compile ; then
+         LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
+     else
+         LIBPATHS=''
+@@ -1725,7 +1725,7 @@
+     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
++    if test -f /etc/ld.so.conf && disabled cross_compile ; 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
+@@ -1734,7 +1734,7 @@
+         done
+     fi
+ 
+-    LIBPATHS="`echo $LIBPATHS /$libdir_name /usr/$libdir_name /usr/local/$libdir_name /usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
++    enabled cross_compile || 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
+@@ -2254,7 +2254,7 @@
+ EOF
+ 
+ if $cc $CFLAGS $ECFLAGS -o $TMPE $TMPC 2>/dev/null ; then
+-$TMPE && cpuclipspositive="yes"
++enabled cross_compile || $TMPE && cpuclipspositive="yes"
+ fi
+ 
+ # test negative wrap
+@@ -2269,7 +2269,7 @@
+ EOF
+ 
+ if $cc $CFLAGS $ECFLAGS -o $TMPE $TMPC 2>/dev/null ; then
+-$TMPE && cpuclipsnegative="yes"
++enabled cross_compile || $TMPE && cpuclipsnegative="yes"
+ fi
+ 
+ # test for distcc
============================================================
--- packages/mythtv/mythtv_0.21.bb	f29d4a96714e9f178504e26dc9f419a4b3f33db5
+++ packages/mythtv/mythtv_0.21.bb	f29d4a96714e9f178504e26dc9f419a4b3f33db5
@@ -0,0 +1,68 @@
+require mythtv.inc
+
+PR = "r0"
+
+#SRC_URI += "file://configure.patch;patch=1 \
+#            file://libmyth-libdir.patch;patch=1"
+
+# Seen on the mythtv web page:
+# http://www.mythtv.org/mc/fix-mythweb-in-0.20.diff;patch=1
+
+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"
+
+PACKAGES_DYNAMIC = "mythtv-theme-*"
+
+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)
+}
+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}	\
+			--disable-altivec	\
+			--enable-v4l		\
+			--enable-audio-oss	\
+			--enable-proc-opt	\
+			--enable-dvb		\
+			--cross-compile	\
+            --dvb-path=${STAGING_INCDIR}
+
+	sed 's!PREFIX =.*!PREFIX = ${prefix}!;/INCLUDEPATH += $${PREFIX}\/include/d' < settings.pro > settings.pro.new
+	mv settings.pro.new settings.pro
+}
+
+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)
+}
============================================================
--- packages/mythtv/mythtv_svn.bb	3f0a3f18b7951f987c766de30111c8bf330990e1
+++ packages/mythtv/mythtv_svn.bb	3f0a3f18b7951f987c766de30111c8bf330990e1
@@ -0,0 +1,74 @@
+require mythtv.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+PV = "0.21+svnr${SRCREV}"
+PR = "r0"
+
+SRCREV = "17880"
+SRC_URI = "svn://svn.mythtv.org/svn/trunk;module=mythtv;proto=http"
+
+SRC_URI += "file://configure.patch;patch=1 \
+           "
+
+S = "${WORKDIR}/mythtv"
+
+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"
+
+PACKAGES_DYNAMIC = "mythtv-theme-*"
+
+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)
+}
+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}	\
+			--disable-altivec	\
+			--enable-v4l		\
+			--enable-audio-oss	\
+			--enable-proc-opt	\
+			--enable-dvb		\
+			--enable-libmp3lame \
+			--cross-compile	\
+            --dvb-path=${STAGING_INCDIR}
+
+	sed 's!PREFIX =.*!PREFIX = ${prefix}!;/INCLUDEPATH += $${PREFIX}\/include/d' < settings.pro > settings.pro.new
+	mv settings.pro.new settings.pro
+}
+
+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)
+}
============================================================
--- packages/mythtv/mythtv.inc	8018345c29d1b148d50191a1778ff38d9acf1886
+++ packages/mythtv/mythtv.inc	51e744d181f35e5c30426c6ee9fbac41c2d48a05
@@ -2,15 +2,13 @@ SECTION = "x11/multimedia"
 HOMEPAGE = "http://www.mythtv.org"
 LICENSE = "GPL"
 SECTION = "x11/multimedia"
-DEPENDS = "libxinerama lame libxv libxxf86vm libxvmc lirc qt-x11-free"
+DEPENDS = "libxinerama libxv libxxf86vm libxvmc lirc qt-x11-free"
 RDEPENDS_${PN} = "qt-x11-plugins-sqldrivers qt-x11-plugins-imageformats"
 
 SRC_URI = "http://www.mythtv.org/mc/mythtv-${PV}.tar.bz2"
 
-inherit qmake qt3x11
+inherit qmake2 qt3x11
 
-# there is a -march=586 somewhere in the source tree
-COMPATIBLE_HOST = 'i.86.*-linux'
 
 QMAKE_PROFILES = "mythtv.pro"
 
@@ -22,7 +20,7 @@ def mythtv_arch(d):
         elif arch == "x86_64":
                 arch = "x86"
         elif arch == "arm":
-                arch = "armv4l"
+                arch = "${BASE_PACKAGE_ARCH}"
         return arch
 
 MYTHTV_ARCH := "${@mythtv_arch(d)}"






More information about the Openembedded-commits mailing list