+%bcond_with x
+%bcond_with wayland
+
Name: crosswalk
-Version: 4.32.73.0
+Version: 5.34.98.0
Release: 0
Summary: Crosswalk is an app runtime based on Chromium
-# License: (BSD-3-Clause and LGPL-2.1+)
-License: BSD-3-Clause
+License: (BSD-3-Clause and LGPL-2.1+)
Group: Web Framework/Web Run Time
Url: https://github.com/otcshare/crosswalk
Source: %{name}.tar
-Source1: xwalk
+Source1: xwalk.in
Source2: org.crosswalkproject.Runtime1.service
-Source3: xwalk.service
+Source3: xwalk.service.in
Source1001: crosswalk.manifest
Source1002: %{name}.xml.in
Source1003: %{name}.png
Patch1: %{name}-do-not-look-for-gtk2-when-using-aura.patch
-Patch2: %{name}-look-for-pvr-libGLESv2.so.patch
-Patch3: %{name}-include-tizen-ime-files.patch
-Patch4: %{name}-disable-ffmpeg-pragmas.patch
-Patch5: Chromium-Fix-gcc-4.5.3-uninitialized-warnings.patch
-Patch6: Blink-Fix-gcc-4.5.3-uninitialized-warnings.patch
Patch7: %{name}-tizen-audio-session-manager.patch
Patch8: %{name}-mesa-ozone-typedefs.patch
+Patch9: Blink-Add-GCC-flag-Wno-narrowing-fix-64bits-build.patch
BuildRequires: bison
BuildRequires: bzip2-devel
BuildRequires: which
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(appcore-common)
-BuildRequires: pkgconfig(appcore-efl)
-BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(audio-session-mgr)
BuildRequires: pkgconfig(cairo)
-BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-location-manager)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(pkgmgr-parser)
BuildRequires: pkgconfig(nspr)
+BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(sensor)
BuildRequires: pkgconfig(vconf)
+%if %{with x}
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xscrnsaver)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(xtst)
-
-# Depending on the Tizen version and profile we are building for, we have
-# different dependencies, patches and gyp options to pass. Checking for
-# specific profiles is not very future-proof. We therefore try to check for
-# either specific features that may be enabled in the current profile (such as
-# Wayland support) or for a certain Tizen major version (the differences betwen
-# Tizen 2 and Tizen 3 are big enough that we need completely different patches
-# and build dependencies, for example).
-%bcond_with wayland
-
-%if "%{tizen}" < "3.0"
-BuildRequires: gst-plugins-atomisp-devel
-BuildRequires: pkgconfig(openssl)
-%else
-BuildRequires: pkgconfig(nss)
%endif
%if %{with wayland}
%package emulator-support
Summary: Support files necessary for running Crosswalk on the Tizen emulator
-# License: (BSD-3-Clause and LGPL-2.1+)
-License: BSD-3-Clause
+License: (BSD-3-Clause and LGPL-2.1+)
Group: Web Framework/Web Run Time
Url: https://github.com/otcshare/crosswalk
%prep
%setup -q -n crosswalk
+cp %{SOURCE1} .
+cp %{SOURCE3} .
cp %{SOURCE1001} .
cp %{SOURCE1002} .
cp %{SOURCE1003} .
sed "s/@VERSION@/%{version}/g" %{name}.xml.in > %{name}.xml
+sed "s|@LIB_INSTALL_DIR@|%{_libdir}|g" xwalk.in > xwalk
+sed "s|@LIB_INSTALL_DIR@|%{_libdir}|g" xwalk.service.in > xwalk.service
cp -a src/AUTHORS AUTHORS.chromium
cp -a src/LICENSE LICENSE.chromium
-cp -a src/xwalk/AUTHORS AUTHORS.xwalk
cp -a src/xwalk/LICENSE LICENSE.xwalk
%patch1
%patch3
%patch4
%patch5 -p1
-%patch6 -p1
+%patch6
%endif
%if %{with wayland}
%patch8
%endif
+%patch9
+
%build
# For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
GYP_EXTRA_FLAGS="--depth=. --generator-output=${BUILDDIR_NAME}"
fi
-# Tizen 2's NSS is too old for Chromium, so we have to use the OpenSSL backend.
-%if "%{tizen}" < "3.0"
-GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dtizen_mobile=1 -Duse_openssl=1"
-%endif
-
%if %{with wayland}
GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ash=1 -Duse_ozone=1"
%endif
${GYP_EXTRA_FLAGS} \
-Dchromeos=0 \
-Ddisable_nacl=1 \
+-Dtizen=1 \
-Dpython_ver=2.7 \
-Duse_aura=1 \
-Duse_cups=0 \
-Duse_system_libxml=1 \
-Duse_system_nspr=1 \
-Denable_xi21_mt=1 \
--Duse_xi2_mt=0
+-Duse_xi2_mt=0 \
+-Denable_hidpi=1
make %{?_smp_mflags} -C "${BUILDDIR_NAME}" BUILDTYPE=Release xwalk xwalkctl xwalk_launcher xwalk-pkg-helper
cd src
# Binaries.
-install -p -D %{SOURCE1} %{buildroot}%{_bindir}/xwalk
+install -p -D ../xwalk %{buildroot}%{_bindir}/xwalk
install -p -D %{SOURCE2} %{buildroot}%{_dbusservicedir}/org.crosswalkproject.Runtime1.service
-install -p -D %{SOURCE3} %{buildroot}%{_systemduserservicedir}/xwalk.service
+install -p -D ../xwalk.service %{buildroot}%{_systemduserservicedir}/xwalk.service
install -p -D ${BUILDDIR_NAME}/out/Release/xwalk %{buildroot}%{_libdir}/xwalk/xwalk
install -p -D ${BUILDDIR_NAME}/out/Release/xwalkctl %{buildroot}%{_bindir}/xwalkctl
install -p -D ${BUILDDIR_NAME}/out/Release/xwalk-launcher %{buildroot}%{_bindir}/xwalk-launcher
-install -p -D ${BUILDDIR_NAME}/out/Release/xwalk-pkg-helper %{buildroot}%{_bindir}/xwalk-pkg-helper
+# xwalk-pkg-helper needs to be set-user-ID-root so it can finish the installation process.
+install -m 06755 -p -D ${BUILDDIR_NAME}/out/Release/xwalk-pkg-helper %{buildroot}%{_bindir}/xwalk-pkg-helper
# Supporting libraries and resources.
+install -p -D ${BUILDDIR_NAME}/out/Release/icudtl.dat %{buildroot}%{_libdir}/xwalk/icudtl.dat
install -p -D ${BUILDDIR_NAME}/out/Release/libffmpegsumo.so %{buildroot}%{_libdir}/xwalk/libffmpegsumo.so
install -p -D ${BUILDDIR_NAME}/out/Release/libosmesa.so %{buildroot}%{_libdir}/xwalk/libosmesa.so
install -p -D ${BUILDDIR_NAME}/out/Release/xwalk.pak %{buildroot}%{_libdir}/xwalk/xwalk.pak
%files
%manifest %{name}.manifest
-# %license AUTHORS.chromium AUTHORS.xwalk LICENSE.chromium LICENSE.xwalk
+%license AUTHORS.chromium LICENSE.chromium LICENSE.xwalk
%{_bindir}/xwalk
%{_bindir}/xwalkctl
%{_bindir}/xwalk-launcher
%{_bindir}/xwalk-pkg-helper
+%{_libdir}/xwalk/icudtl.dat
%{_libdir}/xwalk/libffmpegsumo.so
%{_libdir}/xwalk/xwalk
%{_libdir}/xwalk/xwalk.pak