1 From 38fff363c0169c006ee437c958af03e661a72fdb Mon Sep 17 00:00:00 2001
2 From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3 Date: Mon, 12 Aug 2013 19:06:14 +0300
4 Subject: [PATCH 29/33] packaging: Add a .spec file for crosswalk-webview.
6 It is heavily based on the .spec file we have for crosswalk itself (since
7 most of the job revolves around building Blink and parts of Chromium).
9 We also produce a -demo and a -devel package; the former contains the
10 efl_webview_example application and the latter has the public development
13 .../crosswalk-webview-do-not-look-for-gtk2.patch | 22 +++
14 ...osswalk-webview-look-for-pvr-libGLESv2.so.patch | 17 +++
15 packaging/crosswalk-webview.manifest | 5 +
16 packaging/crosswalk-webview.spec | 149 +++++++++++++++++++++
17 4 files changed, 193 insertions(+)
18 create mode 100644 packaging/crosswalk-webview-do-not-look-for-gtk2.patch
19 create mode 100644 packaging/crosswalk-webview-look-for-pvr-libGLESv2.so.patch
20 create mode 100644 packaging/crosswalk-webview.manifest
21 create mode 100644 packaging/crosswalk-webview.spec
23 diff --git a/packaging/crosswalk-webview-do-not-look-for-gtk2.patch b/packaging/crosswalk-webview-do-not-look-for-gtk2.patch
25 index 0000000..db1e234
27 +++ b/packaging/crosswalk-webview-do-not-look-for-gtk2.patch
29 +Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
31 +Since there is no GTK+2 package for Tizen 2.1 Mobile and we do not use it
32 +anyway, there should be no need to look for GTK+2 at all.
34 +Upstreaming this patch depends on a hard GTK+2 dependency on
35 +remoting/remoting.gyp being removed in chromium. It does not affect crosswalk
36 +because we do not have any dependency on remoting.gyp.
38 +Upstream patch: https://codereview.chromium.org/19531008
39 +Depends on: https://code.google.com/p/chromium/issues/detail?id=247213
40 +--- src/build/linux/system.gyp
41 ++++ src/build/linux/system.gyp
43 + 'use_system_ssl%': 1,
47 ++ [ 'chromeos==0 and toolkit_uses_gtk==1', {
48 + # Hide GTK and related dependencies for Chrome OS, so they won't get
49 + # added back to Chrome OS. Don't try to use GTK on Chrome OS.
51 diff --git a/packaging/crosswalk-webview-look-for-pvr-libGLESv2.so.patch b/packaging/crosswalk-webview-look-for-pvr-libGLESv2.so.patch
53 index 0000000..3fad305
55 +++ b/packaging/crosswalk-webview-look-for-pvr-libGLESv2.so.patch
57 +Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
59 +The PowerVR GL implementation used in Tizen Mobile 2.1 installs libGLESv2.so.1,
60 +not .2. Adjust the library being looked for, otherwise the detection will fail.
63 +--- src/ui/gl/gl_implementation_x11.cc
64 ++++ src/ui/gl/gl_implementation_x11.cc
65 +@@ -139,7 +139,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
68 + case kGLImplementationEGLGLES2: {
69 +- base::NativeLibrary gles_library = LoadLibrary("libGLESv2.so.2");
70 ++ base::NativeLibrary gles_library = LoadLibrary("libGLESv2.so.1");
73 + base::NativeLibrary egl_library = LoadLibrary("libEGL.so.1");
74 \ No newline at end of file
75 diff --git a/packaging/crosswalk-webview.manifest b/packaging/crosswalk-webview.manifest
77 index 0000000..09fdd97
79 +++ b/packaging/crosswalk-webview.manifest
86 \ No newline at end of file
87 diff --git a/packaging/crosswalk-webview.spec b/packaging/crosswalk-webview.spec
89 index 0000000..a48eafa
91 +++ b/packaging/crosswalk-webview.spec
93 +Name: crosswalk-webview
96 +Summary: EFL WebView based on the Crosswalk project
97 +License: BSD-3-Clause # TODO(rakuco): multiple licenses
98 +Group: Applications/Internet
99 +URL: http://www.crosswalk-project.org
100 +Source0: %{name}-%{version}.tar
101 +Source1001: %{name}.manifest
102 +Patch1: %{name}-do-not-look-for-gtk2.patch
103 +Patch2: %{name}-look-for-pvr-libGLESv2.so.patch
105 +BuildRequires: bison
106 +BuildRequires: bzip2-devel
107 +BuildRequires: expat-devel
109 +BuildRequires: gperf
110 +BuildRequires: libasound-devel
111 +BuildRequires: python
112 +BuildRequires: python-xml
114 +BuildRequires: which
115 +BuildRequires: pkgconfig(cairo)
116 +BuildRequires: pkgconfig(dbus-1)
117 +BuildRequires: pkgconfig(ecore)
118 +BuildRequires: pkgconfig(ecore-evas)
119 +BuildRequires: pkgconfig(eina)
120 +BuildRequires: pkgconfig(elementary)
121 +BuildRequires: pkgconfig(evas)
122 +BuildRequires: pkgconfig(fontconfig)
123 +BuildRequires: pkgconfig(freetype2)
124 +BuildRequires: pkgconfig(gles20)
125 +BuildRequires: pkgconfig(glib-2.0)
126 +BuildRequires: pkgconfig(icu-i18n)
127 +BuildRequires: pkgconfig(libexif)
128 +BuildRequires: pkgconfig(libpci)
129 +BuildRequires: pkgconfig(libpulse)
130 +BuildRequires: pkgconfig(libudev)
131 +BuildRequires: pkgconfig(libxml-2.0)
132 +BuildRequires: pkgconfig(libxslt)
133 +BuildRequires: pkgconfig(nspr)
134 +BuildRequires: pkgconfig(nss)
135 +BuildRequires: pkgconfig(pango)
136 +BuildRequires: pkgconfig(x11)
137 +BuildRequires: pkgconfig(xcomposite)
138 +BuildRequires: pkgconfig(xcursor)
139 +BuildRequires: pkgconfig(xdamage)
140 +BuildRequires: pkgconfig(xext)
141 +BuildRequires: pkgconfig(xfixes)
142 +BuildRequires: pkgconfig(xi)
143 +BuildRequires: pkgconfig(xrandr)
144 +BuildRequires: pkgconfig(xrender)
145 +BuildRequires: pkgconfig(xscrnsaver)
146 +BuildRequires: pkgconfig(xt)
147 +BuildRequires: pkgconfig(xtst)
150 +An implementation of a WebView toolkit component for EFL applications based on the
154 +Summary: EFL WebView based on the Crosswalk project (demo programs)
155 +License: BSD-3-Clause # TODO(rakuco): multiple licenses
156 +Group: Applications/Internet
157 +Url: http://www.crosswalk-project.org
158 +Requires: %{name} = %{version}
161 +Demo utilities for the crosswalk-webview library.
163 +crosswalk-webview is an implementation of a WebView toolkit component for EFL
164 +applications based on the Crosswalk project.
167 +Summary: EFL WebView based on the Crosswalk project (development files)
168 +License: BSD-3-Clause # TODO(rakuco): multiple licenses
169 +Group: Development/Libraries
170 +Url: http://www.crosswalk-project.org
171 +Requires: %{name} = %{version}
174 +This package countains all include files, libraries, configuration files needed
175 +for compiling applications which use the crosswalk-webview library.
177 +crosswalk-webview is an implementation of a WebView toolkit component for EFL
178 +applications based on the Crosswalk project.
185 +cp -a src/AUTHORS AUTHORS
186 +cp -a src/LICENSE LICENSE
190 +# TODO(rakuco): Only needed for ia32 on Tizen 2.x.
195 +# For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
196 +# src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
197 +# CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
198 +export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
200 +export GYP_GENERATORS='make'
201 +./src/build/gyp_chromium src/efl_webview/efl_webview.gyp \
206 +-Duse_system_bzip2=1 \
207 +-Duse_system_icu=1 \
208 +-Duse_system_libexif=1 \
209 +-Duse_system_libxml=1 \
210 +-Duse_system_nspr=1 \
211 +-Duse_gnome_keyring=0
213 +make %{?_smp_mflags} -C src BUILDTYPE=Release efl_webview_example
217 +install -m 755 -D src/out/Release/efl_process %{buildroot}%{_bindir}/efl_process
218 +install -m 755 -D src/out/Release/efl_webview_example %{buildroot}%{_bindir}/efl_webview_example
220 +# Development headers.
221 +mkdir -p %{buildroot}%{_includedir}/crosswalk-webview/public/
222 +install -m 644 src/efl_webview/public/*.h %{buildroot}%{_includedir}/crosswalk-webview/public/
224 +# Supporting libraries and resources.
225 +# Note that a single libefl_webview.so is produced by gyp, contrary to
226 +# the recommended practice of producing versioned shared libraries.
227 +install -D src/out/Release/lib.target/libefl_webview.so %{buildroot}%{_libdir}/libefl_webview.so
229 +%post -p /sbin/ldconfig
230 +%postun -p /sbin/ldconfig
233 +%manifest %{name}.manifest
234 +%{_bindir}/efl_process
235 +%{_libdir}/libefl_webview.so
238 +%{_includedir}/crosswalk-webview/*
241 +%{_bindir}/efl_webview_example