XWalk WebView patchset, README and LICENSE files.
[platform/framework/web/xwalk_webview.git] / patchset / 0029-packaging-Add-a-.spec-file-for-crosswalk-webview.patch
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.
5
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).
8
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
11 headers.
12 ---
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
22
23 diff --git a/packaging/crosswalk-webview-do-not-look-for-gtk2.patch b/packaging/crosswalk-webview-do-not-look-for-gtk2.patch
24 new file mode 100644
25 index 0000000..db1e234
26 --- /dev/null
27 +++ b/packaging/crosswalk-webview-do-not-look-for-gtk2.patch
28 @@ -0,0 +1,22 @@
29 +Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
30 +
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.
33 +
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.
37 +
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
42 +@@ -28,7 +28,7 @@
43 +         'use_system_ssl%': 1,
44 +       },
45 +     }],
46 +-    [ 'chromeos==0', {
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.
50 +       'targets': [
51 diff --git a/packaging/crosswalk-webview-look-for-pvr-libGLESv2.so.patch b/packaging/crosswalk-webview-look-for-pvr-libGLESv2.so.patch
52 new file mode 100644
53 index 0000000..3fad305
54 --- /dev/null
55 +++ b/packaging/crosswalk-webview-look-for-pvr-libGLESv2.so.patch
56 @@ -0,0 +1,17 @@
57 +Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
58 +
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.
61 +
62 +Not upstreamable.
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) {
66 +       break;
67 +     }
68 +     case kGLImplementationEGLGLES2: {
69 +-      base::NativeLibrary gles_library = LoadLibrary("libGLESv2.so.2");
70 ++      base::NativeLibrary gles_library = LoadLibrary("libGLESv2.so.1");
71 +       if (!gles_library)
72 +         return false;
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
76 new file mode 100644
77 index 0000000..09fdd97
78 --- /dev/null
79 +++ b/packaging/crosswalk-webview.manifest
80 @@ -0,0 +1,5 @@
81 +<manifest>
82 + <request>
83 +    <domain name="_"/>
84 + </request>
85 +</manifest>
86 \ No newline at end of file
87 diff --git a/packaging/crosswalk-webview.spec b/packaging/crosswalk-webview.spec
88 new file mode 100644
89 index 0000000..a48eafa
90 --- /dev/null
91 +++ b/packaging/crosswalk-webview.spec
92 @@ -0,0 +1,149 @@
93 +Name:           crosswalk-webview
94 +Version:        0.1
95 +Release:        0
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
104 +
105 +BuildRequires:  bison
106 +BuildRequires:  bzip2-devel
107 +BuildRequires:  expat-devel
108 +BuildRequires:  flex
109 +BuildRequires:  gperf
110 +BuildRequires:  libasound-devel
111 +BuildRequires:  python
112 +BuildRequires:  python-xml
113 +BuildRequires:  perl
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)
148 +
149 +%description
150 +An implementation of a WebView toolkit component for EFL applications based on the
151 +Crosswalk project.
152 +
153 +%package demo
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}
159 +
160 +%description demo
161 +Demo utilities for the crosswalk-webview library.
162 +
163 +crosswalk-webview is an implementation of a WebView toolkit component for EFL
164 +applications based on the Crosswalk project.
165 +
166 +%package devel
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}
172 +
173 +%description devel
174 +This package countains all include files, libraries, configuration files needed
175 +for compiling applications which use the crosswalk-webview library.
176 +
177 +crosswalk-webview is an implementation of a WebView toolkit component for EFL
178 +applications based on the Crosswalk project.
179 +
180 +%prep
181 +%setup -q
182 +
183 +cp %{SOURCE1001} .
184 +
185 +cp -a src/AUTHORS AUTHORS
186 +cp -a src/LICENSE LICENSE
187 +
188 +%patch1
189 +
190 +# TODO(rakuco): Only needed for ia32 on Tizen 2.x.
191 +%patch2
192 +
193 +%build
194 +
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`
199 +
200 +export GYP_GENERATORS='make'
201 +./src/build/gyp_chromium src/efl_webview/efl_webview.gyp \
202 +-Ddisable_nacl=1 \
203 +-Duse_cups=0 \
204 +-Duse_gconf=0 \
205 +-Duse_kerberos=0 \
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
212 +
213 +make %{?_smp_mflags} -C src BUILDTYPE=Release efl_webview_example
214 +
215 +%install
216 +# Binaries.
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
219 +
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/
223 +
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
228 +
229 +%post -p /sbin/ldconfig
230 +%postun -p /sbin/ldconfig
231 +
232 +%files
233 +%manifest %{name}.manifest
234 +%{_bindir}/efl_process
235 +%{_libdir}/libefl_webview.so
236 +
237 +%files devel
238 +%{_includedir}/crosswalk-webview/*
239 +
240 +%files demo
241 +%{_bindir}/efl_webview_example
242 -- 
243 1.8.1.2
244