Tizen recipes: avoid -j16
[scm/bb/meta-tizen.git] / meta-tizen-common-share / recipes-crosswalk / crosswalk / crosswalk-thirdparty.inc
1 DESCRIPTION = "Chromium-based app runtime"
2 HOMEPAGE = "https://github.com/otcshare/crosswalk"
3 SECTION = "Web Framework/Web Run Time"
4 LICENSE = "(BSD-3-Clause and LGPL-2.1+)"
5 PV = "11.39.256.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 crosswalk-thirdparty
17 # the PROVIDES rules is ignore "crosswalk-thirdparty  "
18
19
20 RDEPENDS = ""
21 #RDEPENDS of crosswalk-thirdparty (${PN})
22 RDEPENDS_${PN} += "ca-certificates-tizen"
23 RDEPENDS_${PN} += "ss-server"
24
25
26 DEPENDS = ""
27 #DEPENDS of crosswalk-thirdparty
28 DEPENDS += "cairo"
29 DEPENDS += "expat"
30 DEPENDS += "udev"
31 DEPENDS += "libxslt"
32 DEPENDS += "glib-2.0"
33 DEPENDS += "bzip2"
34 DEPENDS += "nss"
35 DEPENDS += "alsa-lib"
36 DEPENDS += "elfutils"
37 inherit pkgconfig
38 DEPENDS += "yasm"
39 inherit perlnative
40 DEPENDS += "wayland"
41 DEPENDS += "which"
42 DEPENDS += "libxml2"
43 DEPENDS += "libcap"
44 DEPENDS += "flex"
45 DEPENDS += "gperf"
46 inherit pythonnative
47 DEPENDS += "python-xml"
48 DEPENDS_append_class-native = " ninja-native"
49 DEPENDS_append_class-target = " ninja-native"
50 DEPENDS += "pango"
51 DEPENDS += "vconf"
52 DEPENDS += "fontconfig"
53 DEPENDS += "libxkbcommon"
54 DEPENDS += "dbus"
55 DEPENDS += "pulseaudio"
56 DEPENDS_append_class-native = " bison-native"
57 DEPENDS_append_class-target = " bison-native"
58 DEPENDS += "pciutils"
59 DEPENDS += "binutils"
60
61 do_prep() {
62  cd ${S}
63  chmod -Rf a+rX,u+w,g-w,o-w ${S}
64  #setup -q -n crosswalk
65  
66  cp ${S}/packaging/crosswalk-thirdparty.manifest .
67  cp ${S}/packaging/xwalk-thirdparty.gyp src/xwalk/
68  
69  
70  # The profiles using Wayland (and thus Ozone) do not need this patch.
71  
72  
73  
74 }
75 do_patch_append() {
76     bb.build.exec_func('do_prep', d)
77 }
78
79 do_configure() {
80 }
81
82 do_compile() {
83  cd ${S}
84  LANG=C
85  export LANG
86  unset DISPLAY
87  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
88  
89  
90  
91  # Stop unconditionally passing -Wall to the compiler. Chromium has its own
92  # mechanisms for deciding which parts of the code need -Wall and which need it
93  # to be left out (since several pieces are built with -Werror). At least in
94  # M39, this is preventing the "rtc_base" target from being built because it
95  # does not expect -Wall to be passed to the compiler (see webrtc issue 3307).
96  export CXXFLAGS="`echo $CXXFLAGS | sed s,-Wall,,g`"
97  
98  # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
99  # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
100  # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
101  export CFLAGS="`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`"
102  
103  
104  # Building the RPM in the GBS chroot fails with errors such as
105  #   /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
106  #       failed to set dynamic section sizes: Memory exhausted
107  # For now, work around it by passing a GNU ld-specific flag that optimizes the
108  # linker for memory usage.
109  export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
110  
111  # Support building in a non-standard directory, possibly outside ${WORKDIR}.
112  # Since the build root is erased every time a new build is performed, one way
113  # to avoid losing the build directory is to specify a location outside the
114  # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
115  # (remember all paths are still inside the chroot):
116  #    gbs build --define 'BUILDDIR_NAME /some/path'
117  BUILDDIR_NAME=""
118  if [ -n "${BUILDDIR_NAME}" ]; then
119     mkdir -p "${BUILDDIR_NAME}"
120     ln -s "${BUILDDIR_NAME}" src/out
121  fi
122  
123  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1"
124  
125  # disable nacl if necessary
126  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1"
127  
128  # Linking fails when fatal ld warnings are enabled. See XWALK-1379.
129  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1"
130  
131  # For building for arm in OBS, we need :
132  # -> to unset sysroot value.
133  # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
134  # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
135  #
136  # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
137  # So force it.
138  
139  
140  
141  
142  # --no-parallel is added because chroot does not mount a /dev/shm, this will
143  # cause python multiprocessing.SemLock error.
144  export GYP_GENERATORS='ninja'
145  ./src/xwalk/gyp_xwalk src/xwalk/xwalk-thirdparty.gyp \
146  --no-parallel \
147  ${GYP_EXTRA_FLAGS} \
148  -Dchromeos=0 \
149  -Dclang=0 \
150  -Dlinux_use_bundled_binutils=0 \
151  -Dlinux_use_bundled_gold=0 \
152  -Dtizen=1 \
153  -Dpython_ver=2.7 \
154  -Duse_aura=1 \
155  -Duse_cups=0 \
156  -Duse_gconf=0 \
157  -Duse_gnome_keyring=0 \
158  -Duse_kerberos=0 \
159  -Duse_system_bzip2=1 \
160  -Duse_system_libexif=1 \
161  -Duse_system_libxml=1 \
162  -Duse_system_yasm=1 \
163  -Dshared_process_mode=1 \
164  -Denable_hidpi=1
165  
166  ninja ${PARALLEL_MAKE} -C src/out/Release xwalk-thirdparty
167  
168  
169  
170 }
171
172 do_install() {
173  export RPM_BUILD_ROOT=${D}
174  cd ${S}
175  LANG=C
176  export LANG
177  unset DISPLAY
178  rm -rf ${D}
179  mkdir -p ${D}
180  
181  
182  
183  mkdir  -p ${D}${prefix}/share/crosswalk-thirdparty/
184  tar -zcvf out.tgz src/out
185  cp -ar out.tgz ${D}${prefix}/share/crosswalk-thirdparty/
186  
187  
188 }
189
190 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
191 PACKAGES += " crosswalk-thirdparty "
192
193 crosswalk-thirdparty_files = ""
194 crosswalk-thirdparty_files += "${prefix}/share/crosswalk-thirdparty/*"
195 MANIFESTFILES_${PN} = "crosswalk-thirdparty.manifest"
196
197 FILES_${PN} = "${crosswalk-thirdparty_files}"
198
199 PKG_crosswalk-thirdparty= "crosswalk-thirdparty"
200
201 require crosswalk-thirdparty-extraconf.inc
202