increase dvbapp PR.
[vuplus_openembedded] / recipes / mythtv / mythtv_0.21.bb
1 require mythtv.inc
2
3 inherit qmake qt3x11
4
5 PR = "${SRCREV}+r5"
6 REALPV = "0.21"
7
8 SRCREV = "20763"
9 SRC_URI = "svn://svn.mythtv.org/svn/branches/release-0-21-fixes;module=mythtv;proto=http"
10
11 SRC_URI += " \
12             file://ffmpeg-arm-update.diff;patch=1 \
13             file://no-cortex-deadlock.patch;patch=1;pnum=2 \
14             file://configure.patch;patch=1 \
15             file://configh \
16             file://configmak \
17             "
18
19 S = "${WORKDIR}/mythtv"
20
21 QMAKE_PROFILES = "mythtv.pro"
22
23 mythlibs = "mythavutil mythavcodec mythavformat myth mythtv mythui mythfreemheg mythupnp mythlivemedia"
24 PACKAGES =+ "mythtv-backend mythtv-frontend mythtv-bin mythtv-filters mythtv-data"
25
26 FILES_${PN}-dbg += "${libdir}/mythtv/filters/.debug"
27 FILES_mythtv-backend = "${bindir}/mythbackend ${bindir}/mythcommflag ${bindir}/mythfilldatabase ${bindir}/mythtranscode"
28 FILES_mythtv-frontend = "${bindir}/mythfrontend ${datadir}/mythtv/i18n/mythfrontend_* ${datadir}/mythtv/*.ttf"
29 RDEPENDS_mythtv-frontend = "qt-x11-plugins-sqldrivers qt-x11-plugins-imageformats"
30 FILES_mythtv-bin = "${bindir}/*"
31 FILES_mythtv-filters = "${libdir}/mythtv/filters/*"
32 FILES_mythtv-data = "${datadir}"
33 RDEPENDS_${PN} = "mythtv-backend mythtv-frontend mythtv-bin mythtv-filters mythtv-data"
34 ALLOW_EMPTY_${PN} = "1"
35
36 PACKAGES_DYNAMIC = "mythtv-theme-*"
37
38 python __anonymous () {
39     import bb
40
41     mythlibs = bb.data.getVar('mythlibs', d).split()
42     pv = bb.data.expand(bb.data.getVar("REALPV", d), d)
43
44     for m in mythlibs:
45         bb.data.setVar("FILES_lib%s%s" % (m, pv), "${libdir}/lib%s-%s.so.*" % (m, pv), d)
46         bb.data.setVar("FILES_lib%s%s-dev" % (m, pv), "${libdir}/lib%s-%s.*" % (m, pv), d)
47
48     packages = " ".join(map(lambda x: "lib%s%s lib%s%s-dev" % (x, pv, x, pv), mythlibs) + bb.data.getVar("PACKAGES", d).split())
49
50     bb.data.setVar("PACKAGES", packages, d)
51 }
52
53 EXTRA_OECONF_armv5te = " --enable-armv5te "
54 EXTRA_OECONF_armv6 = " --enable-armv6 "
55 EXTRA_OECONF_armv7a = " --enable-armv6"
56
57 #build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up)
58 #not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt
59 MY_ARCH := "${PACKAGE_ARCH}"
60 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"
61
62 MY_TARGET_CC_ARCH := "${TARGET_CC_ARCH}"
63 TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt -mtune=iwmmxt', '${MY_TARGET_CC_ARCH}',d)}"
64
65 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', '--enable-pxa --enable-iwmmxt', '',d)} "
66
67 do_configure_prepend() {
68 # it's not autotools anyway, so we call ./configure directly
69         find . -name "Makefile"|xargs rm -f
70
71         ./configure     --prefix=/usr           \
72                         --mandir=/usr/man       \
73                         --cpu=${MYTHTV_ARCH}    \
74                         --arch=${MYTHTV_ARCH} \
75                         --disable-altivec       \
76                         --disable-directfb      \
77                         --disable-opengl-video \
78                         --disable-strip \
79                         --enable-v4l            \
80                         --enable-audio-oss      \
81                         --enable-proc-opt       \
82                         --enable-dvb            \
83                         --enable-libmp3lame \
84                         --cross-compile \
85                         --dvb-path=${STAGING_INCDIR} \
86                         --with-bindings= \
87                         ${EXTRA_OECONF}
88
89         sed 's!PREFIX =.*!PREFIX = ${prefix}!;/INCLUDEPATH += $${PREFIX}\/include/d' < settings.pro > settings.pro.new
90         mv settings.pro.new settings.pro
91         for pro in ${S}/*/*pro ${S}/*/*/*pro ${S}/*/*/*/*pro ; do
92                 sed -i -e s:opengl::g $pro
93         done
94         sed -i /.SUBDIR/d ${S}/bindings/*pro
95         cat ${WORKDIR}/configh >> ${S}/config.h
96         cat ${WORKDIR}/configmak  ${OPTSMAK} >> ${S}/config.mak
97 }
98
99 python populate_packages_prepend () {
100         new_packages = []
101
102         def the_hook(file, pkg, pattern, format, basename):
103                 new_packages.append(pkg)
104
105         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)
106
107         bb.data.setVar("RDEPENDS_${PN}", "%s %s" % (bb.data.getVar("RDEPENDS_${PN}", d), " ".join(new_packages)), d)
108 }