3 FILESEXTRAPATHS_prepend := "${THISDIR}/crosswalk"
7 file://oe-defaults.gypi \
10 # This comes from the chromium recipe:
11 # http://layers.openembedded.org/layerindex/recipe/4969/
12 # It allows architecture specific configuration
13 COMPATIBLE_MACHINE = "(-)"
14 COMPATIBLE_MACHINE_i586 = "(.*)"
15 COMPATIBLE_MACHINE_x86-64 = "(.*)"
16 COMPATIBLE_MACHINE_armv6 = "(.*)"
17 COMPATIBLE_MACHINE_armv7a = "(.*)"
18 COMPATIBLE_MACHINE_romley-ivb = "(.*)"
19 COMPATIBLE_MACHINE_valleyisland-64 = "(.*)"
21 RDEPENDS_${PN} += "libpulsecommon"
23 do_compile_prepend() {
25 CC_host="gcc"; export CC_host
26 CXX_host="g++"; export CXX_host
30 CXX="${CXX}" export CXX_host
31 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -I${WORKDIR}/oe-defaults.gypi -I${WORKDIR}/include.gypi"
32 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -I${WORKDIR}/oe-defaults.gypi -I${WORKDIR}/include.gypi"
43 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
46 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
47 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
48 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
49 export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
52 # Building the RPM in the GBS chroot fails with errors such as
53 # /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
54 # failed to set dynamic section sizes: Memory exhausted
55 # For now, work around it by passing a GNU ld-specific flag that optimizes the
56 # linker for memory usage.
57 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
59 # Support building in a non-standard directory, possibly outside ${WORKDIR}.
60 # Since the build root is erased every time a new build is performed, one way
61 # to avoid losing the build directory is to specify a location outside the
62 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
63 # (remember all paths are still inside the chroot):
64 # gbs build --define 'BUILDDIR_NAME /some/path'
66 if [ -n "${BUILDDIR_NAME}" ]; then
67 mkdir -p "${BUILDDIR_NAME}"
68 ln -s "${BUILDDIR_NAME}" src/out
71 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1 -Denable_ozone_wayland_vkb=1 -Denable_xdg_shell=0"
73 # Force gold binary from chroot ld.gold provided by binutils-gold
74 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1 -Dlinux_use_bundled_binutils=0 -Dlinux_use_bundled_gold=0 "
76 # Linking fails in Tizen Common when fatal ld warnings are enabled. XWALK-1379.
77 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1"
79 # Temporarily disable Alsa support while snd_seq_* support is not enabled on
80 # Tizen. See https://codereview.chromium.org/264973012 and
81 # https://review.tizen.org/gerrit/#/c/24336/
82 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_alsa=0"
84 # Temporarily disable WebRTC support because its build currently hardcodes
85 # dependencies on X11 and OpenSSL. We are still trying to get some
86 # clarifications as to whether this is really necessary. See XWALK-2160.
87 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Denable_webrtc=0"
89 # For building for arm in OBS, we need :
90 # -> to unset sysroot value.
91 # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
92 # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
94 # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
97 # --no-parallel is added because chroot does not mount a /dev/shm, this will
98 # cause python multiprocessing.SemLock error.
99 export GYP_GENERATORS='ninja'
100 ./src/xwalk/gyp_xwalk src/xwalk/xwalk.gyp \
109 -Duse_gnome_keyring=0 \
111 -Duse_system_bzip2=1 \
112 -Duse_system_libexif=1 \
113 -Duse_system_nspr=1 \
114 -Dshared_process_mode=1 \
117 ninja -j16 -C src/out/Release xwalk xwalkctl xwalk_launcher xwalk-pkg-helper
123 crosswalk-dbg_files += "/usr/lib/xwalk/.debug"
124 crosswalk-dbg_files += "/usr/lib/xwalk/.debug/libffmpegsumo.so"
125 crosswalk-dbg_files += "/usr/lib/xwalk/.debug/xwalk"
127 FILES_${PN}-dbg += "${crosswalk-dbg_files}"
129 pkg_postinst_${PN}() {
132 mkdir -p $D/opt/share/icons/default/small
133 mkdir -p $D/opt/share/packages