first commit
[scm/bb/meta-tizen.git] / recipes-tizen / wayland / wayland.inc
1 DESCRIPTION = "Wayland Compositor Infrastructure"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Graphics & UI Framework/Wayland Window System"
4 LICENSE = "MIT"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by wayland 
13 PROVIDES += "wayland"
14 RPROVIDES_wayland += "wayland"
15
16 #PROVIDES by wayland-devel 
17 PROVIDES += "wayland-devel"
18 RPROVIDES_wayland-devel += "wayland-devel"
19 RPROVIDES_wayland-devel += "wayland-dev"
20
21 #PROVIDES by libwayland-cursor 
22 PROVIDES += "libwayland-cursor"
23 RPROVIDES_libwayland-cursor += "libwayland-cursor"
24
25 #PROVIDES by libwayland-client 
26 PROVIDES += "libwayland-client"
27 RPROVIDES_libwayland-client += "libwayland-client"
28
29 #PROVIDES by libwayland-server 
30 PROVIDES += "libwayland-server"
31 RPROVIDES_libwayland-server += "libwayland-server"
32
33 RDEPENDS = ""
34 #RDEPENDS of wayland-devel (${PN}-devel)
35 RDEPENDS_${PN}-devel += "libwayland-server"
36 RDEPENDS_${PN}-devel += "libwayland-cursor"
37 RDEPENDS_${PN}-devel += "libwayland-client"
38
39
40 DEPENDS = ""
41 #DEPENDS of wayland 
42 DEPENDS += "doxygen"
43 DEPENDS += "pkgconfig(libffi)"
44 DEPENDS += "expat"
45 DEPENDS += "automake-native"
46 DEPENDS += "xz"
47 DEPENDS += "libtool-cross"
48 DEPENDS += "autoconf-native"
49 DEPENDS += "fdupes-native"
50
51 do_patch() {
52  chmod -Rf a+rX,u+w,g-w,o-w ${S}
53  #setup -q
54  cp ${S}/packaging/wayland.manifest .
55  
56  
57 }
58
59 do_configure() {
60 }
61
62 do_compile() {
63  LANG=C
64  export LANG
65  unset DISPLAY
66  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
67  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
68  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
69  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
70  
71  
72    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
73    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
74    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
75    ./autogen.sh --build=${TARGET_SYS} --host=${HOST_SYS} \
76          --target=x86_64-tizen-linux \
77          --program-prefix= \
78          --prefix=/usr \
79          --exec-prefix=/usr \
80          --bindir=/usr/bin \
81          --sbindir=/usr/sbin \
82          --sysconfdir=/etc \
83          --datadir=/usr/share \
84          --includedir=/usr/include \
85          --libdir=/usr/lib \
86          --libexecdir=/usr/libexec \
87          --localstatedir=/var \
88          --sharedstatedir=/usr/com \
89          --mandir=/usr/share/man \
90          --infodir=/usr/share/info
91  
92    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
93    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
94    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
95    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
96          --target=x86_64-tizen-linux \
97          --program-prefix= \
98          --prefix=/usr \
99          --exec-prefix=/usr \
100          --bindir=/usr/bin \
101          --sbindir=/usr/sbin \
102          --sysconfdir=/etc \
103          --datadir=/usr/share \
104          --includedir=/usr/include \
105          --libdir=/usr/lib \
106          --libexecdir=/usr/libexec \
107          --localstatedir=/var \
108          --sharedstatedir=/usr/com \
109          --mandir=/usr/share/man \
110          --infodir=/usr/share/info --disable-static
111  make -j16
112  
113  
114  
115 }
116
117 do_install() {
118  echo export RPM_BUILD_ROOT=${D}
119  LANG=C
120  export LANG
121  unset DISPLAY
122  rm -rf ${D} 
123  mkdir -p ${D} 
124  
125  
126    oe_runmake \
127          DESTDIR=${D} \
128          INSTALL_ROOT=${D} \
129          BINDIR=/usr/bin \
130    install  
131    rm -f ${D}/usr/share/info/dir 
132    find ${D} -regex ".*\.la$" | xargs rm -f -- 
133    find ${D} -regex ".*\.a$" | xargs rm -f --
134  
135   _target=""; 
136   _symlinks=0; 
137   _symlinks=1; 
138   fdupes -q -n -r ${D}//usr/share/man | 
139    while read _file; do 
140      if test -z "$_target" ; then 
141        _target="$_file"; 
142      else 
143        if test -z "$_file" ; then 
144         _target=""; 
145         continue ; 
146        fi ; 
147        if test "$_symlinks" = 1; then 
148          ln -sf "${_target#${D}}" "$_file"; 
149        else 
150          ln -f "$_target" "$_file"; 
151        fi ;
152      fi ; 
153   done 
154  
155  
156 }
157
158 PACKAGES = ""
159 PACKAGES += "libwayland-server"
160 PACKAGES += "wayland-devel"
161 PACKAGES += "libwayland-client"
162 PACKAGES += "libwayland-cursor"
163
164 libwayland-server_files = ""
165 libwayland-server_files += "wayland.manifest"
166 libwayland-server_files += "/usr/lib/libwayland-server.so.0*"
167
168 wayland-devel_files = ""
169 wayland-devel_files += "wayland.manifest"
170 wayland-devel_files += "/usr/bin/wayland-scanner"
171 wayland-devel_files += "/usr/include/wayland-*.h"
172 wayland-devel_files += "/usr/lib/libwayland-*.so"
173 wayland-devel_files += "/usr/lib/pkgconfig/wayland-*.pc"
174 wayland-devel_files += "/usr/share/pkgconfig/wayland-*.pc"
175 wayland-devel_files += "/usr/share/wayland/wayland*"
176 wayland-devel_files += "/usr/share/aclocal"
177 wayland-devel_files += "/usr/share/man/man3/*"
178 wayland-devel_files += "README TODO"
179
180 libwayland-client_files = ""
181 libwayland-client_files += "wayland.manifest"
182 libwayland-client_files += "/usr/lib/libwayland-client.so.0*"
183
184 libwayland-cursor_files = ""
185 libwayland-cursor_files += "wayland.manifest"
186 libwayland-cursor_files += "/usr/lib/libwayland-cursor.so.0*"
187
188 FILES_lib${PN}-server = "${libwayland-server_files}"
189 FILES_${PN}-devel = "${wayland-devel_files}"
190 FILES_lib${PN}-client = "${libwayland-client_files}"
191 FILES_lib${PN}-cursor = "${libwayland-cursor_files}"
192
193 PKG_libwayland-server= "libwayland-server"
194 PKG_wayland-devel= "wayland-devel"
195 PKG_libwayland-client= "libwayland-client"
196 PKG_libwayland-cursor= "libwayland-cursor"
197
198 require wayland-extraconf.inc