menuconfig BR2_PACKAGE_IVI_HOMESCREEN
	bool "ivi-homescreen"
	depends on BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
	depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
	depends on BR2_HOST_GCC_AT_LEAST_5 # flutter-engine
	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # C++17 filesystem
	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # flutter-engine
	depends on BR2_TOOLCHAIN_USES_GLIBC # flutter-engine
	depends on BR2_INSTALL_LIBSTDCPP # flutter-engine
	depends on !BR2_STATIC_LIBS # flutter-engine, wayland
	depends on BR2_USE_WCHAR # flutter-engine
	depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES # flutter-engine
	select BR2_PACKAGE_HOST_FLUTTER_SDK_BIN
	select BR2_PACKAGE_FLUTTER_ENGINE
	select BR2_PACKAGE_LIBXKBCOMMON
	select BR2_PACKAGE_WAYLAND
	select BR2_PACKAGE_WAYLAND_PROTOCOLS
	select BR2_PACKAGE_WAYLAND_UTILS
	help
	  Toyota's Flutter Embedder that communicates with Wayland
	  compositors.
	  Features:
	  - Strongly Typed (C++)
	  - Lightweight
	  - Platform Channels enabled/disabled via CMake
	  - OpenGL Texture Framework
	  - Compositor Sub-surface/Region support
	  - Vulkan / EGL backend support

	  https://github.com/toyota-connected/ivi-homescreen

if BR2_PACKAGE_IVI_HOMESCREEN

config BR2_PACKAGE_IVI_HOMESCREEN_IVI_SHELL_CLIENT
	bool "ivi-shell client"

comment "Logging"
config BR2_PACKAGE_IVI_HOMESCREEN_DART_VM_LOGGING
	bool "Enable Dart VM Logging"

config BR2_PACKAGE_IVI_HOMESCREEN_DLT_LOGGING
	bool "DLT logging"

comment "EGL options"

config BR2_PACKAGE_IVI_HOMESCREEN_EGL_TRANSPARENCY
	bool "Transparency"
	depends on BR2_PACKAGE_HAS_LIBEGL

comment "Transparency support needs an EGL backend"
	depends on !BR2_PACKAGE_HAS_LIBEGL

config BR2_PACKAGE_IVI_HOMESCREEN_EGL_ENABLE_3D
	bool "3D support"
	depends on BR2_PACKAGE_HAS_LIBEGL
	help
	  Build with EGL Stencil, Depth, and Stencil

comment "3D support needs an EGL backend"
	depends on !BR2_PACKAGE_HAS_LIBEGL

config BR2_PACKAGE_IVI_HOMESCREEN_EGL_MULTISAMPLE
	bool "Multisample support"
	depends on BR2_PACKAGE_HAS_LIBEGL
	help
	  Build with EGL Sample set to 4

comment "Multisample support needs an EGL backend"
	depends on !BR2_PACKAGE_HAS_LIBEGL

comment "dependency-less plugins"

config BR2_PACKAGE_IVI_HOMESCREEN_ACCESSIBILITY_PLUGIN
	bool "Accessibility"

config BR2_PACKAGE_IVI_HOMESCREEN_COMP_REGION_PLUGIN
	bool "Compositor Region"

config BR2_PACKAGE_IVI_HOMESCREEN_COMP_SURF_PLUGIN
	bool "Compositor Surface"

config BR2_PACKAGE_IVI_HOMESCREEN_DESKTOP_WINDOW_PLUGIN
	bool "Desktop Window"
	help
	  Flutter plugin to change window size.

	  https://pub.dev/packages/desktop_window

config BR2_PACKAGE_IVI_HOMESCREEN_GO_ROUTER_PLUGIN
	bool "Go Router"
	help
	  A declarative routing package for Flutter that uses the
	  Router API to provide a convenient, url-based API for
	  navigating between different screens. You can define URL
	  patterns, navigate using a URL, handle deep links, and a
	  number of other navigation-related scenarios.

	  https://pub.dev/packages/go_router

config BR2_PACKAGE_IVI_HOMESCREEN_INTEGRATION_TEST_PLUGIN
	bool "Flutter Integration Test support"
	help
	  https://docs.flutter.dev/cookbook/testing/integration/introduction

config BR2_PACKAGE_IVI_HOMESCREEN_ISOLATE_PLUGIN
	bool "Isolate"

config BR2_PACKAGE_IVI_HOMESCREEN_KEYBOARD_MANAGER_PLUGIN
	bool "Keyboard Manager"
	select BR2_PACKAGE_IVI_HOMESCREEN_TEXT_INPUT_PLUGIN # runtime
	help
	  This is a wrapper for the raw keyboard listener made to
	  simplify intercept external keyboard button press.

	  https://pub.dev/packages/keyboard_manager

config BR2_PACKAGE_IVI_HOMESCREEN_KEY_EVENT_PLUGIN
	bool "Key Event"
	select BR2_PACKAGE_IVI_HOMESCREEN_TEXT_INPUT_PLUGIN # runtime
	help
	  KeyEvent plugin to support RawKeyEvent.

config BR2_PACKAGE_IVI_HOMESCREEN_LAYER_PLAYGROUND_PLUGIN
	bool "Layer Playground"
	select BR2_PACKAGE_IVI_HOMESCREEN_PLATFORM_VIEWS_PLUGIN
	help
	  This plugin enables the platform views plugin and also
	  provides a simple-box-view-type option.

	  https://github.com/toyota-connected/ivi-homescreen/tree/main/shell/plugins/platform_views

config BR2_PACKAGE_IVI_HOMESCREEN_LOGGING_PLUGIN
	bool "Logging"

config BR2_PACKAGE_IVI_HOMESCREEN_MOUSE_CURSOR_PLUGIN
	bool "Mouse Cursor"
	help
	  Add mouse cursor support.

config BR2_PACKAGE_IVI_HOMESCREEN_PACKAGE_INFO_PLUGIN
	bool "PackageInfo"
	help
	  Prints the ivi-homescreen package information.

config BR2_PACKAGE_IVI_HOMESCREEN_PLATFORM_PLUGIN
	bool "Platform"
	help
	  Get information about the platform the Flutter application
	  is running on.

config BR2_PACKAGE_IVI_HOMESCREEN_PLATFORM_VIEWS_PLUGIN
	bool "Platform Views"
	help
	  This plugin supports the AndroidView interface. Meaning you
	  can take any Platform View Dart code, change the definition
	  to use AndroidView, and you will have a working interface.

	  Benefits of using this interface:
	    - pre-defined interface that is supported in Flutter SDK
	    - params are easily augmented in Dart to add for given use
	      case
	    - pass touch to another process/library without additional
	      work

	  For a backing implementation there are a number of approaches:
	    - Have a PlatformView implementation render to a Texture
	    - Compositor Region support
	      (poke a hole for another process)
	    - Compositor sub-surface and manage Z-order

	  The above is already supported today using either an OpenGL
	  texture, or a Compositor Sub-Surface. Using Platform Views
	  just re-uses an existing interface.

	  https://github.com/toyota-connected/ivi-homescreen/tree/main/shell/plugins/platform_views

config BR2_PACKAGE_IVI_HOMESCREEN_RESTORATION_PLUGIN
	bool "Restoration"
	help
	  Handles the Flutter restoration callback

config BR2_PACKAGE_IVI_HOMESCREEN_TEXT_INPUT_PLUGIN
	bool "Text Input"
	help
	  Allow for text input

comment "plugins with external dependencies"
config BR2_PACKAGE_IVI_HOMESCREEN_AUDIO_PLAYERS
	bool "Audio Players"
	select BR2_PACKAGE_GSTREAMER1
	select BR2_PACKAGE_GST1_PLUGINS_BASE
	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA
	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT
	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE
	select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME
	help
	  A Flutter plugin to play multiple simultaneously audio files.
	  Based on audioplayers-v5.2.1

	  https://pub.dev/packages/audioplayers

config BR2_PACKAGE_IVI_HOMESCREEN_FLUTTER_SECURE_STORAGE_PLUGIN
	bool "Flutter Secure Storage"
	select BR2_PACKAGE_LIBSECRET
	help
	  Store data in secure storage

	  https://pub.dev/packages/flutter_secure_storage

config BR2_PACKAGE_IVI_HOMESCREEN_GOOGLE_SIGN_IN_PLUGIN
	bool "Google Sign In manager"
	select BR2_PACKAGE_LIBCURL
	select BR2_PACKAGE_LIBCURL_FORCE_TLS
	select BR2_PACKAGE_OPENSSL
	help
	  This static plugin is to support this pub.dev package:
	  https://pub.dev/packages/google_sign_in

	  https://github.com/toyota-connected/ivi-homescreen/tree/main/shell/plugins/google_sign_in

config BR2_PACKAGE_IVI_HOMESCREEN_GSTREAMER_EGL_PLUGIN
	bool "GStreamer EGL"
	depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
	depends on BR2_PACKAGE_HAS_LIBEGL
	depends on BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API # GST1_PLUGINS_BASE_LIB_OPENGL_EGL
	select BR2_PACKAGE_FFMPEG
	select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_EGL
	help
	  A GStreamer-powered alternative to Flutter's video_player that
	  support Linux, iOS and Android.

	  https://pub.dev/packages/flutter_gstreamer_player

comment "GStreamer plugin needs gst1-plugins-base with an EGL backend"
	depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
	depends on !BR2_PACKAGE_HAS_LIBEGL \
		|| !BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API

config BR2_PACKAGE_IVI_HOMESCREEN_OPENGL_TEXTURE_PLUGIN
	bool "OpenGL Texture"
	depends on BR2_PACKAGE_HAS_LIBEGL
	help
	  A Flutter OpenGL ES plugin using a Texture() widget.
	  Many shaders from ShaderToy.com can be copy/pasted

	  https://pub.dev/packages/flutter_opengl

comment "OpenGL texture plugin needs an EGL backend"
	depends on !BR2_PACKAGE_HAS_LIBEGL

endif # BR2_PACKAGE_IVI_HOMESCREEN

comment "ivi-homescreen needs a glibc toolchain w/ wchar, C++, gcc >= 8, dynamic library, host gcc >= 5"
	depends on BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
	depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
	depends on !BR2_TOOLCHAIN_USES_GLIBC \
		|| !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_8 \
		|| BR2_STATIC_LIBS || !BR2_USE_WCHAR \
		|| !BR2_HOST_GCC_AT_LEAST_5

comment "ivi-homescreen needs a toolchain not affected by GCC bug 64735"
	depends on BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
	depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735

comment "ivi-homescreen needs an OpenGL or OpenGLES backend"
	depends on BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
	depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
	depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES
