1 # TODO: review configure options:
2 # - FTL_JIT on !x86_64?
3 # - WEB_RTC+MEDIA_STREAM (BR: openwebrtc)
4 # - AVIF? (BR: libavif-devel >= 0.9.0)
5 # - THUNDER? (BR: Thunder + ThunderClientLibraries)
6 # - libsoup3 for HTTP/2 (drop USE_SOUP2=ON)? (BR: libsoup3-devel >= 2.99.9; changes abi tag from -4.0 to -4.1; doc tag remains -4.0)
7 # - gtk4 variant as gtk-webkit5 (-DUSE_GTK4=ON), (needs libsoup3, BR: gtk4-devel >= 3.98.5; changes abi and doc tags to -5.0)
10 %bcond_without introspection # GObject introspection
11 %bcond_with cairogl # accelerated 2D canvas using cairo-gl
12 %bcond_without wayland # Wayland target (requires GTK+ wayland target)
14 # it's not possible to build this with debuginfo on 32bit archs due to
15 # memory constraints during linking
17 %define _enable_debug_packages 0
19 Summary: Port of WebKit embeddable web component to GTK+ 3
20 Summary(pl.UTF-8): Port osadzalnego komponentu WWW WebKit do GTK+ 3
22 # NOTE: 2.34.x is stable, 2.35.x devel
27 Source0: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
28 # Source0-md5: 32334fddc48e3428044bbd9215d0636f
30 Patch1: %{name}-icu59.patch
31 Patch2: %{name}-gir.patch
32 Patch3: %{name}-npapi-remnants.patch
33 URL: https://webkitgtk.org/
34 BuildRequires: /usr/bin/ld.gold
35 BuildRequires: EGL-devel
36 BuildRequires: OpenGL-GLX-devel
37 BuildRequires: OpenGLESv2-devel
38 BuildRequires: at-spi2-core-devel >= 2.5.3
39 BuildRequires: atk-devel >= 1:2.16.0
40 BuildRequires: bubblewrap >= 0.3.1
41 BuildRequires: cairo-devel >= 1.16.0
42 BuildRequires: cmake >= 3.12
43 BuildRequires: docbook-dtd412-xml
44 BuildRequires: enchant2-devel >= 2
45 BuildRequires: fontconfig-devel >= 2.13.0
46 BuildRequires: freetype-devel >= 1:2.9.0
47 BuildRequires: gcc-c++ >= 6:7.3.0
48 BuildRequires: gettext-devel
49 BuildRequires: glib2-devel >= 1:2.67.1
50 BuildRequires: glibc-misc
51 %{?with_introspection:BuildRequires: gobject-introspection-devel >= 1.32.0}
52 BuildRequires: gperf >= 3.0.1
53 BuildRequires: gstreamer-devel >= 1.14
54 BuildRequires: gstreamer-gl-devel >= 1.10.0
55 # codecparsers,mpegts with -DUSE_GSTREAMER_MPEGTS=ON
56 #BuildRequires: gstreamer-plugins-bad-devel >= 1.10.0
57 # app,audio,fft,pbutils,tag,video
58 BuildRequires: gstreamer-plugins-base-devel >= 1.10.0
59 BuildRequires: gtk+3-devel >= 3.22.0
60 BuildRequires: gtk-doc >= 1.10
61 BuildRequires: harfbuzz-devel >= 1.4.2
62 BuildRequires: harfbuzz-icu-devel >= 1.4.2
63 BuildRequires: hyphen-devel
64 BuildRequires: libgcrypt-devel >= 1.7.0
65 BuildRequires: libicu-devel >= 61.2
66 BuildRequires: libjpeg-devel
67 BuildRequires: libmanette-devel >= 0.2.4
68 BuildRequires: libnotify-devel
69 BuildRequires: libpng-devel
70 BuildRequires: libsecret-devel
71 BuildRequires: libsoup-devel >= 2.54
72 BuildRequires: libstdc++-devel >= 6:7.3.0
73 BuildRequires: libtasn1-devel
74 BuildRequires: libwebp-devel
75 BuildRequires: libwpe-devel >= 1.3.0
76 BuildRequires: libxml2-devel >= 1:2.8.0
77 BuildRequires: libxslt-devel >= 1.1.7
78 BuildRequires: openjpeg2-devel >= 2.2.0
79 BuildRequires: pango-devel >= 1:1.32.0
80 BuildRequires: perl-base >= 1:5.10.0
81 BuildRequires: pkgconfig
83 BuildRequires: pkgconfig(cairo-egl) >= 1.10.2
84 BuildRequires: pkgconfig(cairo-gl) >= 1.10.2
85 BuildRequires: pkgconfig(cairo-glx) >= 1.10.2
87 BuildRequires: python >= 1:2.7.0
88 BuildRequires: rpm-build >= 4.6
89 BuildRequires: rpmbuild(macros) >= 1.699
90 BuildRequires: ruby >= 1:1.9
91 BuildRequires: ruby-modules >= 1:1.9
92 BuildRequires: sqlite3-devel >= 3
93 BuildRequires: systemd-devel
94 BuildRequires: tar >= 1:1.22
96 BuildRequires: wayland-devel
97 BuildRequires: wayland-egl-devel
98 BuildRequires: wayland-protocols >= 1.12
100 BuildRequires: wpebackend-fdo-devel >= 1.6.0
101 BuildRequires: woff2-devel >= 1.0.2
102 BuildRequires: xdg-dbus-proxy
103 BuildRequires: xorg-lib-libICE-devel
104 BuildRequires: xorg-lib-libXcomposite-devel
105 BuildRequires: xorg-lib-libXdamage-devel
106 BuildRequires: xorg-lib-libXext-devel
107 BuildRequires: xorg-lib-libXrender-devel
108 BuildRequires: xorg-lib-libXt-devel
110 BuildRequires: zlib-devel
111 Requires: at-spi2-core-libs >= 2.5.3
112 Requires: atk >= 1:2.16.0
113 Requires: cairo >= 1.16.0
114 Requires: fontconfig-libs >= 2.13.0
115 Requires: freetype >= 1:2.9.0
116 Requires: glib2 >= 1:2.67.1
117 Requires: gstreamer >= 1.2.3
118 Requires: gstreamer-plugins-base >= 1.2.3
119 Requires: gtk+3 >= 3.22.0
120 Requires: harfbuzz >= 1.4.2
121 Requires: libgcrypt >= 1.7.0
122 Requires: libsoup >= 2.54
123 Requires: libxml2 >= 1:2.8.0
124 Requires: libxslt >= 1.1.7
125 Requires: openjpeg2 >= 2.2.0
126 Requires: pango >= 1:1.32.0
127 Requires: woff2 >= 1.0.2
128 Requires: wpebackend-fdo >= 1.6.0
129 %{?with_introspection:Conflicts: gir-repository < 0.6.5-7}
130 # Source/JavaScriptCore/CMakeLists.txt /WTF_CPU_
131 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa mips ppc ppc64 ppc64le s390 s390x sh4
132 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
134 # __once_call, __once_called non-function symbols from libstdc++
135 %define skip_post_check_so lib.*gtk-4.0.*
138 gtk-webkit4 is a port of the WebKit embeddable web component to GTK+
141 %description -l pl.UTF-8
142 gtk-webkit4 to port osadzalnego komponentu WWW WebKit do GTK+ 3.
145 Summary: Development files for WebKit for GTK+ 3
146 Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK+ 3
147 Group: X11/Development/Libraries
148 Requires: %{name} = %{version}-%{release}
149 Requires: glib2-devel >= 1:2.67.1
150 Requires: gtk+3-devel >= 3.22.0
151 Requires: libsoup-devel >= 2.54
152 Requires: libstdc++-devel >= 6:7.3.0
155 Development files for WebKit for GTK+ 3.
157 %description devel -l pl.UTF-8
158 Pliki programistyczne komponentu WebKit dla GTK+ 3.
161 Summary: WebKit API documentation
162 Summary(pl.UTF-8): Dokumentacja API WebKita
164 Requires: gtk-doc-common
168 WebKit API documentation.
170 %description apidocs -l pl.UTF-8
171 Dokumentacja API WebKita.
174 %setup -q -n webkitgtk-%{version}
184 %{?with_cairogl:-DENABLE_ACCELERATED_2D_CANVAS=ON} \
185 -DENABLE_GEOLOCATION=ON \
187 %{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
189 %{!?with_wayland:-DENABLE_WAYLAND_TARGET=OFF} \
190 -DENABLE_WEB_AUDIO=ON \
195 -DENABLE_SAMPLING_PROFILER=OFF \
197 %ifarch %{ix86} %{x8664} x32
198 -DHAVE_SSE2_EXTENSIONS=ON \
201 -DSHOULD_INSTALL_JS_SHELL=ON \
207 rm -rf $RPM_BUILD_ROOT
209 %{__make} -C build install \
210 DESTDIR=$RPM_BUILD_ROOT
212 %if "%{_gtkdocdir}" != "%{_datadir}/gtk-doc/html"
213 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
214 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
217 %find_lang WebKit2GTK-4.0
220 rm -rf $RPM_BUILD_ROOT
222 %post -p /sbin/ldconfig
223 %postun -p /sbin/ldconfig
225 %files -f WebKit2GTK-4.0.lang
226 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_bindir}/WebKitWebDriver
229 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so.*.*.*
230 %attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-4.0.so.37
231 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so.*.*.*
232 %attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-4.0.so.18
233 %if %{with introspection}
234 %{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
235 %{_libdir}/girepository-1.0/WebKit2-4.0.typelib
236 %{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
238 %if "%{_libexecdir}" != "%{_libdir}"
239 %dir %{_libexecdir}/webkit2gtk-4.0
241 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitNetworkProcess
242 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitWebProcess
243 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/jsc
244 %dir %{_libdir}/webkit2gtk-4.0
245 %dir %{_libdir}/webkit2gtk-4.0/injected-bundle
246 %attr(755,root,root) %{_libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so
251 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so
252 %if %{with introspection}
253 %{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
254 %{_datadir}/gir-1.0/WebKit2-4.0.gir
255 %{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir
257 %{_includedir}/webkitgtk-4.0
258 %{_pkgconfigdir}/javascriptcoregtk-4.0.pc
259 %{_pkgconfigdir}/webkit2gtk-4.0.pc
260 %{_pkgconfigdir}/webkit2gtk-web-extension-4.0.pc
263 %defattr(644,root,root,755)
264 %{_gtkdocdir}/jsc-glib-4.0
265 %{_gtkdocdir}/webkit2gtk-4.0
266 %{_gtkdocdir}/webkitdomgtk-4.0