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