037dbec6eb036640592a77c733c9abb7394eedee
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-graphics / weston / weston.inc
1 DESCRIPTION = "Wayland Compositor Infrastructure"
2 HOMEPAGE = "http://weston.freedesktop.org/"
3 SECTION = "Graphics & UI Framework/Wayland Window System"
4 LICENSE = "MIT"
5 PV = "1.6.0"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by weston
17
18
19 #PROVIDES by weston-dev
20 PROVIDES += "weston-dev"
21
22
23 #PROVIDES by weston-docs
24 PROVIDES += "weston-docs "
25
26
27 #PROVIDES by weston-clients
28 PROVIDES += "weston-clients"
29
30
31 RDEPENDS = ""
32 #RDEPENDS of weston (${PN})
33 RDEPENDS_${PN} += "weston-startup"
34 RDEPENDS_${PN} += "shadow"
35
36
37 DEPENDS = ""
38 #DEPENDS of weston
39 DEPENDS += "mtdev"
40 DEPENDS += "cairo"
41 DEPENDS += "expat"
42 DEPENDS += "udev"
43 DEPENDS += "libvpx"
44 DEPENDS += "xz"
45 DEPENDS += "libinput"
46 DEPENDS_append_class-native = " automake-native"
47 DEPENDS_append_class-target = " automake-native"
48 DEPENDS += "mesa"
49 DEPENDS += "systemd"
50 inherit pkgconfig
51 DEPENDS += "glib-2.0"
52 DEPENDS += "wayland"
53 DEPENDS += "pixman"
54 DEPENDS += "libdrm"
55 DEPENDS_append_class-native = " libtool"
56 DEPENDS_append_class-target = " libtool-cross"
57 DEPENDS += "libffi"
58 DEPENDS += "pango"
59 DEPENDS += "poppler"
60 DEPENDS += "virtual/libgles2"
61 DEPENDS += "libpam"
62 DEPENDS += "virtual/egl"
63 DEPENDS += "libxkbcommon"
64 DEPENDS += "libjpeg-turbo"
65 DEPENDS_append_class-native = " autoconf-native"
66 DEPENDS_append_class-target = " autoconf-native"
67
68 do_prep() {
69  cd ${S}
70  chmod -Rf a+rX,u+w,g-w,o-w ${S}
71  #setup -q
72  cp ${S}/packaging/weston.manifest .
73  
74  
75 }
76 do_patch_append() {
77     bb.build.exec_func('do_prep', d)
78 }
79
80 do_configure() {
81 }
82
83 do_compile() {
84  cd ${S}
85   LANG=C
86   export LANG
87   unset DISPLAY
88   LD_AS_NEEDED=1; export LD_AS_NEEDED ;
89   
90   
91    
92   autotools_do_configure
93   
94   make -j16
95   
96   
97   
98 }
99 EXTRA_OECONF += " --disable-static --disable-setuid-install --enable-simple-clients --enable-clients --disable-libunwind --disable-xwayland --disable-xwayland-test --disable-x11-compositor --disable-rpi-compositor --with-cairo=glesv2 "
100
101 do_install() {
102  export RPM_BUILD_ROOT=${D}
103  cd ${S}
104  LANG=C
105  export LANG
106  unset DISPLAY
107  rm -rf ${D}
108  mkdir -p ${D}
109  
110  
111    oe_runmake \
112          DESTDIR=${D} \
113          INSTALL_ROOT=${D} \
114          BINDIR=${prefix}/bin \
115    install  
116    rm -f ${D}${infodir}/dir 
117    find ${D} -regex ".*\.la$" | xargs rm -f -- 
118    find ${D} -regex ".*\.a$" | xargs rm -f --
119  
120  # install example clients
121  install -m 755 weston-calibrator ${D}${prefix}/bin
122  install -m 755 weston-simple-touch ${D}${prefix}/bin
123  install -m 755 weston-simple-shm ${D}${prefix}/bin
124  install -m 755 weston-simple-egl ${D}${prefix}/bin
125  install -m 755 weston-simple-damage ${D}${prefix}/bin
126  install -m 755 weston-nested-client ${D}${prefix}/bin
127  install -m 755 weston-nested ${D}${prefix}/bin
128  install -m 755 weston-flower ${D}${prefix}/bin
129  install -m 755 weston-image ${D}${prefix}/bin
130  install -m 755 weston-cliptest ${D}${prefix}/bin
131  install -m 755 weston-dnd ${D}${prefix}/bin
132  install -m 755 weston-editor ${D}${prefix}/bin
133  install -m 755 weston-stacking ${D}${prefix}/bin
134  install -m 755 weston-smoke ${D}${prefix}/bin
135  install -m 755 weston-scaler ${D}${prefix}/bin
136  install -m 755 weston-resizor ${D}${prefix}/bin
137  install -m 755 weston-eventdemo ${D}${prefix}/bin
138  install -m 755 weston-clickdot ${D}${prefix}/bin
139  install -m 755 weston-subsurfaces ${D}${prefix}/bin
140  install -m 755 weston-transformed ${D}${prefix}/bin
141  install -m 755 weston-fullscreen ${D}${prefix}/bin
142  
143  install -d ${D}${prefix}/lib/systemd/user
144  install -m 644 ${S}/packaging/weston.target ${D}${prefix}/lib/systemd/user/weston.target
145  # The weston.service unit file must be provided by the weston-startup
146  # virtual package, i.e. "Provide: weston-startup".  The weston-startup
147  # virtual package requirement is intended to force Tizen profile
148  # maintainers to add the necessary start-up script or systemd unit
149  # file to start weston. Otherwise it becomes possible to install
150  # weston without an automated means to start weston at boot, which may
151  # lead to confusion.  This approach allows startup related files to be
152  # maintained outside of this weston package.
153  
154  
155 }
156
157 pkg_preinst_${PN}() {
158     #!/bin/sh -e
159
160     getent group weston-launch >/dev/null || $D${prefix}/sbin/groupadd -o -r weston-launch
161
162 }
163
164 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
165 PACKAGES += " weston "
166 PACKAGES += " weston-clients "
167 PACKAGES += " weston-docs "
168 PACKAGES += " weston-dev "
169
170 weston_files = ""
171 weston_files += "${prefix}/bin/wcap-*"
172 weston_files += "${prefix}/bin/weston"
173 weston_files += "${prefix}/bin/weston-info"
174 weston_files += "${prefix}/bin/weston-launch"
175 weston_files += "${prefix}/bin/weston-terminal"
176 weston_files += "${prefix}/libexec/weston-*"
177 weston_files += "${prefix}/lib/weston/desktop-shell.so"
178 weston_files += "${prefix}/lib/weston/drm-backend.so"
179 weston_files += "${prefix}/lib/weston/fbdev-backend.so"
180 weston_files += "${prefix}/lib/weston/fullscreen-shell.so"
181 weston_files += "${prefix}/lib/weston/headless-backend.so"
182 weston_files += "${prefix}/lib/weston/wayland-backend.so"
183 weston_files += "${prefix}/lib/weston/gl-renderer.so"
184 weston_files += "${prefix}/share/weston"
185 weston_files += "${prefix}/lib/systemd/user/weston.target"
186 MANIFESTFILES_${PN} = "weston.manifest"
187
188 weston-clients_files = ""
189 weston-clients_files += "${prefix}/bin/weston-simple-touch"
190 weston-clients_files += "${prefix}/bin/weston-simple-shm"
191 weston-clients_files += "${prefix}/bin/weston-simple-egl"
192 weston-clients_files += "${prefix}/bin/weston-simple-damage"
193 weston-clients_files += "${prefix}/bin/weston-nested-client"
194 weston-clients_files += "${prefix}/bin/weston-nested"
195 weston-clients_files += "${prefix}/bin/weston-flower"
196 weston-clients_files += "${prefix}/bin/weston-image"
197 weston-clients_files += "${prefix}/bin/weston-cliptest"
198 weston-clients_files += "${prefix}/bin/weston-dnd"
199 weston-clients_files += "${prefix}/bin/weston-editor"
200 weston-clients_files += "${prefix}/bin/weston-stacking"
201 weston-clients_files += "${prefix}/bin/weston-smoke"
202 weston-clients_files += "${prefix}/bin/weston-scaler"
203 weston-clients_files += "${prefix}/bin/weston-resizor"
204 weston-clients_files += "${prefix}/bin/weston-eventdemo"
205 weston-clients_files += "${prefix}/bin/weston-clickdot"
206 weston-clients_files += "${prefix}/bin/weston-subsurfaces"
207 weston-clients_files += "${prefix}/bin/weston-transformed"
208 weston-clients_files += "${prefix}/bin/weston-fullscreen"
209 weston-clients_files += "${prefix}/bin/weston-calibrator"
210 MANIFESTFILES_${PN}-clients = "weston.manifest"
211
212 weston-docs_files = ""
213
214 weston-dev_files = ""
215 weston-dev_files += "${prefix}/include/weston/*.h"
216 weston-dev_files += "${prefix}/lib/pkgconfig/*.pc"
217 MANIFESTFILES_${PN}-dev = "weston.manifest"
218
219 FILES_${PN} = "${weston_files}"
220 FILES_${PN}-clients = "${weston-clients_files}"
221 FILES_${PN}-docs = "${weston-docs_files}"
222 FILES_${PN}-dev = "${weston-dev_files}"
223
224 PKG_weston= "weston"
225 PKG_weston-clients= "weston-clients"
226 PKG_weston-docs= "weston-docs"
227 PKG_weston-dev= "weston-dev"
228
229 require weston-extraconf.inc
230