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: 08145bd6c1587230f135921c142bc150
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: at-spi2-core-devel >= 2.6.0
34 BuildRequires: atk-devel
35 BuildRequires: bison >= 2.3
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: flex >= 2.5.34
42 BuildRequires: fontconfig-devel >= 2.13.0
43 BuildRequires: freetype-devel >= 1:2.9.0
44 BuildRequires: gcc-c++ >= 6:7.3.0
45 BuildRequires: geoclue2-devel >= 2.1.5
46 BuildRequires: gettext-devel
47 BuildRequires: glib2-devel >= 1:2.44
48 BuildRequires: glibc-misc
49 %{?with_introspection:BuildRequires: gobject-introspection-devel >= 1.32.0}
50 BuildRequires: gperf >= 3.0.1
51 BuildRequires: gstreamer-devel >= 1.14
52 BuildRequires: gstreamer-gl-devel >= 1.8.3
53 # mpegts with -DUSE_GSTREAMER_MPEGTS=ON
54 #BuildRequires: gstreamer-plugins-bad-devel >= 1.8.3
55 # app,audio,fft,pbutils,tag,video
56 BuildRequires: gstreamer-plugins-base-devel >= 1.8.3
57 BuildRequires: gtk+3-devel >= 3.22.0
58 BuildRequires: gtk-doc >= 1.10
59 BuildRequires: harfbuzz-devel >= 1.4.2
60 BuildRequires: harfbuzz-icu-devel >= 1.4.2
61 BuildRequires: hyphen-devel
62 BuildRequires: libgcrypt-devel >= 1.7.0
63 BuildRequires: libicu-devel >= 59
64 BuildRequires: libjpeg-devel
65 BuildRequires: libnotify-devel
66 BuildRequires: libpng-devel
67 BuildRequires: libsecret-devel
68 BuildRequires: libsoup-devel >= 2.54
69 BuildRequires: libstdc++-devel >= 6:6.0.0
70 BuildRequires: libtasn1-devel
71 BuildRequires: libwebp-devel
72 BuildRequires: libwpe-devel >= 1.3.0
73 BuildRequires: libxml2-devel >= 1:2.8.0
74 BuildRequires: libxslt-devel >= 1.1.7
75 BuildRequires: openjpeg2-devel >= 2.2.0
76 BuildRequires: pango-devel >= 1:1.32.0
77 BuildRequires: perl-base >= 1:5.10.0
78 BuildRequires: pkgconfig
80 BuildRequires: pkgconfig(cairo-egl)
81 BuildRequires: pkgconfig(cairo-gl)
82 BuildRequires: pkgconfig(cairo-glx)
84 BuildRequires: python >= 1:2.7.0
85 BuildRequires: rpmbuild(macros) >= 1.699
86 BuildRequires: ruby >= 1:1.9
87 BuildRequires: ruby-modules >= 1:1.9
88 BuildRequires: sqlite3-devel >= 3
89 BuildRequires: tar >= 1:1.22
90 BuildRequires: wpebackend-fdo-devel >= 1.4.0
91 BuildRequires: woff2-devel >= 1.0.2
92 BuildRequires: xdg-dbus-proxy
93 BuildRequires: xorg-lib-libXcomposite-devel
94 BuildRequires: xorg-lib-libXdamage-devel
95 BuildRequires: xorg-lib-libXrender-devel
96 BuildRequires: xorg-lib-libXt-devel
98 BuildRequires: zlib-devel
99 Requires: cairo >= 1.16.0
100 Requires: fontconfig-libs >= 2.13.0
101 Requires: freetype >= 1:2.9.0
102 Requires: glib2 >= 1:2.40
103 Requires: gstreamer >= 1.2.3
104 Requires: gstreamer-plugins-base >= 1.2.3
105 Requires: gtk+3 >= 3.12.0
106 Requires: harfbuzz >= 1.4.2
107 Requires: libsoup >= 2.48
108 Requires: libxml2 >= 1:2.8.0
109 Requires: libxslt >= 1.1.7
110 Requires: openjpeg2 >= 2.2.0
111 Requires: pango >= 1:1.32.0
112 Requires: woff2 >= 1.0.2
113 %{?with_introspection:Conflicts: gir-repository < 0.6.5-7}
114 # Source/JavaScriptCore/CMakeLists.txt /WTF_CPU_
115 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa mips ppc ppc64 ppc64le s390 s390x sh4
116 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
118 # __once_call, __once_called non-function symbols from libstdc++
119 %define skip_post_check_so lib.*gtk-4.0.*
122 gtk-webkit4 is a port of the WebKit embeddable web component to GTK+
125 %description -l pl.UTF-8
126 gtk-webkit4 to port osadzalnego komponentu WWW WebKit do GTK+ 3.
129 Summary: Development files for WebKit for GTK+ 3
130 Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK+ 3
131 Group: X11/Development/Libraries
132 Requires: %{name} = %{version}-%{release}
133 Requires: glib2-devel >= 1:2.40
134 Requires: gtk+3-devel >= 3.12.0
135 Requires: libsoup-devel >= 2.48
136 Requires: libstdc++-devel >= 6:4.9
139 Development files for WebKit for GTK+ 3.
141 %description devel -l pl.UTF-8
142 Pliki programistyczne komponentu WebKit dla GTK+ 3.
145 Summary: WebKit API documentation
146 Summary(pl.UTF-8): Dokumentacja API WebKita
148 Requires: gtk-doc-common
149 %if "%{_rpmversion}" >= "5"
154 WebKit API documentation.
156 %description apidocs -l pl.UTF-8
157 Dokumentacja API WebKita.
160 %setup -q -n webkitgtk-%{version}
170 %{?with_cairogl:-DENABLE_ACCELERATED_2D_CANVAS=ON} \
171 -DENABLE_GEOLOCATION=ON \
173 %{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
174 %{!?with_wayland:-DENABLE_WAYLAND_TARGET=OFF} \
178 -DENABLE_SAMPLING_PROFILER=OFF \
181 -DENABLE_WEB_AUDIO=ON \
183 %ifarch %{ix86} %{x8664} x32
184 -DHAVE_SSE2_EXTENSIONS=ON \
187 -DSHOULD_INSTALL_JS_SHELL=ON
192 rm -rf $RPM_BUILD_ROOT
194 %{__make} -C build install \
195 DESTDIR=$RPM_BUILD_ROOT
197 %if "%{_gtkdocdir}" != "%{_datadir}/gtk-doc/html"
198 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
199 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
202 %find_lang WebKit2GTK-4.0
205 rm -rf $RPM_BUILD_ROOT
207 %post -p /sbin/ldconfig
208 %postun -p /sbin/ldconfig
210 %files -f WebKit2GTK-4.0.lang
211 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_bindir}/WebKitWebDriver
214 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so.*.*.*
215 %attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-4.0.so.37
216 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so.*.*.*
217 %attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-4.0.so.18
218 %if %{with introspection}
219 %{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
220 %{_libdir}/girepository-1.0/WebKit2-4.0.typelib
221 %{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
223 %if "%{_libexecdir}" != "%{_libdir}"
224 %dir %{_libexecdir}/webkit2gtk-4.0
226 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitNetworkProcess
227 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess
228 #%attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess2
229 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitWebProcess
230 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/jsc
231 %dir %{_libdir}/webkit2gtk-4.0
232 %dir %{_libdir}/webkit2gtk-4.0/injected-bundle
233 %attr(755,root,root) %{_libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so
238 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so
239 %if %{with introspection}
240 %{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
241 %{_datadir}/gir-1.0/WebKit2-4.0.gir
242 %{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir
244 %{_includedir}/webkitgtk-4.0
245 %{_pkgconfigdir}/javascriptcoregtk-4.0.pc
246 %{_pkgconfigdir}/webkit2gtk-4.0.pc
247 %{_pkgconfigdir}/webkit2gtk-web-extension-4.0.pc
250 %defattr(644,root,root,755)
251 %{_gtkdocdir}/jsc-glib-4.0
252 %{_gtkdocdir}/webkit2gtk-4.0
253 %{_gtkdocdir}/webkitdomgtk-4.0