comment "libtorrent-rasterbar needs a toolchain w/ C++, threads, wchar, gcc >= 4.9"
	depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9

comment "libtorrent-rasterbar needs exception_ptr"
	depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735

config BR2_PACKAGE_LIBTORRENT_RASTERBAR
	bool "libtorrent-rasterbar"
	depends on BR2_INSTALL_LIBSTDCPP # boost
	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
	depends on BR2_TOOLCHAIN_HAS_THREADS # boost
	depends on BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK
	depends on BR2_USE_WCHAR # boost
	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
	select BR2_PACKAGE_BOOST
	select BR2_PACKAGE_BOOST_SYSTEM
	select BR2_PACKAGE_OPENSSL
	help
	  libtorrent is a feature complete C++ bittorrent implementation
	  focusing on efficiency and scalability.

	  https://www.libtorrent.org/