1 # TODO: review configure options:
2 # - FTL_JIT on !x86_64?
3 # - WEB_RTC+MEDIA_STREAM (BR: openwebrtc)
4 # - GAMEPAD? (BR: libmanette-devel >= 0.2.4)
7 %bcond_without introspection # GObject introspection
8 %bcond_with cairogl # accelerated 2D canvas using cairo-gl
9 %bcond_without wayland # Wayland target (requires GTK+ wayland target)
11 # it's not possible to build this with debuginfo on 32bit archs due to
12 # memory constraints during linking
14 %define _enable_debug_packages 0
16 Summary: Port of WebKit embeddable web component to GTK+ 3
17 Summary(pl.UTF-8): Port osadzalnego komponentu WWW WebKit do GTK+ 3
19 # NOTE: 2.30.x is stable, 2.31.x devel
24 Source0: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
25 # Source0-md5: c8291af0c5102fff1f73e67f0bff6c87
27 Patch1: %{name}-icu59.patch
28 Patch2: %{name}-gir.patch
29 Patch3: %{name}-wpe.patch
30 URL: https://webkitgtk.org/
31 BuildRequires: /usr/bin/ld.gold
32 BuildRequires: EGL-devel
33 BuildRequires: OpenGL-GLX-devel
34 BuildRequires: OpenGLESv2-devel
35 BuildRequires: at-spi2-core-devel >= 2.5.3
36 BuildRequires: atk-devel >= 1:2.16.0
37 BuildRequires: bubblewrap >= 0.3.1
38 BuildRequires: cairo-devel >= 1.16.0
39 BuildRequires: cmake >= 3.10
40 BuildRequires: docbook-dtd412-xml
41 BuildRequires: enchant2-devel >= 2
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: gettext-devel
46 BuildRequires: glib2-devel >= 1:2.44
47 BuildRequires: glibc-misc
48 %{?with_introspection:BuildRequires: gobject-introspection-devel >= 1.32.0}
49 BuildRequires: gperf >= 3.0.1
50 BuildRequires: gstreamer-devel >= 1.14
51 BuildRequires: gstreamer-gl-devel >= 1.10.0
52 # codecparsers,mpegts with -DUSE_GSTREAMER_MPEGTS=ON
53 #BuildRequires: gstreamer-plugins-bad-devel >= 1.10.0
54 # app,audio,fft,pbutils,tag,video
55 BuildRequires: gstreamer-plugins-base-devel >= 1.10.0
56 BuildRequires: gtk+3-devel >= 3.22.0
57 BuildRequires: gtk-doc >= 1.10
58 BuildRequires: harfbuzz-devel >= 1.4.2
59 BuildRequires: harfbuzz-icu-devel >= 1.4.2
60 BuildRequires: hyphen-devel
61 BuildRequires: libgcrypt-devel >= 1.7.0
62 BuildRequires: libicu-devel >= 60.2
63 BuildRequires: libjpeg-devel
64 BuildRequires: libnotify-devel
65 BuildRequires: libpng-devel
66 BuildRequires: libsecret-devel
67 BuildRequires: libsoup-devel >= 2.54
68 BuildRequires: libstdc++-devel >= 6:7.3.0
69 BuildRequires: libtasn1-devel
70 BuildRequires: libwebp-devel
71 BuildRequires: libwpe-devel >= 1.3.0
72 BuildRequires: libxml2-devel >= 1:2.8.0
73 BuildRequires: libxslt-devel >= 1.1.7
74 BuildRequires: openjpeg2-devel >= 2.2.0
75 BuildRequires: pango-devel >= 1:1.32.0
76 BuildRequires: perl-base >= 1:5.10.0
77 BuildRequires: pkgconfig
79 BuildRequires: pkgconfig(cairo-egl) >= 1.10.2
80 BuildRequires: pkgconfig(cairo-gl) >= 1.10.2
81 BuildRequires: pkgconfig(cairo-glx) >= 1.10.2
83 BuildRequires: python >= 1:2.7.0
84 BuildRequires: rpm-build >= 4.6
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
91 BuildRequires: wayland-devel
92 BuildRequires: wayland-egl-devel
93 BuildRequires: wayland-protocols >= 1.12
95 BuildRequires: wpebackend-fdo-devel >= 1.4.0
96 BuildRequires: woff2-devel >= 1.0.2
97 BuildRequires: xdg-dbus-proxy
98 BuildRequires: xorg-lib-libICE-devel
99 BuildRequires: xorg-lib-libXcomposite-devel
100 BuildRequires: xorg-lib-libXdamage-devel
101 BuildRequires: xorg-lib-libXext-devel
102 BuildRequires: xorg-lib-libXrender-devel
103 BuildRequires: xorg-lib-libXt-devel
105 BuildRequires: zlib-devel
106 Requires: at-spi2-core-libs >= 2.5.3
107 Requires: atk >= 1:2.16.0
108 Requires: cairo >= 1.16.0
109 Requires: fontconfig-libs >= 2.13.0
110 Requires: freetype >= 1:2.9.0
111 Requires: glib2 >= 1:2.44
112 Requires: gstreamer >= 1.2.3
113 Requires: gstreamer-plugins-base >= 1.2.3
114 Requires: gtk+3 >= 3.22.0
115 Requires: harfbuzz >= 1.4.2
116 Requires: libgcrypt >= 1.7.0
117 Requires: libsoup >= 2.54
118 Requires: libxml2 >= 1:2.8.0
119 Requires: libxslt >= 1.1.7
120 Requires: openjpeg2 >= 2.2.0
121 Requires: pango >= 1:1.32.0
122 Requires: woff2 >= 1.0.2
123 %{?with_introspection:Conflicts: gir-repository < 0.6.5-7}
124 # Source/JavaScriptCore/CMakeLists.txt /WTF_CPU_
125 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa mips ppc ppc64 ppc64le s390 s390x sh4
126 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
128 # __once_call, __once_called non-function symbols from libstdc++
129 %define skip_post_check_so lib.*gtk-4.0.*
132 gtk-webkit4 is a port of the WebKit embeddable web component to GTK+
135 %description -l pl.UTF-8
136 gtk-webkit4 to port osadzalnego komponentu WWW WebKit do GTK+ 3.
139 Summary: Development files for WebKit for GTK+ 3
140 Summary(pl.UTF-8): Pliki programistyczne komponentu WebKit dla GTK+ 3
141 Group: X11/Development/Libraries
142 Requires: %{name} = %{version}-%{release}
143 Requires: glib2-devel >= 1:2.44
144 Requires: gtk+3-devel >= 3.22.0
145 Requires: libsoup-devel >= 2.54
146 Requires: libstdc++-devel >= 6:7.3.0
149 Development files for WebKit for GTK+ 3.
151 %description devel -l pl.UTF-8
152 Pliki programistyczne komponentu WebKit dla GTK+ 3.
155 Summary: WebKit API documentation
156 Summary(pl.UTF-8): Dokumentacja API WebKita
158 Requires: gtk-doc-common
162 WebKit API documentation.
164 %description apidocs -l pl.UTF-8
165 Dokumentacja API WebKita.
168 %setup -q -n webkitgtk-%{version}
178 %{?with_cairogl:-DENABLE_ACCELERATED_2D_CANVAS=ON} \
179 -DENABLE_GEOLOCATION=ON \
181 %{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
182 -DENABLE_NETSCAPE_PLUGIN_API=ON \
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
201 rm -rf $RPM_BUILD_ROOT
203 %{__make} -C build install \
204 DESTDIR=$RPM_BUILD_ROOT
206 %if "%{_gtkdocdir}" != "%{_datadir}/gtk-doc/html"
207 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
208 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
211 %find_lang WebKit2GTK-4.0
214 rm -rf $RPM_BUILD_ROOT
216 %post -p /sbin/ldconfig
217 %postun -p /sbin/ldconfig
219 %files -f WebKit2GTK-4.0.lang
220 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_bindir}/WebKitWebDriver
223 %attr(755,root,root) %{_libdir}/libwebkit2gtk-4.0.so.*.*.*
224 %attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-4.0.so.37
225 %attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.0.so.*.*.*
226 %attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-4.0.so.18
227 %if %{with introspection}
228 %{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib
229 %{_libdir}/girepository-1.0/WebKit2-4.0.typelib
230 %{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib
232 %if "%{_libexecdir}" != "%{_libdir}"
233 %dir %{_libexecdir}/webkit2gtk-4.0
235 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitNetworkProcess
236 %attr(755,root,root) %{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess
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