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: gettext-tools
50 BuildRequires: glib2-devel >= 1:2.67.1
51 BuildRequires: glibc-misc
52 %{?with_introspection:BuildRequires: gobject-introspection-devel >= 1.32.0}
53 BuildRequires: gperf >= 3.0.1
54 BuildRequires: gstreamer-devel >= 1.14
55 BuildRequires: gstreamer-gl-devel >= 1.10.0
56 # codecparsers,mpegts with -DUSE_GSTREAMER_MPEGTS=ON
57 #BuildRequires: gstreamer-plugins-bad-devel >= 1.10.0
58 # app,audio,fft,pbutils,tag,video
59 BuildRequires: gstreamer-plugins-base-devel >= 1.10.0
60 BuildRequires: gtk+3-devel >= 3.22.0
61 BuildRequires: gtk-doc >= 1.10
62 BuildRequires: harfbuzz-devel >= 1.4.2
63 BuildRequires: harfbuzz-icu-devel >= 1.4.2
64 BuildRequires: hyphen-devel
65 BuildRequires: libgcrypt-devel >= 1.7.0
66 BuildRequires: libicu-devel >= 61.2
67 BuildRequires: libjpeg-devel
68 BuildRequires: libmanette-devel >= 0.2.4
69 BuildRequires: libnotify-devel
70 BuildRequires: libpng-devel
71 BuildRequires: libseccomp-devel
72 BuildRequires: libsecret-devel
73 BuildRequires: libsoup-devel >= 2.54
74 BuildRequires: libstdc++-devel >= 6:7.3.0
75 BuildRequires: libtasn1-devel
76 BuildRequires: libwebp-devel
77 BuildRequires: libwpe-devel >= 1.3.0
78 BuildRequires: libxml2-devel >= 1:2.8.0
79 BuildRequires: libxslt-devel >= 1.1.7
80 BuildRequires: openjpeg2-devel >= 2.2.0
81 BuildRequires: pango-devel >= 1:1.32.0
82 BuildRequires: perl-base >= 1:5.10.0
83 BuildRequires: pkgconfig
85 BuildRequires: pkgconfig(cairo-egl) >= 1.10.2
86 BuildRequires: pkgconfig(cairo-gl) >= 1.10.2
87 BuildRequires: pkgconfig(cairo-glx) >= 1.10.2
89 BuildRequires: python >= 1:2.7.0
90 BuildRequires: rpm-build >= 4.6
91 BuildRequires: rpmbuild(macros) >= 1.699
92 BuildRequires: ruby >= 1:1.9
93 BuildRequires: ruby-modules >= 1:1.9
94 BuildRequires: sqlite3-devel >= 3
95 BuildRequires: systemd-devel
96 BuildRequires: tar >= 1:1.22
98 BuildRequires: wayland-devel
99 BuildRequires: wayland-egl-devel
100 BuildRequires: wayland-protocols >= 1.12
102 BuildRequires: wpebackend-fdo-devel >= 1.6.0
103 BuildRequires: woff2-devel >= 1.0.2
104 BuildRequires: xdg-dbus-proxy
105 BuildRequires: xorg-lib-libICE-devel
106 BuildRequires: xorg-lib-libXcomposite-devel
107 BuildRequires: xorg-lib-libXdamage-devel
108 BuildRequires: xorg-lib-libXext-devel
109 BuildRequires: xorg-lib-libXrender-devel
110 BuildRequires: xorg-lib-libXt-devel
112 BuildRequires: zlib-devel
113 Requires: at-spi2-core-libs >= 2.5.3
114 Requires: atk >= 1:2.16.0
115 Requires: cairo >= 1.16.0
116 Requires: fontconfig-libs >= 2.13.0
117 Requires: freetype >= 1:2.9.0
118 Requires: glib2 >= 1:2.67.1
119 Requires: gstreamer >= 1.2.3
120 Requires: gstreamer-plugins-base >= 1.2.3
121 Requires: gtk+3 >= 3.22.0
122 Requires: harfbuzz >= 1.4.2
123 Requires: libgcrypt >= 1.7.0
124 Requires: libsoup >= 2.54
125 Requires: libxml2 >= 1:2.8.0
126 Requires: libxslt >= 1.1.7
127 Requires: openjpeg2 >= 2.2.0
128 Requires: pango >= 1:1.32.0
129 Requires: woff2 >= 1.0.2
130 Requires: wpebackend-fdo >= 1.6.0
131 %{?with_introspection:Conflicts: gir-repository < 0.6.5-7}
132 # Source/JavaScriptCore/CMakeLists.txt /WTF_CPU_
133 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa mips ppc ppc64 ppc64le s390 s390x sh4
134 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
136 # __once_call, __once_called non-function symbols from libstdc++
137 %define skip_post_check_so lib.*gtk-4.0.*
140 gtk-webkit4 is a port of the WebKit embeddable web component to GTK+
143 %description -l pl.UTF-8
144 gtk-webkit4 to port osadzalnego komponentu WWW WebKit do GTK+ 3.
147 Summary: Development files for WebKit for GTK+ 3
148 Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK+ 3
149 Group: X11/Development/Libraries
150 Requires: %{name} = %{version}-%{release}
151 Requires: glib2-devel >= 1:2.67.1
152 Requires: gtk+3-devel >= 3.22.0
153 Requires: libsoup-devel >= 2.54
154 Requires: libstdc++-devel >= 6:7.3.0
157 Development files for WebKit for GTK+ 3.
159 %description devel -l pl.UTF-8
160 Pliki programistyczne komponentu WebKit dla GTK+ 3.
163 Summary: WebKit API documentation
164 Summary(pl.UTF-8): Dokumentacja API WebKita
166 Requires: gtk-doc-common
170 WebKit API documentation.
172 %description apidocs -l pl.UTF-8
173 Dokumentacja API WebKita.
176 %setup -q -n webkitgtk-%{version}
186 %{?with_cairogl:-DENABLE_ACCELERATED_2D_CANVAS=ON} \
187 -DENABLE_GEOLOCATION=ON \
189 %{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
191 %{!?with_wayland:-DENABLE_WAYLAND_TARGET=OFF} \
192 -DENABLE_WEB_AUDIO=ON \
197 -DENABLE_SAMPLING_PROFILER=OFF \
199 %ifarch %{ix86} %{x8664} x32
200 -DHAVE_SSE2_EXTENSIONS=ON \
203 -DSHOULD_INSTALL_JS_SHELL=ON \
209 rm -rf $RPM_BUILD_ROOT
211 %{__make} -C build install \
212 DESTDIR=$RPM_BUILD_ROOT
214 %if "%{_gtkdocdir}" != "%{_datadir}/gtk-doc/html"
215 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
216 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
219 %find_lang WebKit2GTK-4.0
222 rm -rf $RPM_BUILD_ROOT
224 %post -p /sbin/ldconfig
225 %postun -p /sbin/ldconfig
227 %files -f WebKit2GTK-4.0.lang
228 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_bindir}/WebKitWebDriver
231 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so.*.*.*
232 %attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-4.0.so.37
233 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-4.0.so.18
235 %if %{with introspection}
236 %{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
237 %{_libdir}/girepository-1.0/WebKit2-4.0.typelib
238 %{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
240 %if "%{_libexecdir}" != "%{_libdir}"
241 %dir %{_libexecdir}/webkit2gtk-4.0
243 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitNetworkProcess
244 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitWebProcess
245 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/jsc
246 %dir %{_libdir}/webkit2gtk-4.0
247 %dir %{_libdir}/webkit2gtk-4.0/injected-bundle
248 %attr(755,root,root) %{_libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so
253 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so
254 %if %{with introspection}
255 %{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
256 %{_datadir}/gir-1.0/WebKit2-4.0.gir
257 %{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir
259 %{_includedir}/webkitgtk-4.0
260 %{_pkgconfigdir}/javascriptcoregtk-4.0.pc
261 %{_pkgconfigdir}/webkit2gtk-4.0.pc
262 %{_pkgconfigdir}/webkit2gtk-web-extension-4.0.pc
265 %defattr(644,root,root,755)
266 %{_gtkdocdir}/jsc-glib-4.0
267 %{_gtkdocdir}/webkit2gtk-4.0
268 %{_gtkdocdir}/webkitdomgtk-4.0