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