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
15 #PROVIDES by crosswalk
22 DEPENDS += "libhaptic"
27 DEPENDS += "libslp-sensor"
33 DEPENDS += "slp-pkgmgr"
35 DEPENDS += "fontconfig"
45 DEPENDS += "pkgmgr-info"
48 DEPENDS += "python-xml"
49 DEPENDS_append_class-native = " ninja-native"
50 DEPENDS_append_class-target = " ninja-native"
55 DEPENDS += "libxkbcommon"
56 DEPENDS += "pulseaudio"
57 DEPENDS += "location-manager"
59 DEPENDS_append_class-native = " bison-native"
60 DEPENDS_append_class-target = " bison-native"
65 chmod -Rf a+rX,u+w,g-w,o-w ${S}
66 #setup -q -n crosswalk
68 cp ${S}/packaging/xwalk.in .
69 cp ${S}/packaging/xwalk.service.in .
70 cp ${S}/packaging/crosswalk.manifest .
71 cp ${S}/packaging/crosswalk.xml.in .
72 cp ${S}/packaging/crosswalk.png .
73 sed "s/@VERSION@/6.35.132.0/g" crosswalk.xml.in > crosswalk.xml
74 sed "s|@LIB_INSTALL_DIR@|${prefix}/lib|g" xwalk.in > xwalk
75 sed "s|@LIB_INSTALL_DIR@|${prefix}/lib|g" xwalk.service.in > xwalk.service
77 cp -a src/AUTHORS AUTHORS.chromium
78 cp -a src/LICENSE LICENSE.chromium
79 cp -a src/xwalk/LICENSE LICENSE.xwalk
81 cat ${S}/packaging/crosswalk-do-not-look-for-gtk2-when-using-aura.patch | patch -s -p0 --fuzz=2
84 # Linking fails in Tizen Common when fatal ld warnings are enabled. XWALK-1379.
86 cat ${S}/packaging/Blink-Add-GCC-flag-Wno-narrowing-fix-64bits-build.patch | patch -s -p0 --fuzz=2
92 bb.build.exec_func('do_prep', d)
103 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
104 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
105 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
106 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
109 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
110 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
111 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
112 export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
114 # Building the RPM in the GBS chroot fails with errors such as
115 # /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
116 # failed to set dynamic section sizes: Memory exhausted
117 # For now, work around it by passing a GNU ld-specific flag that optimizes the
118 # linker for memory usage.
119 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
121 # Support building in a non-standard directory, possibly outside ${WORKDIR}.
122 # Since the build root is erased every time a new build is performed, one way
123 # to avoid losing the build directory is to specify a location outside the
124 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
125 # (remember all paths are still inside the chroot):
126 # gbs build --define 'BUILDDIR_NAME /some/path'
128 if [ -n "${BUILDDIR_NAME}" ]; then
129 mkdir -p "${BUILDDIR_NAME}"
130 ln -s "${BUILDDIR_NAME}" src/out
133 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1 -Denable_ozone_wayland_vkb=1 -Denable_xdg_shell=1"
135 # --no-parallel is added because chroot does not mount a /dev/shm, this will
136 # cause python multiprocessing.SemLock error.
137 export GYP_GENERATORS='ninja'
138 ./src/xwalk/gyp_xwalk src/xwalk/xwalk.gyp \
148 -Duse_gnome_keyring=0 \
150 -Duse_system_bzip2=1 \
151 -Duse_system_libexif=1 \
152 -Duse_system_libxml=1 \
153 -Duse_system_nspr=1 \
156 ninja -j16 -C src/out/Release xwalk xwalkctl xwalk_launcher xwalk-pkg-helper
163 echo export RPM_BUILD_ROOT=${D}
172 install -p -D xwalk ${D}${prefix}/bin/xwalk
173 install -p -D ${S}/packaging/org.crosswalkproject.Runtime1.service ${D}/usr/share/dbus-1/services/org.crosswalkproject.Runtime1.service
174 install -p -D xwalk.service ${D}/usr/lib/systemd/user/xwalk.service
175 install -p -D src/out/Release/xwalk ${D}${prefix}/lib/xwalk/xwalk
176 install -p -D src/out/Release/xwalkctl ${D}${prefix}/bin/xwalkctl
177 install -p -D src/out/Release/xwalk-launcher ${D}${prefix}/bin/xwalk-launcher
178 # xwalk-pkg-helper needs to be set-user-ID-root so it can finish the installation process.
179 install -m 06755 -p -D src/out/Release/xwalk-pkg-helper ${D}${prefix}/bin/xwalk-pkg-helper
181 # Supporting libraries and resources.
182 install -p -D src/out/Release/icudtl.dat ${D}${prefix}/lib/xwalk/icudtl.dat
183 install -p -D src/out/Release/lib/libmojo_system.so ${D}${prefix}/lib/xwalk/lib/libmojo_system.so
184 install -p -D src/out/Release/libffmpegsumo.so ${D}${prefix}/lib/xwalk/libffmpegsumo.so
185 install -p -D src/out/Release/xwalk.pak ${D}${prefix}/lib/xwalk/xwalk.pak
187 # Register xwalk to the package manager.
188 install -p -D crosswalk.xml ${D}/usr/share/packages/crosswalk.xml
189 install -p -D crosswalk.png ${D}/usr/share/icons/default/small/crosswalk.png
196 crosswalk_files += "crosswalk.manifest"
197 crosswalk_files += "${prefix}/bin/xwalk"
198 crosswalk_files += "${prefix}/bin/xwalkctl"
199 crosswalk_files += "${prefix}/bin/xwalk-launcher"
200 crosswalk_files += "${prefix}/bin/xwalk-pkg-helper"
201 crosswalk_files += "${prefix}/lib/xwalk/icudtl.dat"
202 crosswalk_files += "${prefix}/lib/xwalk/lib/libmojo_system.so"
203 crosswalk_files += "${prefix}/lib/xwalk/libffmpegsumo.so"
204 crosswalk_files += "${prefix}/lib/xwalk/xwalk"
205 crosswalk_files += "${prefix}/lib/xwalk/xwalk.pak"
206 crosswalk_files += "/usr/share/packages/crosswalk.xml"
207 crosswalk_files += "/usr/share/icons/default/small/crosswalk.png"
208 crosswalk_files += "/usr/share/dbus-1/services/org.crosswalkproject.Runtime1.service"
209 crosswalk_files += "/usr/lib/systemd/user/xwalk.service"
211 FILES_${PN} = "${crosswalk_files}"
213 PKG_crosswalk= "crosswalk"
215 require crosswalk-extraconf.inc