surpport seeking the recorded video
[vuplus_openembedded] / recipes / mythtv / mythtv_0.22.bb
1 require mythtv.inc
2
3 DEPENDS_{PN} += "libmyth"
4 DEPENDS_libmyth = "libmythdb libmythavutil libmythavcodec libmythavformat libmythswscale libmythhdhomerun \
5         libmythtv libmythui libmythfreemheg libmythupnp libmythlivemedia"
6
7 RDEPENDS_${PN} = "mythtv-backend mythtv-frontend mythtv-bin mythtv-filters mythtv-database \
8 mysql5-server mysql5-client libmysqlclient qt4-plugin-sqldriver-sqlmysql xmltv"
9 RDEPENDS_${PN}_append_libc-glibc = " glibc-gconv-utf-16"
10
11 PR = "svnr${SRCPV}+r7"
12 PV = "0.22"
13
14 # REALPV is here to support release candidates
15 # OE in that case has as PV something like 0.21+0.22rc1
16 # but for packaging the real PV is needed
17 REALPV = "0.22"
18
19 SRCREV = "23062"
20 SRC_URI = "svn://svn.mythtv.org/svn/branches/release-0-22-fixes;module=mythtv;proto=http"
21
22 S = "${WORKDIR}/mythtv"
23
24 ALLOW_EMPTY_${PN} = "1"
25
26 QMAKE_PROFILES = "mythtv.pro"
27
28 SRC_URI += " \
29         file://configure.patch;patch=1 \
30         "
31
32 inherit qmake2 qt4x11
33
34 EXTRA_MYTHTVCONF_armv7a = "--cpu=cortex-a8"
35 EXTRA_MYTHTVCONF_armv5te = "--cpu=armv5te"
36 EXTRA_MYTHTVCONF ?= ""
37 EXTRA_OECONF = " \
38         --cross-prefix=${TARGET_PREFIX} \
39         --sysroot=${STAGING_DIR_HOST} \
40         --prefix=${prefix} \
41         --arch=${TARGET_ARCH} \
42         \
43         --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
44         --extra-cxxflags="${TARGET_CXXFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
45         --extra-ldflags="${TARGET_LDFLAGS}" \
46         ${EXTRA_MYTHTVCONF} \
47 "
48
49 do_configure_prepend() {
50 # it's not autotools anyway, so we call ./configure directly
51         find . -name "Makefile"|xargs rm -f
52         ./configure     --qmake=qmake2          \
53                         --disable-altivec        \
54                          --disable-opengl        \
55                         --disable-stripping        \
56                         --disable-xvmc                \
57                         --enable-v4l                \
58                         --enable-audio-oss        \
59                         --enable-dvb                \
60                         --enable-libmp3lame \
61             --dvb-path=${STAGING_INCDIR} \
62                         --without-bindings=perl,python \
63                         ${EXTRA_OECONF}
64 }
65
66 do_install() {
67         oe_runmake INSTALL_ROOT=${D} install
68         install -d ${D}${datadir}/mythtv
69         install -d ${D}${datadir}/mythtv/sql
70         install -m 0644 ${S}/database/mc.sql ${D}${datadir}/mythtv/sql
71 }
72
73 PACKAGES =+ "mythtv-backend mythtv-frontend mythtv-bin mythtv-filters mythtv-database"
74 PACKAGES_DYNAMIC = "mythtv-theme-*"
75
76 FILES_${PN}-dbg += "${libdir}/mythtv/filters/.debug"
77 FILES_mythtv-backend = "${bindir}/mythbackend ${bindir}/mythcommflag ${bindir}/mythfilldatabase ${bindir}/mythtranscode"
78 FILES_mythtv-frontend = "${bindir}/mythfrontend ${datadir}/mythtv/i18n/mythfrontend_* ${datadir}/mythtv/*.ttf"
79 FILES_mythtv-bin = "${bindir}/*"
80 FILES_mythtv-filters = "${libdir}/mythtv/filters/*"
81 FILES_mythtv-database = "${datadir}/mythtv/sql/"
82
83 RRECOMMENDS_mythtv-frontend += "mythtv-theme-defaultmenu mythtv-theme-terra"
84
85 mythlibs = "mythdb mythavutil mythavcodec mythavformat mythswscale mythhdhomerun myth mythtv mythui mythfreemheg mythupnp mythlivemedia"
86
87 python __anonymous () {
88     import bb
89     mythlibs = bb.data.getVar('mythlibs', d).split()
90     pv = bb.data.expand(bb.data.getVar("REALPV", d), d)
91     for m in mythlibs:
92         bb.data.setVar("FILES_lib%s%s" % (m, pv), "${libdir}/lib%s-%s.so.*" % (m, pv), d)
93         bb.data.setVar("FILES_lib%s%s-dev" % (m, pv), "${libdir}/lib%s-%s.*" % (m, pv), d)
94     packages = " ".join(map(lambda x: "lib%s%s lib%s%s-dev" % (x, pv, x, pv), mythlibs) + bb.data.getVar("PACKAGES", d).split())
95     bb.data.setVar("PACKAGES", packages, d)
96 }
97 python populate_packages_prepend () {
98         new_packages = []
99         def the_hook(file, pkg, pattern, format, basename):
100                 new_packages.append(pkg)
101         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)
102         bb.data.setVar("RDEPENDS_${PN}", "%s %s" % (bb.data.getVar("RDEPENDS_${PN}", d), " ".join(new_packages)), d)
103 }