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 # - JPEGXL? (BR: libjxl-devel)
6 # - THUNDER? (BR: Thunder + ThunderClientLibraries)
7 # - 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)
8 # - gtk4 variant as gtk-webkit5 (-DUSE_GTK4=ON), (needs libsoup3, BR: gtk4-devel >= 3.98.5; changes abi and doc tags to -5.0)
11 %bcond_without introspection # GObject introspection
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: 1e3fe866ab6e41e7ec3deb80bd5b3a85
30 Patch1: %{name}-icu59.patch
31 Patch2: %{name}-gir.patch
32 URL: https://webkitgtk.org/
33 BuildRequires: /usr/bin/ld.gold
34 BuildRequires: EGL-devel
35 BuildRequires: OpenGL-GLX-devel
36 BuildRequires: OpenGLESv2-devel
37 BuildRequires: at-spi2-core-devel >= 2.5.3
38 BuildRequires: atk-devel >= 1:2.16.0
39 BuildRequires: bubblewrap >= 0.3.1
40 BuildRequires: cairo-devel >= 1.16.0
41 BuildRequires: cmake >= 3.12
42 BuildRequires: docbook-dtd412-xml
43 BuildRequires: enchant2-devel >= 2
44 BuildRequires: fontconfig-devel >= 2.13.0
45 BuildRequires: freetype-devel >= 1:2.9.0
46 BuildRequires: gcc-c++ >= 6:7.3.0
47 BuildRequires: gettext-devel
48 BuildRequires: gettext-tools
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: libseccomp-devel
71 BuildRequires: libsecret-devel
72 BuildRequires: libsoup-devel >= 2.54
74 BuildRequires: libstdc++-devel >= 6:8
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
84 BuildRequires: python >= 1:2.7.0
85 BuildRequires: rpm-build >= 4.6
86 BuildRequires: rpmbuild(macros) >= 1.699
87 BuildRequires: ruby >= 1:1.9
88 BuildRequires: ruby-modules >= 1:1.9
89 BuildRequires: sqlite3-devel >= 3
90 BuildRequires: systemd-devel
91 BuildRequires: tar >= 1:1.22
93 BuildRequires: wayland-devel
94 BuildRequires: wayland-egl-devel
95 BuildRequires: wayland-protocols >= 1.12
97 BuildRequires: wpebackend-fdo-devel >= 1.6.0
98 BuildRequires: woff2-devel >= 1.0.2
99 BuildRequires: xdg-dbus-proxy
100 BuildRequires: xorg-lib-libICE-devel
101 BuildRequires: xorg-lib-libXcomposite-devel
102 BuildRequires: xorg-lib-libXdamage-devel
103 BuildRequires: xorg-lib-libXext-devel
104 BuildRequires: xorg-lib-libXrender-devel
105 BuildRequires: xorg-lib-libXt-devel
107 BuildRequires: zlib-devel
108 Requires: at-spi2-core-libs >= 2.5.3
109 Requires: atk >= 1:2.16.0
110 Requires: cairo >= 1.16.0
111 Requires: fontconfig-libs >= 2.13.0
112 Requires: freetype >= 1:2.9.0
113 Requires: glib2 >= 1:2.67.1
114 Requires: gstreamer >= 1.2.3
115 Requires: gstreamer-plugins-base >= 1.2.3
116 Requires: gtk+3 >= 3.22.0
117 Requires: harfbuzz >= 1.4.2
118 Requires: libgcrypt >= 1.7.0
119 Requires: libsoup >= 2.54
120 Requires: libxml2 >= 1:2.8.0
121 Requires: libxslt >= 1.1.7
122 Requires: openjpeg2 >= 2.2.0
123 Requires: pango >= 1:1.32.0
124 Requires: woff2 >= 1.0.2
125 Requires: wpebackend-fdo >= 1.6.0
126 %{?with_introspection:Conflicts: gir-repository < 0.6.5-7}
127 # Source/JavaScriptCore/CMakeLists.txt /WTF_CPU_
128 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa mips ppc ppc64 ppc64le s390 s390x sh4
129 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
131 # __once_call, __once_called non-function symbols from libstdc++
132 %define skip_post_check_so lib.*gtk-4.0.*
135 gtk-webkit4 is a port of the WebKit embeddable web component to GTK+
138 %description -l pl.UTF-8
139 gtk-webkit4 to port osadzalnego komponentu WWW WebKit do GTK+ 3.
142 Summary: Development files for WebKit for GTK+ 3
143 Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK+ 3
144 Group: X11/Development/Libraries
145 Requires: %{name} = %{version}-%{release}
146 Requires: glib2-devel >= 1:2.67.1
147 Requires: gtk+3-devel >= 3.22.0
148 Requires: libsoup-devel >= 2.54
149 Requires: libstdc++-devel >= 6:8
152 Development files for WebKit for GTK+ 3.
154 %description devel -l pl.UTF-8
155 Pliki programistyczne komponentu WebKit dla GTK+ 3.
158 Summary: WebKit API documentation
159 Summary(pl.UTF-8): Dokumentacja API WebKita
161 Requires: gtk-doc-common
165 WebKit API documentation.
167 %description apidocs -l pl.UTF-8
168 Dokumentacja API WebKita.
171 %setup -q -n webkitgtk-%{version}
180 -DENABLE_GEOLOCATION=ON \
182 %{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
184 %{!?with_wayland:-DENABLE_WAYLAND_TARGET=OFF} \
185 -DENABLE_WEB_AUDIO=ON \
190 -DENABLE_SAMPLING_PROFILER=OFF \
192 %ifarch %{ix86} %{x8664} x32
193 -DHAVE_SSE2_EXTENSIONS=ON \
196 -DSHOULD_INSTALL_JS_SHELL=ON \
202 rm -rf $RPM_BUILD_ROOT
204 %{__make} -C build install \
205 DESTDIR=$RPM_BUILD_ROOT
207 %if "%{_gtkdocdir}" != "%{_datadir}/gtk-doc/html"
208 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
209 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
212 %find_lang WebKit2GTK-4.0
215 rm -rf $RPM_BUILD_ROOT
217 %post -p /sbin/ldconfig
218 %postun -p /sbin/ldconfig
220 %files -f WebKit2GTK-4.0.lang
221 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_bindir}/WebKitWebDriver
224 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so.*.*.*
225 %attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-4.0.so.37
226 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so.*.*.*
227 %attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-4.0.so.18
228 %if %{with introspection}
229 %{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
230 %{_libdir}/girepository-1.0/WebKit2-4.0.typelib
231 %{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
233 %if "%{_libexecdir}" != "%{_libdir}"
234 %dir %{_libexecdir}/webkit2gtk-4.0
236 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitNetworkProcess
237 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitWebProcess
238 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/jsc
239 %dir %{_libdir}/webkit2gtk-4.0
240 %dir %{_libdir}/webkit2gtk-4.0/injected-bundle
241 %attr(755,root,root) %{_libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so
246 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so
247 %if %{with introspection}
248 %{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
249 %{_datadir}/gir-1.0/WebKit2-4.0.gir
250 %{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir
252 %{_includedir}/webkitgtk-4.0
253 %{_pkgconfigdir}/javascriptcoregtk-4.0.pc
254 %{_pkgconfigdir}/webkit2gtk-4.0.pc
255 %{_pkgconfigdir}/webkit2gtk-web-extension-4.0.pc
258 %defattr(644,root,root,755)
259 %{_gtkdocdir}/jsc-glib-4.0
260 %{_gtkdocdir}/webkit2gtk-4.0
261 %{_gtkdocdir}/webkitdomgtk-4.0