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+)"
11 inherit manifest autotools-brokensep
16 #PROVIDES by crosswalk-thirdparty
17 # the PROVIDES rules is ignore "crosswalk-thirdparty "
21 #RDEPENDS of crosswalk-thirdparty (${PN})
22 RDEPENDS_${PN} += "ca-certificates-tizen"
23 RDEPENDS_${PN} += "ss-server"
27 #DEPENDS of crosswalk-thirdparty
48 DEPENDS += "python-xml"
49 DEPENDS_append_class-native = " ninja-native"
50 DEPENDS_append_class-target = " ninja-native"
53 DEPENDS += "fontconfig"
54 DEPENDS += "libxkbcommon"
56 DEPENDS += "pulseaudio"
57 DEPENDS_append_class-native = " bison-native"
58 DEPENDS_append_class-target = " bison-native"
64 chmod -Rf a+rX,u+w,g-w,o-w ${S}
65 #setup -q -n crosswalk
67 cp ${S}/packaging/crosswalk-thirdparty.manifest .
68 cp ${S}/packaging/xwalk-thirdparty.gyp src/xwalk/
71 # The profiles using Wayland (and thus Ozone) do not need this patch.
76 bb.build.exec_func('do_prep', d)
87 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
90 # Stop unconditionally passing -Wall to the compiler. Chromium has its own
91 # mechanisms for deciding which parts of the code need -Wall and which need it
92 # to be left out (since several pieces are built with -Werror). At least in
93 # M39, this is preventing the "rtc_base" target from being built because it
94 # does not expect -Wall to be passed to the compiler (see webrtc issue 3307).
95 export CXXFLAGS="`echo $CXXFLAGS | sed s,-Wall,,g`"
97 # Do not use -finline-functions: it breaks the build because it causes -Wall to
98 # warn about some conditions that cannot really be reached (ie. variables that
99 # may be used uninitialized while in fact thay cannot be uninitialized). See
101 export CXXFLAGS="`echo $CXXFLAGS | sed s,-finline-functions,,g`"
103 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
104 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
105 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
106 export CFLAGS="`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`"
109 # Building the RPM in the GBS chroot fails with errors such as
110 # /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
111 # failed to set dynamic section sizes: Memory exhausted
112 # For now, work around it by passing a GNU ld-specific flag that optimizes the
113 # linker for memory usage.
114 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
116 # Support building in a non-standard directory, possibly outside ${WORKDIR}.
117 # Since the build root is erased every time a new build is performed, one way
118 # to avoid losing the build directory is to specify a location outside the
119 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
120 # (remember all paths are still inside the chroot):
121 # gbs build --define 'BUILDDIR_NAME /some/path'
123 if [ -n "${BUILDDIR_NAME}" ]; then
124 mkdir -p "${BUILDDIR_NAME}"
125 ln -s "${BUILDDIR_NAME}" src/out
128 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1"
130 # Force gold binary from chroot ld.gold provided by binutils-gold
131 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1 -Dlinux_use_bundled_binutils=0 -Dlinux_use_bundled_gold=0 "
133 # Linking fails when fatal ld warnings are enabled. See XWALK-1379.
134 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1"
136 # For building for arm in OBS, we need :
137 # -> to unset sysroot value.
138 # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
139 # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
142 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dsysroot= "
144 # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
149 # --no-parallel is added because chroot does not mount a /dev/shm, this will
150 # cause python multiprocessing.SemLock error.
151 export GYP_GENERATORS='ninja'
152 export GYP_DEFINES="$GYP_DEFINES arm_float_abi=hard"
153 ./src/xwalk/gyp_xwalk src/xwalk/xwalk-thirdparty.gyp \
158 -Dlinux_use_bundled_binutils=0 \
159 -Dlinux_use_bundled_gold=0 \
160 -Dlinux_use_gold_flags=1 \
166 -Duse_gnome_keyring=0 \
168 -Duse_system_bzip2=1 \
169 -Duse_system_libexif=1 \
170 -Duse_system_libxml=1 \
171 -Duse_system_yasm=1 \
174 ninja ${PARALLEL_MAKE} -C src/out/Release xwalk-thirdparty
181 export RPM_BUILD_ROOT=${D}
191 mkdir -p ${D}${prefix}/share/crosswalk-thirdparty/
192 tar -zcvf out.tgz src/out
193 cp -ar out.tgz ${D}${prefix}/share/crosswalk-thirdparty/
198 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
199 PACKAGES += " crosswalk-thirdparty "
201 crosswalk-thirdparty_files = ""
202 crosswalk-thirdparty_files += "${prefix}/share/crosswalk-thirdparty/*"
203 MANIFESTFILES_${PN} = "crosswalk-thirdparty.manifest"
205 FILES_${PN} = "${crosswalk-thirdparty_files}"
207 PKG_crosswalk-thirdparty= "crosswalk-thirdparty"
209 require crosswalk-thirdparty-extraconf.inc