1 # TODO: review configure options:
2 # - FTL_JIT on !x86_64?
3 # - WEB_RTC+MEDIA_STREAM (BR: openwebrtc)
6 %bcond_without introspection # disable introspection
7 %bcond_with cairogl # accelerated 2D canvas using cairo-gl
8 %bcond_without wayland # Wayland target (requires GTK+ wayland target)
10 # it's not possible to build this with debuginfo on 32bit archs due to
11 # memory constraints during linking
13 %define _enable_debug_packages 0
15 Summary: Port of WebKit embeddable web component to GTK+ 3
16 Summary(pl.UTF-8): Port osadzalnego komponentu WWW WebKit do GTK+ 3
18 # NOTE: 2.26.x is stable, 2.27.x devel (see DEVEL-2.27 branch)
23 Source0: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
24 # Source0-md5: 65e06fe73ee166447894aaea95038e3b
26 Patch1: %{name}-icu59.patch
27 Patch2: %{name}-gir.patch
28 Patch3: %{name}-icu65.patch
29 URL: https://webkitgtk.org/
30 BuildRequires: /usr/bin/ld.gold
31 BuildRequires: EGL-devel
32 BuildRequires: OpenGL-GLX-devel
33 BuildRequires: OpenGLESv2-devel
34 BuildRequires: at-spi2-core-devel >= 2.5.3
35 BuildRequires: atk-devel >= 1:2.16.0
36 BuildRequires: bubblewrap >= 0.3.1
37 BuildRequires: cairo-devel >= 1.16.0
38 BuildRequires: cmake >= 3.10
39 BuildRequires: docbook-dtd412-xml
40 BuildRequires: enchant2-devel >= 2
41 BuildRequires: fontconfig-devel >= 2.13.0
42 BuildRequires: freetype-devel >= 1:2.9.0
43 BuildRequires: gcc-c++ >= 6:7.3.0
44 BuildRequires: gettext-devel
45 BuildRequires: glib2-devel >= 1:2.44
46 BuildRequires: glibc-misc
47 %{?with_introspection:BuildRequires: gobject-introspection-devel >= 1.32.0}
48 BuildRequires: gperf >= 3.0.1
49 BuildRequires: gstreamer-devel >= 1.14
50 BuildRequires: gstreamer-gl-devel >= 1.10.0
51 # codecparsers,mpegts with -DUSE_GSTREAMER_MPEGTS=ON
52 #BuildRequires: gstreamer-plugins-bad-devel >= 1.10.0
53 # app,audio,fft,pbutils,tag,video
54 BuildRequires: gstreamer-plugins-base-devel >= 1.10.0
55 BuildRequires: gtk+3-devel >= 3.22.0
56 BuildRequires: gtk-doc >= 1.10
57 BuildRequires: harfbuzz-devel >= 1.4.2
58 BuildRequires: harfbuzz-icu-devel >= 1.4.2
59 BuildRequires: hyphen-devel
60 BuildRequires: libgcrypt-devel >= 1.7.0
61 BuildRequires: libicu-devel >= 59
62 BuildRequires: libjpeg-devel
63 BuildRequires: libnotify-devel
64 BuildRequires: libpng-devel
65 BuildRequires: libsecret-devel
66 BuildRequires: libsoup-devel >= 2.54
67 BuildRequires: libstdc++-devel >= 6:7.3.0
68 BuildRequires: libtasn1-devel
69 BuildRequires: libwebp-devel
70 BuildRequires: libwpe-devel >= 1.3.0
71 BuildRequires: libxml2-devel >= 1:2.8.0
72 BuildRequires: libxslt-devel >= 1.1.7
73 BuildRequires: openjpeg2-devel >= 2.2.0
74 BuildRequires: pango-devel >= 1:1.32.0
75 BuildRequires: perl-base >= 1:5.10.0
76 BuildRequires: pkgconfig
78 BuildRequires: pkgconfig(cairo-egl)
79 BuildRequires: pkgconfig(cairo-gl)
80 BuildRequires: pkgconfig(cairo-glx)
82 BuildRequires: python >= 1:2.7.0
83 BuildRequires: rpmbuild(macros) >= 1.699
84 BuildRequires: ruby >= 1:1.9
85 BuildRequires: ruby-modules >= 1:1.9
86 BuildRequires: sqlite3-devel >= 3
87 BuildRequires: tar >= 1:1.22
89 BuildRequires: wayland-devel
90 BuildRequires: wayland-egl-devel
92 BuildRequires: wpebackend-fdo-devel >= 1.4.0
93 BuildRequires: woff2-devel >= 1.0.2
94 BuildRequires: xdg-dbus-proxy
95 BuildRequires: xorg-lib-libICE-devel
96 BuildRequires: xorg-lib-libXcomposite-devel
97 BuildRequires: xorg-lib-libXdamage-devel
98 BuildRequires: xorg-lib-libXext-devel
99 BuildRequires: xorg-lib-libXrender-devel
100 BuildRequires: xorg-lib-libXt-devel
102 BuildRequires: zlib-devel
103 Requires: at-spi2-core-libs >= 2.5.3
104 Requires: atk >= 1:2.16.0
105 Requires: cairo >= 1.16.0
106 Requires: fontconfig-libs >= 2.13.0
107 Requires: freetype >= 1:2.9.0
108 Requires: glib2 >= 1:2.44
109 Requires: gstreamer >= 1.2.3
110 Requires: gstreamer-plugins-base >= 1.2.3
111 Requires: gtk+3 >= 3.22.0
112 Requires: harfbuzz >= 1.4.2
113 Requires: libgcrypt >= 1.7.0
114 Requires: libsoup >= 2.54
115 Requires: libxml2 >= 1:2.8.0
116 Requires: libxslt >= 1.1.7
117 Requires: openjpeg2 >= 2.2.0
118 Requires: pango >= 1:1.32.0
119 Requires: woff2 >= 1.0.2
120 %{?with_introspection:Conflicts: gir-repository < 0.6.5-7}
121 # Source/JavaScriptCore/CMakeLists.txt /WTF_CPU_
122 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa mips ppc ppc64 ppc64le s390 s390x sh4
123 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
125 # __once_call, __once_called non-function symbols from libstdc++
126 %define skip_post_check_so lib.*gtk-4.0.*
129 gtk-webkit4 is a port of the WebKit embeddable web component to GTK+
132 %description -l pl.UTF-8
133 gtk-webkit4 to port osadzalnego komponentu WWW WebKit do GTK+ 3.
136 Summary: Development files for WebKit for GTK+ 3
137 Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK+ 3
138 Group: X11/Development/Libraries
139 Requires: %{name} = %{version}-%{release}
140 Requires: glib2-devel >= 1:2.44
141 Requires: gtk+3-devel >= 3.22.0
142 Requires: libsoup-devel >= 2.54
143 Requires: libstdc++-devel >= 6:7.3.0
146 Development files for WebKit for GTK+ 3.
148 %description devel -l pl.UTF-8
149 Pliki programistyczne komponentu WebKit dla GTK+ 3.
152 Summary: WebKit API documentation
153 Summary(pl.UTF-8): Dokumentacja API WebKita
155 Requires: gtk-doc-common
156 %if "%{_rpmversion}" >= "5"
161 WebKit API documentation.
163 %description apidocs -l pl.UTF-8
164 Dokumentacja API WebKita.
167 %setup -q -n webkitgtk-%{version}
177 %{?with_cairogl:-DENABLE_ACCELERATED_2D_CANVAS=ON} \
178 -DENABLE_GEOLOCATION=ON \
180 %{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
181 %{!?with_wayland:-DENABLE_WAYLAND_TARGET=OFF} \
185 -DENABLE_SAMPLING_PROFILER=OFF \
188 -DENABLE_WEB_AUDIO=ON \
190 %ifarch %{ix86} %{x8664} x32
191 -DHAVE_SSE2_EXTENSIONS=ON \
194 -DSHOULD_INSTALL_JS_SHELL=ON
199 rm -rf $RPM_BUILD_ROOT
201 %{__make} -C build install \
202 DESTDIR=$RPM_BUILD_ROOT
204 %if "%{_gtkdocdir}" != "%{_datadir}/gtk-doc/html"
205 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
206 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
209 %find_lang WebKit2GTK-4.0
212 rm -rf $RPM_BUILD_ROOT
214 %post -p /sbin/ldconfig
215 %postun -p /sbin/ldconfig
217 %files -f WebKit2GTK-4.0.lang
218 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_bindir}/WebKitWebDriver
221 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so.*.*.*
222 %attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-4.0.so.37
223 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so.*.*.*
224 %attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-4.0.so.18
225 %if %{with introspection}
226 %{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
227 %{_libdir}/girepository-1.0/WebKit2-4.0.typelib
228 %{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
230 %if "%{_libexecdir}" != "%{_libdir}"
231 %dir %{_libexecdir}/webkit2gtk-4.0
233 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitNetworkProcess
234 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess
235 #%attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess2
236 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitWebProcess
237 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/jsc
238 %dir %{_libdir}/webkit2gtk-4.0
239 %dir %{_libdir}/webkit2gtk-4.0/injected-bundle
240 %attr(755,root,root) %{_libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so
245 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so
246 %if %{with introspection}
247 %{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
248 %{_datadir}/gir-1.0/WebKit2-4.0.gir
249 %{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir
251 %{_includedir}/webkitgtk-4.0
252 %{_pkgconfigdir}/javascriptcoregtk-4.0.pc
253 %{_pkgconfigdir}/webkit2gtk-4.0.pc
254 %{_pkgconfigdir}/webkit2gtk-web-extension-4.0.pc
257 %defattr(644,root,root,755)
258 %{_gtkdocdir}/jsc-glib-4.0
259 %{_gtkdocdir}/webkit2gtk-4.0
260 %{_gtkdocdir}/webkitdomgtk-4.0