Merge remote-tracking branch 'dm/opendreambox-1.6' into test_0701
[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 \
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 \
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-qtdemux gst-plugin-vorbis gst-plugin-audioparsersbad"
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-networkwizard = "provides easy step by step network configuration"
63
64 PN = "enigma2"
65 PR = "r0"
66
67 SRCDATE = "20110217"
68 SRCREV = "5e19a3f8a5e8ce8a4e2cb2b601a1b8ef3554e4be"
69 #SRCDATE is NOT used by git to checkout a specific revision
70 #but we need it to build a ipk package version
71 #when you like to checkout a specific revision of e2 you need
72 #have to specify a commit id or a tag name in SRCREV
73
74 # if you want experimental use
75 ####################################################
76 BRANCH = "experimental"
77 PV = "experimental-git${SRCDATE}"
78 #SRCREV = ""
79 ####################################################
80
81 # if you want a 2.7-based release, use
82 ####################################################
83 #BRANCH="2.7"
84 #PV = "2.7git${SRCDATE}"
85 # if you want 2.7.0 use
86 #SRCREV = "d5a16c6e9d0ee1cc2dc0d65b4321842dea4b0891"
87 ####################################################
88
89 # if you want a vuplus release, use
90 ####################################################
91 #BRANCH_vuplus = "vuplus"
92 #PV_vuplus = "2.8git${SRCDATE}"
93 #SRCREV_vuplus = "4186f8c308d9450353520a88eb5a5ee3940281d3"
94 ####################################################
95
96 #if you want a vuplus experimental, use
97 ####################################################
98 BRANCH_vuplus = "vuplus_experimental"
99 PV_vuplus = "experimental-git${SRCDATE}"
100 SRCREV_vuplus = ""
101 ####################################################
102
103 SRC_URI = "git://git.opendreambox.org/git/enigma2.git;protocol=git;branch=${BRANCH};tag=${SRCREV}"
104 SRC_URI_append_dm7025 = " file://7025_pvr_device_compatibility.diff;patch=1;pnum=1"
105
106 # enigma2_vuplus_mediaplayer.patch is for trick-play in media player
107
108
109 SRC_URI_bm750 = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
110            file://enigma2_vuplus_vfd.patch;patch=1;pnum=1 \
111            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
112            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
113            file://enigma2_vuplus_mediaplayer_subtitle.patch;patch=1;pnum=1 \
114            file://enigma2_vuplus_remove_dreambox_enigma.patch;patch=1;pnum=1 \
115            file://MyriadPro-Regular.otf \
116            file://MyriadPro-Semibold.otf \
117            file://MyriadPro-SemiboldIt.otf \
118            file://750S \
119            file://Vu_HD \
120            file://number_key \
121            "
122
123 SRC_URI_vusolo = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
124            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
125            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
126            file://enigma2_vuplus_mediaplayer_subtitle.patch;patch=1;pnum=1 \
127            file://enigma2_vuplus_misc.patch;patch=1;pnum=1 \
128            file://enigma2_vuplus_remove_dreambox_enigma.patch;patch=1;pnum=1 \
129            file://MyriadPro-Regular.otf \
130            file://MyriadPro-Semibold.otf \
131            file://MyriadPro-SemiboldIt.otf \
132            file://750S \
133            file://Vu_HD \
134            file://number_key \
135            "
136
137
138
139 SRC_URI_vuuno = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
140            file://enigma2_vuplus_vfd.patch;patch=1;pnum=1 \
141            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
142            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
143            file://enigma2_vuplus_mediaplayer_subtitle.patch;patch=1;pnum=1 \
144            file://enigma2_vuplus_remove_dreambox_enigma.patch;patch=1;pnum=1 \
145            file://MyriadPro-Regular.otf \
146            file://MyriadPro-Semibold.otf \
147            file://MyriadPro-SemiboldIt.otf \
148            file://750S \
149            file://Vu_HD \
150            file://number_key \
151            "
152
153 SRC_URI_vuultimo = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
154            file://enigma2_vuplus_vfd.patch;patch=1;pnum=1 \
155            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
156            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
157            file://enigma2_vuplus_mediaplayer_subtitle.patch;patch=1;pnum=1 \
158            file://enigma2_vuplus_remove_dreambox_enigma.patch;patch=1;pnum=1 \
159            file://MyriadPro-Regular.otf \
160            file://MyriadPro-Semibold.otf \
161            file://MyriadPro-SemiboldIt.otf \
162            file://750S \
163            file://Vu_HD \
164            file://number_key \
165            "
166
167 def change_po():
168         import os
169         try:
170                 os.system("find ./ -name \"*.po\" > ./po_list")
171                 os.system("find ./ -name \"*.pot\" >> ./po_list")
172                 po_list = []
173                 po_list = open('po_list','r+').readlines()
174                 for x in po_list:
175                         changeword(x)
176                 os.system('rm po_list')
177         except:
178                 print 'word patch error '
179                 return
180
181 def changeword(file):
182         fn = file[:-1]
183         fnn = file[:-1]+'_n'
184         cmd = "sed s/Dreambox/STB/g "+fn+" > "+fnn
185         os.system(cmd)
186         cmd1 = "mv "+fnn+" "+fn
187         os.system(cmd1)
188
189 do_unpack_append(){
190         change_po()
191 }
192
193 S = "${WORKDIR}/git"
194
195 FILES_${PN} += "${datadir}/fonts ${datadir}/keymaps"
196 FILES_${PN}-meta = "${datadir}/meta"
197 PACKAGES += "${PN}-meta"
198 PACKAGE_ARCH = "${MACHINE_ARCH}"
199
200 inherit autotools pkgconfig
201
202
203 do_compile_prepend_vuplus() {
204         install -m 0755 ${WORKDIR}/MyriadPro-Regular.otf ${S}/data/fonts/
205         install -m 0755 ${WORKDIR}/MyriadPro-Semibold.otf ${S}/data/fonts/
206         install -m 0755 ${WORKDIR}/MyriadPro-SemiboldIt.otf ${S}/data/fonts/
207         install -m 0755 ${WORKDIR}/750S/*.png ${S}/data/750S/
208         install -m 0755 ${WORKDIR}/750S/buttons/*.png ${S}/data/750S/buttons/
209         install -m 0755 ${WORKDIR}/750S/countries/*.png ${S}/data/750S/countries/
210         install -m 0755 ${WORKDIR}/750S/icons/*.png ${S}/data/750S/icons/
211         install -m 0755 ${WORKDIR}/750S/menu/*.png ${S}/data/750S/menu/
212         install -m 0755 ${WORKDIR}/750S/spinner/*.png ${S}/data/skin_default/spinner/
213         install -m 0755 ${WORKDIR}/Vu_HD/*.png ${S}/data/Vu_HD/
214         install -m 0755 ${WORKDIR}/Vu_HD/buttons/*.png ${S}/data/Vu_HD/buttons/
215         install -m 0755 ${WORKDIR}/Vu_HD/countries/*.png ${S}/data/Vu_HD/countries/
216         install -m 0755 ${WORKDIR}/Vu_HD/icons/*.png ${S}/data/Vu_HD/icons/
217         install -m 0755 ${WORKDIR}/Vu_HD/menu/*.png ${S}/data/Vu_HD/menu/
218         install -m 0755 ${WORKDIR}/number_key/*.png ${S}/data/skin_default/buttons/
219 }
220
221 EXTRA_OECONF = " \
222         BUILD_SYS=${BUILD_SYS} \
223         HOST_SYS=${HOST_SYS} \
224         STAGING_INCDIR=${STAGING_INCDIR} \
225         STAGING_LIBDIR=${STAGING_LIBDIR} \
226 "
227
228 python populate_packages_prepend () {
229         enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
230
231         do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', '%s ', recursive=True, match_path=True, prepend=True)
232 }
233
234 RCONFLICTS_${PN} = "dreambox-keymaps"
235 RREPLACES_${PN} = "dreambox-keymaps tuxbox-tuxtxt-32bpp (<= 0.0+cvs20090130-r1)"
236
237 # workaround for opkg <= 0.1.7+svnr455-r19.1
238 pkg_preinst_${PN} () {
239         if [ "x$D" != "x" ]; then
240                 exit 1
241         fi
242         if [ -f ${datadir}/fonts/tuxtxt.ttf ]; then
243                 cp -a ${datadir}/fonts/tuxtxt.ttf /tmp/tuxtxt.ttf
244         fi
245 }
246 pkg_postinst_${PN} () {
247         if [ "x$D" != "x" ]; then
248                 exit 1
249         fi
250         if [ -f /tmp/tuxtxt.ttf -a ! -f ${datadir}/fonts/tuxtxt.ttf ]; then
251                 mv /tmp/tuxtxt.ttf ${datadir}/fonts/tuxtxt.ttf
252         fi
253 }