75bace527308eaf3f9ec3c2889096b07823d66ab
[vuplus_openembedded] / recipes / 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 DEPENDS = "jpeg libungif libmad libpng libsigc++-1.2 gettext-native \
4         dreambox-dvbincludes freetype libdvbsi++ python swig-native \
5         libfribidi libxmlccwrap libdreamdvd gstreamer gst-plugin-dvbmediasink \
6         gst-plugins-bad gst-plugins-good gst-plugins-ugly python-wifi wvdial wvstreams ppp usbmodeswitch usbmodeswitch-data \
7         hostap-daemon bridge-utils mpfr gmp tslib opera-hbbtv util-linux-ng ntfs-3g dosfstools "
8 RDEPENDS = "python-codecs python-core python-lang python-re python-threading \
9         python-xml python-fcntl gst-plugin-decodebin gst-plugin-decodebin2 python-stringold \
10         python-pickle gst-plugin-app gst-plugin-fragmented \
11         gst-plugin-id3demux gst-plugin-mad gst-plugin-ogg gst-plugin-playbin \
12         gst-plugin-typefindfunctions gst-plugin-audioconvert gst-plugin-audioresample \
13         gst-plugin-wavparse python-netclient gst-plugin-mpegstream \
14         gst-plugin-flac gst-plugin-dvbmediasink gst-plugin-mpegdemux gst-plugin-dvdsub \
15         gst-plugin-souphttpsrc gst-plugin-mpegaudioparse gst-plugin-subparse \
16         gst-plugin-apetag gst-plugin-icydemux gst-plugin-autodetect gst-plugin-flv \
17         glibc-gconv-iso8859-15 ethtool parted"
18
19 GST_RTSP_RDEPENDS = "gst-plugin-udp gst-plugin-rtsp gst-plugin-rtp gst-plugin-rtpmanager"
20 GST_ALSA_RDEPENDS = "gst-plugin-alsa alsa-conf"
21 GST_MISC_RDEPENDS = "gst-plugin-matroska gst-plugin-isomp4 gst-plugin-vorbis gst-plugin-audioparsers"
22 GST_DVD_RDEPENDS = "gst-plugin-cdxaparse gst-plugin-cdio gst-plugin-vcdsrc"
23 GST_BASE_RDEPENDS = "${GST_ALSA_RDEPENDS} ${GST_MISC_RDEPENDS} ${GST_RTSP_RDEPENDS}"
24
25 RDEPENDS_append_dm7025 = " ${GST_ALSA_RDEPENDS} gst-plugin-ivorbisdec"
26 RDEPENDS_append_dm800 = " ${GST_BASE_RDEPENDS} gst-plugin-ivorbisdec"
27 RDEPENDS_append_dm8000 = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
28 RDEPENDS_append_dm500hd = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
29 RDEPENDS_append_dm800se = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
30 RDEPENDS_append_bm750 = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
31 RDEPENDS_append_vusolo = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
32 RDEPENDS_append_vuuno = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
33 RDEPENDS_append_vuultimo = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
34 RDEPENDS_append_vuduo2 = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
35 RDEPENDS_append_vusolo2 = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
36 RDEPENDS_append_dm7020hd = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
37
38 # 'forward depends' - no two providers can have the same PACKAGES_DYNAMIC, however both
39 # enigma2 and enigma2-plugins produce enigma2-plugin-*.
40 #DEPENDS += "enigma2-plugins"
41 #PACKAGES_DYNAMIC = "enigma2-plugin-*"
42
43 DESCRIPTION_append_enigma2-plugin-extensions-cutlisteditor = "enables you to cut your movies."
44 RDEPENDS_enigma2-plugin-extensions-cutlisteditor = "aio-grab"
45 DESCRIPTION_append_enigma2-plugin-extensions-graphmultiepg = "shows a graphical timeline EPG."
46 DESCRIPTION_append_enigma2-plugin-extensions-pictureplayer = "displays photos on the TV."
47 DESCRIPTION_append_enigma2-plugin-systemplugins-frontprocessorupdate = "keeps your frontprocessor up to date."
48 DESCRIPTION_append_enigma2-plugin-systemplugins-positionersetup = "helps you installing a motorized dish."
49 DESCRIPTION_append_enigma2-plugin-systemplugins-satelliteequipmentcontrol = "allows you to fine-tune DiSEqC-settings."
50 DESCRIPTION_append_enigma2-plugin-systemplugins-satfinder = "helps you to align your dish."
51 DESCRIPTION_append_enigma2-plugin-systemplugins-skinselector = "shows a menu with selectable skins."
52 DESCRIPTION_append_enigma2-plugin-systemplugins-videomode = "selects advanced video modes"
53 RDEPENDS_enigma2-plugin-extensions-dvdplayer = "libdreamdvd0"
54 RDEPENDS_enigma2-plugin-systemplugins-nfiflash = "twisted-web"
55 RDEPENDS_enigma2-plugin-systemplugins-softwaremanager = "twisted-web"
56 RCONFLICTS_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
57 RREPLACES_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
58 DESCRIPTION_append_enigma2-plugin-systemplugins-crashlogautosubmit = "automatically send crashlogs to Dream Multimedia"
59 RDEPENDS_enigma2-plugin-systemplugins-crashlogautosubmit = "twisted-mail twisted-names python-compression python-mime python-email"
60 DESCRIPTION_append_enigma2-plugin-systemplugins-cleanupwizard = "informs you on low internal memory on system startup."
61 DESCRIPTION_append_enigma2-plugin-extenstions-modem = "opens a menu to connect to internet via builtin modem."
62 RDEPENDS_enigma2-plugin-extensions-modem = "dreambox-modem-ppp-scripts ppp"
63 DESCRIPTION_append_enigma2-plugin-systemplugins-wirelesslan = "helps you configuring your wireless lan"
64 RDEPENDS_enigma2-plugin-systemplugins-wirelesslan = "wpa-supplicant wireless-tools python-wifi"
65 DESCRIPTION_append_enigma2-plugin-systemplugins-wirelesslansetup = "configure wireless lan"
66 RDEPENDS_enigma2-plugin-systemplugins-wirelesslansetup = "wpa-supplicant wireless-tools python-wifi"
67 DESCRIPTION_append_enigma2-plugin-systemplugins-networkwizard = "provides easy step by step network configuration"
68 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 "
69 DESCRIPTION_append_enigma2-plugin-systemplugins-crashreport = "automatically send crashlogs to Vu+"
70 RDEPENDS_enigma2-plugin-systemplugins-crashreport = "twisted-mail twisted-names python-compression python-mime python-email"
71 RDEPENDS_enigma2-plugin-systemplugins-3gmodemmanager = "ppp usbmodeswitch usbmodeswitch-data wvdial wvstreams libwvutils4.6 libwvstreams-extras libuniconf4.6"
72 RDEPENDS_enigma2-plugin-systemplugins-wirelessaccesspoint = "hostap-daemon bridge-utils"
73 RDEPENDS_enigma2-plugin-extensions-streamtv = "librtmp0 gst-plugin-rtmp "
74 RDEPENDS_enigma2-plugin-extensions-dlnabrowser = "djmount fuse-utils libfuse2 libupnp3 kernel-module-fuse "
75 RDEPENDS_enigma2-plugin-extensions-dlnaserver = "minidlna libexif12 libavformat52 libavutil50 libavcodec52 libgsm1 libmp3lame0 libschroedinger-1.0-0 libtheora0 liboil"
76 RDEPENDS_enigma2-plugin-extensions-hbbtv = "tslib-conf libts-1.0-0 libsysfs2 libgmp3 libmpfr1 opera-hbbtv"
77 RDEPENDS_enigma2-plugin-systemplugins-devicemanager = "util-linux-ng-blkid ntfs-3g dosfstools"
78
79 RDEPENDS_enigma2-plugin-systemplugins-netdrive = "curlftpfs kernel-module-fuse libfuse2"
80
81 PN = "enigma2"
82 PR = "r136"
83
84 SRCDATE = "20110922"
85 SRCREV = "5e19a3f8a5e8ce8a4e2cb2b601a1b8ef3554e4be"
86 #SRCDATE is NOT used by git to checkout a specific revision
87 #but we need it to build a ipk package version
88 #when you like to checkout a specific revision of e2 you need
89 #have to specify a commit id or a tag name in SRCREV
90
91 # if you want experimental use
92 ####################################################
93 BRANCH = "experimental"
94 PV = "experimental-git${SRCDATE}"
95 #SRCREV = ""
96 ####################################################
97
98 # if you want a 2.7-based release, use
99 ####################################################
100 #BRANCH="2.7"
101 #PV = "2.7git${SRCDATE}"
102 # if you want 2.7.0 use
103 #SRCREV = "d5a16c6e9d0ee1cc2dc0d65b4321842dea4b0891"
104 ####################################################
105
106 # if you want a vuplus release, use
107 ####################################################
108 #BRANCH_vuplus = "vuplus"
109 #PV_vuplus = "2.8git${SRCDATE}"
110 #SRCREV_vuplus = "4186f8c308d9450353520a88eb5a5ee3940281d3"
111 ####################################################
112
113 #if you want a vuplus experimental, use
114 ####################################################
115 BRANCH_vuplus = "vuplus_experimental"
116 PV_vuplus = "experimental-git${SRCDATE}"
117 SRCREV_vuplus = ""
118 ####################################################
119
120 #SRC_URI = "git://git.opendreambox.org/git/enigma2.git;protocol=git;branch=${BRANCH};tag=${SRCREV}"
121 #SRC_URI_append_dm7025 = " file://7025_pvr_device_compatibility.diff;patch=1;pnum=1"
122
123 # enigma2_vuplus_mediaplayer.patch is for trick-play in media player
124
125 SRC_URI = "git://code.vuplus.com/git/dvbapp.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
126            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
127            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
128            file://enigma2_vuplus_mediaplayer_subtitle.patch;patch=1;pnum=1 \
129            file://enigma2_vuplus_remove_dreambox_enigma.patch;patch=1;pnum=1 \
130            file://enigma2_vuplus_vfd_mode.patch;patch=1;pnum=1 \
131            file://enigma2_vuplus_fix_standby_name.patch;patch=1;pnum=1 \
132            file://enigma2_vuplus_fix_standby_name_skin.patch;patch=1;pnum=1 \
133            file://MyriadPro-Regular.otf \
134            file://MyriadPro-Semibold.otf \
135            file://MyriadPro-SemiboldIt.otf \
136            file://750S \
137            file://Vu_HD \
138            file://number_key \
139            "
140
141
142
143 SRC_URI_append_vusolo = " file://enigma2_vuplus_misc.patch;patch=1;pnum=1"
144
145 SRC_URI_append = " ${@base_contains("MACHINE_FEATURES", "vuwlan", "file://enigma2_vuplus_networksetup.patch;patch=1;pnum=1", "", d)}"
146
147 SRC_URI_append_vuultimo = " \
148            file://analog.ttf \
149            file://skin_user.xml \
150            file://vfd_icons \
151 "
152
153 SRC_URI_append_vuduo2 = " \
154            file://skin_user_vuduo2.xml \
155            file://vfd_icons_vuduo2 \
156 "
157
158 def change_po():
159         import os
160         try:
161                 os.system("find ./ -name \"*.po\" > ./po_list")
162                 os.system("find ./ -name \"*.pot\" >> ./po_list")
163                 po_list = []
164                 po_list = open('po_list','r+').readlines()
165                 for x in po_list:
166                         changeword(x)
167                 os.system('rm po_list')
168         except:
169                 print 'word patch error '
170                 return
171
172 def changeword(file):
173         fn = file[:-1]
174         fnn = file[:-1]+'_n'
175         cmd = "sed s/Dreambox/STB/g "+fn+" > "+fnn
176         os.system(cmd)
177         cmd1 = "mv "+fnn+" "+fn
178         os.system(cmd1)
179
180 do_unpack_append(){
181         change_po()
182 }
183
184 S = "${WORKDIR}/git"
185
186 FILES_${PN} += "${datadir}/fonts ${datadir}/keymaps"
187 FILES_${PN}-meta = "${datadir}/meta"
188 PACKAGES += "${PN}-meta"
189 PACKAGE_ARCH = "${MACHINE_ARCH}"
190
191 inherit autotools pkgconfig
192
193
194 do_compile_prepend_vuplus() {
195         install -m 0755 ${WORKDIR}/MyriadPro-Regular.otf ${S}/data/fonts/
196         install -m 0755 ${WORKDIR}/MyriadPro-Semibold.otf ${S}/data/fonts/
197         install -m 0755 ${WORKDIR}/MyriadPro-SemiboldIt.otf ${S}/data/fonts/
198         install -m 0755 ${WORKDIR}/750S/*.png ${S}/data/750S/
199         install -m 0755 ${WORKDIR}/750S/buttons/*.png ${S}/data/750S/buttons/
200         install -m 0755 ${WORKDIR}/750S/countries/*.png ${S}/data/750S/countries/
201         install -m 0755 ${WORKDIR}/750S/icons/*.png ${S}/data/750S/icons/
202         install -m 0755 ${WORKDIR}/750S/menu/*.png ${S}/data/750S/menu/
203         install -m 0755 ${WORKDIR}/750S/spinner/*.png ${S}/data/skin_default/spinner/
204         install -m 0755 ${WORKDIR}/Vu_HD/*.png ${S}/data/Vu_HD/
205         install -m 0755 ${WORKDIR}/Vu_HD/buttons/*.png ${S}/data/Vu_HD/buttons/
206         install -m 0755 ${WORKDIR}/Vu_HD/countries/*.png ${S}/data/Vu_HD/countries/
207         install -m 0755 ${WORKDIR}/Vu_HD/icons/*.png ${S}/data/Vu_HD/icons/
208         install -m 0755 ${WORKDIR}/Vu_HD/menu/*.png ${S}/data/Vu_HD/menu/
209         install -m 0755 ${WORKDIR}/number_key/*.png ${S}/data/skin_default/buttons/
210 }
211
212 EXTRA_OECONF = " \
213         ${@base_contains("MACHINE_FEATURES", "display-text-vfd", "--with-display-text-vfd" , "", d)} \
214         ${@base_contains("MACHINE_FEATURES", "display-graphic-vfd", "--with-display-graphic-vfd" , "", d)} \
215         ${@base_contains("MACHINE_FEATURES", "right-half-vfd-skin", "--with-set-right-half-vfd-skin" , "", d)} \
216         ${@base_contains("MACHINE_FEATURES", "enable-rc-kbd", "--with-remote-keyboard" , "", d)} \
217         BUILD_SYS=${BUILD_SYS} \
218         HOST_SYS=${HOST_SYS} \
219         STAGING_INCDIR=${STAGING_INCDIR} \
220         STAGING_LIBDIR=${STAGING_LIBDIR} \
221 "
222
223 do_install_append_vuultimo() {
224         install -m 0755 ${WORKDIR}/analog.ttf ${D}/usr/share/fonts/
225         install -m 0755 ${WORKDIR}/skin_user.xml ${D}/usr/share/enigma2/defaults/
226         install -d ${D}/usr/share/enigma2/vfd_icons/
227         install -m 0755 ${WORKDIR}/vfd_icons/*.png ${D}/usr/share/enigma2/vfd_icons/
228 }
229
230 do_install_append_vuduo2() {
231         install -m 0755 ${WORKDIR}/skin_user_vuduo2.xml ${D}/usr/share/enigma2/defaults/skin_user.xml
232         install -d ${D}/usr/share/enigma2/vfd_icons/
233         install -m 0755 ${WORKDIR}/vfd_icons_vuduo2/*.png ${D}/usr/share/enigma2/vfd_icons/
234 }
235
236 python populate_packages_prepend () {
237         enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
238
239         do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', '%s ', recursive=True, match_path=True, prepend=True)
240 }
241
242 RCONFLICTS_${PN} = "dreambox-keymaps"
243 RREPLACES_${PN} = "dreambox-keymaps tuxbox-tuxtxt-32bpp (<= 0.0+cvs20090130-r1)"
244
245 # workaround for opkg <= 0.1.7+svnr455-r19.1
246 pkg_preinst_${PN} () {
247         if [ "x$D" != "x" ]; then
248                 exit 1
249         fi
250         if [ -f ${datadir}/fonts/tuxtxt.ttf ]; then
251                 cp -a ${datadir}/fonts/tuxtxt.ttf /tmp/tuxtxt.ttf
252         fi
253 }
254 pkg_postinst_${PN} () {
255         if [ "x$D" != "x" ]; then
256                 exit 1
257         fi
258         if [ -f /tmp/tuxtxt.ttf -a ! -f ${datadir}/fonts/tuxtxt.ttf ]; then
259                 mv /tmp/tuxtxt.ttf ${datadir}/fonts/tuxtxt.ttf
260         fi
261 }