comment "amd-catalyst needs a glibc toolchain"
	depends on BR2_i386 || BR2_x86_64
	depends on !BR2_TOOLCHAIN_USES_GLIBC

config BR2_PACKAGE_AMD_CATALYST
	bool "amd-catalyst"
	depends on BR2_i386 || BR2_x86_64
	depends on BR2_TOOLCHAIN_USES_GLIBC
	help
	  The binary-only driver blob for AMD cards.
	  This driver supports AMD Radeon HD 5xxx and newer graphics
	  cards.

	  http://www.amd.com/

if BR2_PACKAGE_AMD_CATALYST

comment "amd-catalyst X.org drivers needs a modular Xorg server <= 1.17"
	depends on !BR2_PACKAGE_XORG7 \
	|| !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR \
	|| !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19

config BR2_PACKAGE_AMD_CATALYST_XORG
	bool "X.org drivers"
	default y
	depends on BR2_PACKAGE_XORG7
	depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR
	depends on BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
	select BR2_PACKAGE_XSERVER_XORG_SERVER_AIGLX
	select BR2_PACKAGE_ACPID # runtime
	select BR2_PACKAGE_XLIB_LIBX11 # runtime
	select BR2_PACKAGE_XLIB_LIBXEXT # runtime
	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE # runtime
	# This package does not have standard GL headers
	select BR2_PACKAGE_MESA3D_HEADERS
	select BR2_PACKAGE_HAS_LIBGL

if BR2_PACKAGE_AMD_CATALYST_XORG

config BR2_PACKAGE_PROVIDES_LIBGL
	default "amd-catalyst"

config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS
	bool "command-line configuration tools"
	help
	  Build and install the AMD command line tools.

comment "Catalyst Control Center needs Qt4 with X11 and PNG support"
	depends on !BR2_PACKAGE_QT || !BR2_PACKAGE_QT_X11 \
		|| BR2_PACKAGE_QT_NOPNG

config BR2_PACKAGE_AMD_CATALYST_CCCLE
	bool "Catalyst Control Center"
	depends on BR2_PACKAGE_QT
	depends on BR2_PACKAGE_QT_X11
	depends on !BR2_PACKAGE_QT_NOPNG
	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # procps-ng
	select BR2_PACKAGE_PROCPS_NG # runtime
	select BR2_PACKAGE_QT_ACCESSIBILITY
	help
	  Installs the Catalyst Control Center, a Qt graphical tool to
	  control AMD graphics accelerators.

endif

comment "amd-catalyst kernel module needs a kernel to be built"
	depends on !BR2_LINUX_KERNEL

config BR2_PACKAGE_AMD_CATALYST_MODULE
	bool "fglrx kernel module"
	depends on BR2_LINUX_KERNEL
	help
	  Builds and install the fglrx kernel module

config BR2_PACKAGE_AMD_CATALYST_OPENCL
	bool "OpenCL support"
	help
	  Installs the OpenCL binary blobs and the ICD profile
	  for GPGPU computing.

endif # BR2_PACKAGE_AMD_CATALYST
