From fb27a961e1c0cda4043956c026df217eda970c238f37c02fe2c45857f9d9ecaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 23 Aug 2023 13:33:00 +0000 Subject: [PATCH] Accepting request 1105477 from GNOME:Next Add wpewebkit port. A webkit port like webkit2gtk3 but oriented to embedded use cases. OBS-URL: https://build.opensuse.org/request/show/1105477 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/wpewebkit?expand=0&rev=1 --- .gitattributes | 23 ++++ .gitignore | 1 + _constraints | 37 ++++++ _service | 3 + fix-include-dirs.patch | 48 ++++++++ fix-load-backend-fdo-lib.patch | 13 ++ wpewebkit-2.40.3.tar.xz | 3 + wpewebkit.changes | 4 + wpewebkit.spec | 219 +++++++++++++++++++++++++++++++++ 9 files changed, 351 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _constraints create mode 100644 _service create mode 100644 fix-include-dirs.patch create mode 100644 fix-load-backend-fdo-lib.patch create mode 100644 wpewebkit-2.40.3.tar.xz create mode 100644 wpewebkit.changes create mode 100644 wpewebkit.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..ecde99c --- /dev/null +++ b/_constraints @@ -0,0 +1,37 @@ + + + + 4 + + 26 + + + 16 + + + SLOW_CPU + + + armv6l + armv7l + + + + 12 + + + 8 + + + + + + aarch64 + + + + asimdrdm + + + + diff --git a/_service b/_service new file mode 100644 index 0000000..6062efc --- /dev/null +++ b/_service @@ -0,0 +1,3 @@ + + + diff --git a/fix-include-dirs.patch b/fix-include-dirs.patch new file mode 100644 index 0000000..7faf308 --- /dev/null +++ b/fix-include-dirs.patch @@ -0,0 +1,48 @@ +Index: wpewebkit-2.40.3/Source/cmake/FindWayland.cmake +=================================================================== +--- wpewebkit-2.40.3.orig/Source/cmake/FindWayland.cmake ++++ wpewebkit-2.40.3/Source/cmake/FindWayland.cmake +@@ -32,5 +32,6 @@ find_package(PkgConfig QUIET) + pkg_check_modules(WAYLAND wayland-client wayland-server wayland-egl) + + include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(Wayland REQUIRED_VARS WAYLAND_LIBRARIES ++find_package_handle_standard_args(Wayland ++ REQUIRED_VARS WAYLAND_INCLUDE_DIRS WAYLAND_LIBRARIES + FOUND_VAR WAYLAND_FOUND) +Index: wpewebkit-2.40.3/Tools/wpe/backends/PlatformWPE.cmake +=================================================================== +--- wpewebkit-2.40.3.orig/Tools/wpe/backends/PlatformWPE.cmake ++++ wpewebkit-2.40.3/Tools/wpe/backends/PlatformWPE.cmake +@@ -29,6 +29,8 @@ list(APPEND WPEToolingBackends_SYSTEM_IN + ${ATK_INCLUDE_DIRS} + ${GLIB_INCLUDE_DIRS} + ${LIBEPOXY_INCLUDE_DIRS} ++ ${LIBXKBCOMMON_INCLUDE_DIRS} ++ ${WAYLAND_INCLUDE_DIRS} + ${WPEBACKEND_FDO_INCLUDE_DIRS} + ) + +Index: wpewebkit-2.40.3/Source/cmake/FindLibxkbcommon.cmake +=================================================================== +--- wpewebkit-2.40.3.orig/Source/cmake/FindLibxkbcommon.cmake ++++ wpewebkit-2.40.3/Source/cmake/FindLibxkbcommon.cmake +@@ -32,5 +32,6 @@ find_package(PkgConfig QUIET) + pkg_check_modules(LIBXKBCOMMON xkbcommon) + + include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(Libxkbcommon REQUIRED_VARS LIBXKBCOMMON_FOUND ++find_package_handle_standard_args(Libxkbcommon ++ REQUIRED_VARS LIBXKBCOMMON_INCLUDE_DIRS LIBXKBCOMMON_FOUND + FOUND_VAR LIBXKBCOMMON_FOUND) +Index: wpewebkit-2.40.3/Tools/MiniBrowser/wpe/CMakeLists.txt +=================================================================== +--- wpewebkit-2.40.3.orig/Tools/MiniBrowser/wpe/CMakeLists.txt ++++ wpewebkit-2.40.3/Tools/MiniBrowser/wpe/CMakeLists.txt +@@ -14,6 +14,7 @@ set(MiniBrowser_SYSTEM_INCLUDE_DIRECTORI + ${ATK_INCLUDE_DIRS} + ${GLIB_INCLUDE_DIRS} + ${LIBSOUP_INCLUDE_DIRS} ++ ${WAYLAND_INCLUDE_DIRS} + ${WPEBACKEND_FDO_INCLUDE_DIRS} + ) diff --git a/fix-load-backend-fdo-lib.patch b/fix-load-backend-fdo-lib.patch new file mode 100644 index 0000000..2c25dac --- /dev/null +++ b/fix-load-backend-fdo-lib.patch @@ -0,0 +1,13 @@ +Index: wpewebkit-2.40.3/Tools/wpe/backends/PlatformWPE.cmake +=================================================================== +--- wpewebkit-2.40.3.orig/Tools/wpe/backends/PlatformWPE.cmake ++++ wpewebkit-2.40.3/Tools/wpe/backends/PlatformWPE.cmake +@@ -74,7 +74,7 @@ add_custom_command( + VERBATIM) + + list(APPEND WPEToolingBackends_DEFINITIONS WPE_BACKEND_FDO) +-list(APPEND WPEToolingBackends_PRIVATE_DEFINITIONS WPE_BACKEND="libWPEBackend-fdo-1.0.so") ++list(APPEND WPEToolingBackends_PRIVATE_DEFINITIONS WPE_BACKEND="libWPEBackend-fdo-1.0.so.1") + + if (ENABLE_ACCESSIBILITY) + list(APPEND WPEToolingBackends_DEFINITIONS ENABLE_ACCESSIBILITY=1) diff --git a/wpewebkit-2.40.3.tar.xz b/wpewebkit-2.40.3.tar.xz new file mode 100644 index 0000000..c14a571 --- /dev/null +++ b/wpewebkit-2.40.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05b6a9cb1d7d03485e0dc41b2a8e6f99a36aea23d32ba3ecb38d0d6860747ada +size 38085660 diff --git a/wpewebkit.changes b/wpewebkit.changes new file mode 100644 index 0000000..0135f98 --- /dev/null +++ b/wpewebkit.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Jun 30 17:43:03 UTC 2023 - Joan Torres + +- Init repo. diff --git a/wpewebkit.spec b/wpewebkit.spec new file mode 100644 index 0000000..6275cc9 --- /dev/null +++ b/wpewebkit.spec @@ -0,0 +1,219 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +%define _apiver 2.0 +%define _wksover 2_0-1 +%define _sonameverpkg 2_0 + +Name: wpewebkit +Version: 2.40.3 +Release: 0 +Summary: Library for rendering web content, WPE Port +License: BSD-3-Clause AND LGPL-2.1 +Group: Development/Libraries/C and C++ +URL: https://wpewebkit.org/ +Source: %{url}/releases/%{name}-%{version}.tar.xz +Patch0: fix-include-dirs.patch +Patch1: fix-load-backend-fdo-lib.patch + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: memory-constraints +BuildRequires: ninja +BuildRequires: python3 +BuildRequires: perl >= 5.10.0 +BuildRequires: ruby >= 2.5 +BuildRequires: pkgconfig(cairo) >= 1.14.0 +BuildRequires: pkgconfig(fontconfig) >= 2.8.0 +BuildRequires: pkgconfig(freetype2) >= 2.4.2 +BuildRequires: pkgconfig(harfbuzz) >= 0.9.18 +BuildRequires: libicu-devel >= 61.2 +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(epoxy) >= 1.4.0 +BuildRequires: pkgconfig(libgcrypt) >= 1.6.0 +BuildRequires: pkgconfig(libxml-2.0) >= 2.8.0 +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: unifdef +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(wpe-1.0) +BuildRequires: pkgconfig(libsoup-3.0) >= 3.0.0 +BuildRequires: pkgconfig(glib-2.0) >= 2.70.0 +BuildRequires: pkgconfig(atk) >= 2.16.0 +BuildRequires: pkgconfig(atk-bridge-2.0) +BuildRequires: pkgconfig(libopenjp2) >= 2.2.0 +BuildRequires: pkgconfig(libwoff2dec) +BuildRequires: pkgconfig(libwoff2common) >= 1.0.2 +BuildRequires: pkgconfig(libtasn1) +BuildRequires: pkgconfig(libxslt) >= 1.1.7 +BuildRequires: pkgconfig(libavif) >= 0.9.0 +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libseccomp) +BuildRequires: pkgconfig(wpebackend-fdo-1.0) +BuildRequires: bubblewrap +BuildRequires: xdg-dbus-proxy +BuildRequires: pkgconfig(gstreamer-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-allocators-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-app-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-audio-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-fft-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-gl-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-mpegts-1.0) >= 1.4.0 +BuildRequires: pkgconfig(gstreamer-pbutils-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-tag-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-video-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-codecparsers-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-transcoder-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-rtp-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-sdp-1.0) >= 1.16.2 +BuildRequires: pkgconfig(gstreamer-webrtc-1.0) >= 1.16.2 +BuildRequires: gperf >= 3.0.1 +BuildRequires: pkgconfig(xkbcommon) >= 0.4.0 +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-server) +BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(wayland-protocols) + +%description +WPE allows embedders to create simple and performant systems based on +Web platform technologies. It is designed with hardware acceleration +in mind, leveraging common 3D graphics APIs for best performance. + +%package -n libWPEWebKit-%{_wksover} +Summary: Library for rendering web content, WPE port +Group: System/Libraries +Requires: bubblewrap +Requires: xdg-dbus-proxy +Requires: %{name}-%{_sonameverpkg}-injected-bundles +Provides: libWPEWebKit-{_apiver} + +%description -n libWPEWebKit-%{_wksover} +WPE allows embedders to create simple and performant systems based on +Web platform technologies. It is designed with hardware acceleration +in mind, leveraging common 3D graphics APIs for best performance. + +%package -n wpewebkit-%{_sonameverpkg}-injected-bundles +Summary: Injected bundles for wpewebkit +Group: System/Libraries + +%description -n wpewebkit-%{_sonameverpkg}-injected-bundles +WPE allows embedders to create simple and performant systems based on +Web platform technologies. It is designed with hardware acceleration +in mind, leveraging common 3D graphics APIs for best performance. + +%package -n libWPEWebInspectorResources +Summary: WPEWebInspectorResources tool +Group: System/Libraries + +%description -n libWPEWebInspectorResources +WPE allows embedders to create simple and performant systems based on +Web platform technologies. It is designed with hardware acceleration +in mind, leveraging common 3D graphics APIs for best performance. + +%package -n WPEWebDriver +Summary: WebDriver service implementation for WPE WebKit +Group: System/Libraries + +%description -n WPEWebDriver +WPE allows embedders to create simple and performant systems based on +Web platform technologies. It is designed with hardware acceleration +in mind, leveraging common 3D graphics APIs for best performance. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries/C and C++ +Requires: libWPEWebKit-%{_wksover} = %{version} + +%description devel +WPE allows embedders to create simple and performant systems based on +Web platform technologies. It is designed with hardware acceleration +in mind, leveraging common 3D graphics APIs for best performance. + +%package minibrowser +Summary: MiniBrowser from WebKit +Group: Development/Tools/Other +Requires: libWPEWebKit-%{_wksover} = %{version} + +%description minibrowser +A small test browswer from webkit, useful for testing features and +embedded mini browsers. + +%prep +%autosetup -p1 + +%build +# Not eat all memory +%define _dwz_low_mem_die_limit 40000000 +%define _dwz_max_die_limit 250000000 +%limit_build -m 2500 + +# Use linker flags to reduce memory consumption +%global optflags %(echo %{optflags} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads | sed 's/-g /-g1 /') +%cmake \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_DOCUMENTATION=OFF \ + -DENABLE_INTROSPECTION=OFF \ + -DPORT=WPE \ + -DENABLE_MINIBROWSER=ON \ + -DUSE_AVIF=ON \ + -DLIBEXEC_INSTALL_DIR=%{_libexecdir}/libWPEWebKit-%{_wksover} \ +%ifarch aarch64 + -DENABLE_JIT=OFF \ + -DENABLE_C_LOOP=ON \ + -DENABLE_SAMPLING_PROFILER=OFF \ + -DUSE_SYSTEM_MALLOC=ON \ +%endif +%ninja_build + +%install +%ninja_install -C build + +%ldconfig_scriptlets -n libWPEWebKit-%{_wksover} + +%files -n libWPEWebKit-%{_wksover} +%dir %{_libdir}/wpe-webkit-%{_apiver} +%exclude %{_libexecdir}/libWPEWebKit-%{_wksover}/MiniBrowser +%{_libexecdir}/libWPEWebKit-%{_wksover} +%{_libdir}/libWPEWebKit-%{_apiver}.so.* +%doc NEWS + +%files -n wpewebkit-%{_sonameverpkg}-injected-bundles +%dir %{_libdir}/wpe-webkit-%{_apiver}/injected-bundle +%{_libdir}/wpe-webkit-%{_apiver}/injected-bundle/libWPEInjectedBundle.so + +%files -n libWPEWebInspectorResources +%{_libdir}/wpe-webkit-%{_apiver}/libWPEWebInspectorResources.so + +%files -n WPEWebDriver +%{_bindir}/WPEWebDriver + +%files devel +%{_includedir}/wpe-webkit-%{_apiver} +%{_libdir}/libWPEWebKit-%{_apiver}.so +%{_libdir}/pkgconfig/wpe-webkit-%{_apiver}.pc +%{_libdir}/pkgconfig/wpe-web-process-extension-%{_apiver}.pc + +%files minibrowser +%{_libexecdir}/libWPEWebKit-%{_wksover}/MiniBrowser + +%changelog