[packages/gtk-webkit4] - updated to 2.36.1; build also soup3 (as gtk-webkit4.1) and gtk4 (as gtk-webkit5) variants - remove

qboosh qboosh at pld-linux.org
Mon Apr 25 06:27:45 CEST 2022


commit ff2d8655f2849df637f45d2f89d22f9ea60eb149
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 25 06:28:01 2022 +0200

    - updated to 2.36.1; build also soup3 (as gtk-webkit4.1) and gtk4 (as gtk-webkit5) variants
    - removed outdated (and now breaking gtk4 variant) gir patch

 gtk-webkit4-gir.patch |  14 ---
 gtk-webkit4.spec      | 248 ++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 231 insertions(+), 31 deletions(-)
---
diff --git a/gtk-webkit4.spec b/gtk-webkit4.spec
index da494ac..2d4e63f 100644
--- a/gtk-webkit4.spec
+++ b/gtk-webkit4.spec
@@ -4,11 +4,13 @@
 # - AVIF? (BR: libavif-devel >= 0.9.0)
 # - JPEGXL? (BR: libjxl-devel)
 # - THUNDER? (BR: Thunder + ThunderClientLibraries)
-# - 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)
-# - gtk4 variant as gtk-webkit5 (-DUSE_GTK4=ON), (needs libsoup3, BR: gtk4-devel >= 3.98.5; changes abi and doc tags to -5.0)
 #
 # Conditional build:
 %bcond_without	introspection	# GObject introspection
+%bcond_without	libsoup2	# webkit-4.0 (libsoup2 based) variant
+%bcond_without	libsoup3	# webkit-4.1 (libsoup3 based) variant (HTTP/2 support)
+%bcond_without	gtk3		# webkit-4.x (gtk3 based) variants
+%bcond_without	gtk4		# webkit-5.0 (gtk4/libsoup3 based) variant
 %bcond_without	wayland		# Wayland target (requires GTK+ wayland target)
 #
 # it's not possible to build this with debuginfo on 32bit archs due to
@@ -20,15 +22,14 @@ Summary:	Port of WebKit embeddable web component to GTK+ 3
 Summary(pl.UTF-8):	Port osadzalnego komponentu WWW WebKit do GTK+ 3
 Name:		gtk-webkit4
 # NOTE: 2.34.x is stable, 2.35.x devel
-Version:	2.36.0
+Version:	2.36.1
 Release:	1
 License:	BSD-like
 Group:		X11/Libraries
 Source0:	https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
-# Source0-md5:	1e3fe866ab6e41e7ec3deb80bd5b3a85
+# Source0-md5:	e6100df7f82d95a4e65176b10f5ab011
 Patch0:		x32.patch
 Patch1:		%{name}-icu59.patch
-Patch2:		%{name}-gir.patch
 URL:		https://webkitgtk.org/
 BuildRequires:	/usr/bin/ld.gold
 BuildRequires:	EGL-devel
@@ -56,7 +57,8 @@ BuildRequires:	gstreamer-gl-devel >= 1.10.0
 #BuildRequires:	gstreamer-plugins-bad-devel >= 1.10.0
 # app,audio,fft,pbutils,tag,video
 BuildRequires:	gstreamer-plugins-base-devel >= 1.10.0
-BuildRequires:	gtk+3-devel >= 3.22.0
+%{?with_gtk3:BuildRequires:	gtk+3-devel >= 3.22.0}
+%{?with_gtk4:BuildRequires:	gtk4-devel >= 4.0}
 BuildRequires:	gtk-doc >= 1.10
 BuildRequires:	harfbuzz-devel >= 1.4.2
 BuildRequires:	harfbuzz-icu-devel >= 1.4.2
@@ -69,7 +71,8 @@ BuildRequires:	libnotify-devel
 BuildRequires:	libpng-devel
 BuildRequires:	libseccomp-devel
 BuildRequires:	libsecret-devel
-BuildRequires:	libsoup-devel >= 2.54
+%{?with_libsoup2:BuildRequires:	libsoup-devel >= 2.54}
+%{?with_libsoup3:BuildRequires:	libsoup3-devel >= 3.0}
 # -std=c++2a
 BuildRequires:	libstdc++-devel >= 6:8
 BuildRequires:	libtasn1-devel
@@ -155,30 +158,139 @@ Development files for WebKit for GTK+ 3.
 Pliki programistyczne komponentu WebKit dla GTK+ 3.
 
 %package apidocs
-Summary:	WebKit API documentation
-Summary(pl.UTF-8):	Dokumentacja API WebKita
+Summary:	API documentation for WebKit GTK+ 3 port
+Summary(pl.UTF-8):	Dokumentacja API portu WebKitu do GTK+ 3
 Group:		Documentation
 Requires:	gtk-doc-common
 BuildArch:	noarch
 
 %description apidocs
-WebKit API documentation.
+API documentation for WebKit GTK+ 3 port.
 
 %description apidocs -l pl.UTF-8
-Dokumentacja API WebKita.
+Dokumentacja API portu WebKitu do GTK+ 3.
+
+%package -n gtk-webkit4.1
+Summary:	Port of WebKit embeddable web component to GTK+ 3 with HTTP/2 support
+Summary(pl.UTF-8):	Port osadzalnego komponentu WWW WebKit do GTK+ 3 z obsługą HTTP/2
+Group:		X11/Libraries
+Requires:	at-spi2-core-libs >= 2.5.3
+Requires:	atk >= 1:2.16.0
+Requires:	cairo >= 1.16.0
+Requires:	fontconfig-libs >= 2.13.0
+Requires:	freetype >= 1:2.9.0
+Requires:	glib2 >= 1:2.67.1
+Requires:	gstreamer >= 1.2.3
+Requires:	gstreamer-plugins-base >= 1.2.3
+Requires:	gtk+3 >= 3.22.0
+Requires:	harfbuzz >= 1.4.2
+Requires:	libgcrypt >= 1.7.0
+Requires:	libsoup3 >= 3.0
+Requires:	libxml2 >= 1:2.8.0
+Requires:	libxslt >= 1.1.7
+Requires:	openjpeg2 >= 2.2.0
+Requires:	pango >= 1:1.32.0
+Requires:	woff2 >= 1.0.2
+Requires:	wpebackend-fdo >= 1.6.0
+
+%description -n gtk-webkit4.1
+gtk-webkit4.1 is a port of the WebKit embeddable web component to GTK+
+3 with HTTP/2 (libsoup 3) support.
+
+%description -n gtk-webkit4.1 -l pl.UTF-8
+gtk-webkit4.1 to port osadzalnego komponentu WWW WebKit do GTK+ 3 z
+obsługą HTTP/2 (libsoup 3).
+
+%package -n gtk-webkit4.1-devel
+Summary:	Development files for WebKit for GTK+ 3 with HTTP/2 support
+Summary(pl.UTF-8):	Pliki programistyczne komponentu WebKit dla GTK+ 3 z obsługą HTTP/2
+Group:		X11/Development/Libraries
+Requires:	gtk-webkit4.1 = %{version}-%{release}
+Requires:	glib2-devel >= 1:2.67.1
+Requires:	gtk+3-devel >= 3.22.0
+Requires:	libsoup3-devel >= 3.0
+Requires:	libstdc++-devel >= 6:8
+
+%description -n gtk-webkit4.1-devel
+Development files for WebKit for GTK+ 3 with HTTP/2 support.
+
+%description -n gtk-webkit4.1-devel -l pl.UTF-8
+Pliki programistyczne komponentu WebKit dla GTK+ 3 z obsługą HTTP/2.
+
+%package -n gtk-webkit5
+Summary:	Port of WebKit embeddable web component to GTK 4
+Summary(pl.UTF-8):	Port osadzalnego komponentu WWW WebKit do GTK 4
+Group:		X11/Libraries
+Requires:	at-spi2-core-libs >= 2.5.3
+Requires:	atk >= 1:2.16.0
+Requires:	cairo >= 1.16.0
+Requires:	fontconfig-libs >= 2.13.0
+Requires:	freetype >= 1:2.9.0
+Requires:	glib2 >= 1:2.67.1
+Requires:	gstreamer >= 1.2.3
+Requires:	gstreamer-plugins-base >= 1.2.3
+Requires:	gtk4 >= 4.0
+Requires:	harfbuzz >= 1.4.2
+Requires:	libgcrypt >= 1.7.0
+Requires:	libsoup3 >= 3.0
+Requires:	libxml2 >= 1:2.8.0
+Requires:	libxslt >= 1.1.7
+Requires:	openjpeg2 >= 2.2.0
+Requires:	pango >= 1:1.32.0
+Requires:	woff2 >= 1.0.2
+Requires:	wpebackend-fdo >= 1.6.0
+
+%description -n gtk-webkit5
+gtk-webkit5 is a port of the WebKit embeddable web component to GTK 4.
+
+%description -n gtk-webkit5 -l pl.UTF-8
+gtk-webkit5 to port osadzalnego komponentu WWW WebKit do GTK+ 4.
+
+%package -n gtk-webkit5-devel
+Summary:	Development files for WebKit for GTK 4
+Summary(pl.UTF-8):	Pliki programistyczne komponentu WebKit dla GTK 4
+Group:		X11/Development/Libraries
+Requires:	gtk-webkit5 = %{version}-%{release}
+Requires:	glib2-devel >= 1:2.67.1
+Requires:	gtk4-devel >= 4.0
+Requires:	libsoup3-devel >= 3.0
+Requires:	libstdc++-devel >= 6:8
+
+%description -n gtk-webkit5-devel
+Development files for WebKit for GTK 4.
+
+%description -n gtk-webkit5-devel -l pl.UTF-8
+Pliki programistyczne komponentu WebKit dla GTK 4.
+
+%package -n gtk-webkit5-apidocs
+Summary:	API documentation for WebKit GTK 4 port
+Summary(pl.UTF-8):	Dokumentacja API portu WebKitu do GTK 4
+Group:		Documentation
+Requires:	gtk-doc-common
+BuildArch:	noarch
+
+%description -n gtk-webkit5-apidocs
+API documentation for WebKit GTK 4 port.
+
+%description -n gtk-webkit5-apidocs -l pl.UTF-8
+Dokumentacja API portu WebKitu do GTK 4.
 
 %prep
 %setup -q -n webkitgtk-%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
-install -d build
-cd build
+for kind in %{?with_gtk3:%{?with_libsoup2:soup2} %{?with_libsoup3:soup3}} %{?with_gtk4:gtk4} ; do
+install -d build-${kind}
+cd build-${kind}
+# gtk4 variant is missing some files in dist:
+# Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-5.0-sections.txt
+# Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-5.0.types
+# don't know how to generate them, disable GTKDOC for now
 %cmake .. \
 	-DENABLE_GEOLOCATION=ON \
-	-DENABLE_GTKDOC=ON \
+	$([ "$kind" != "gtk4" ] && echo -DENABLE_GTKDOC=ON) \
 	%{!?with_introspection:-DENABLE_INTROSPECTION=OFF} \
 	-DENABLE_VIDEO=ON \
 	%{!?with_wayland:-DENABLE_WAYLAND_TARGET=OFF} \
@@ -194,15 +306,20 @@ cd build
 %endif
 	-DPORT=GTK \
 	-DSHOULD_INSTALL_JS_SHELL=ON \
-	-DUSE_SOUP2=ON
+	$([ "$kind" = "gtk4" ] && echo -DUSE_GTK4=ON) \
+	$([ "$kind" = "soup2" ] && echo -DUSE_SOUP2=ON)
 
 %{__make}
+cd ..
+done
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} -C build install \
+for kind in %{?with_gtk3:%{?with_libsoup2:soup2} %{?with_libsoup3:soup3}} %{?with_gtk4:gtk4} ; do
+%{__make} -C build-${kind} install \
 	DESTDIR=$RPM_BUILD_ROOT
+done
 
 %if "%{_gtkdocdir}" != "%{_datadir}/gtk-doc/html"
 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
@@ -210,6 +327,8 @@ install -d $RPM_BUILD_ROOT%{_gtkdocdir}
 %endif
 
 %find_lang WebKit2GTK-4.0
+%find_lang WebKit2GTK-4.1
+%find_lang WebKit2GTK-5.0
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -217,6 +336,13 @@ rm -rf $RPM_BUILD_ROOT
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
+%post	-n gtk-webkit4.1 -p /sbin/ldconfig
+%postun	-n gtk-webkit4.1 -p /sbin/ldconfig
+
+%post	-n gtk-webkit5 -p /sbin/ldconfig
+%postun	-n gtk-webkit5 -p /sbin/ldconfig
+
+%if %{with gtk3} && %{with libsoup2}
 %files -f WebKit2GTK-4.0.lang
 %defattr(644,root,root,755)
 %doc NEWS
@@ -253,9 +379,97 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/javascriptcoregtk-4.0.pc
 %{_pkgconfigdir}/webkit2gtk-4.0.pc
 %{_pkgconfigdir}/webkit2gtk-web-extension-4.0.pc
+%endif
 
+%if %{with gtk3}
 %files apidocs
 %defattr(644,root,root,755)
 %{_gtkdocdir}/jsc-glib-4.0
 %{_gtkdocdir}/webkit2gtk-4.0
 %{_gtkdocdir}/webkitdomgtk-4.0
+%endif
+
+%if %{with gtk3} && %{with libsoup3}
+%files -n gtk-webkit4.1 -f WebKit2GTK-4.1.lang
+%defattr(644,root,root,755)
+%doc NEWS
+%attr(755,root,root) %{_libdir}/libwebkit2gtk-4.1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-4.1.so.0
+%attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-4.1.so.0
+%if %{with introspection}
+%{_libdir}/girepository-1.0/JavaScriptCore-4.1.typelib
+%{_libdir}/girepository-1.0/WebKit2-4.1.typelib
+%{_libdir}/girepository-1.0/WebKit2WebExtension-4.1.typelib
+%endif
+%if "%{_libexecdir}" != "%{_libdir}"
+%dir %{_libexecdir}/webkit2gtk-4.1
+%endif
+%attr(755,root,root) %{_libexecdir}/webkit2gtk-4.1/WebKitNetworkProcess
+%attr(755,root,root) %{_libexecdir}/webkit2gtk-4.1/WebKitWebProcess
+%attr(755,root,root) %{_libexecdir}/webkit2gtk-4.1/jsc
+%dir %{_libdir}/webkit2gtk-4.1
+%dir %{_libdir}/webkit2gtk-4.1/injected-bundle
+%attr(755,root,root) %{_libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so
+
+%files -n gtk-webkit4.1-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libwebkit2gtk-4.1.so
+%attr(755,root,root) %{_libdir}/libjavascriptcoregtk-4.1.so
+%if %{with introspection}
+%{_datadir}/gir-1.0/JavaScriptCore-4.1.gir
+%{_datadir}/gir-1.0/WebKit2-4.1.gir
+%{_datadir}/gir-1.0/WebKit2WebExtension-4.1.gir
+%endif
+%{_includedir}/webkitgtk-4.1
+%{_pkgconfigdir}/javascriptcoregtk-4.1.pc
+%{_pkgconfigdir}/webkit2gtk-4.1.pc
+%{_pkgconfigdir}/webkit2gtk-web-extension-4.1.pc
+%endif
+
+%if %{with gtk4}
+%files -n gtk-webkit5 -f WebKit2GTK-5.0.lang
+%defattr(644,root,root,755)
+%doc NEWS
+%attr(755,root,root) %{_libdir}/libwebkit2gtk-5.0.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libwebkit2gtk-5.0.so.0
+%attr(755,root,root) %{_libdir}/libjavascriptcoregtk-5.0.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libjavascriptcoregtk-5.0.so.0
+%if %{with introspection}
+%{_libdir}/girepository-1.0/JavaScriptCore-5.0.typelib
+%{_libdir}/girepository-1.0/WebKit2-5.0.typelib
+%{_libdir}/girepository-1.0/WebKit2WebExtension-5.0.typelib
+%endif
+%if "%{_libexecdir}" != "%{_libdir}"
+%dir %{_libexecdir}/webkit2gtk-5.0
+%endif
+%attr(755,root,root) %{_libexecdir}/webkit2gtk-5.0/WebKitNetworkProcess
+%attr(755,root,root) %{_libexecdir}/webkit2gtk-5.0/WebKitWebProcess
+%attr(755,root,root) %{_libexecdir}/webkit2gtk-5.0/jsc
+%dir %{_libdir}/webkit2gtk-5.0
+%dir %{_libdir}/webkit2gtk-5.0/injected-bundle
+%attr(755,root,root) %{_libdir}/webkit2gtk-5.0/injected-bundle/libwebkit2gtkinjectedbundle.so
+
+%files -n gtk-webkit5-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libwebkit2gtk-5.0.so
+%attr(755,root,root) %{_libdir}/libjavascriptcoregtk-5.0.so
+%if %{with introspection}
+%{_datadir}/gir-1.0/JavaScriptCore-5.0.gir
+%{_datadir}/gir-1.0/WebKit2-5.0.gir
+%{_datadir}/gir-1.0/WebKit2WebExtension-5.0.gir
+%endif
+%{_includedir}/webkitgtk-5.0
+%{_pkgconfigdir}/javascriptcoregtk-5.0.pc
+%{_pkgconfigdir}/webkit2gtk-5.0.pc
+%{_pkgconfigdir}/webkit2gtk-web-extension-5.0.pc
+
+# disabled for now, see note on cmake
+%if 0
+%files -n gtk-webkit5-apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/jsc-glib-5.0
+%{_gtkdocdir}/webkit2gtk-5.0
+%{_gtkdocdir}/webkitdomgtk-5.0
+%endif
+%endif
diff --git a/gtk-webkit4-gir.patch b/gtk-webkit4-gir.patch
deleted file mode 100644
index 7e427fa..0000000
--- a/gtk-webkit4-gir.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- webkitgtk-2.24.1/Source/WebKit/PlatformGTK.cmake.orig	2019-04-08 11:30:53.000000000 +0200
-+++ webkitgtk-2.24.1/Source/WebKit/PlatformGTK.cmake	2019-04-22 09:07:32.025569199 +0200
-@@ -855,6 +855,11 @@
- 
-     ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib)
-     ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib)
-+
-+    # ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir is created from different directory
-+    # so cmake needs top-level target dependency
-+    # note: NAME_WE cuts all extensions, so WebKit2-${WEBKITGTK_API_VERSION}.gir becomes WebKit2-4 not WebKit2-4.0
-+    add_dependencies(WebKit2-4-gir JavaScriptCore-4-gir)
- endif ()
- 
- install(TARGETS webkit2gtkinjectedbundle
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gtk-webkit4.git/commitdiff/ff2d8655f2849df637f45d2f89d22f9ea60eb149



More information about the pld-cvs-commit mailing list