Fix test bb
[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 gst-plugin-selector \
13         gst-plugin-flac gst-plugin-dvbmediasink gst-plugin-mpegdemux \
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_dm7020hd = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
32
33 # 'forward depends' - no two providers can have the same PACKAGES_DYNAMIC, however both
34 # enigma2 and enigma2-plugins produce enigma2-plugin-*.
35 #DEPENDS += "enigma2-plugins"
36 #PACKAGES_DYNAMIC = "enigma2-plugin-*"
37
38 DESCRIPTION_append_enigma2-plugin-extensions-cutlisteditor = "enables you to cut your movies."
39 RDEPENDS_enigma2-plugin-extensions-cutlisteditor = "aio-grab"
40 DESCRIPTION_append_enigma2-plugin-extensions-graphmultiepg = "shows a graphical timeline EPG."
41 DESCRIPTION_append_enigma2-plugin-extensions-pictureplayer = "displays photos on the TV."
42 DESCRIPTION_append_enigma2-plugin-systemplugins-frontprocessorupdate = "keeps your frontprocessor up to date."
43 DESCRIPTION_append_enigma2-plugin-systemplugins-positionersetup = "helps you installing a motorized dish."
44 DESCRIPTION_append_enigma2-plugin-systemplugins-satelliteequipmentcontrol = "allows you to fine-tune DiSEqC-settings."
45 DESCRIPTION_append_enigma2-plugin-systemplugins-satfinder = "helps you to align your dish."
46 DESCRIPTION_append_enigma2-plugin-systemplugins-skinselector = "shows a menu with selectable skins."
47 DESCRIPTION_append_enigma2-plugin-systemplugins-videomode = "selects advanced video modes"
48 RDEPENDS_enigma2-plugin-extensions-dvdplayer = "libdreamdvd0"
49 RDEPENDS_enigma2-plugin-systemplugins-nfiflash = "twisted-web"
50 RDEPENDS_enigma2-plugin-systemplugins-softwaremanager = "twisted-web"
51 RCONFLICTS_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
52 RREPLACES_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
53 DESCRIPTION_append_enigma2-plugin-systemplugins-crashlogautosubmit = "automatically send crashlogs to Dream Multimedia"
54 RDEPENDS_enigma2-plugin-systemplugins-crashlogautosubmit = "twisted-mail twisted-names python-compression python-mime python-email"
55 DESCRIPTION_append_enigma2-plugin-systemplugins-cleanupwizard = "informs you on low internal memory on system startup."
56 DESCRIPTION_append_enigma2-plugin-extenstions-modem = "opens a menu to connect to internet via builtin modem."
57 RDEPENDS_enigma2-plugin-extensions-modem = "dreambox-modem-ppp-scripts ppp"
58 DESCRIPTION_append_enigma2-plugin-systemplugins-wirelesslan = "helps you configuring your wireless lan"
59 RDEPENDS_enigma2-plugin-systemplugins-wirelesslan = "wpa-supplicant wireless-tools python-wifi"
60 DESCRIPTION_append_enigma2-plugin-systemplugins-networkwizard = "provides easy step by step network configuration"
61
62 PN = "enigma2"
63 PR = "r0"
64
65 SRCDATE = "20101124"
66 SRCDATE_vuplus = "20101124"
67 #SRCDATE is NOT used by git to checkout a specific revision
68 #but we need it to build a ipk package version
69 #when you like to checkout a specific revision of e2 you need
70 #have to specify a commit id or a tag name in SRCREV
71
72 # if you want experimental use
73 ####################################################
74 BRANCH = "experimental"
75 PV = "experimental-git${SRCDATE}"
76 SRCREV = ""
77 ####################################################
78
79 # if you want a 2.7-based release, use
80 ####################################################
81 #BRANCH="2.7"
82 #PV = "2.7git${SRCDATE}"
83 # if you want 2.7.0 use
84 #SRCREV = "d5a16c6e9d0ee1cc2dc0d65b4321842dea4b0891"
85 ####################################################
86
87 # if you want a vuplus release, use
88 ####################################################
89 #BRANCH_vuplus = "vuplus"
90 #PV_vuplus = "2.8git${SRCDATE}"
91 #SRCREV_vuplus = "4186f8c308d9450353520a88eb5a5ee3940281d3"
92 ####################################################
93
94 #if you want a vuplus experimental, use
95 ####################################################
96 BRANCH_vuplus = "vuplus_experimental"
97 PV_vuplus = "experimental-git${SRCDATE}"
98 SRCREV_vuplus = ""
99 ####################################################
100
101
102 SRC_URI = "git://git.opendreambox.org/git/enigma2.git;protocol=git;branch=${BRANCH};tag=${SRCREV}"
103
104
105 SRC_URI_bm750 = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
106            file://enigma2_vuplus_duo.patch;patch=1;pnum=1 \
107            file://enigma2_vuplus_swloop.patch;patch=1;pnum=1 \
108            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
109            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
110            file://MyriadPro-Regular.otf \
111            file://MyriadPro-Semibold.otf \
112            file://MyriadPro-SemiboldIt.otf \
113            file://750S \
114            file://Vu_HD \
115            file://number_key \
116            "
117
118
119 SRC_URI_vusolo = "git://archive.vuplus.com/git/enigma2.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
120            file://enigma2_vuplus_skin.patch;patch=1;pnum=1 \
121            file://enigma2_vuplus_mediaplayer.patch;patch=1;pnum=1 \
122            file://enigma2_vuplus_misc.patch;patch=1;pnum=1 \
123            file://MyriadPro-Regular.otf \
124            file://MyriadPro-Semibold.otf \
125            file://MyriadPro-SemiboldIt.otf \
126            file://750S \
127            file://Vu_HD \
128            file://number_key \
129            file://enigma2.sh"
130
131 def change_po():
132         import os
133         try:
134                 os.system("find ./ -name \"*.po\" > ./po_list")
135                 os.system("find ./ -name \"*.pot\" >> ./po_list")
136                 po_list = []
137                 po_list = open('po_list','r+').readlines()
138                 for x in po_list:
139                         changeword(x)
140                 os.system('rm po_list')
141         except:
142                 print 'word patch error '
143                 return
144
145 def changeword(file):
146         fn = file[:-1]
147         fnn = file[:-1]+'_n'
148         cmd = "sed s/Dreambox/STB/g "+fn+" > "+fnn
149         os.system(cmd)
150         cmd1 = "mv "+fnn+" "+fn
151         os.system(cmd1)
152
153 do_unpack_append(){
154         change_po()
155 }
156
157 S = "${WORKDIR}/git"
158
159 FILES_${PN} += "${datadir}/fonts ${datadir}/keymaps"
160 FILES_${PN}-meta = "${datadir}/meta"
161 PACKAGES += "${PN}-meta"
162 PACKAGE_ARCH = "${MACHINE_ARCH}"
163
164 inherit autotools pkgconfig
165
166
167 do_compile_prepend_vuplus() {
168         install -m 0755 ${WORKDIR}/MyriadPro-Regular.otf ${S}/data/fonts/
169         install -m 0755 ${WORKDIR}/MyriadPro-Semibold.otf ${S}/data/fonts/
170         install -m 0755 ${WORKDIR}/MyriadPro-SemiboldIt.otf ${S}/data/fonts/
171         install -m 0755 ${WORKDIR}/750S/*.png ${S}/data/750S/
172         install -m 0755 ${WORKDIR}/750S/buttons/*.png ${S}/data/750S/buttons/
173         install -m 0755 ${WORKDIR}/750S/countries/*.png ${S}/data/750S/countries/
174         install -m 0755 ${WORKDIR}/750S/icons/*.png ${S}/data/750S/icons/
175         install -m 0755 ${WORKDIR}/750S/menu/*.png ${S}/data/750S/menu/
176         install -m 0755 ${WORKDIR}/750S/spinner/*.png ${S}/data/skin_default/spinner/
177         install -m 0755 ${WORKDIR}/Vu_HD/*.png ${S}/data/Vu_HD/
178         install -m 0755 ${WORKDIR}/Vu_HD/buttons/*.png ${S}/data/Vu_HD/buttons/
179         install -m 0755 ${WORKDIR}/Vu_HD/countries/*.png ${S}/data/Vu_HD/countries/
180         install -m 0755 ${WORKDIR}/Vu_HD/icons/*.png ${S}/data/Vu_HD/icons/
181         install -m 0755 ${WORKDIR}/Vu_HD/menu/*.png ${S}/data/Vu_HD/menu/
182         install -m 0755 ${WORKDIR}/number_key/*.png ${S}/data/skin_default/buttons/
183 }
184
185 EXTRA_OECONF = " \
186         BUILD_SYS=${BUILD_SYS} \
187         HOST_SYS=${HOST_SYS} \
188         STAGING_INCDIR=${STAGING_INCDIR} \
189         STAGING_LIBDIR=${STAGING_LIBDIR} \
190 "
191
192 python populate_packages_prepend () {
193         enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
194
195         do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', '%s ', recursive=True, match_path=True, prepend=True)
196 }
197
198 RCONFLICTS_${PN} = "dreambox-keymaps"
199 RREPLACES_${PN} = "dreambox-keymaps tuxbox-tuxtxt-32bpp (<= 0.0+cvs20090130-r1)"
200
201 # workaround for opkg <= 0.1.7+svnr455-r19.1
202 pkg_preinst_${PN} () {
203         if [ "x$D" != "x" ]; then
204                 exit 1
205         fi
206         if [ -f ${datadir}/fonts/tuxtxt.ttf ]; then
207                 cp -a ${datadir}/fonts/tuxtxt.ttf /tmp/tuxtxt.ttf
208         fi
209 }
210 pkg_postinst_${PN} () {
211         if [ "x$D" != "x" ]; then
212                 exit 1
213         fi
214         if [ -f /tmp/tuxtxt.ttf -a ! -f ${datadir}/fonts/tuxtxt.ttf ]; then
215                 mv /tmp/tuxtxt.ttf ${datadir}/fonts/tuxtxt.ttf
216         fi
217 }