1 |
# Seems not to build with -j24, we choose -j6 |
2 |
%global make %(cpus=%_smp_mflags;if [ "${cpus##-j}" -gt 6 ];then echo make -j6;else echo make $cpus;fi) |
3 |
|
4 |
%ifarch aarch64 |
5 |
%define _smp_ncpus_max 2 |
6 |
%endif |
7 |
|
8 |
%define oname webkitgtk |
9 |
|
10 |
%define api 4.0 |
11 |
|
12 |
%define javascriptcoregtk_major 18 |
13 |
%define libjavascriptcoregtk %mklibname javascriptcoregtk %{api} %{javascriptcoregtk_major} |
14 |
%define javascriptcoregtk_gir %mklibname javascriptcore-gir %{api} |
15 |
|
16 |
%define webkit2_major 37 |
17 |
%define libwebkit2 %mklibname webkit2gtk %{api} %{webkit2_major} |
18 |
%define webkit2_gir %mklibname webkit2gtk-gir %{api} |
19 |
|
20 |
%define develname %mklibname -d webkit2 |
21 |
|
22 |
Name: webkit2 |
23 |
Version: 2.24.0 |
24 |
Release: %mkrel 2 |
25 |
Summary: GTK Web content engine library |
26 |
License: BSD and LGPLv2+ |
27 |
Group: System/Libraries |
28 |
Source0: http://webkitgtk.org/releases/%{oname}-%{version}.tar.xz |
29 |
# Don't use the shebang, but point straight to python 3 |
30 |
Patch2: no-env-shebang.patch |
31 |
URL: http://www.webkitgtk.org |
32 |
BuildRequires: pkgconfig(atk) |
33 |
BuildRequires: pkgconfig(atspi-2) |
34 |
BuildRequires: pkgconfig(egl) |
35 |
BuildRequires: pkgconfig(enchant-2) |
36 |
BuildRequires: pkgconfig(fontconfig) |
37 |
BuildRequires: pkgconfig(freetype2) |
38 |
BuildRequires: pkgconfig(gdk-2.0) |
39 |
BuildRequires: pkgconfig(gdk-3.0) |
40 |
BuildRequires: pkgconfig(geoclue-2.0) |
41 |
BuildRequires: pkgconfig(gl) |
42 |
BuildRequires: pkgconfig(glesv2) |
43 |
BuildRequires: pkgconfig(gobject-introspection-1.0) |
44 |
BuildRequires: pkgconfig(gstreamer-1.0) >= 1.0.3 |
45 |
BuildRequires: pkgconfig(gstreamer-app-1.0) >= 1.0.3 |
46 |
BuildRequires: pkgconfig(gstreamer-audio-1.0) >= 1.0.3 |
47 |
BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.0.3 |
48 |
BuildRequires: pkgconfig(gstreamer-fft-1.0) >= 1.0.3 |
49 |
BuildRequires: pkgconfig(gstreamer-gl-1.0) >= 1.5.0 |
50 |
BuildRequires: pkgconfig(gstreamer-mpegts-1.0) >= 1.4.0 |
51 |
BuildRequires: pkgconfig(gstreamer-pbutils-1.0) >= 1.0.3 |
52 |
BuildRequires: pkgconfig(gstreamer-tag-1.0) >= 1.0.3 |
53 |
BuildRequires: pkgconfig(gstreamer-video-1.0) >= 1.0.3 |
54 |
BuildRequires: pkgconfig(gtk+-2.0) |
55 |
BuildRequires: pkgconfig(gtk+-3.0) |
56 |
BuildRequires: pkgconfig(gtk+-unix-print-3.0) |
57 |
BuildRequires: pkgconfig(gtk+-wayland-3.0) |
58 |
BuildRequires: pkgconfig(gtk+-x11-3.0) |
59 |
BuildRequires: pkgconfig(harfbuzz) >= 0.9.7 |
60 |
BuildRequires: pkgconfig(harfbuzz-icu) >= 0.9.18 |
61 |
BuildRequires: pkgconfig(icu-uc) |
62 |
BuildRequires: pkgconfig(libsecret-1) |
63 |
BuildRequires: pkgconfig(libwebp) |
64 |
BuildRequires: pkgconfig(sqlite3) |
65 |
BuildRequires: pkgconfig(upower-glib) |
66 |
BuildRequires: pkgconfig(libwoff2dec) |
67 |
BuildRequires: pkgconfig(wayland-client) |
68 |
BuildRequires: pkgconfig(wayland-egl) |
69 |
BuildRequires: pkgconfig(wayland-server) |
70 |
BuildRequires: pkgconfig(gnutls) |
71 |
BuildRequires: bison >= 2.3 |
72 |
BuildRequires: gperf >= 3.0.1 |
73 |
BuildRequires: pkgconfig(python3) |
74 |
BuildRequires: ruby >= 1.8.7 |
75 |
BuildRequires: pkgconfig(cairo) >= 1.10.2 |
76 |
BuildRequires: pkgconfig(libnotify) |
77 |
BuildRequires: pkgconfig(libopenjp2) |
78 |
BuildRequires: pkgconfig(libjpeg) |
79 |
BuildRequires: libsoup-devel >= 2.42.0 |
80 |
BuildRequires: pkgconfig(libxml-2.0) >= 2.8.0 |
81 |
BuildRequires: pkgconfig(libxslt) >= 1.1.7 |
82 |
BuildRequires: pkgconfig(zlib) |
83 |
BuildRequires: pkgconfig(libpng) |
84 |
BuildRequires: hyphen-devel |
85 |
BuildRequires: pkgconfig(x11) |
86 |
BuildRequires: pkgconfig(xcomposite) |
87 |
BuildRequires: pkgconfig(xdamage) |
88 |
BuildRequires: pkgconfig(xrender) |
89 |
BuildRequires: pkgconfig(xt) |
90 |
BuildRequires: cmake |
91 |
Requires: %{libwebkit2} = %{version} |
92 |
|
93 |
%description |
94 |
WebKitGTK is the port of the portable web rendering engine WebKit to the |
95 |
GTK platform. |
96 |
|
97 |
%package jsc |
98 |
Summary: JavaScriptCore shell for WebKit GTK |
99 |
Group: Development/GNOME and GTK+ |
100 |
|
101 |
%description jsc |
102 |
jsc is a shell for JavaScriptCore, WebKit's JavaScript engine. It |
103 |
allows you to interact with the JavaScript engine directly. |
104 |
|
105 |
%package -n %{libwebkit2} |
106 |
Summary: GTK port of WebKit web browser engine |
107 |
Group: System/Libraries |
108 |
Requires: %{name} >= %{version} |
109 |
|
110 |
%description -n %{libwebkit2} |
111 |
The GTK port of WebKit is intended to provide a browser component |
112 |
primarily for users of the portable GTK UI toolkit on platforms like |
113 |
Linux. |
114 |
|
115 |
%package -n %{libjavascriptcoregtk} |
116 |
Summary: GTK port of WebKit web browser engine |
117 |
Group: System/Libraries |
118 |
|
119 |
%description -n %{libjavascriptcoregtk} |
120 |
The GTK port of WebKit is intended to provide a browser component |
121 |
primarily for users of the portable GTK UI toolkit on platforms like |
122 |
Linux. |
123 |
|
124 |
%package -n %{develname} |
125 |
Summary: Development files for WebKit GTK port |
126 |
Group: Development/GNOME and GTK+ |
127 |
Provides: %{name}-devel = %{version}-%{release} |
128 |
Provides: libwebkit2gtk-devel = %{version}-%{release} |
129 |
Requires: %{libjavascriptcoregtk} = %{version} |
130 |
Requires: %{libwebkit2} = %{version} |
131 |
Requires: %{javascriptcoregtk_gir} = %{version} |
132 |
Requires: %{webkit2_gir} = %{version} |
133 |
Requires: %{name}-jsc = %{version} |
134 |
|
135 |
%description -n %{develname} |
136 |
The %{name}-devel package contains libraries, build data, and header |
137 |
files for developing applications that use %{name}. |
138 |
|
139 |
%package -n %{javascriptcoregtk_gir} |
140 |
Summary: GObject Introspection interface description for JSCore |
141 |
Group: System/Libraries |
142 |
Requires: %{libjavascriptcoregtk} = %{version}-%{release} |
143 |
|
144 |
%description -n %{javascriptcoregtk_gir} |
145 |
GObject Introspection interface description for JSCore. |
146 |
|
147 |
%package -n %{webkit2_gir} |
148 |
Summary: GObject Introspection interface description for %{name} |
149 |
Group: System/Libraries |
150 |
Requires: %{libwebkit2} = %{version}-%{release} |
151 |
|
152 |
%description -n %{webkit2_gir} |
153 |
GObject Introspection interface description for WebKit. |
154 |
|
155 |
%prep |
156 |
%setup -qn %{oname}-%{version} |
157 |
%autopatch -p1 |
158 |
|
159 |
%build |
160 |
# Decrease debuginfo verbosity to reduce memory consumption even more |
161 |
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /') |
162 |
# remove -O2 -g from RELWITHDEBINFO flags, since this is already in our C[XX]FLAGS |
163 |
# and would prevent overriding them |
164 |
# only keep -DNDEBUG |
165 |
|
166 |
# We actually want RelWithDebInfo, not Release, but it is currently broken |
167 |
# c.f. https://bugs.mageia.org/show_bug.cgi?id=19470 and |
168 |
# https://bugs.webkit.org/show_bug.cgi?id=163897 |
169 |
%cmake \ |
170 |
-DPORT=GTK \ |
171 |
-DCMAKE_BUILD_TYPE=Release \ |
172 |
-DCMAKE_C_FLAGS_RELWITHDEBINFO="-DNDEBUG" \ |
173 |
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-DNDEBUG" \ |
174 |
-DPYTHON_EXECUTABLE=%{_bindir}/python3 |
175 |
%make_build |
176 |
|
177 |
%install |
178 |
%make_install -C build |
179 |
|
180 |
%find_lang WebKit2GTK-%{api} |
181 |
|
182 |
%files -f WebKit2GTK-%{api}.lang |
183 |
%dir %{_libexecdir}/webkit2gtk-%{api} |
184 |
%{_libexecdir}/webkit2gtk-%{api}/WebKit* |
185 |
%dir %{_libdir}/webkit2gtk-%{api} |
186 |
%{_libdir}/webkit2gtk-%{api}/injected-bundle/libwebkit2gtkinjectedbundle.so |
187 |
%{_bindir}/WebKitWebDriver |
188 |
|
189 |
%files jsc |
190 |
%{_libexecdir}/webkit2gtk-%{api}/jsc |
191 |
|
192 |
%files -n %{libjavascriptcoregtk} |
193 |
%{_libdir}/libjavascriptcoregtk-%{api}.so.%{javascriptcoregtk_major} |
194 |
%{_libdir}/libjavascriptcoregtk-%{api}.so.%{javascriptcoregtk_major}.* |
195 |
|
196 |
%files -n %{libwebkit2} |
197 |
%{_libdir}/libwebkit2gtk-%{api}.so.%{webkit2_major} |
198 |
%{_libdir}/libwebkit2gtk-%{api}.so.%{webkit2_major}.* |
199 |
|
200 |
%files -n %{develname} |
201 |
%{_includedir}/webkitgtk-%{api} |
202 |
%{_libdir}/*-%{api}.so |
203 |
%{_libdir}/pkgconfig/*-%{api}.pc |
204 |
%{_datadir}/gir-1.0/*-%{api}.gir |
205 |
|
206 |
%files -n %{javascriptcoregtk_gir} |
207 |
%{_libdir}/girepository-1.0/JavaScriptCore-%{api}.typelib |
208 |
|
209 |
%files -n %{webkit2_gir} |
210 |
%{_libdir}/girepository-1.0/WebKit2-%{api}.typelib |
211 |
%{_libdir}/girepository-1.0/WebKit2WebExtension-%{api}.typelib |