diff --git a/meta-multimedia/recipes-multimedia/kmsxx/kmsxx_git.bb b/meta-multimedia/recipes-multimedia/kmsxx/kmsxx_git.bb new file mode 100644 index 00000000000..b55ed73315b --- /dev/null +++ b/meta-multimedia/recipes-multimedia/kmsxx/kmsxx_git.bb @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: MIT +# +# Copyright Leica Geosystems AG +# + +SUMMARY = "C++ library for kernel mode setting" +HOMEPAGE = "https://github.com/tomba/kmsxx" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad" + +BRANCH = "master" +SRC_URI = "git://github.com/tomba/kmsxx.git;protocol=https;branch=${BRANCH}" +SRCREV = "403c756c958c2a60adc6e8fa64aa0943b4dfda4e" + +PACKAGES =+ "${PN}-python" + +DEPENDS = "libdrm libevdev fmt python3 python3-pybind11" + +PACKAGECONFIG ??= "python" +PACKAGECONFIG[python] += "-Dpykms=enabled, -Dpykms=disabled" + +S = "${WORKDIR}/git" + +inherit meson pkgconfig + +do_install() { + install -d ${D}${libdir} + install -m 0644 ${B}/kms++/libkms++.so.0 ${D}${libdir} + install -m 0644 ${B}/kms++util/libkms++util.so.0 ${D}${libdir} + + install -d ${D}${bindir} + install -m 755 ${B}/utils/kmsview ${D}${bindir} + install -m 755 ${B}/utils/kmsblank ${D}${bindir} + + if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + install -m 0644 ${B}/py/pykms/pykms.so ${D}${PYTHON_SITEPACKAGES_DIR} + fi +} + +FILES:${PN} +="/usr/lib/* \ + /usr/bin/* " + +FILES:${PN}-python += "${PYTHON_SITEPACKAGES_DIR}/*"