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