diff --git a/recipes-support/qtwaylandscanner-kde.inc b/recipes-support/qtwaylandscanner-kde.inc new file mode 100644 index 0000000..68db038 --- /dev/null +++ b/recipes-support/qtwaylandscanner-kde.inc @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: 2018-2020 Volker Krause +# +# SPDX-License-Identifier: MIT + +DESCRIPTION = "qtwaylandscanner temporary fork (really KWayland Server repository subset)" +HOMEPAGE = "https://invent.kde.org/plasma/kwayland-server/" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-only.txt;md5=fabba2a3bfeb22a6483d44e9ae824d3f" +PR = "r0" + +BBCLASSEXTEND = "native nativesdk" + +DEPENDS = " \ + qtbase \ + extra-cmake-modules \ +" + +SRC_URI = " \ + git://invent.kde.org/plasma/kwayland-server;nobranch=1;protocol=https \ + file://fake_project_root.patch \ +" +S = "${WORKDIR}/git/" + +OECMAKE_SOURCEPATH = "${S}/src/tools" + +inherit cmake_qt5 + +do_install() { + install -d ${D}/${bindir} + cp ${B}/qtwaylandscanner_kde ${D}/${bindir} +} diff --git a/recipes-support/qtwaylandscanner-kde/fake_project_root.patch b/recipes-support/qtwaylandscanner-kde/fake_project_root.patch new file mode 100644 index 0000000..ec622f3 --- /dev/null +++ b/recipes-support/qtwaylandscanner-kde/fake_project_root.patch @@ -0,0 +1,27 @@ +diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt +index 5eea6e49..b78afb7b 100644 +--- a/src/tools/CMakeLists.txt ++++ b/src/tools/CMakeLists.txt +@@ -1,3 +1,22 @@ ++cmake_minimum_required(VERSION 3.16) ++set(QT_MIN_VERSION "5.15.0") ++project(QtWaylandScannerKde) ++set(CMAKE_CXX_STANDARD 17) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++ ++# ECM setup ++include(FeatureSummary) ++find_package(ECM ${KF5_MIN_VERSION} NO_MODULE REQUIRED) ++set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) ++ ++include(CheckIncludeFile) ++ ++include(KDEInstallDirs) ++include(KDECompilerSettings NO_POLICY_SCOPE) ++include(KDECMakeSettings) ++ ++find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Concurrent) ++ + remove_definitions(-DQT_NO_CAST_FROM_ASCII) + add_executable(qtwaylandscanner_kde qtwaylandscanner.cpp) + target_link_libraries(qtwaylandscanner_kde Qt::Core) diff --git a/recipes-support/qtwaylandscanner-kde_5.21.90.bb b/recipes-support/qtwaylandscanner-kde_5.21.90.bb new file mode 100644 index 0000000..6082bec --- /dev/null +++ b/recipes-support/qtwaylandscanner-kde_5.21.90.bb @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: none +# SPDX-License-Identifier: CC0-1.0 + +require ${PN}.inc +SRCREV = "v${PV}"