1 DESCRIPTION = "Crosswalk is an app runtime based on Chromium"
2 HOMEPAGE = "https://github.com/otcshare/crosswalk"
3 SECTION = "Web Framework/Web Run Time"
4 LICENSE = "(BSD-3-Clause and LGPL-2.1+)"
10 inherit autotools-brokensep
14 #PROVIDES by crosswalk
21 DEPENDS += "libhaptic"
26 DEPENDS += "libslp-sensor"
32 DEPENDS += "slp-pkgmgr"
34 DEPENDS += "fontconfig"
43 DEPENDS += "appcore-agent"
44 DEPENDS += "pkgmgr-info"
47 DEPENDS += "python-xml"
48 DEPENDS_append_class-native = " ninja-native"
53 DEPENDS += "libxkbcommon"
54 DEPENDS += "pulseaudio"
55 DEPENDS += "location-manager"
57 DEPENDS_append_class-native = " bison-native"
62 chmod -Rf a+rX,u+w,g-w,o-w ${S}
63 #setup -q -n crosswalk
65 cp ${S}/packaging/xwalk.in .
66 cp ${S}/packaging/xwalk.service.in .
67 cp ${S}/packaging/crosswalk.manifest .
68 cp ${S}/packaging/crosswalk.xml.in .
69 cp ${S}/packaging/crosswalk.png .
70 sed "s/@VERSION@/6.35.132.0/g" crosswalk.xml.in > crosswalk.xml
71 sed "s|@LIB_INSTALL_DIR@|${prefix}/lib|g" xwalk.in > xwalk
72 sed "s|@LIB_INSTALL_DIR@|${prefix}/lib|g" xwalk.service.in > xwalk.service
74 cp -a src/AUTHORS AUTHORS.chromium
75 cp -a src/LICENSE LICENSE.chromium
76 cp -a src/xwalk/LICENSE LICENSE.xwalk
78 cat ${S}/packaging/crosswalk-do-not-look-for-gtk2-when-using-aura.patch | patch -s -p0 --fuzz=2
81 # Linking fails in Tizen Common when fatal ld warnings are enabled. XWALK-1379.
83 cat ${S}/packaging/Blink-Add-GCC-flag-Wno-narrowing-fix-64bits-build.patch | patch -s -p0 --fuzz=2
89 bb.build.exec_func('do_prep', d)
100 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
101 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
102 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
103 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
106 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
107 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
108 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
109 export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
111 # Building the RPM in the GBS chroot fails with errors such as
112 # /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
113 # failed to set dynamic section sizes: Memory exhausted
114 # For now, work around it by passing a GNU ld-specific flag that optimizes the
115 # linker for memory usage.
116 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
118 # Support building in a non-standard directory, possibly outside ${WORKDIR}.
119 # Since the build root is erased every time a new build is performed, one way
120 # to avoid losing the build directory is to specify a location outside the
121 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
122 # (remember all paths are still inside the chroot):
123 # gbs build --define 'BUILDDIR_NAME /some/path'
125 if [ -n "${BUILDDIR_NAME}" ]; then
126 mkdir -p "${BUILDDIR_NAME}"
127 ln -s "${BUILDDIR_NAME}" src/out
130 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1 -Denable_ozone_wayland_vkb=1 -Denable_xdg_shell=1"
132 # --no-parallel is added because chroot does not mount a /dev/shm, this will
133 # cause python multiprocessing.SemLock error.
134 export GYP_GENERATORS='ninja'
135 ./src/xwalk/gyp_xwalk src/xwalk/xwalk.gyp \
145 -Duse_gnome_keyring=0 \
147 -Duse_system_bzip2=1 \
148 -Duse_system_libexif=1 \
149 -Duse_system_libxml=1 \
150 -Duse_system_nspr=1 \
153 ninja -j16 -C src/out/Release xwalk xwalkctl xwalk_launcher xwalk-pkg-helper
160 echo export RPM_BUILD_ROOT=${D}
169 install -p -D xwalk ${D}${prefix}/bin/xwalk
170 install -p -D ${S}/packaging/org.crosswalkproject.Runtime1.service ${D}/usr/share/dbus-1/services/org.crosswalkproject.Runtime1.service
171 install -p -D xwalk.service ${D}/usr/lib/systemd/user/xwalk.service
172 install -p -D src/out/Release/xwalk ${D}${prefix}/lib/xwalk/xwalk
173 install -p -D src/out/Release/xwalkctl ${D}${prefix}/bin/xwalkctl
174 install -p -D src/out/Release/xwalk-launcher ${D}${prefix}/bin/xwalk-launcher
175 # xwalk-pkg-helper needs to be set-user-ID-root so it can finish the installation process.
176 install -m 06755 -p -D src/out/Release/xwalk-pkg-helper ${D}${prefix}/bin/xwalk-pkg-helper
178 # Supporting libraries and resources.
179 install -p -D src/out/Release/icudtl.dat ${D}${prefix}/lib/xwalk/icudtl.dat
180 install -p -D src/out/Release/lib/libmojo_system.so ${D}${prefix}/lib/xwalk/lib/libmojo_system.so
181 install -p -D src/out/Release/libffmpegsumo.so ${D}${prefix}/lib/xwalk/libffmpegsumo.so
182 install -p -D src/out/Release/xwalk.pak ${D}${prefix}/lib/xwalk/xwalk.pak
184 # Register xwalk to the package manager.
185 install -p -D crosswalk.xml ${D}/usr/share/packages/crosswalk.xml
186 install -p -D crosswalk.png ${D}/usr/share/icons/default/small/crosswalk.png
193 crosswalk_files += "crosswalk.manifest"
194 crosswalk_files += "${prefix}/bin/xwalk"
195 crosswalk_files += "${prefix}/bin/xwalkctl"
196 crosswalk_files += "${prefix}/bin/xwalk-launcher"
197 crosswalk_files += "${prefix}/bin/xwalk-pkg-helper"
198 crosswalk_files += "${prefix}/lib/xwalk/icudtl.dat"
199 crosswalk_files += "${prefix}/lib/xwalk/lib/libmojo_system.so"
200 crosswalk_files += "${prefix}/lib/xwalk/libffmpegsumo.so"
201 crosswalk_files += "${prefix}/lib/xwalk/xwalk"
202 crosswalk_files += "${prefix}/lib/xwalk/xwalk.pak"
203 crosswalk_files += "/usr/share/packages/crosswalk.xml"
204 crosswalk_files += "/usr/share/icons/default/small/crosswalk.png"
205 crosswalk_files += "/usr/share/dbus-1/services/org.crosswalkproject.Runtime1.service"
206 crosswalk_files += "/usr/lib/systemd/user/xwalk.service"
208 FILES_${PN} = "${crosswalk_files}"
210 PKG_crosswalk= "crosswalk"
212 require crosswalk-extraconf.inc