crosswalk: fix build on ARM
[scm/bb/meta-tizen.git] / meta-tizen-common-share / recipes-crosswalk / crosswalk / crosswalk-thirdparty.inc
index 57810d4..68859ac 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Chromium-based app runtime"
 HOMEPAGE = "https://github.com/otcshare/crosswalk"
 SECTION = "Web Framework/Web Run Time"
 LICENSE = "(BSD-3-Clause and LGPL-2.1+)"
-PV = "10.38.222.0"
+PV = "11.40.277.0"
 
 SRC_URI = ""
 
@@ -20,10 +20,12 @@ PROVIDES = ""
 RDEPENDS = ""
 #RDEPENDS of crosswalk-thirdparty (${PN})
 RDEPENDS_${PN} += "ca-certificates-tizen"
+RDEPENDS_${PN} += "ss-server"
 
 
 DEPENDS = ""
 #DEPENDS of crosswalk-thirdparty
+DEPENDS += "protobuf"
 DEPENDS += "cairo"
 DEPENDS += "expat"
 DEPENDS += "udev"
@@ -34,6 +36,7 @@ DEPENDS += "nss"
 DEPENDS += "alsa-lib"
 DEPENDS += "elfutils"
 inherit pkgconfig
+DEPENDS += "yasm"
 inherit perlnative
 DEPENDS += "wayland"
 DEPENDS += "which"
@@ -65,9 +68,6 @@ do_prep() {
  cp ${S}/packaging/xwalk-thirdparty.gyp src/xwalk/
  
  
- cat ${S}/packaging/Blink-Add-GCC-flag-Wno-narrowing-fix-64bits-build.patch | patch -s  -p0 --fuzz=2
- #patch9
  # The profiles using Wayland (and thus Ozone) do not need this patch.
  
  
@@ -92,12 +92,18 @@ do_compile() {
  # to be left out (since several pieces are built with -Werror). At least in
  # M39, this is preventing the "rtc_base" target from being built because it
  # does not expect -Wall to be passed to the compiler (see webrtc issue 3307).
- export CXXFLAGS=`echo $CXXFLAGS | sed s,-Wall,,g`
+ export CXXFLAGS="`echo $CXXFLAGS | sed s,-Wall,,g`"
+ # Do not use -finline-functions: it breaks the build because it causes -Wall to
+ # warn about some conditions that cannot really be reached (ie. variables that
+ # may be used uninitialized while in fact thay cannot be uninitialized). See
+ # TC-2299.
+ export CXXFLAGS="`echo $CXXFLAGS | sed s,-finline-functions,,g`"
  
  # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
  # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
  # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
- export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
+ export CFLAGS="`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`"
  
  
  # Building the RPM in the GBS chroot fails with errors such as
@@ -119,12 +125,12 @@ do_compile() {
     ln -s "${BUILDDIR_NAME}" src/out
  fi
  
- GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1 -Denable_xdg_shell=1"
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1"
  
  # Force gold binary from chroot ld.gold provided by binutils-gold
  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1 -Dlinux_use_bundled_binutils=0 -Dlinux_use_bundled_gold=0 "
  
- # Linking fails in Tizen Common when fatal ld warnings are enabled. XWALK-1379.
+ # Linking fails when fatal ld warnings are enabled. See XWALK-1379.
  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1"
  
  # For building for arm in OBS, we need :
@@ -132,18 +138,26 @@ do_compile() {
  # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
  # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
  #
+
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dsysroot= "
+
  # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
  # So force it.
  
  
  # --no-parallel is added because chroot does not mount a /dev/shm, this will
  # cause python multiprocessing.SemLock error.
  export GYP_GENERATORS='ninja'
+ export GYP_DEFINES="$GYP_DEFINES arm_float_abi=hard"
  ./src/xwalk/gyp_xwalk src/xwalk/xwalk-thirdparty.gyp \
  --no-parallel \
  ${GYP_EXTRA_FLAGS} \
  -Dchromeos=0 \
  -Dclang=0 \
+ -Dlinux_use_bundled_binutils=0 \
+ -Dlinux_use_bundled_gold=0 \
+ -Dlinux_use_gold_flags=1 \
  -Dtizen=1 \
  -Dpython_ver=2.7 \
  -Duse_aura=1 \
@@ -154,11 +168,10 @@ do_compile() {
  -Duse_system_bzip2=1 \
  -Duse_system_libexif=1 \
  -Duse_system_libxml=1 \
- -Duse_system_nspr=1 \
- -Dshared_process_mode=1 \
- -Denable_hidpi=1
+ -Duse_system_yasm=1 \
+ -Denable_hidpi=1 
  
- ninja -j16 -C src/out/Release xwalk-thirdparty
+ ninja ${PARALLEL_MAKE} -C src/out/Release xwalk-thirdparty
  
  
  
@@ -174,9 +187,10 @@ do_install() {
  mkdir -p ${D}
  
  
- mkdir  -p ${D}/${prefix}/share/crosswalk-thirdparty/
+ mkdir  -p ${D}${prefix}/share/crosswalk-thirdparty/
  tar -zcvf out.tgz src/out
- cp -ar out.tgz ${D}/${prefix}/share/crosswalk-thirdparty/
+ cp -ar out.tgz ${D}${prefix}/share/crosswalk-thirdparty/
  
  
 }