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