source "package/imlib2/Config.in"
source "package/jasper/Config.in"
source "package/jpeg/Config.in"
+ source "package/kmsxx/Config.in"
source "package/lcms2/Config.in"
source "package/lesstif/Config.in"
source "package/libart/Config.in"
--- /dev/null
+config BR2_PACKAGE_KMSXX
+ bool "kms++"
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+ select BR2_PACKAGE_LIBDRM
+ help
+ libkms++ is a C++11 library for kernel mode setting.
+
+ Also included are simple test tools for KMS.
+
+ https://github.com/tomba/kmsxx
+
+if BR2_PACKAGE_KMSXX
+
+config BR2_PACKAGE_KMSXX_INSTALL_TESTS
+ bool "Install test programs"
+ help
+ This option allows to install the kmsxx test programs.
+
+endif
+
+comment "kms++ needs a toolchain w/ threads, C++, gcc >= 4.8"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
+ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
--- /dev/null
+################################################################################
+#
+# kmsxx
+#
+################################################################################
+
+KMSXX_VERSION = a706f157b86e90696808025db01de99646d51a77
+KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
+KMSXX_LICENSE = MPLv2.0
+KMSXX_LICENSE_FILES = LICENSE
+KMSXX_INSTALL_STAGING = YES
+KMSXX_DEPENDENCIES = libdrm host-pkgconf
+KMSXX_CONF_OPTS = -DKMSXX_ENABLE_PYTHON=OFF
+
+ifeq ($(BR2_PACKAGE_KMSXX_INSTALL_TESTS),y)
+KMSXX_TESTS = \
+ fbtestpat kmsblank kmscapture \
+ kmsprint kmsview testpat wbcap \
+ wbm2m
+
+define KMSXX_INSTALL_TARGET_TESTS
+ $(foreach t,$(KMSXX_TESTS),\
+ $(INSTALL) -D -m 0755 $(@D)/bin/$(t) \
+ $(TARGET_DIR)/usr/bin/$(t)
+ )
+endef
+endif
+
+KMSXX_LIBS = kms++ kms++util
+
+define KMSXX_INSTALL_TARGET_CMDS
+ $(foreach l,$(KMSXX_LIBS),\
+ $(INSTALL) -D -m 0755 $(@D)/lib/lib$(l).so \
+ $(TARGET_DIR)/usr/lib/lib$(l).so
+ )
+ $(KMSXX_INSTALL_TARGET_TESTS)
+endef
+
+define KMSXX_INSTALL_STAGING_CMDS
+ $(foreach l,$(KMSXX_LIBS),\
+ $(INSTALL) -D -m 0755 $(@D)/lib/lib$(l).so \
+ $(STAGING_DIR)/usr/lib/lib$(l).so ; \
+ mkdir -p $(STAGING_DIR)/usr/include/$(l) ; \
+ cp -dpfr $(@D)/$(l)/inc/$(l)/* $(STAGING_DIR)/usr/include/$(l)/
+ )
+endef
+
+$(eval $(cmake-package))