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