]>
Commit | Line | Data |
---|---|---|
68e7984a | 1 | # TODO: |
1239c82a JB |
2 | # - opencl support (BR: OpenCL-devel, WEBKIT_CONFIG+=opencl) ? |
3 | # - seccomp support (BR: libseccomp-devel, WEBKIT_CONFIG+=seccomp_filters) ? | |
5da6712d JB |
4 | # - system leveldb (requires memenv helper library) |
5 | # NOTE: not splitting WebKit/WebKitWidgets, interdependencies are not clear | |
6 | # (e.g. WebProcess requires WebKitWidgets) | |
0ca16147 | 7 | # - switch to building using cmake directly, reenable doc |
50a36e1f JB |
8 | # |
9 | # Conditional build: | |
b0970bd0 ER |
10 | %bcond_with bootstrap # disable features to able to build without installed qt5 |
11 | # -- build targets | |
0ca16147 | 12 | %bcond_with doc # Documentation |
b0970bd0 | 13 | # -- features |
1239c82a | 14 | %bcond_with qtmultimedia # QtMultimedia support |
68e7984a | 15 | |
b0970bd0 | 16 | %if %{with bootstrap} |
cbf6f77b | 17 | %undefine with_doc |
b0970bd0 ER |
18 | %endif |
19 | ||
b320c168 JR |
20 | # it's not possible to build this with debuginfo on 32bit archs due to |
21 | # memory constraints during linking | |
22 | %ifarch %{ix86} x32 | |
23 | %define _enable_debug_packages 0 | |
24 | %endif | |
25 | ||
0ca16147 | 26 | %define snap alpha2 |
39fcd210 | 27 | %define rel 4 |
0ca16147 | 28 | |
5da6712d | 29 | %define orgname qtwebkit |
0ca16147 AM |
30 | %define qtbase_ver 5.11 |
31 | %define qtdeclarative_ver 5.11 | |
32 | %define qtlocation_ver 5.11 | |
33 | %define qtmultimedia_ver 5.11 | |
34 | %define qtsensors_ver 5.11 | |
35 | %define qttools_ver 5.11 | |
50a36e1f JB |
36 | Summary: The Qt5 WebKit libraries |
37 | Summary(pl.UTF-8): Biblioteki Qt5 WebKit | |
68e7984a | 38 | Name: qt5-%{orgname} |
0ca16147 | 39 | Version: 5.212.0 |
ce0cee87 | 40 | Release: 0.%{snap}.%{rel} |
1239c82a | 41 | License: LGPL v2+ |
68e7984a | 42 | Group: X11/Libraries |
0ca16147 AM |
43 | Source0: https://github.com/annulen/webkit/archive/qtwebkit-%{version}-%{snap}.tar.gz |
44 | # Source0-md5: 9216661f6626fe4224ac477adf8d4162 | |
45 | # from FC | |
46 | Patch100: qt5-qtwebkit-5.212.0-alpha2-fix-pagewidth.patch | |
47 | Patch101: qtwebkit-5.212.0-alpha2-fix-null-pointer-dereference.patch | |
48 | Patch102: qtwebkit-5.212.0_cmake_cmp0071.patch | |
49 | Patch103: qtwebkit-5.212.0_fix_missing_sources.patch | |
50 | Patch104: 0016-cmake-Import-ECMEnableSanitizers.patch | |
51 | Patch105: 0031-Disable-ES6-Proxy-object.patch | |
52 | Patch106: 0111-ECM-Update-ECMGeneratePkgConfigFile-to-latest-versio.patch | |
53 | Patch107: 0012-cmake-Fix-include-dir-in-the-generated-pkg-config-fi.patch | |
9f9a5867 | 54 | Patch108: x32.patch |
0ca16147 | 55 | URL: https://github.com/annulen/webkit |
5da6712d JB |
56 | BuildRequires: OpenGL-devel |
57 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
58 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
1239c82a | 59 | %{?with_qtmultimedia:BuildRequires: Qt5MultimediaWidgets-devel >= %{qtmultimedia_ver}} |
5da6712d JB |
60 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} |
61 | BuildRequires: Qt5OpenGL-devel >= %{qtbase_ver} | |
1239c82a | 62 | BuildRequires: Qt5Positioning-devel >= %{qtlocation_ver} |
5da6712d JB |
63 | BuildRequires: Qt5PrintSupport-devel >= %{qtbase_ver} |
64 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
65 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
1239c82a | 66 | BuildRequires: Qt5Sensors-devel >= %{qtsensors_ver} |
5da6712d JB |
67 | BuildRequires: Qt5Sql-devel >= %{qtbase_ver} |
68 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} | |
f2d76ab3 | 69 | BuildRequires: Qt5WebChannel-devel >= %{qtbase_ver} |
5da6712d | 70 | BuildRequires: glib2-devel >= 2.0 |
4b19fed1 | 71 | BuildRequires: gperf |
5da6712d JB |
72 | BuildRequires: gstreamer-devel >= 1.0 |
73 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
74 | BuildRequires: libicu-devel | |
75 | BuildRequires: libjpeg-devel | |
76 | BuildRequires: libpng-devel | |
77 | BuildRequires: libwebp-devel | |
78 | BuildRequires: libxml2-devel >= 2.0 | |
79 | BuildRequires: libxslt-devel | |
80 | BuildRequires: pkgconfig | |
50a36e1f | 81 | BuildRequires: rpmbuild(macros) >= 1.654 |
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} | |
68e7984a | 87 | BuildRequires: rpmbuild(macros) >= 1.654 |
5da6712d | 88 | BuildRequires: sqlite3-devel >= 3 |
983a5b21 | 89 | BuildRequires: tar >= 1:1.22 |
5da6712d JB |
90 | BuildRequires: xorg-lib-libX11-devel |
91 | BuildRequires: xorg-lib-libXcomposite-devel | |
92 | BuildRequires: xorg-lib-libXrender-devel | |
983a5b21 | 93 | BuildRequires: xz |
5da6712d | 94 | BuildRequires: zlib-devel |
a4846994 | 95 | BuildConflicts: leveldb-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} |
983a5b21 ER |
168 | %if "%{_rpmversion}" >= "5" |
169 | BuildArch: noarch | |
170 | %endif | |
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} | |
183 | %if "%{_rpmversion}" >= "5" | |
184 | BuildArch: noarch | |
185 | %endif | |
186 | ||
187 | %description doc-qch | |
188 | Qt5 WebKit documentation in QCH format. | |
189 | ||
190 | %description doc-qch -l pl.UTF-8 | |
191 | Dokumentacja do bibliotek Qt5 WebKit w formacie QCH. | |
68e7984a | 192 | |
68e7984a | 193 | %prep |
0ca16147 AM |
194 | %setup -q -n webkit-qtwebkit-%{version}-%{snap} |
195 | %patch100 -p1 | |
196 | %patch101 -p1 | |
197 | %patch102 -p1 | |
198 | %patch103 -p1 | |
199 | %patch104 -p1 | |
200 | %patch105 -p1 | |
201 | %patch106 -p1 | |
202 | %patch107 -p1 | |
9f9a5867 | 203 | %patch108 -p1 |
68e7984a WF |
204 | |
205 | %build | |
8a437667 JR |
206 | mkdir -p build |
207 | cd build | |
208 | CFLAGS="%{rpmcflags}"; export CFLAGS | |
735f3c51 | 209 | CXXFLAGS="%{rpmcxxflags} -fpermissive"; export CXXFLAGS |
8a437667 JR |
210 | # We cannot use default cmake macro here as it overwrites some settings queried |
211 | # by qtwebkit cmake from qmake | |
212 | cmake \ | |
213 | -DPORT=Qt \ | |
214 | -DCMAKE_BUILD_TYPE=Release \ | |
215 | -DENABLE_TOOLS=OFF \ | |
216 | -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \ | |
217 | -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \ | |
218 | -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
219 | %{?with_qtmultimedia:-DUSE_QT_MULTIMEDIA:BOOL=ON} \ | |
220 | %{?with_doc:-DGENERATE_DOCUMENTATION=ON} \ | |
221 | %if "%{_lib}" == "lib64" | |
222 | -DLIB_SUFFIX=64 \ | |
223 | %endif | |
224 | %if "%{_lib}" == "libx32" | |
225 | -DLIB_SUFFIX=x32 \ | |
226 | %endif | |
227 | %ifarch x32 | |
228 | -DENABLE_JIT=OFF \ | |
229 | %endif | |
230 | .. | |
5da6712d | 231 | |
68e7984a | 232 | %{__make} |
cbf6f77b | 233 | %{?with_doc:%{__make} docs} |
68e7984a WF |
234 | |
235 | %install | |
236 | rm -rf $RPM_BUILD_ROOT | |
8a437667 JR |
237 | |
238 | cd build | |
68e7984a | 239 | %{__make} install \ |
8a437667 | 240 | DESTDIR=$RPM_BUILD_ROOT |
68e7984a | 241 | |
cbf6f77b JR |
242 | %if %{with doc} |
243 | %{__make} install_docs \ | |
8a437667 | 244 | DESTDIR=$RPM_BUILD_ROOT |
cbf6f77b | 245 | %endif |
68e7984a | 246 | |
0ca16147 | 247 | # kill unnecessary -L%{_libdir} from *.pc |
5da6712d | 248 | %{__sed} -i -e "s,-L%{_libdir} \?,,g" \ |
5da6712d JB |
249 | $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc |
250 | # kill unwanted Libs.private (containing many bogus entries) from *.pc files | |
251 | %{__sed} -i -e '/^Libs\.private/d' $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc | |
50a36e1f | 252 | |
68e7984a WF |
253 | %clean |
254 | rm -rf $RPM_BUILD_ROOT | |
255 | ||
50a36e1f JB |
256 | %post -n Qt5WebKit -p /sbin/ldconfig |
257 | %postun -n Qt5WebKit -p /sbin/ldconfig | |
68e7984a | 258 | |
255f7f61 | 259 | %files -n Qt5WebKit |
68e7984a | 260 | %defattr(644,root,root,755) |
50a36e1f | 261 | %attr(755,root,root) %{_libdir}/libQt5WebKit.so.*.*.* |
255f7f61 | 262 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebKit.so.5 |
50a36e1f | 263 | %attr(755,root,root) %{_libdir}/libQt5WebKitWidgets.so.*.*.* |
255f7f61 | 264 | %attr(755,root,root) %ghost %{_libdir}/libQt5WebKitWidgets.so.5 |
255f7f61 WF |
265 | %dir %{_libdir}/qt5/qml/QtWebKit |
266 | %attr(755,root,root) %{_libdir}/qt5/qml/QtWebKit/libqmlwebkitplugin.so | |
53fad3a3 | 267 | %{_libdir}/qt5/qml/QtWebKit/plugins.qmltypes |
255f7f61 WF |
268 | %{_libdir}/qt5/qml/QtWebKit/qmldir |
269 | %dir %{_libdir}/qt5/qml/QtWebKit/experimental | |
270 | %attr(755,root,root) %{_libdir}/qt5/qml/QtWebKit/experimental/libqmlwebkitexperimentalplugin.so | |
271 | %{_libdir}/qt5/qml/QtWebKit/experimental/qmldir | |
5da6712d | 272 | %dir %{_libdir}/qt5/libexec |
5da6712d | 273 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebProcess |
0ca16147 AM |
274 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebDatabaseProcess |
275 | %attr(755,root,root) %{_libdir}/qt5/libexec/QtWebNetworkProcess | |
255f7f61 WF |
276 | |
277 | %files -n Qt5WebKit-devel | |
68e7984a | 278 | %defattr(644,root,root,755) |
255f7f61 WF |
279 | %attr(755,root,root) %{_libdir}/libQt5WebKit.so |
280 | %attr(755,root,root) %{_libdir}/libQt5WebKitWidgets.so | |
255f7f61 WF |
281 | %{_includedir}/qt5/QtWebKit |
282 | %{_includedir}/qt5/QtWebKitWidgets | |
283 | %{_pkgconfigdir}/Qt5WebKit.pc | |
284 | %{_pkgconfigdir}/Qt5WebKitWidgets.pc | |
50a36e1f JB |
285 | %{_libdir}/cmake/Qt5WebKit |
286 | %{_libdir}/cmake/Qt5WebKitWidgets | |
5da6712d | 287 | %{qt5dir}/mkspecs/modules/qt_lib_webkit.pri |
5da6712d | 288 | %{qt5dir}/mkspecs/modules/qt_lib_webkitwidgets.pri |
68e7984a | 289 | |
cbf6f77b | 290 | %if %{with doc} |
68e7984a WF |
291 | %files doc |
292 | %defattr(644,root,root,755) | |
5da6712d | 293 | %{_docdir}/qt5-doc/qtwebkit |
50a36e1f | 294 | |
50a36e1f JB |
295 | %files doc-qch |
296 | %defattr(644,root,root,755) | |
5da6712d | 297 | %{_docdir}/qt5-doc/qtwebkit.qch |
50a36e1f | 298 | %endif |