]>
Commit | Line | Data |
---|---|---|
5da6712d JB |
1 | # NOTE: not splitting WebKit/WebKitWidgets, interdependencies are not clear |
2 | # (e.g. WebProcess requires WebKitWidgets) | |
50a36e1f JB |
3 | # |
4 | # Conditional build: | |
b0970bd0 ER |
5 | %bcond_with bootstrap # disable features to able to build without installed qt5 |
6 | # -- build targets | |
effa4d27 | 7 | %bcond_without doc # documentation |
b0970bd0 | 8 | # -- features |
d8711f9d | 9 | %bcond_with qtmultimedia # QtMultimedia support (instead of GStreamer) |
effa4d27 | 10 | %bcond_with seccomp # WebProcess seccomp filters (broken as of 5.212.0-alpha4) |
68e7984a | 11 | |
b0970bd0 | 12 | %if %{with bootstrap} |
cbf6f77b | 13 | %undefine with_doc |
b0970bd0 ER |
14 | %endif |
15 | ||
b320c168 JR |
16 | # it's not possible to build this with debuginfo on 32bit archs due to |
17 | # memory constraints during linking | |
18 | %ifarch %{ix86} x32 | |
19 | %define _enable_debug_packages 0 | |
20 | %endif | |
21 | ||
366913d7 | 22 | %define snap alpha4 |
13d48438 | 23 | %define rel 6 |
0ca16147 | 24 | |
5da6712d | 25 | %define orgname qtwebkit |
0ca16147 AM |
26 | %define qtbase_ver 5.11 |
27 | %define qtdeclarative_ver 5.11 | |
28 | %define qtlocation_ver 5.11 | |
29 | %define qtmultimedia_ver 5.11 | |
30 | %define qtsensors_ver 5.11 | |
31 | %define qttools_ver 5.11 | |
366913d7 | 32 | %define qtwebchannel_ver 5.11 |
50a36e1f JB |
33 | Summary: The Qt5 WebKit libraries |
34 | Summary(pl.UTF-8): Biblioteki Qt5 WebKit | |
68e7984a | 35 | Name: qt5-%{orgname} |
0ca16147 | 36 | Version: 5.212.0 |
ce0cee87 | 37 | Release: 0.%{snap}.%{rel} |
1239c82a | 38 | License: LGPL v2+ |
68e7984a | 39 | Group: X11/Libraries |
366913d7 | 40 | #Source0Download: https://github.com/qtwebkit/qtwebkit/releases |
f0b9aa9b | 41 | Source0: https://github.com/qtwebkit/qtwebkit/releases/download/qtwebkit-%{version}-%{snap}/qtwebkit-%{version}-%{snap}.tar.xz |
366913d7 JB |
42 | # Source0-md5: 5b61a72497f06e51db09d57edc3c35fb |
43 | Patch0: %{name}-css.patch | |
effa4d27 | 44 | Patch1: %{name}-docs.patch |
999564b7 | 45 | Patch2: glib2.68.patch |
f37d7ebf | 46 | Patch3: %{name}-gstreamer.patch |
0ca16147 | 47 | # from FC |
0ca16147 | 48 | Patch102: qtwebkit-5.212.0_cmake_cmp0071.patch |
9f9a5867 | 49 | Patch108: x32.patch |
0ca16147 | 50 | URL: https://github.com/annulen/webkit |
5da6712d JB |
51 | BuildRequires: OpenGL-devel |
52 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
53 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
1239c82a | 54 | %{?with_qtmultimedia:BuildRequires: Qt5MultimediaWidgets-devel >= %{qtmultimedia_ver}} |
5da6712d JB |
55 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} |
56 | BuildRequires: Qt5OpenGL-devel >= %{qtbase_ver} | |
1239c82a | 57 | BuildRequires: Qt5Positioning-devel >= %{qtlocation_ver} |
5da6712d JB |
58 | BuildRequires: Qt5PrintSupport-devel >= %{qtbase_ver} |
59 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
60 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
1239c82a | 61 | BuildRequires: Qt5Sensors-devel >= %{qtsensors_ver} |
366913d7 | 62 | BuildRequires: Qt5WebChannel-devel >= %{qtwebchannel_ver} |
5da6712d | 63 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} |
366913d7 JB |
64 | BuildRequires: bison >= 2.1 |
65 | BuildRequires: dwz >= 0.13 | |
66 | BuildRequires: glib2-devel >= 1:2.36 | |
67 | BuildRequires: gperf >= 3.0.1 | |
68 | BuildRequires: gstreamer-devel >= 1.0.3 | |
69 | BuildRequires: gstreamer-gl-devel >= 1.6.0 | |
70 | BuildRequires: gstreamer-plugins-bad-devel >= 1.4.0 | |
71 | BuildRequires: gstreamer-plugins-base-devel >= 1.0.3 | |
72 | BuildRequires: hyphen-devel | |
5da6712d JB |
73 | BuildRequires: libicu-devel |
74 | BuildRequires: libjpeg-devel | |
75 | BuildRequires: libpng-devel | |
366913d7 | 76 | %{?with_seccomp:BuildRequires: libseccomp-devel} |
5da6712d | 77 | BuildRequires: libwebp-devel |
366913d7 JB |
78 | BuildRequires: libxml2-devel >= 1:2.8.0 |
79 | BuildRequires: libxslt-devel >= 1.1.7 | |
80 | BuildRequires: perl-base >= 1:5.10.0 | |
5da6712d | 81 | BuildRequires: pkgconfig |
366913d7 JB |
82 | BuildRequires: python >= 1:2.7.0 |
83 | BuildRequires: ruby >= 1:1.9 | |
cbf6f77b | 84 | %if %{with doc} |
50a36e1f JB |
85 | BuildRequires: qt5-assistant >= %{qttools_ver} |
86 | %endif | |
87 | BuildRequires: qt5-build >= %{qtbase_ver} | |
88 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
3a925366 | 89 | BuildRequires: rpm-build >= 4.6 |
366913d7 | 90 | BuildRequires: rpmbuild(macros) >= 1.752 |
5da6712d | 91 | BuildRequires: sqlite3-devel >= 3 |
983a5b21 | 92 | BuildRequires: tar >= 1:1.22 |
366913d7 | 93 | BuildRequires: woff2-devel >= 1.0.1 |
5da6712d JB |
94 | BuildRequires: xorg-lib-libX11-devel |
95 | BuildRequires: xorg-lib-libXcomposite-devel | |
96 | BuildRequires: xorg-lib-libXrender-devel | |
983a5b21 | 97 | BuildRequires: xz |
5da6712d | 98 | BuildRequires: zlib-devel |
68e7984a WF |
99 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
100 | ||
d4c1b613 | 101 | %define specflags -fno-strict-aliasing -DU_DEFINE_FALSE_AND_TRUE=1 |
50a36e1f | 102 | %define qt5dir %{_libdir}/qt5 |
68e7984a WF |
103 | |
104 | %description | |
50a36e1f JB |
105 | Qt is a cross-platform application and UI framework. Using Qt, you can |
106 | write web-enabled applications once and deploy them across desktop, | |
107 | mobile and embedded systems without rewriting the source code. | |
108 | ||
109 | This package contains Qt5 WebKit libraries. | |
110 | ||
111 | %description -l pl.UTF-8 | |
112 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
113 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
114 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
115 | źródłowego. | |
116 | ||
117 | Ten pakiet zawiera biblioteki Qt5 WebKit. | |
68e7984a | 118 | |
255f7f61 | 119 | %package -n Qt5WebKit |
50a36e1f JB |
120 | Summary: The Qt5 WebKit libraries |
121 | Summary(pl.UTF-8): Biblioteki Qt5 WebKit | |
255f7f61 | 122 | Group: X11/Libraries |
5da6712d JB |
123 | Requires: Qt5Core >= %{qtbase_ver} |
124 | Requires: Qt5Gui >= %{qtbase_ver} | |
1239c82a | 125 | %{?with_qtmultimedia:Requires: Qt5MultimediaWidgets >= %{qtmultimedia_ver}} |
5da6712d JB |
126 | Requires: Qt5Network >= %{qtbase_ver} |
127 | Requires: Qt5OpenGL >= %{qtbase_ver} | |
1239c82a | 128 | Requires: Qt5Positioning >= %{qtlocation_ver} |
5da6712d JB |
129 | Requires: Qt5PrintSupport >= %{qtbase_ver} |
130 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
131 | Requires: Qt5Quick >= %{qtdeclarative_ver} | |
1239c82a | 132 | Requires: Qt5Sensors >= %{qtsensors_ver} |
5da6712d JB |
133 | Requires: Qt5Sql >= %{qtbase_ver} |
134 | Requires: Qt5Widgets >= %{qtbase_ver} | |
255f7f61 WF |
135 | |
136 | %description -n Qt5WebKit | |
5da6712d JB |
137 | Qt5 WebKit libraries provide a web browser engine as well as C++ |
138 | classes to render and interact with web content. | |
50a36e1f JB |
139 | |
140 | %description -n Qt5WebKit -l pl.UTF-8 | |
5da6712d JB |
141 | Biblioteki Qt5 WebKit dostarczają silnik przeglądarki WWW, a także |
142 | klasy C++ do renderowania i interakcji z treścią WWW. | |
255f7f61 WF |
143 | |
144 | %package -n Qt5WebKit-devel | |
50a36e1f JB |
145 | Summary: Qt5 WebKit libraries - development files |
146 | Summary(pl.UTF-8): Biblioteki Qt5 WebKit - pliki programistyczne | |
68e7984a | 147 | Group: X11/Development/Libraries |
5da6712d JB |
148 | Requires: Qt5Core-devel >= %{qtbase_ver} |
149 | Requires: Qt5Gui-devel >= %{qtbase_ver} | |
1239c82a | 150 | %{?with_qtmultimedia:Requires: Qt5MultimediaWidgets-devel >= %{qtmultimedia_ver}} |
5da6712d JB |
151 | Requires: Qt5Network-devel >= %{qtbase_ver} |
152 | Requires: Qt5OpenGL-devel >= %{qtbase_ver} | |
1239c82a | 153 | Requires: Qt5Positioning-devel >= %{qtlocation_ver} |
5da6712d | 154 | Requires: Qt5PrintSupport-devel >= %{qtbase_ver} |
3a925366 | 155 | Requires: Qt5Quick-devel >= %{qtdeclarative_ver} |
1239c82a | 156 | Requires: Qt5Sensors-devel >= %{qtsensors_ver} |
255f7f61 | 157 | Requires: Qt5WebKit = %{version}-%{release} |
5da6712d | 158 | Requires: Qt5Widgets-devel >= %{qtbase_ver} |
68e7984a | 159 | |
255f7f61 | 160 | %description -n Qt5WebKit-devel |
50a36e1f JB |
161 | Qt5 WebKit libraries - development files. |
162 | ||
163 | %description -n Qt5WebKit-devel -l pl.UTF-8 | |
164 | Biblioteki Qt5 WebKit - pliki programistyczne. | |
68e7984a WF |
165 | |
166 | %package doc | |
50a36e1f JB |
167 | Summary: Qt5 WebKit documentation in HTML format |
168 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 WebKit w formacie HTML | |
68e7984a | 169 | Group: Documentation |
50a36e1f | 170 | Requires: qt5-doc-common >= %{qtbase_ver} |
ae9966f7 | 171 | BuildArch: noarch |
68e7984a WF |
172 | |
173 | %description doc | |
50a36e1f JB |
174 | Qt5 WebKit documentation in HTML format. |
175 | ||
176 | %description doc -l pl.UTF-8 | |
177 | Dokumentacja do bibliotek Qt5 WebKit w formacie HTML. | |
178 | ||
179 | %package doc-qch | |
180 | Summary: Qt5 WebKit documentation in QCH format | |
181 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 WebKit w formacie QCH | |
182 | Group: Documentation | |
183 | Requires: qt5-doc-common >= %{qtbase_ver} | |
ae9966f7 | 184 | BuildArch: noarch |
50a36e1f JB |
185 | |
186 | %description doc-qch | |
187 | Qt5 WebKit documentation in QCH format. | |
188 | ||
189 | %description doc-qch -l pl.UTF-8 | |
190 | Dokumentacja do bibliotek Qt5 WebKit w formacie QCH. | |
68e7984a | 191 | |
68e7984a | 192 | %prep |
f0b9aa9b | 193 | %setup -q -n qtwebkit-%{version}-%{snap} |
366913d7 | 194 | %patch0 -p1 |
effa4d27 | 195 | %patch1 -p1 |
999564b7 | 196 | %patch2 -p1 |
f37d7ebf | 197 | %patch3 -p1 |
0ca16147 | 198 | %patch102 -p1 |
9f9a5867 | 199 | %patch108 -p1 |
68e7984a WF |
200 | |
201 | %build | |
8a437667 JR |
202 | mkdir -p build |
203 | cd build | |
204 | CFLAGS="%{rpmcflags}"; export CFLAGS | |
735f3c51 | 205 | CXXFLAGS="%{rpmcxxflags} -fpermissive"; export CXXFLAGS |
8a437667 JR |
206 | # We cannot use default cmake macro here as it overwrites some settings queried |
207 | # by qtwebkit cmake from qmake | |
208 | cmake \ | |
209 | -DPORT=Qt \ | |
210 | -DCMAKE_BUILD_TYPE=Release \ | |
3a37d7db | 211 | -DENABLE_NETSCAPE_PLUGIN_API=ON \ |
366913d7 | 212 | %{?with_seccomp:-DENABLE_SECCOMP_FILTERS=ON} \ |
8a437667 | 213 | -DENABLE_TOOLS=OFF \ |
3a37d7db | 214 | -DENABLE_X11_TARGET=ON \ |
8a437667 JR |
215 | -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \ |
216 | -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \ | |
217 | -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
d8711f9d | 218 | %{?with_qtmultimedia:-DUSE_GSTREAMER:BOOL=OFF -DUSE_QT_MULTIMEDIA:BOOL=ON} \ |
8a437667 JR |
219 | %{?with_doc:-DGENERATE_DOCUMENTATION=ON} \ |
220 | %if "%{_lib}" == "lib64" | |
221 | -DLIB_SUFFIX=64 \ | |
222 | %endif | |
223 | %if "%{_lib}" == "libx32" | |
224 | -DLIB_SUFFIX=x32 \ | |
225 | %endif | |
226 | %ifarch x32 | |
227 | -DENABLE_JIT=OFF \ | |
228 | %endif | |
229 | .. | |
5da6712d | 230 | |
68e7984a | 231 | %{__make} |
366913d7 | 232 | |
68e7984a WF |
233 | %install |
234 | rm -rf $RPM_BUILD_ROOT | |
8a437667 | 235 | |
366913d7 | 236 | %{__make} -C build install \ |
effa4d27 | 237 | DESTDIR=$RPM_BUILD_ROOT |
68e7984a | 238 | |
366913d7 JB |
239 | # normalize paths |
240 | %{__sed} -i -e '/^Libs:/ s,-L/[^ ]*,-L%{_libdir},' \ | |
241 | -e '/^Cflags:/ s,-I[^ ]*/include/qt5,-I%{_includedir}/qt5,' \ | |
5da6712d | 242 | $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc |
50a36e1f | 243 | |
68e7984a WF |
244 | %clean |
245 | rm -rf $RPM_BUILD_ROOT | |
246 | ||
50a36e1f JB |
247 | %post -n Qt5WebKit -p /sbin/ldconfig |
248 | %postun -n Qt5WebKit -p /sbin/ldconfig | |
68e7984a | 249 | |
255f7f61 | 250 | %files -n Qt5WebKit |
68e7984a | 251 | %defattr(644,root,root,755) |
50a36e1f | 252 | %attr(755,root,root) %{_libdir}/libQt5WebKit.so.*.*.* |
255f7f61 | 253 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebKit.so.5 |
50a36e1f | 254 | %attr(755,root,root) %{_libdir}/libQt5WebKitWidgets.so.*.*.* |
255f7f61 | 255 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebKitWidgets.so.5 |
255f7f61 WF |
256 | %dir %{_libdir}/qt5/qml/QtWebKit |
257 | %attr(755,root,root) %{_libdir}/qt5/qml/QtWebKit/libqmlwebkitplugin.so | |
53fad3a3 | 258 | %{_libdir}/qt5/qml/QtWebKit/plugins.qmltypes |
255f7f61 WF |
259 | %{_libdir}/qt5/qml/QtWebKit/qmldir |
260 | %dir %{_libdir}/qt5/qml/QtWebKit/experimental | |
261 | %attr(755,root,root) %{_libdir}/qt5/qml/QtWebKit/experimental/libqmlwebkitexperimentalplugin.so | |
262 | %{_libdir}/qt5/qml/QtWebKit/experimental/qmldir | |
5da6712d | 263 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebProcess |
0ca16147 | 264 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebNetworkProcess |
f0b9aa9b JP |
265 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebPluginProcess |
266 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebStorageProcess | |
255f7f61 WF |
267 | |
268 | %files -n Qt5WebKit-devel | |
68e7984a | 269 | %defattr(644,root,root,755) |
255f7f61 WF |
270 | %attr(755,root,root) %{_libdir}/libQt5WebKit.so |
271 | %attr(755,root,root) %{_libdir}/libQt5WebKitWidgets.so | |
255f7f61 WF |
272 | %{_includedir}/qt5/QtWebKit |
273 | %{_includedir}/qt5/QtWebKitWidgets | |
274 | %{_pkgconfigdir}/Qt5WebKit.pc | |
275 | %{_pkgconfigdir}/Qt5WebKitWidgets.pc | |
50a36e1f JB |
276 | %{_libdir}/cmake/Qt5WebKit |
277 | %{_libdir}/cmake/Qt5WebKitWidgets | |
5da6712d | 278 | %{qt5dir}/mkspecs/modules/qt_lib_webkit.pri |
f0b9aa9b | 279 | %{qt5dir}/mkspecs/modules/qt_lib_webkit_private.pri |
5da6712d | 280 | %{qt5dir}/mkspecs/modules/qt_lib_webkitwidgets.pri |
f0b9aa9b | 281 | %{qt5dir}/mkspecs/modules/qt_lib_webkitwidgets_private.pri |
68e7984a | 282 | |
cbf6f77b | 283 | %if %{with doc} |
68e7984a WF |
284 | %files doc |
285 | %defattr(644,root,root,755) | |
5da6712d | 286 | %{_docdir}/qt5-doc/qtwebkit |
50a36e1f | 287 | |
50a36e1f JB |
288 | %files doc-qch |
289 | %defattr(644,root,root,755) | |
5da6712d | 290 | %{_docdir}/qt5-doc/qtwebkit.qch |
50a36e1f | 291 | %endif |