SHA256
1
0
forked from pool/wpewebkit

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
This commit is contained in:
Bjørn Lie 2023-08-23 13:33:00 +00:00 committed by Git OBS Bridge
commit fb27a961e1
9 changed files with 351 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

37
_constraints Normal file
View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<constraints>
<hardware>
<jobs>4</jobs>
<disk>
<size unit="G">26</size>
</disk>
<physicalmemory>
<size unit="G">16</size>
</physicalmemory>
</hardware>
<hostlabel exclude="true">SLOW_CPU</hostlabel>
<overwrite>
<conditions>
<arch>armv6l</arch>
<arch>armv7l</arch>
</conditions>
<hardware>
<disk>
<size unit="G">12</size>
</disk>
<physicalmemory>
<size unit="G">8</size>
</physicalmemory>
</hardware>
</overwrite>
<overwrite>
<conditions>
<arch>aarch64</arch>
</conditions>
<hardware>
<cpu>
<flag>asimdrdm</flag>
</cpu>
</hardware>
</overwrite>
</constraints>

3
_service Normal file
View File

@ -0,0 +1,3 @@
<services>
<service name="download_files" mode="manual"/>
</services>

48
fix-include-dirs.patch Normal file
View File

@ -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}
)

View File

@ -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)

3
wpewebkit-2.40.3.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:05b6a9cb1d7d03485e0dc41b2a8e6f99a36aea23d32ba3ecb38d0d6860747ada
size 38085660

4
wpewebkit.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Fri Jun 30 17:43:03 UTC 2023 - Joan Torres <joan.torres@suse.com>
- Init repo.

219
wpewebkit.spec Normal file
View File

@ -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