Add fake qtwaylandscanner-kde package

This support packages splits part of the kwayland-server code and
builds it for the cross-compilation toolchain.
This commit is contained in:
Andreas Cord-Landwehr
2021-05-22 17:00:12 +02:00
parent 6f372296a7
commit e820c6df25
3 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: 2018-2020 Volker Krause <vkrause@kde.org>
#
# 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}
}

View File

@@ -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)

View File

@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
require ${PN}.inc
SRCREV = "v${PV}"