1config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
2	bool
3	# ARM needs BLX, so v5t+, BE completely untested so disabled
4	default y if BR2_arm && !BR2_ARM_CPU_ARMV4
5	default y if BR2_aarch64 || BR2_aarch64_be
6	default y if BR2_i386 || BR2_x86_64
7	# Disabled on MIPS big endian due to sigbus
8	default y if BR2_mipsel || BR2_mips64el
9	# Disabled on PowerPC pending runtime testing
10	# RISC-V needs the g/imafd ISA.
11	default y if BR2_riscv && BR2_RISCV_ISA_RVI \
12		&& BR2_RISCV_ISA_RVM && BR2_RISCV_ISA_RVA \
13		&& BR2_RISCV_ISA_RVF && BR2_RISCV_ISA_RVD
14	# Disabled on SuperH because of segfault
15	depends on BR2_USE_MMU # libglib2
16	depends on BR2_TOOLCHAIN_HAS_SYNC_4
17	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
18
19comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 10, host gcc >= 4.9"
20	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
21	depends on !BR2_BINFMT_FLAT
22	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \
23		|| !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
24		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
25		|| !BR2_HOST_GCC_AT_LEAST_4_9
26
27comment "wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend"
28	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
29	depends on !BR2_BINFMT_FLAT
30	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL \
31		|| !BR2_PACKAGE_HAS_LIBEGL_WAYLAND
32
33config BR2_PACKAGE_WPEWEBKIT
34	bool "wpewebkit"
35	depends on !BR2_STATIC_LIBS # wayland
36	depends on !BR2_BINFMT_FLAT # icu
37	depends on BR2_HOST_GCC_AT_LEAST_4_9 # icu, host-ruby
38	depends on BR2_INSTALL_LIBSTDCPP # harfbuzz, icu
39	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland, icu, libsoup3
40	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10
41	depends on BR2_USE_WCHAR # icu, libsoup3
42	depends on BR2_PACKAGE_HAS_LIBGLES # libepoxy
43	depends on BR2_PACKAGE_HAS_LIBEGL # libepoxy
44	depends on BR2_PACKAGE_HAS_LIBEGL_WAYLAND # wpebackend-fdo
45	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
46	select BR2_PACKAGE_CAIRO
47	select BR2_PACKAGE_CAIRO_PNG
48	select BR2_PACKAGE_HARFBUZZ
49	select BR2_PACKAGE_ICU
50	select BR2_PACKAGE_JPEG
51	select BR2_PACKAGE_LIBEPOXY
52	select BR2_PACKAGE_LIBGCRYPT
53	select BR2_PACKAGE_LIBPNG
54	select BR2_PACKAGE_LIBSOUP3
55	select BR2_PACKAGE_LIBTASN1
56	select BR2_PACKAGE_LIBXSLT
57	select BR2_PACKAGE_WAYLAND
58	select BR2_PACKAGE_WAYLAND_PROTOCOLS
59	select BR2_PACKAGE_WEBP
60	select BR2_PACKAGE_WEBP_DEMUX
61	select BR2_PACKAGE_WPEBACKEND_FDO
62	help
63	  WPE (Web Platform for Embedded) port of the WebKit engine,
64	  to allow embedders to create simple and performant systems
65	  based on Web platform technologies.
66
67	  https://wpewebkit.org/
68
69if BR2_PACKAGE_WPEWEBKIT
70
71config BR2_PACKAGE_WPEWEBKIT_SANDBOX
72	bool "sandboxing support"
73	depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS # libseccomp
74	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # libseccomp
75	select BR2_PACKAGE_BUBBLEWRAP # runtime
76	select BR2_PACKAGE_XDG_DBUS_PROXY # runtime
77	select BR2_PACKAGE_LIBSECCOMP
78	help
79	  Enable sandboxing of the processes used for network operation,
80	  disk asccess, and Web content rendering.
81
82comment "sandboxing supports needs a toolchain w/ headers >= 3.12"
83	depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS
84	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
85
86config BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
87	bool "multimedia support"
88	select BR2_PACKAGE_GSTREAMER1
89	select BR2_PACKAGE_GST1_PLUGINS_BAD
90	select BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS
91	select BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX
92	select BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SUBENC
93	select BR2_PACKAGE_GST1_PLUGINS_BASE
94	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA
95	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP
96	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT
97	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE
98	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK
99	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERTSCALE
100	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME
101	select BR2_PACKAGE_GST1_PLUGINS_GOOD
102	select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOFX
103	select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT
104	select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4
105	select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA
106	select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP
107	select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VPX
108	select BR2_PACKAGE_GST1_LIBAV
109	help
110	  This option pulls in all of the required dependencies
111	  to enable multimedia (video/audio) support.
112
113if BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA
114
115config BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM
116	bool "media-stream support"
117	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEORATE
118	help
119	  This option enables media-stream support.
120
121config BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL
122	bool "use gstreamer-gl"
123	default y
124	depends on BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_PLATFORM
125	help
126	  Use the GStreamer GL elements for handling video content.
127	  This is recommended as it improves performance of video
128	  playback. In some target configurations incorrect rendering
129	  might be produced, and disabling this option may help.
130
131endif
132
133config BR2_PACKAGE_WPEWEBKIT_WEBDRIVER
134	bool "WebDriver support"
135	help
136	  Enable support for WebDriver. This will build and install the
137	  WebKitWebDriver program in the target.
138
139endif
140