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