[usbtunerhelper] add patch for usbtuners which take longer for loading during init.
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-vuplus / enigma2 / enigma2.bb
1 DESCRIPTION = "Enigma2 is an experimental, but useful framebuffer-based frontend for DVB functions"
2 MAINTAINER = "vuplus team"
3 LICENSE = "GPLv2"
4 LIC_FILES_CHKSUM = "file://LICENSE;md5=c9e255efa454e0155c1fd758df7dcaf3"
5
6 DEPENDS = " \
7         jpeg \
8         giflib \
9         libmad \
10         libpng \
11         libsigc++-1.2 \
12         gettext-native \
13         dreambox-dvbincludes \
14         freetype \
15         libdvbsi++ \
16         python \
17         swig-native \
18         libfribidi \
19         libxml2 \
20         libxmlccwrap \
21         libdreamdvd \
22         ${@base_contains("GST_VERSION", "1.0", "gstreamer1.0-plugins-base gstreamer1.0", "gst-plugins-base gstreamer", d)} \
23         python-wifi \
24         hostapd \
25         bridge-utils \
26         ntfs-3g \
27         dosfstools \
28         util-linux \
29         fuse-exfat \
30         satipclient \
31         "
32
33 DEPENDS += " \
34         wireless-tools \
35         wpa-supplicant \
36         python-twisted \
37         curlftpfs \
38         fuse \
39         virtual/kernel \
40         aio-grab \
41         librtmp \
42         cdrkit \
43         libcddb \
44         libcdio \
45         avahi \
46         gstreamer1.0-plugins-good \
47         gstreamer1.0-plugins-bad \
48         "
49
50 DEPENDS += " \
51         vuplus-3gcommand \
52         vuplus-dlnaserver \
53         "
54
55 RDEPENDS_${PN} = " \
56         alsa-conf \
57         ethtool \
58         glibc-gconv-iso8859-15 \
59         parted \
60         ${PYTHON_RDEPS} \
61         ${GST_RDEPENDS} \
62         fuse-exfat \
63         util-linux-partx \
64         vuplus-skins \
65         ${@base_contains("VUPLUS_FEATURES", "dvbproxy", "vuplus-dvb-proxy libgles vuplus-platform-util", "vuplus-dvb-modules", d)} \
66         ${@base_contains("VUPLUS_FEATURES", "bluetooth", "bluetoothsetup-${MACHINE}", "", d)} \
67         udev \
68         "
69
70 PYTHON_RDEPS = " \
71         python-codecs \
72         python-core \
73         python-lang \
74         python-re \
75         python-threading \
76         python-xml \
77         python-fcntl \
78         python-stringold \
79         python-pickle \
80         python-netclient \
81         "
82
83 GST_RDEPENDS = "${@base_contains('GST_VERSION', '1.0', ' \
84         gstreamer1.0-plugin-dvbmediasink \
85         gstreamer1.0-plugin-subsink \
86         gstreamer1.0-plugins-base-alsa \
87         gstreamer1.0-plugins-base-app \
88         gstreamer1.0-plugins-base-audioconvert \
89         gstreamer1.0-plugins-base-audioresample \
90         gstreamer1.0-plugins-base-ogg \
91         gstreamer1.0-plugins-base-playback \
92         gstreamer1.0-plugins-base-subparse \
93         gstreamer1.0-plugins-base-typefindfunctions \
94         gstreamer1.0-plugins-base-vorbis \
95         gstreamer1.0-plugins-good-apetag \
96         gstreamer1.0-plugins-good-audioparsers \
97         gstreamer1.0-plugins-good-autodetect \
98         gstreamer1.0-plugins-good-avi \
99         gstreamer1.0-plugins-good-flac \
100         gstreamer1.0-plugins-good-flv \
101         gstreamer1.0-plugins-good-icydemux \
102         gstreamer1.0-plugins-good-id3demux \
103         gstreamer1.0-plugins-good-isomp4 \
104         gstreamer1.0-plugins-good-matroska \
105         gstreamer1.0-plugins-good-rtp \
106         gstreamer1.0-plugins-good-rtpmanager \
107         gstreamer1.0-plugins-good-rtsp \
108         gstreamer1.0-plugins-good-souphttpsrc \
109         gstreamer1.0-plugins-good-udp \
110         gstreamer1.0-plugins-good-wavparse \
111         gstreamer1.0-plugins-bad-faad \
112         gstreamer1.0-plugins-bad-fragmented \
113         gstreamer1.0-plugins-bad-videoparsersbad \
114         gstreamer1.0-plugins-bad-mms \
115         gstreamer1.0-plugins-bad-mpegpsdemux \
116         gstreamer1.0-plugins-bad-mpegtsdemux \
117         gstreamer1.0-plugins-ugly-asf \
118         gstreamer1.0-plugins-ugly-cdio \
119         gstreamer1.0-plugins-ugly-dvdsub \
120         gstreamer1.0-plugins-ugly-mad \
121         gstreamer1.0-plugins-ugly-amrnb \
122         gstreamer1.0-plugins-ugly-amrwbdec \
123         ', ' \
124         gst-plugin-dvbmediasink \
125         gst-plugin-subsink \
126         gst-plugins-base-alsa \
127         gst-plugins-base-app \
128         gst-plugins-base-audioconvert \
129         gst-plugins-base-audioresample \
130         gst-plugins-base-decodebin \
131         gst-plugins-base-decodebin2 \
132         gst-plugins-base-ogg \
133         gst-plugins-base-playbin \
134         gst-plugins-base-subparse \
135         gst-plugins-base-typefindfunctions \
136         gst-plugins-base-vorbis \
137         gst-plugins-good-apetag \
138         gst-plugins-good-audioparsers \
139         gst-plugins-good-autodetect \
140         gst-plugins-good-avi \
141         gst-plugins-good-flac \
142         gst-plugins-good-flv \
143         gst-plugins-good-icydemux \
144         gst-plugins-good-id3demux \
145         gst-plugins-good-isomp4 \
146         gst-plugins-good-matroska \
147         gst-plugins-good-rtp \
148         gst-plugins-good-rtpmanager \
149         gst-plugins-good-rtsp \
150         gst-plugins-good-souphttpsrc \
151         gst-plugins-good-udp \
152         gst-plugins-good-wavparse \
153         gst-plugins-bad-cdxaparse \
154         gst-plugins-bad-faad \
155         gst-plugins-bad-mms \
156         gst-plugins-bad-mpegdemux \
157         gst-plugins-bad-vcdsrc \
158         gst-plugins-bad-fragmented \
159         gst-plugins-ugly-asf \
160         gst-plugins-ugly-cdio \
161         gst-plugins-ugly-dvdsub \
162         gst-plugins-ugly-mad \
163         gst-plugins-ugly-mpegstream \
164         gst-plugins-ugly-mpegaudioparse \
165         gst-plugins-ugly-amrnb \
166         gst-plugins-ugly-amrwbdec \
167         ', d)}"
168
169 # 'forward depends' - no two providers can have the same PACKAGES_DYNAMIC, however both
170 # enigma2 and enigma2-plugins produce enigma2-plugin-*.
171 #DEPENDS += "enigma2-plugins"
172 #PACKAGES_DYNAMIC = "enigma2-plugin-*"
173
174 SUMMARY_enigma2-plugin-extensions-cutlisteditor = "enables you to cut your movies."
175 RDEPENDS_enigma2-plugin-extensions-cutlisteditor = "aio-grab"
176 SUMMARY_enigma2-plugin-extensions-graphmultiepg = "shows a graphical timeline EPG."
177 SUMMARY_enigma2-plugin-extensions-pictureplayer = "displays photos on the TV."
178 SUMMARY_enigma2-plugin-systemplugins-frontprocessorupdate = "keeps your frontprocessor up to date."
179 SUMMARY_enigma2-plugin-systemplugins-positionersetup = "helps you installing a motorized dish."
180 SUMMARY_enigma2-plugin-systemplugins-satelliteequipmentcontrol = "allows you to fine-tune DiSEqC-settings."
181 SUMMARY_enigma2-plugin-systemplugins-satfinder = "helps you to align your dish."
182 SUMMARY_enigma2-plugin-systemplugins-skinselector = "shows a menu with selectable skins."
183 SUMMARY_enigma2-plugin-systemplugins-videomode = "selects advanced video modes"
184 DEPENDS_enigma2-plugin-extensions-dvdplayer = "libdreamdvd0"
185 RDEPENDS_enigma2-plugin-systemplugins-nfiflash = "python-twisted-web"
186 RDEPENDS_enigma2-plugin-systemplugins-softwaremanager = "python-twisted-web"
187 RCONFLICTS_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
188 RREPLACES_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
189 SUMMARY_enigma2-plugin-systemplugins-crashlogautosubmit = "automatically send crashlogs to Dream Multimedia"
190 RDEPENDS_enigma2-plugin-systemplugins-crashlogautosubmit = "python-twisted-mail python-twisted-names python-compression python-mime python-email"
191 SUMMARY_enigma2-plugin-systemplugins-cleanupwizard = "informs you on low internal memory on system startup."
192 SUMMARY_enigma2-plugin-extenstions-modem = "opens a menu to connect to internet via builtin modem."
193 RDEPENDS_enigma2-plugin-extensions-modem = "dreambox-modem-ppp-scripts ppp"
194 SUMMARY_enigma2-plugin-systemplugins-wirelesslan = "helps you configuring your wireless lan"
195 RDEPENDS_enigma2-plugin-systemplugins-wirelesslan = "wpa-supplicant wireless-tools python-wifi"
196 SUMMARY_enigma2-plugin-systemplugins-wirelesslansetup = "configure wireless lan"
197 RDEPENDS_enigma2-plugin-systemplugins-wirelesslansetup = "wpa-supplicant wireless-tools python-wifi"
198 SUMMARY_enigma2-plugin-systemplugins-networkwizard = "provides easy step by step network configuration"
199 RDEPENDS_enigma2-plugin-extensions-webbrowser = "python-gdata libqtwebkite4 vuplus-webbrowser-utils qt4-embedded-fonts qt4-embedded-plugin-imageformat-gif qt4-embedded-plugin-imageformat-ico qt4-embedded-plugin-imageformat-jpeg qt4-embedded-plugin-imageformat-mng qt4-embedded-plugin-imageformat-svg qt4-embedded-plugin-imageformat-tiff qt4-embedded-plugin-iconengine-svgicon "
200 SUMMARY_enigma2-plugin-systemplugins-crashreport = "automatically send crashlogs to Vu+"
201 RDEPENDS_enigma2-plugin-systemplugins-crashreport = "python-twisted-mail python-twisted-names python-compression python-mime python-email"
202 RDEPENDS_enigma2-plugin-systemplugins-wirelessaccesspoint = "hostapd bridge-utils"
203
204 RDEPENDS_enigma2-plugin-extensions-streamtv = " \
205         librtmp \
206         ${@base_contains("GST_VERSION", "1.0", "gstreamer1.0-plugins-bad-rtmp", "gst-plugins-bad-rtmp", d)} \
207 "
208
209 DEPENDS += "djmount minidlna"
210 RDEPENDS_enigma2-plugin-extensions-dlnaserver = "minidlna vuplus-dlnaserver"
211 RDEPENDS_enigma2-plugin-extensions-dlnabrowser = "djmount kernel-module-fuse fuse-utils"
212
213 DEPENDS += "${@base_contains("VUPLUS_FEATURES", "hbbtv", "opera-hbbtv" , "", d)}"
214 RDEPENDS_enigma2-plugin-extensions-hbbtv = "${@base_contains("VUPLUS_FEATURES", "hbbtv", "opera-hbbtv" , "", d)}"
215
216 DEPENDS += "${@base_contains("VUPLUS_FEATURES", "webkithbbtv", "webkit-hbbtv-browser" , "", d)}"
217
218 DEPENDS += "wvdial wvstreams ppp usb-modeswitch usb-modeswitch-data"
219 RDEPENDS_enigma2-plugin-systemplugins-3gmodemmanager = "ppp usb-modeswitch usb-modeswitch-data wvdial wvstreams \
220         kernel-module-ppp-async kernel-module-ppp-deflate kernel-module-ppp-synctty kernel-module-ppp-generic kernel-module-usbserial \
221         vuplus-3gcommand \
222 "
223
224 RDEPENDS_enigma2-plugin-systemplugins-devicemanager = "util-linux-blkid ntfs-3g dosfstools"
225 RDEPENDS_enigma2-plugin-systemplugins-netdrive = "curlftpfs kernel-module-fuse fuse"
226
227 RDEPENDS_enigma2-plugin-systemplugins-backupsuitehdd = "mtd-utils-mkfs.ubifs mtd-utils-nanddump mtd-utils-ubinize"
228 RDEPENDS_enigma2-plugin-systemplugins-backupsuiteusb = "enigma2-plugin-extensions-backupsuitehdd"
229
230 RDEPENDS_enigma2-plugin-extensions-satipclient = "satipclient"
231
232 DEPENDS += "${@base_contains("VUPLUS_FEATURES", "uianimation", "libgles libvugles2" , "", d)}"
233 RDEPENDS_${PN}_append_vuplus += "${@base_contains("VUPLUS_FEATURES", "uianimation", "libvugles2" , "", d)}"
234
235 PN = "enigma2"
236 PR = "r191"
237
238 inherit gitpkgv pythonnative
239
240 ####################################################
241 SRCDATE = "20121128"
242 PV = "experimental-git${SRCDATE}"
243 BRANCH = "vuplus_experimental"
244 SRCREV = ""
245 ####################################################
246
247 # enigma2_vuplus_mediaplayer.patch is for trick-play in media player
248
249 SRC_URI = "git://code.vuplus.com/git/dvbapp.git;protocol=http;branch=${BRANCH};rev=${SRCREV} \
250         file://enigma2_vuplus_skin.patch \
251         file://enigma2_vuplus_mediaplayer.patch \
252         file://enigma2_vuplus_remove_dreambox_enigma.patch \
253         file://enigma2_vuplus_vfd_mode.patch \
254         file://enigma2_vuplus_pluginbrowser.patch \
255         file://enigma2_vuplus_proc_oom_score_adj.patch \
256         file://enigma2_vuplus_fix_standby_name.patch \
257         file://enigma2_vuplus_disable_subtitle_sync_mode_bug.patch \
258         file://spinner \
259         file://number_key \
260 "
261
262 SRC_URI_append = " ${@base_contains('GST_VERSION', '1.0', '', 'file://enablesubtitleshack.patch', d)}"
263
264 SRC_URI_append = " ${@base_contains("VUPLUS_FEATURES", "vuwlan", "file://enigma2_vuplus_networksetup.patch", "", d)}"
265
266 LDFLAGS_prepend = "${@base_contains('GST_VERSION', '1.0', ' -lxml2 ', '', d)}"
267
268 SRC_URI_append = " file://enigma2_vuplus_inputhotplug.patch"
269
270 def change_po():
271     import os
272     try:
273         os.system("find ./ -name \"*.po\" > ./po_list")
274         os.system("find ./ -name \"*.pot\" >> ./po_list")
275         po_list = []
276         po_list = open('po_list','r+').readlines()
277         for x in po_list:
278             changeword(x)
279         os.system('rm po_list')
280     except:
281         print 'word patch error '
282         return
283
284 def changeword(file):
285     fn = file[:-1]
286     fnn = file[:-1]+'_n'
287     cmd = "sed s/Dreambox/STB/g "+fn+" > "+fnn
288     os.system(cmd)
289     cmd1 = "mv "+fnn+" "+fn
290     os.system(cmd1)
291
292 do_unpack_append(){
293     change_po()
294 }
295
296 S = "${WORKDIR}/git"
297
298 FILES_${PN} += "${datadir}/fonts ${datadir}/keymaps"
299 FILES_${PN}-meta = "${datadir}/meta"
300 PACKAGES += "${PN}-meta"
301 PACKAGE_ARCH = "${MACHINE_ARCH}"
302
303 inherit autotools-brokensep pkgconfig pythonnative
304
305 do_configure_prepend() {
306         git checkout ${BRANCH}
307 }
308
309 do_compile_prepend_vuplus() {
310         install -m 0755 ${WORKDIR}/spinner/*.png ${S}/data/skin_default/spinner/
311         install -m 0755 ${WORKDIR}/number_key/*.png ${S}/data/skin_default/buttons/
312 }
313
314 EXTRA_OECONF = " \
315         --enable-dependency-tracking \
316         ${@base_contains("GST_VERSION", "1.0", "--with-gstversion=1.0", "", d)} \
317         ${@base_contains("VUPLUS_FEATURES", "display-text-vfd", "--with-display-text-vfd" , "", d)} \
318         ${@base_contains("VUPLUS_FEATURES", "display-graphic-vfd", "--with-display-graphic-vfd" , "", d)} \
319         ${@base_contains("VUPLUS_FEATURES", "right-half-vfd-skin", "--with-set-right-half-vfd-skin" , "", d)} \
320         ${@base_contains("VUPLUS_FEATURES", "enable-rc-kbd", "--with-remote-keyboard" , "", d)} \
321         ${@base_contains("VUPLUS_FEATURES", "uianimation", "--with-libvugles2" , "", d)} \
322         BUILD_SYS=${BUILD_SYS} \
323         HOST_SYS=${HOST_SYS} \
324         STAGING_INCDIR=${STAGING_INCDIR} \
325         STAGING_LIBDIR=${STAGING_LIBDIR} \
326 "
327
328 python populate_packages_prepend() {
329     enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
330     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/[a-zA-Z0-9_]+.*$', 'enigma2-plugin-%s', '%s', recursive=True, match_path=True, prepend=True)
331     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/.*\.la$', 'enigma2-plugin-%s-dev', '%s (development)', recursive=True, match_path=True, prepend=True)
332     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/.*\.a$', 'enigma2-plugin-%s-staticdev', '%s (static development)', recursive=True, match_path=True, prepend=True)
333     do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/(.*/)?\.debug/.*$', 'enigma2-plugin-%s-dbg', '%s (debug)', recursive=True, match_path=True, prepend=True)
334 }
335
336 INSANE_SKIP_${PN} = "already-stripped"
337 INSANE_SKIP_enigma2-plugin-extensions-webbrowser = "build-deps"
338 INSANE_SKIP_enigma2-plugin-extensions-modem = "build-deps"
339
340
341