/
qtwebkit5.spec
263 lines (212 loc) · 8.25 KB
/
qtwebkit5.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# Conditional building of X11 related things
%bcond_with X11
Name: qt5-qtwebkit
Summary: Web content engine library for Qt
Version: 5.2.2
Release: 1%{?dist}
Group: Qt/Qt
License: BSD and LGPLv2+
URL: https://qt.gitorious.org/qt/qtwebkit/commit/5e64d7e
Source0: %{name}-%{version}.tar.bz2
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5PrintSupport)
#BuildRequires: qt5-qtlocation-devel
BuildRequires: pkgconfig(Qt5Script)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt53D)
#BuildRequires: qt5-qtsensors-devel
BuildRequires: pkgconfig(Qt5XmlPatterns)
BuildRequires: qt5-qmake
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(icu-uc)
BuildRequires: pkgconfig(sqlite3)
%if %{with X11}
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xrender)
%endif
# FIXME, it needs checking if other glib modules are used, those need
# to be added separately!
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: libjpeg-turbo-devel
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libxslt)
BuildRequires: gperf
BuildRequires: python
BuildRequires: bison
BuildRequires: flex
BuildRequires: fdupes
BuildRequires: ruby
BuildRequires: perl
BuildRequires: perl-version
BuildRequires: perl-libs
%description
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
%package uiprocess-launcher
Summary: Web content engine library for Qt - WebKit2 process launcher
Group: Qt/Qt
%description uiprocess-launcher
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
This package contains the UI process launcher for WebKit2 engine
%package -n libqtwebkit5
Summary: Web content engine library for Qt - core runtime files
Group: Qt/Qt
Requires: %{name}-uiprocess-launcher = %{version}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description -n libqtwebkit5
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
This package contains the core runtime files needed to launch Qt 5 applications
using QtWebKit library.
%package -n libqtwebkit5-devel
Summary: Web content engine library for Qt - core development files
Group: Qt/Qt
Requires: libqtwebkit5 = %{version}
%description -n libqtwebkit5-devel
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
This package contains the core development files needed to build Qt 5 applications
using QtWebKit library.
%package -n libqtwebkit5-widgets
Summary: Web content engine library for Qt - GUI runtime files
Group: Qt/Qt
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description -n libqtwebkit5-widgets
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
This package contains the GUI runtime files needed to launch Qt 5 applications
using QtWebKitWidgets library.
%package -n libqtwebkit5-widgets-devel
Summary: Web content engine library for Qt - GUI development files
Group: Qt/Qt
Requires: libqtwebkit5-widgets = %{version}
%description -n libqtwebkit5-widgets-devel
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
This package contains the GUI development files needed to build Qt 5 applications
using QtWebKitWidgets library.
%package -n qt5-qtqml-import-webkitplugin
Summary: Qt WebKit QML plugin
Group: Qt/Qt
%description -n qt5-qtqml-import-webkitplugin
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
This package contains the WebKit QML plugin for QtQml.
%package -n qt5-qtqml-import-webkitplugin-experimental
Summary: Qt WebKit Experimental QML plugin
Group: Qt/Qt
%description -n qt5-qtqml-import-webkitplugin-experimental
QtWebKit provides a Web browser engine that makes it easy to embed content from
the World Wide Web into your Qt application.
This package contains the WebKit QML Experimental plugin for QtQml.
%prep
%setup -q -n %{name}-%{version}/qtwebkit
# remove .../qt/tests directory which introduces nothing but trouble
rm -rf Source/WebKit/qt/tests/
%build
## From Carsten Munk: create way smaller debuginfo
#export CXXFLAGS="`echo $CXXFLAGS | sed 's/ -g / -gdwarf-4 /g'`"
#export CFLAGS="`echo $CFLAGS | sed 's/ -g / -gdwarf-4 /g'`"
# XXX: Remove debug symbols entirely, we're running out of linker memory!
export CXXFLAGS="`echo $CXXFLAGS | sed 's/ -g / /g'`"
export CFLAGS="`echo $CFLAGS | sed 's/ -g / /g'`"
#
export QMAKEPATH="`pwd`/Tools/qmake"
export QTDIR=/usr/share/qt5
#
touch .git
%ifarch aarch64
%global qtdefines DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0
%else
%global qtdefines
%endif
#
# Configure to release build, drop tests, mimic Tools/qmake/mkspecs/features/production_build.prf for the whole
# build not just WebCore. We could also drop WebKit1 support aka libqtwebkit5-widgets with WEBKIT_CONFIG-=build_webkit1.
# See also Tools/qmake/mkspecs/features/features.prf.
qmake -qt=5 CONFIG+=release CONFIG-=debug \
%{?qtdefines} \
WEBKIT_CONFIG-=build_tests \
CONFIG+=no_debug_info \
CONFIG-=separate_debug_info \
QMAKE_CFLAGS+=$QMAKE_CFLAGS_RELEASE \
QMAKE_CXXFLAGS+=$QMAKE_CXXFLAGS_RELEASE \
CONFIG*=use_all_in_one_files \
WEBKIT_CONFIG-=ftpdir \
WEBKIT_CONFIG-=video \
WEBKIT_CONFIG-=web_audio \
WEBKIT_CONFIG-=legacy_web_audio \
WEBKIT_CONFIG-=use_gstreamer \
WEBKIT_CONFIG-=use_gstreamer010 \
WEBKIT_CONFIG-=use_qt_multimedia \
WEBKIT_CONFIG-=gamepad \
WEBKIT_CONFIG-=svg \
WEBKIT_CONFIG-=inspector \
WEBKIT_CONFIG-=fullscreen_api \
WEBKIT_CONFIG-=netscape_plugin_api \
WEBKIT_CONFIG-=build_qttestsupport
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
%qmake5_install
# Remove .la files
rm -f %{buildroot}/usr/lib/libQt5WebKit.la
rm -f %{buildroot}/usr/lib/libQt5WebKitWidgets.la
# Fix wrong path in pkgconfig files
find %{buildroot}%{_libdir}/pkgconfig -type f -name '*.pc' \
-exec perl -pi -e "s, -L%{_builddir}/?\S+,,g" {} \;
# Fix wrong path in prl files
find %{buildroot}%{_libdir} -type f -name '*.prl' \
-exec sed -i -e "/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/" {} \;
# Eliminate duplicates
%fdupes %{buildroot}/%{_libdir}
%fdupes %{buildroot}/%{_includedir}
%post -n libqtwebkit5 -p /sbin/ldconfig
%postun -n libqtwebkit5 -p /sbin/ldconfig
%post -n libqtwebkit5-widgets -p /sbin/ldconfig
%postun -n libqtwebkit5-widgets -p /sbin/ldconfig
%files uiprocess-launcher
%defattr(-,root,root,-)
%{_libdir}/qt5/libexec/QtWebProcess
%files -n libqtwebkit5
%defattr(-,root,root,-)
%{_libdir}/libQt5WebKit.so.*
%files -n libqtwebkit5-devel
%defattr(-,root,root,-)
%{_includedir}/qt5/QtWebKit/
%{_libdir}/cmake/Qt5WebKit/
%{_libdir}/libQt5WebKit.prl
%{_libdir}/libQt5WebKit.so
%{_libdir}/pkgconfig/Qt5WebKit.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_webkit.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_webkit_private.pri
%files -n libqtwebkit5-widgets
%defattr(-,root,root,-)
%{_libdir}/libQt5WebKitWidgets.so.*
%files -n libqtwebkit5-widgets-devel
%defattr(-,root,root,-)
%{_includedir}/qt5/QtWebKitWidgets/
%{_libdir}/cmake/Qt5WebKitWidgets/
%{_libdir}/libQt5WebKitWidgets.prl
%{_libdir}/libQt5WebKitWidgets.so
%{_libdir}/pkgconfig/Qt5WebKitWidgets.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_webkitwidgets_private.pri
%files -n qt5-qtqml-import-webkitplugin
%defattr(-,root,root,-)
%{_libdir}/qt5/qml/QtWebKit/libqmlwebkitplugin.so
%{_libdir}/qt5/qml/QtWebKit/qmldir
%files -n qt5-qtqml-import-webkitplugin-experimental
%defattr(-,root,root,-)
%{_libdir}/qt5/qml/QtWebKit/experimental/libqmlwebkitexperimentalplugin.so
%{_libdir}/qt5/qml/QtWebKit/experimental/qmldir
#### No changelog section, separate $pkg.changes contains the history