add some plugins and utils.
[vuplus_openvuplus] / meta-openvuplus / recipes-vuplus / enigma2 / enigma2.bb
1 DESCRIPTION = "Enigma2 is an experimental, but useful framebuffer-based frontend for DVB functions"
2 MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>"
3 LICENSE = "GPLv2"
4 LIC_FILES_CHKSUM = "file://LICENSE;md5=c9e255efa454e0155c1fd758df7dcaf3"
5 DEPENDS = "jpeg libungif libmad libpng libsigc++-1.2 gettext-native \
6         dreambox-dvbincludes freetype libdvbsi++ python swig-native \
7         libfribidi libxmlccwrap libdreamdvd gstreamer gst-plugin-dvbmediasink \
8         gst-plugins-bad gst-plugins-good gst-plugins-ugly python-wifi \
9         hostap-daemon bridge-utils \
10 "
11
12 # DEPENDS += "wvdial wvstreams ppp usbmodeswitch usbmodeswitch-data djmount minidlna"
13
14 RDEPENDS_GST= "gst-plugins-base-decodebin gst-plugins-base-decodebin2 gst-plugins-base-app gst-plugins-bad-fragmented \
15                 gst-plugins-good-id3demux gst-plugins-ugly-mad gst-plugins-base-ogg gst-plugins-base-playbin \
16                 gst-plugins-base-typefindfunctions gst-plugins-base-audioconvert gst-plugins-base-audioresample \
17                 gst-plugins-good-wavparse gst-plugins-ugly-mpegstream \
18                 gst-plugins-good-flac gst-plugin-dvbmediasink gst-plugins-bad-mpegdemux gst-plugins-ugly-dvdsub \
19                 gst-plugins-good-souphttpsrc gst-plugins-ugly-mpegaudioparse gst-plugins-base-subparse \
20                 gst-plugins-good-apetag gst-plugins-good-icydemux gst-plugins-good-autodetect gst-plugins-good-flv \
21 "
22
23 RDEPENDS = "python-codecs python-core python-lang python-re python-threading \
24                 python-xml python-fcntl python-stringold python-pickle python-netclient \
25                 glibc-gconv-iso8859-15 ethtool \
26                 ${RDEPENDS_GST} \
27 "
28
29 GST_RTSP_RDEPENDS = "gst-plugins-good-udp gst-plugins-good-rtsp gst-plugins-good-rtp gst-plugins-good-rtpmanager"
30 GST_ALSA_RDEPENDS = "gst-plugins-base-alsa alsa-conf"
31 GST_MISC_RDEPENDS = "gst-plugins-good-matroska gst-plugins-good-isomp4 gst-plugins-base-vorbis gst-plugins-good-audioparsers"
32 GST_DVD_RDEPENDS = "gst-plugins-bad-cdxaparse gst-plugins-ugly-cdio gst-plugins-bad-vcdsrc"
33 GST_BASE_RDEPENDS = "${GST_ALSA_RDEPENDS} ${GST_MISC_RDEPENDS} ${GST_RTSP_RDEPENDS}"
34
35 RDEPENDS_append_vuplus = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugins-good-avi"
36
37 # 'forward depends' - no two providers can have the same PACKAGES_DYNAMIC, however both
38 # enigma2 and enigma2-plugins produce enigma2-plugin-*.
39 #DEPENDS += "enigma2-plugins"
40 #PACKAGES_DYNAMIC = "enigma2-plugin-*"
41
42 SUMMARY_enigma2-plugin-extensions-cutlisteditor = "enables you to cut your movies."
43 RDEPENDS_enigma2-plugin-extensions-cutlisteditor = "aio-grab"
44 SUMMARY_enigma2-plugin-extensions-graphmultiepg = "shows a graphical timeline EPG."
45 SUMMARY_enigma2-plugin-extensions-pictureplayer = "displays photos on the TV."
46 SUMMARY_enigma2-plugin-systemplugins-frontprocessorupdate = "keeps your frontprocessor up to date."
47 SUMMARY_enigma2-plugin-systemplugins-positionersetup = "helps you installing a motorized dish."
48 SUMMARY_enigma2-plugin-systemplugins-satelliteequipmentcontrol = "allows you to fine-tune DiSEqC-settings."
49 SUMMARY_enigma2-plugin-systemplugins-satfinder = "helps you to align your dish."
50 SUMMARY_enigma2-plugin-systemplugins-skinselector = "shows a menu with selectable skins."
51 SUMMARY_enigma2-plugin-systemplugins-videomode = "selects advanced video modes"
52 DEPENDS_enigma2-plugin-extensions-dvdplayer = "libdreamdvd0"
53 RDEPENDS_enigma2-plugin-systemplugins-nfiflash = "python-twisted-web"
54 RDEPENDS_enigma2-plugin-systemplugins-softwaremanager = "python-twisted-web"
55 RCONFLICTS_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
56 RREPLACES_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
57 SUMMARY_enigma2-plugin-systemplugins-crashlogautosubmit = "automatically send crashlogs to Dream Multimedia"
58 RDEPENDS_enigma2-plugin-systemplugins-crashlogautosubmit = "python-twisted-mail python-twisted-names python-compression python-mime python-email"
59 SUMMARY_enigma2-plugin-systemplugins-cleanupwizard = "informs you on low internal memory on system startup."
60 SUMMARY_enigma2-plugin-extenstions-modem = "opens a menu to connect to internet via builtin modem."
61 RDEPENDS_enigma2-plugin-extensions-modem = "dreambox-modem-ppp-scripts ppp"
62 SUMMARY_enigma2-plugin-systemplugins-wirelesslan = "helps you configuring your wireless lan"
63 RDEPENDS_enigma2-plugin-systemplugins-wirelesslan = "wpa-supplicant wireless-tools python-wifi"
64 SUMMARY_enigma2-plugin-systemplugins-wirelesslansetup = "configure wireless lan"
65 RDEPENDS_enigma2-plugin-systemplugins-wirelesslansetup = "wpa-supplicant wireless-tools python-wifi"
66 SUMMARY_enigma2-plugin-systemplugins-networkwizard = "provides easy step by step network configuration"
67 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 "
68 SUMMARY_enigma2-plugin-systemplugins-crashreport = "automatically send crashlogs to Vu+"
69 RDEPENDS_enigma2-plugin-systemplugins-crashreport = "python-twisted-mail python-twisted-names python-compression python-mime python-email"
70 RDEPENDS_enigma2-plugin-systemplugins-wirelessaccesspoint = "hostap-daemon bridge-utils"
71
72 RDEPENDS_enigma2-plugin-extensions-streamtv = "librtmp0 gst-plugins-bad-rtmp "
73
74 DEPENDS += "djmount minidlna"
75 RDEPENDS_enigma2-plugin-extensions-dlnaserver = "minidlna "
76 RDEPENDS_enigma2-plugin-extensions-dlnabrowser = "djmount kernel-module-fuse fuse-utils"
77
78 DEPENDS += "opera-hbbtv"
79 RDEPENDS_enigma2-plugin-extensions-hbbtv = "opera-hbbtv"
80
81 DEPENDS += "wvdial wvstreams ppp usb-modeswitch usb-modeswitch-data"
82 RDEPENDS_enigma2-plugin-systemplugins-3gmodemmanager = "ppp usb-modeswitch usb-modeswitch-data wvdial wvstreams kernel-module-usbserial"
83
84 PN = "enigma2"
85 PR = "r40"
86
87 SRCDATE = "20121128"
88 #SRCDATE is NOT used by git to checkout a specific revision
89 #but we need it to build a ipk package version
90 #when you like to checkout a specific revision of e2 you need
91 #have to specify a commit id or a tag name in SRCREV
92
93 ####################################################
94 BRANCH = "vuplus_experimental"
95 PV = "experimental-git${SRCDATE}"
96 SRCREV = ""
97 ####################################################
98
99 # enigma2_vuplus_mediaplayer.patch is for trick-play in media player
100
101 SRC_URI = "git://code.vuplus.com/git/dvbapp.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
102            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
103            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
104            file://enigma2_vuplus_mediaplayer_subtitle.patch;patch=1;pnum=1 \
105            file://enigma2_vuplus_remove_dreambox_enigma.patch;patch=1;pnum=1 \
106            file://enigma2_vuplus_vfd_mode.patch;patch=1;pnum=1 \
107            file://enigma2_vuplus_addlibpythondeps.patch;patch=1;pnum=1 \
108            file://enigma2_wirelessaccesspoint.patch;patch=1;pnum=1 \
109            file://MyriadPro-Regular.otf \
110            file://MyriadPro-Semibold.otf \
111            file://MyriadPro-SemiboldIt.otf \
112            file://750S \
113            file://Vu_HD \
114            file://number_key \
115            "
116
117 SRC_URI_append = " ${@base_contains("MACHINE_FEATURES", "vuwlan", "file://enigma2_vuplus_networksetup.patch;patch=1;pnum=1", "", d)}"
118
119 def change_po():
120         import os
121         try:
122                 os.system("find ./ -name \"*.po\" > ./po_list")
123                 os.system("find ./ -name \"*.pot\" >> ./po_list")
124                 po_list = []
125                 po_list = open('po_list','r+').readlines()
126                 for x in po_list:
127                         changeword(x)
128                 os.system('rm po_list')
129         except:
130                 print 'word patch error '
131                 return
132
133 def changeword(file):
134         fn = file[:-1]
135         fnn = file[:-1]+'_n'
136         cmd = "sed s/Dreambox/STB/g "+fn+" > "+fnn
137         os.system(cmd)
138         cmd1 = "mv "+fnn+" "+fn
139         os.system(cmd1)
140
141 do_unpack_append(){
142         change_po()
143 }
144
145 S = "${WORKDIR}/git"
146
147 FILES_${PN} += "${datadir}/fonts ${datadir}/keymaps"
148 FILES_${PN}-meta = "${datadir}/meta"
149 PACKAGES += "${PN}-meta"
150 PACKAGE_ARCH = "${MACHINE_ARCH}"
151
152 inherit autotools pkgconfig
153
154 do_configure_prepend() {
155         git checkout ${BRANCH}
156 }
157
158 do_compile_prepend_vuplus() {
159         install -m 0755 ${WORKDIR}/MyriadPro-Regular.otf ${S}/data/fonts/
160         install -m 0755 ${WORKDIR}/MyriadPro-Semibold.otf ${S}/data/fonts/
161         install -m 0755 ${WORKDIR}/MyriadPro-SemiboldIt.otf ${S}/data/fonts/
162         install -m 0755 ${WORKDIR}/750S/*.png ${S}/data/750S/
163         install -m 0755 ${WORKDIR}/750S/buttons/*.png ${S}/data/750S/buttons/
164         install -m 0755 ${WORKDIR}/750S/countries/*.png ${S}/data/750S/countries/
165         install -m 0755 ${WORKDIR}/750S/icons/*.png ${S}/data/750S/icons/
166         install -m 0755 ${WORKDIR}/750S/menu/*.png ${S}/data/750S/menu/
167         install -m 0755 ${WORKDIR}/750S/spinner/*.png ${S}/data/skin_default/spinner/
168         install -m 0755 ${WORKDIR}/Vu_HD/*.png ${S}/data/Vu_HD/
169         install -m 0755 ${WORKDIR}/Vu_HD/buttons/*.png ${S}/data/Vu_HD/buttons/
170         install -m 0755 ${WORKDIR}/Vu_HD/countries/*.png ${S}/data/Vu_HD/countries/
171         install -m 0755 ${WORKDIR}/Vu_HD/icons/*.png ${S}/data/Vu_HD/icons/
172         install -m 0755 ${WORKDIR}/Vu_HD/menu/*.png ${S}/data/Vu_HD/menu/
173         install -m 0755 ${WORKDIR}/number_key/*.png ${S}/data/skin_default/buttons/
174 }
175
176 EXTRA_OECONF = " \
177         ${@base_contains("MACHINE_FEATURES", "display-text-vfd", "--with-display-text-vfd" , "", d)} \
178         ${@base_contains("MACHINE_FEATURES", "display-graphic-vfd", "--with-display-graphic-vfd" , "", d)} \
179         ${@base_contains("MACHINE_FEATURES", "right-half-vfd-skin", "--with-set-right-half-vfd-skin" , "", d)} \
180         ${@base_contains("MACHINE_FEATURES", "enable-rc-kbd", "--with-remote-keyboard" , "", d)} \
181         BUILD_SYS=${BUILD_SYS} \
182         HOST_SYS=${HOST_SYS} \
183         STAGING_INCDIR=${STAGING_INCDIR} \
184         STAGING_LIBDIR=${STAGING_LIBDIR} \
185 "
186
187 python populate_packages_prepend() {
188         enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
189         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/[a-zA-Z0-9_]+.*$', 'enigma2-plugin-%s', '%s', recursive=True, match_path=True, prepend=True)
190         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/.*\.la$', 'enigma2-plugin-%s-dev', '%s (development)', recursive=True, match_path=True, prepend=True)
191         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/.*\.a$', 'enigma2-plugin-%s-staticdev', '%s (static development)', recursive=True, match_path=True, prepend=True)
192         do_split_packages(d, enigma2_plugindir, '^(\w+/\w+)/(.*/)?\.debug/.*$', 'enigma2-plugin-%s-dbg', '%s (debug)', recursive=True, match_path=True, prepend=True)
193 }
194
195 RCONFLICTS_${PN} = "dreambox-keymaps"
196 RREPLACES_${PN} = "dreambox-keymaps tuxbox-tuxtxt-32bpp (<= 0.0+cvs20090130-r1)"