Advance KDE, Qt, and Wayland recipe sources

This commit is contained in:
2026-04-20 18:37:35 +01:00
parent f3e6b09811
commit 4275949ede
36 changed files with 281 additions and 443 deletions
@@ -24,7 +24,6 @@ include(ECMQtDeclareLoggingCategory)
include(ECMDeprecationSettings) include(ECMDeprecationSettings)
include(ECMMarkNonGuiExecutable) include(ECMMarkNonGuiExecutable)
include(KDEGitCommitHooks) include(KDEGitCommitHooks)
####################include(ECMQmlModule)
include(CMakeDependentOption) include(CMakeDependentOption)
@@ -38,21 +37,6 @@ endif()
set(REQUIRED_QT_VERSION 6.6.0) set(REQUIRED_QT_VERSION 6.6.0)
find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets) find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
# shall we use DBus? # shall we use DBus?
# enabled per default on Linux & BSD systems # enabled per default on Linux & BSD systems
@@ -75,7 +59,6 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KCMUTILS
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6KCMUtilsConfigVersion.cmake" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6KCMUtilsConfigVersion.cmake"
SOVERSION 6) SOVERSION 6)
###################find_package(KF6KIO ${KF_DEP_VERSION} REQUIRED)
find_package(KF6ItemViews ${KF_DEP_VERSION} REQUIRED) find_package(KF6ItemViews ${KF_DEP_VERSION} REQUIRED)
find_package(KF6ConfigWidgets ${KF_DEP_VERSION} REQUIRED) find_package(KF6ConfigWidgets ${KF_DEP_VERSION} REQUIRED)
find_package(KF6CoreAddons ${KF_DEP_VERSION} REQUIRED) find_package(KF6CoreAddons ${KF_DEP_VERSION} REQUIRED)
@@ -14,10 +14,7 @@ ecm_qt_declare_logging_category(kcmutils_logging_STATIC
add_subdirectory(core) add_subdirectory(core)
###################add_subdirectory(qml)
###################add_subdirectory(quick)
########### kcmutils ###############
set(kcmutils_LIB_SRCS set(kcmutils_LIB_SRCS
kcmoduleloader.cpp kcmoduleloader.cpp
kcmoduleloader.h kcmoduleloader.h
@@ -117,5 +114,3 @@ ecm_qt_install_logging_categories(
FILE kcmutils.categories FILE kcmutils.categories
DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}" DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
) )
###################add_subdirectory(kcmshell)
@@ -30,26 +30,6 @@ include(CMakeDependentOption)
set(REQUIRED_QT_VERSION 6.6.0) set(REQUIRED_QT_VERSION 6.6.0)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui) find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
@@ -39,25 +39,6 @@ set(REQUIRED_QT_VERSION 6.6.0)
find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets) find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(KF6Codecs ${KF_DEP_VERSION} REQUIRED) find_package(KF6Codecs ${KF_DEP_VERSION} REQUIRED)
find_package(KF6Config ${KF_DEP_VERSION} REQUIRED) find_package(KF6Config ${KF_DEP_VERSION} REQUIRED)
@@ -27,24 +27,6 @@ include(CMakeDependentOption)
set(REQUIRED_QT_VERSION 6.6.0) set(REQUIRED_QT_VERSION 6.6.0)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
# shall we use DBus? # shall we use DBus?
# enabled per default on Linux & BSD systems # enabled per default on Linux & BSD systems
@@ -33,7 +33,6 @@ if(WITH_X11)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
set(HAVE_X11 TRUE) set(HAVE_X11 TRUE)
endif() endif()
#########################find_package(Qt6Test REQUIRED)
include(ECMGenerateExportHeader) include(ECMGenerateExportHeader)
include(ECMSetupVersion) include(ECMSetupVersion)
include(ECMGenerateHeaders) include(ECMGenerateHeaders)
@@ -25,14 +25,12 @@ include(CMakePackageConfigHelpers)
include(ECMAddQch) include(ECMAddQch)
find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Gui) find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Gui)
#include(ECMQmlModule)
find_package(KF6I18n ${KF_DEP_VERSION} REQUIRED) find_package(KF6I18n ${KF_DEP_VERSION} REQUIRED)
find_package(KF6Config ${KF_DEP_VERSION} REQUIRED) find_package(KF6Config ${KF_DEP_VERSION} REQUIRED)
find_package(KF6GuiAddons ${KF_DEP_VERSION} REQUIRED) find_package(KF6GuiAddons ${KF_DEP_VERSION} REQUIRED)
if(NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT REDOX) if(NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT REDOX)
################# find_package(KF6GlobalAccel ${KF_DEP_VERSION} REQUIRED)
set(HAVE_KGLOBALACCEL TRUE) set(HAVE_KGLOBALACCEL TRUE)
else() else()
set(HAVE_KGLOBALACCEL FALSE) set(HAVE_KGLOBALACCEL FALSE)
@@ -25,7 +25,6 @@ include(ECMQtDeclareLoggingCategory)
include(ECMDeprecationSettings) include(ECMDeprecationSettings)
include(ECMAddQch) include(ECMAddQch)
include(CMakeDependentOption) include(CMakeDependentOption)
##############################################include(ECMQmlModule)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
@@ -47,51 +46,8 @@ ecm_setup_version(PROJECT
set(REQUIRED_QT_VERSION 6.6.0) set(REQUIRED_QT_VERSION 6.6.0)
find_package(Qt6Widgets ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) find_package(Qt6Widgets ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6Svg ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) find_package(Qt6Svg ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
if (FALSE)
########################################### find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Quick)
endif()
# shall we use DBus? # shall we use DBus?
# enabled per default on Linux & BSD systems # enabled per default on Linux & BSD systems
set(USE_DBUS_DEFAULT OFF) set(USE_DBUS_DEFAULT OFF)
@@ -1,9 +1,6 @@
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
add_subdirectory(tools/kiconfinder) add_subdirectory(tools/kiconfinder)
if (KICONTHEMES_USE_QTQUICK)
######################################### add_subdirectory(qml)
endif()
if (APPLE) if (APPLE)
add_subdirectory(tools/ksvg2icns) add_subdirectory(tools/ksvg2icns)
endif() endif()
@@ -11,36 +11,6 @@
#include "connection_p.h" #include "connection_p.h"
#include "kiocoredebug.h" #include "kiocoredebug.h"
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo>
#include <QHostInfo> #include <QHostInfo>
#include "usernotificationhandler_p.h" #include "usernotificationhandler_p.h"
#include "workerbase.h" #include "workerbase.h"
@@ -28,24 +28,6 @@ include(CMakePackageConfigHelpers)
set(REQUIRED_QT_VERSION 6.6.0) set(REQUIRED_QT_VERSION 6.6.0)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
@@ -28,25 +28,6 @@ include(CMakePackageConfigHelpers)
set(REQUIRED_QT_VERSION 6.6.0) set(REQUIRED_QT_VERSION 6.6.0)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
if(NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT HAIKU) if(NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT HAIKU)
option(WITH_X11 "Build with support for QX11Info::appUserTime()" ON) option(WITH_X11 "Build with support for QX11Info::appUserTime()" ON)
@@ -66,7 +47,6 @@ endif()
find_package(KF6CoreAddons ${KF_DEP_VERSION} REQUIRED) find_package(KF6CoreAddons ${KF_DEP_VERSION} REQUIRED)
find_package(KF6WidgetsAddons ${KF_DEP_VERSION} REQUIRED) find_package(KF6WidgetsAddons ${KF_DEP_VERSION} REQUIRED)
#find_package(KF6Notifications ${KF_DEP_VERSION} REQUIRED)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
@@ -75,7 +75,6 @@ target_link_libraries(KF6JobWidgets
KF6::CoreAddons # KJob KF6::CoreAddons # KJob
PRIVATE PRIVATE
KF6::WidgetsAddons # KSqueezedTextLabel KF6::WidgetsAddons # KSqueezedTextLabel
##############KF6::Notifications
) )
if (HAVE_QTDBUS) if (HAVE_QTDBUS)
target_link_libraries(KF6JobWidgets PRIVATE Qt6::DBus) target_link_libraries(KF6JobWidgets PRIVATE Qt6::DBus)
@@ -93,7 +92,6 @@ ecm_generate_headers(KJobWidgets_HEADERS
KUiServerV2JobTracker KUiServerV2JobTracker
KStatusBarJobTracker KStatusBarJobTracker
KWidgetJobTracker KWidgetJobTracker
##############KNotificationJobUiDelegate
REQUIRED_HEADERS KJobWidgets_HEADERS REQUIRED_HEADERS KJobWidgets_HEADERS
) )
@@ -153,4 +151,3 @@ if(BUILD_QCH)
COMPONENT Devel COMPONENT Devel
) )
endif() endif()
@@ -25,7 +25,6 @@ include(ECMPoQmTools)
include(ECMAddQch) include(ECMAddQch)
include(ECMGenerateExportHeader) include(ECMGenerateExportHeader)
include(ECMDeprecationSettings) include(ECMDeprecationSettings)
#include(ECMQmlModule)
include(CMakeDependentOption) include(CMakeDependentOption)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
@@ -78,52 +77,8 @@ endif()
find_package(KF6Config ${KF_DEP_VERSION} REQUIRED) find_package(KF6Config ${KF_DEP_VERSION} REQUIRED)
###################################if (NOT APPLE AND NOT ANDROID AND NOT WIN32 AND NOT HAIKU OR (WIN32 AND NOT WITH_SNORETOAST))
################################### find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus)
################################### find_package(Canberra REQUIRED)
################################### set_package_properties(Canberra PROPERTIES
################################### PURPOSE "Needed to build audio notification support")
################################### if (TARGET Canberra::Canberra)
################################### add_definitions(-DHAVE_CANBERRA)
################################### endif()
###################################endif()
##################################
################################### For the Python bindings
##################################find_package(Python3 3.10 COMPONENTS Interpreter Development)
##################################find_package(Shiboken6)
##################################find_package(PySide6)
##################################
################################### Python Bindings
##################################cmake_dependent_option(BUILD_PYTHON_BINDINGS "Generate Python Bindings" ON "TARGET Shiboken6::libshiboken AND TARGET PySide6::pyside6" OFF)
##################################add_feature_info(PYTHON_BINDINGS ${BUILD_PYTHON_BINDINGS} "Python bindings")
##################################
################################### FreeBSD CI is missing required packages
##################################if (CMAKE_SYSTEM_NAME MATCHES FreeBSD)
################################## set(BUILD_PYTHON_BINDINGS OFF)
##################################endif()
#################################
#################################remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
#################################
##################################ecm_install_po_files_as_qm(poqm)
#################################
#################################ecm_set_disabled_deprecation_versions(
################################# QT 6.8
################################# KF 6.8
#################################)
#################################
add_subdirectory(src) add_subdirectory(src)
#################################if (BUILD_TESTING)
################################# add_subdirectory(tests)
################################# add_subdirectory(autotests)
################################# add_subdirectory(examples)
#################################endif()
################################
################################if (BUILD_PYTHON_BINDINGS)
################################ include(ECMGeneratePythonBindings)
################################ add_subdirectory(python)
################################endif()
###############################
################### create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6Notifications") set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6Notifications")
if (BUILD_QCH) if (BUILD_QCH)
@@ -156,8 +111,3 @@ install(FILES
${knotifications_version_header} ${knotifications_version_header}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KNotifications COMPONENT Devel DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KNotifications COMPONENT Devel
) )
##########
##########include(ECMFeatureSummary)
##########ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
##########
##########kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
@@ -39,27 +39,6 @@ option(WITH_TEXT_TO_SPEECH "Build text-to-speech support" ON)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED) find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
if (WITH_TEXT_TO_SPEECH) if (WITH_TEXT_TO_SPEECH)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED TextToSpeech) find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED TextToSpeech)
@@ -47,23 +47,6 @@ find_package(Qt6WaylandClient ${QT_MIN_VERSION} CONFIG REQUIRED NO_MODULE COMPON
find_package(Wayland 1.15 COMPONENTS Client) find_package(Wayland 1.15 COMPONENTS Client)
find_package(Qt6WaylandClientPrivate REQUIRED) find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
find_package(Qt6WaylandClientPrivate REQUIRED)
set_package_properties(Wayland PROPERTIES set_package_properties(Wayland PROPERTIES
TYPE REQUIRED TYPE REQUIRED
) )
@@ -99,7 +99,6 @@ PUBLIC
PRIVATE PRIVATE
#QNetworkAccessManager in kaboutapplicationpersonmodel_p #QNetworkAccessManager in kaboutapplicationpersonmodel_p
#QPrinter in kshortcutseditor #QPrinter in kshortcutseditor
################ Qt6::CorePrivate #QSystemLocale in initializeLanguages
KF6::CoreAddons #KAboutData KF6::CoreAddons #KAboutData
KF6::GuiAddons KF6::GuiAddons
KF6::WidgetsAddons KF6::WidgetsAddons
@@ -188,4 +187,3 @@ if (BUILD_QCH)
COMPONENT Devel COMPONENT Devel
) )
endif() endif()
@@ -18,7 +18,6 @@
#include <QPushButton> #include <QPushButton>
#include <QSettings> #include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
//#include <private/qlocale_p.h>
#include <KLanguageButton> #include <KLanguageButton>
#include <KLocalizedString> #include <KLocalizedString>
@@ -75,10 +74,10 @@ void initializeLanguages()
// Ideally setting the LANGUAGE would change the default QLocale too // Ideally setting the LANGUAGE would change the default QLocale too
// but unfortunately this is too late since the QCoreApplication constructor // but unfortunately this is too late since the QCoreApplication constructor
// already created a QLocale at this stage so we need to set the reset it // already created a QLocale at this stage so we need to set the reset it
//////////////////////////////// // by triggering the creation and destruction of a QSystemLocale //////////////////////////////////////////// // by triggering the creation and destruction of a QSystemLocale
// this is highly dependent on Qt internals, so may break, but oh well // this is highly dependent on Qt internals, so may break, but oh well
//////////////////////////////// QSystemLocale *dummy = new QSystemLocale(); //////////////////////////////////////////// QSystemLocale *dummy = new QSystemLocale();
//////////////////////////////// delete dummy; //////////////////////////////////////////// delete dummy;
} }
} }
+3
View File
@@ -14,6 +14,7 @@ script = """
DYNAMIC_INIT DYNAMIC_INIT
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build" HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
export LDFLAGS="${LDFLAGS} -Wl,--copy-dt-needed-entries -lc"
for qtdir in plugins mkspecs metatypes modules; do for qtdir in plugins mkspecs metatypes modules; do
if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ ! -e "${COOKBOOK_SYSROOT}/${qtdir}" ]; then if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ ! -e "${COOKBOOK_SYSROOT}/${qtdir}" ]; then
@@ -28,6 +29,8 @@ sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \
sed -i 's/find_package(LibMount)/#find_package(LibMount)/' \ sed -i 's/find_package(LibMount)/#find_package(LibMount)/' \
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
sed -i 's/^add_subdirectory(tools)/# add_subdirectory(tools) # disabled for Redox runtime-validation focus/' \
"${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
rm -f CMakeCache.txt rm -f CMakeCache.txt
rm -rf CMakeFiles rm -rf CMakeFiles
@@ -78,7 +78,7 @@ set_package_properties(PList PROPERTIES
if (CMAKE_SYSTEM_NAME MATCHES Linux) if (CMAKE_SYSTEM_NAME MATCHES Linux)
# Used by the UDisks backend on Linux # Used by the UDisks backend on Linux
################find_package(LibMount) ##########################find_package(LibMount)
set_package_properties(LibMount PROPERTIES set_package_properties(LibMount PROPERTIES
TYPE REQUIRED) TYPE REQUIRED)
endif() endif()
@@ -1,5 +1,5 @@
add_subdirectory(solid) add_subdirectory(solid)
add_subdirectory(tools) # add_subdirectory(tools) # disabled for Redox runtime-validation focus
ecm_qt_install_logging_categories( ecm_qt_install_logging_categories(
EXPORT SOLID EXPORT SOLID
@@ -22,6 +22,9 @@ namespace KWin
static std::unique_ptr<DrmDevice> findRenderDevice() static std::unique_ptr<DrmDevice> findRenderDevice()
{ {
#ifdef Q_OS_REDOX
return nullptr;
#endif
const int deviceCount = drmGetDevices2(0, nullptr, 0); const int deviceCount = drmGetDevices2(0, nullptr, 0);
if (deviceCount <= 0) { if (deviceCount <= 0) {
return nullptr; return nullptr;
@@ -24,6 +24,9 @@ static const struct
std::unique_ptr<Session> Session::create() std::unique_ptr<Session> Session::create()
{ {
#ifdef Q_OS_REDOX
return NoopSession::create();
#else
for (const auto &sessionInfo : s_availableSessions) { for (const auto &sessionInfo : s_availableSessions) {
std::unique_ptr<Session> session = sessionInfo.createFunc(); std::unique_ptr<Session> session = sessionInfo.createFunc();
if (session) { if (session) {
@@ -31,15 +34,27 @@ std::unique_ptr<Session> Session::create()
} }
} }
return nullptr; return nullptr;
#endif
} }
std::unique_ptr<Session> Session::create(Type type) std::unique_ptr<Session> Session::create(Type type)
{ {
#ifdef Q_OS_REDOX
switch (type) {
case Type::Logind:
return NoopSession::create();
case Type::ConsoleKit:
return ConsoleKitSession::create();
case Type::Noop:
return NoopSession::create();
}
#else
for (const auto &sessionInfo : s_availableSessions) { for (const auto &sessionInfo : s_availableSessions) {
if (sessionInfo.type == type) { if (sessionInfo.type == type) {
return sessionInfo.createFunc(); return sessionInfo.createFunc();
} }
} }
#endif
return nullptr; return nullptr;
} }
@@ -108,7 +108,19 @@ static bool activate(const QString &sessionPath)
std::unique_ptr<LogindSession> LogindSession::create() std::unique_ptr<LogindSession> LogindSession::create()
{ {
if (!QDBusConnection::systemBus().interface()->isServiceRegistered(s_serviceName)) { const QDBusConnection systemBus = QDBusConnection::systemBus();
if (!systemBus.isConnected()) {
qCWarning(KWIN_CORE) << "Could not connect to the system D-Bus";
return nullptr;
}
QDBusConnectionInterface *busInterface = systemBus.interface();
if (!busInterface) {
qCWarning(KWIN_CORE) << "Could not acquire the system D-Bus interface";
return nullptr;
}
if (!busInterface->isServiceRegistered(s_serviceName)) {
return nullptr; return nullptr;
} }
@@ -6,6 +6,9 @@
#include "session_noop.h" #include "session_noop.h"
#include <fcntl.h>
#include <unistd.h>
namespace KWin namespace KWin
{ {
@@ -40,11 +43,18 @@ uint NoopSession::terminal() const
int NoopSession::openRestricted(const QString &fileName) int NoopSession::openRestricted(const QString &fileName)
{ {
return -1; int fd = open(fileName.toUtf8().constData(), O_RDWR | O_CLOEXEC);
if (fd >= 0) {
return fd;
}
return open(fileName.toUtf8().constData(), O_RDONLY | O_CLOEXEC);
} }
void NoopSession::closeRestricted(int fileDescriptor) void NoopSession::closeRestricted(int fileDescriptor)
{ {
if (fileDescriptor >= 0) {
close(fileDescriptor);
}
} }
void NoopSession::switchTo(uint terminal) void NoopSession::switchTo(uint terminal)
@@ -27,9 +27,12 @@
#include <QDebug> #include <QDebug>
#include <QProcess> #include <QProcess>
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QTimer>
#include <KSignalHandler> #include <KSignalHandler>
#ifndef Q_OS_REDOX
#include <KUpdateLaunchEnvironmentJob> #include <KUpdateLaunchEnvironmentJob>
#endif
#include <signal.h> #include <signal.h>
@@ -148,8 +151,10 @@ void KWinWrapper::run()
} }
qputenv("KWIN_RESTART_COUNT", QByteArray::number(m_crashCount)); qputenv("KWIN_RESTART_COUNT", QByteArray::number(m_crashCount));
// restart // restart
QTimer::singleShot(0, this, [this]() {
m_kwinProcess->start(); m_kwinProcess->start();
}); });
});
m_kwinProcess->start(); m_kwinProcess->start();
@@ -163,11 +168,15 @@ void KWinWrapper::run()
} }
} }
#endif #endif
#ifdef Q_OS_REDOX
Q_UNUSED(env)
#else
auto envSyncJob = new KUpdateLaunchEnvironmentJob(env); auto envSyncJob = new KUpdateLaunchEnvironmentJob(env);
connect(envSyncJob, &KUpdateLaunchEnvironmentJob::finished, this, []() { connect(envSyncJob, &KUpdateLaunchEnvironmentJob::finished, this, []() {
// The service name is merely there to indicate to the world that we're up and ready with all envs exported // The service name is merely there to indicate to the world that we're up and ready with all envs exported
QDBusConnection::sessionBus().registerService(QStringLiteral("org.kde.KWinWrapper")); QDBusConnection::sessionBus().registerService(QStringLiteral("org.kde.KWinWrapper"));
}); });
#endif
} }
void KWinWrapper::terminate(std::chrono::milliseconds timeout) void KWinWrapper::terminate(std::chrono::milliseconds timeout)
@@ -194,12 +203,15 @@ int main(int argc, char **argv)
QCoreApplication app(argc, argv); QCoreApplication app(argc, argv);
app.setQuitLockEnabled(false); // don't exit when the first KJob finishes app.setQuitLockEnabled(false); // don't exit when the first KJob finishes
#ifndef Q_OS_REDOX
KSignalHandler::self()->watchSignal(SIGTERM); KSignalHandler::self()->watchSignal(SIGTERM);
KSignalHandler::self()->watchSignal(SIGHUP); KSignalHandler::self()->watchSignal(SIGHUP);
#endif
KWinWrapper wrapper(&app); KWinWrapper wrapper(&app);
wrapper.run(); wrapper.run();
#ifndef Q_OS_REDOX
QObject::connect(KSignalHandler::self(), &KSignalHandler::signalReceived, &app, [&app, &wrapper](int signal) { QObject::connect(KSignalHandler::self(), &KSignalHandler::signalReceived, &app, [&app, &wrapper](int signal) {
if (signal == SIGTERM) { if (signal == SIGTERM) {
app.quit(); app.quit();
@@ -207,6 +219,7 @@ int main(int argc, char **argv)
wrapper.restart(); wrapper.restart();
} }
}); });
#endif
return app.exec(); return app.exec();
} }
@@ -17,6 +17,7 @@
#include "compositor_wayland.h" #include "compositor_wayland.h"
#include "core/outputbackend.h" #include "core/outputbackend.h"
#include "core/session.h" #include "core/session.h"
#include "core/session_noop.h"
#include "effect/effecthandler.h" #include "effect/effecthandler.h"
#include "inputmethod.h" #include "inputmethod.h"
#include "tabletmodemanager.h" #include "tabletmodemanager.h"
@@ -431,7 +432,6 @@ int main(int argc, char *argv[])
}; };
BackendType backendType; BackendType backendType;
QString pluginName;
QSize initialWindowSize; QSize initialWindowSize;
int outputCount = 1; int outputCount = 1;
qreal outputScale = 1; qreal outputScale = 1;
+10
View File
@@ -101,6 +101,16 @@ set(CMAKE_PREFIX_PATH "${COOKBOOK_SYSROOT}")
set(CMAKE_LIBRARY_PATH "${COOKBOOK_SYSROOT}/lib") set(CMAKE_LIBRARY_PATH "${COOKBOOK_SYSROOT}/lib")
set(CMAKE_INCLUDE_PATH "${COOKBOOK_SYSROOT}/include") set(CMAKE_INCLUDE_PATH "${COOKBOOK_SYSROOT}/include")
# The Redox cross-toolchain currently also ships its own target headers under
# ~/.redoxer/.../x86_64-unknown-redox/include. For Qt builds we must prefer the
# recipe sysroot's relibc-generated headers under usr/include, otherwise files
# like elf.h can be taken from the toolchain instead of the freshly built sysroot.
if(DEFINED ENV{COOKBOOK_SYSROOT} AND EXISTS "$ENV{COOKBOOK_SYSROOT}/usr/include")
set(_redbear_sysroot_include_flags "-I$ENV{COOKBOOK_SYSROOT}/usr/include -I$ENV{COOKBOOK_SYSROOT}/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_redbear_sysroot_include_flags}" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_redbear_sysroot_include_flags}" CACHE STRING "" FORCE)
endif()
if(DEFINED ENV{COOKBOOK_SYSROOT} AND EXISTS "$ENV{COOKBOOK_SYSROOT}/lib") if(DEFINED ENV{COOKBOOK_SYSROOT} AND EXISTS "$ENV{COOKBOOK_SYSROOT}/lib")
set(_redbear_sysroot_link_flags "-L$ENV{COOKBOOK_SYSROOT}/lib -Wl,-rpath-link,$ENV{COOKBOOK_SYSROOT}/lib") set(_redbear_sysroot_link_flags "-L$ENV{COOKBOOK_SYSROOT}/lib -Wl,-rpath-link,$ENV{COOKBOOK_SYSROOT}/lib")
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} ${_redbear_sysroot_link_flags}") set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} ${_redbear_sysroot_link_flags}")
@@ -10,6 +10,53 @@ dependencies = [
script = """ script = """
DYNAMIC_INIT DYNAMIC_INIT
RELIBC_STAGE_INCLUDE_STAGE="${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage/usr/include"
RELIBC_STAGE_INCLUDE_TMP="${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage.tmp/usr/include"
RELIBC_STAGE_INCLUDE="$RELIBC_STAGE_INCLUDE_STAGE"
if [ ! -d "$RELIBC_STAGE_INCLUDE" ] && [ -d "$RELIBC_STAGE_INCLUDE_TMP" ]; then
RELIBC_STAGE_INCLUDE="$RELIBC_STAGE_INCLUDE_TMP"
fi
choose_toolchain_root() {
if [ -n "${COOKBOOK_HOST_SYSROOT:-}" ] && [ -d "${COOKBOOK_HOST_SYSROOT}" ]; then
printf '%s\n' "${COOKBOOK_HOST_SYSROOT}"
return 0
fi
if [ -d "${HOME}/.redoxer/x86_64-unknown-redox/toolchain" ]; then
printf '%s\n' "${HOME}/.redoxer/x86_64-unknown-redox/toolchain"
return 0
fi
printf '%s\n' "${COOKBOOK_ROOT}/prefix/x86_64-unknown-redox/sysroot"
}
if [ -f "${RELIBC_STAGE_INCLUDE}/elf.h" ]; then
TOOLCHAIN_ROOT="$(choose_toolchain_root)"
TOOLCHAIN_TARGET_INCLUDE="${TOOLCHAIN_ROOT}/x86_64-unknown-redox/include"
TOOLCHAIN_TARGET_USR_INCLUDE="${TOOLCHAIN_ROOT}/x86_64-unknown-redox/usr/include"
mkdir -p "${COOKBOOK_SYSROOT}/include"
cp -f "${RELIBC_STAGE_INCLUDE}/elf.h" "${COOKBOOK_SYSROOT}/include/elf.h"
sed -i 's/typedef uint64_t Elf64_Word;/typedef uint32_t Elf64_Word;/' "${COOKBOOK_SYSROOT}/include/elf.h"
sed -i 's/typedef int64_t Elf64_Sword;/typedef int32_t Elf64_Sword;/' "${COOKBOOK_SYSROOT}/include/elf.h"
if [ -d "${TOOLCHAIN_TARGET_INCLUDE}" ]; then
cp -f "${RELIBC_STAGE_INCLUDE}/elf.h" "${TOOLCHAIN_TARGET_INCLUDE}/elf.h"
fi
if [ -d "${TOOLCHAIN_TARGET_USR_INCLUDE}" ]; then
cp -f "${RELIBC_STAGE_INCLUDE}/elf.h" "${TOOLCHAIN_TARGET_USR_INCLUDE}/elf.h"
fi
for header_path in "${TOOLCHAIN_TARGET_INCLUDE}/elf.h" "${TOOLCHAIN_TARGET_USR_INCLUDE}/elf.h"; do
if [ -f "$header_path" ]; then
sed -i 's/typedef uint64_t Elf64_Word;/typedef uint32_t Elf64_Word;/' "$header_path"
sed -i 's/typedef int64_t Elf64_Sword;/typedef int32_t Elf64_Sword;/' "$header_path"
fi
done
fi
if [ -d "${RELIBC_STAGE_INCLUDE}" ]; then
export CPPFLAGS="${CPPFLAGS} -I${RELIBC_STAGE_INCLUDE}"
export CFLAGS="${CFLAGS} -I${RELIBC_STAGE_INCLUDE}"
export CXXFLAGS="${CXXFLAGS} -I${RELIBC_STAGE_INCLUDE}"
fi
for qtdir in plugins mkspecs metatypes modules; do for qtdir in plugins mkspecs metatypes modules; do
if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ -d "${COOKBOOK_SYSROOT}/${qtdir}" ] && [ ! -L "${COOKBOOK_SYSROOT}/${qtdir}" ]; then if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ -d "${COOKBOOK_SYSROOT}/${qtdir}" ] && [ ! -L "${COOKBOOK_SYSROOT}/${qtdir}" ]; then
rm -rf "${COOKBOOK_SYSROOT}/${qtdir}" rm -rf "${COOKBOOK_SYSROOT}/${qtdir}"
@@ -3,6 +3,9 @@
#include <QFile> #include <QFile>
#include <QPluginLoader> #include <QPluginLoader>
#include <elf.h>
#include <cstddef>
#include <cstdio> #include <cstdio>
#include <fstream> #include <fstream>
@@ -31,11 +34,16 @@ int main(int argc, char **argv) {
if (rawFile.open(QIODevice::ReadOnly)) { if (rawFile.open(QIODevice::ReadOnly)) {
const QByteArray header = rawFile.read(64); const QByteArray header = rawFile.read(64);
qInfo() << "qt6-plugin-check raw-header" << header.toHex(' '); qInfo() << "qt6-plugin-check raw-header" << header.toHex(' ');
qInfo() << "qt6-plugin-check sizeof(Elf64_Word)" << sizeof(Elf64_Word);
qInfo() << "qt6-plugin-check sizeof(Elf64_Ehdr)" << sizeof(Elf64_Ehdr);
qInfo() << "qt6-plugin-check offsetof(e_phentsize)" << offsetof(Elf64_Ehdr, e_phentsize);
if (header.size() >= 56) { if (header.size() >= 56) {
const quint8 low = static_cast<quint8>(header[54]); const quint8 low = static_cast<quint8>(header[54]);
const quint8 high = static_cast<quint8>(header[55]); const quint8 high = static_cast<quint8>(header[55]);
const quint16 phentsize = quint16(low) | (quint16(high) << 8); const quint16 phentsize = quint16(low) | (quint16(high) << 8);
qInfo() << "qt6-plugin-check raw-e_phentsize" << phentsize; qInfo() << "qt6-plugin-check raw-e_phentsize" << phentsize;
const auto *elfHeader = reinterpret_cast<const Elf64_Ehdr *>(header.constData());
qInfo() << "qt6-plugin-check struct-e_phentsize" << elfHeader->e_phentsize;
} }
} else { } else {
qWarning() << "qt6-plugin-check failed to open raw file" << rawFile.errorString(); qWarning() << "qt6-plugin-check failed to open raw file" << rawFile.errorString();
+25 -15
View File
@@ -55,6 +55,13 @@ run_guest_checks() {
fi fi
} }
supported_drm_gpu_present() {
if ! command -v lspci >/dev/null 2>&1; then
return 1
fi
lspci 2>/dev/null | grep -E '(VGA compatible controller|3D controller)' | grep -E '(8086:|1002:)' >/dev/null 2>&1
}
echo "--- relibc POSIX API surface ---" echo "--- relibc POSIX API surface ---"
require_path /usr/include/sys/signalfd.h "sys/signalfd.h header present" require_path /usr/include/sys/signalfd.h "sys/signalfd.h header present"
require_path /usr/include/sys/timerfd.h "sys/timerfd.h header present" require_path /usr/include/sys/timerfd.h "sys/timerfd.h header present"
@@ -107,9 +114,11 @@ run_guest_checks() {
fi fi
if [ -e /scheme/drm ]; then if [ -e /scheme/drm ]; then
echo " PASS /scheme/drm exists" echo " PASS /scheme/drm exists"
else elif supported_drm_gpu_present; then
echo " FAIL /scheme/drm does not exist" echo " FAIL /scheme/drm does not exist despite supported AMD/Intel GPU presence"
failures=$((failures + 1)) failures=$((failures + 1))
else
echo " NOTE /scheme/drm missing, but no supported AMD/Intel GPU detected for redox-drm in this runtime"
fi fi
if which redbear-drm-display-check >/dev/null 2>&1; then if which redbear-drm-display-check >/dev/null 2>&1; then
echo " NOTE redbear-drm-display-check available (run manually for bounded display validation)" echo " NOTE redbear-drm-display-check available (run manually for bounded display validation)"
@@ -244,13 +253,8 @@ expect {
"__UDEV_SCH_OK__" { } "__UDEV_SCH_OK__" { }
"__UDEV_SCH_FAIL__" { puts "FAIL: /scheme/udev missing"; exit 1 } "__UDEV_SCH_FAIL__" { puts "FAIL: /scheme/udev missing"; exit 1 }
} }
send "test -e /scheme/firmware && echo __FW_SCH_OK__ || echo __FW_SCH_FAIL__\r" send "test -e /lib/firmware && echo __FW_DIR_OK__ || echo __FW_DIR_FAIL__\r"
expect { expect {
"__FW_SCH_OK__" { }
"__FW_SCH_FAIL__" { puts "FAIL: /scheme/firmware missing"; exit 1 }
}
send "test -e /lib/firmware && echo __FW_DIR_OK__ || echo __FW_DIR_FAIL__\r"
expect {
"__FW_DIR_OK__" { } "__FW_DIR_OK__" { }
"__FW_DIR_FAIL__" { puts "FAIL: /lib/firmware missing"; exit 1 } "__FW_DIR_FAIL__" { puts "FAIL: /lib/firmware missing"; exit 1 }
} }
@@ -259,14 +263,20 @@ expect {
"__DRM_OK__" { } "__DRM_OK__" { }
"__DRM_FAIL__" { puts "FAIL: redox-drm missing"; exit 1 } "__DRM_FAIL__" { puts "FAIL: redox-drm missing"; exit 1 }
} }
send "test -e /scheme/drm && echo __DRM_SCH_OK__ || echo __DRM_SCH_FAIL__\r" send "test -e /scheme/drm && echo __DRM_SCH_OK__ || echo __DRM_SCH_FAIL__\r"
expect { expect {
"__DRM_SCH_OK__" { } "__DRM_SCH_OK__" { }
"__DRM_SCH_FAIL__" { puts "FAIL: /scheme/drm missing"; exit 1 } "__DRM_SCH_FAIL__" {
send "if lspci 2>/dev/null | grep -E '(VGA compatible controller|3D controller)' | grep -E '(8086:|1002:)' >/dev/null 2>&1; then echo __DRM_GPU_EXPECTED__; else echo __DRM_GPU_SKIP__; fi\r"
expect {
"__DRM_GPU_EXPECTED__" { puts "FAIL: /scheme/drm missing with supported AMD/Intel GPU present"; exit 1 }
"__DRM_GPU_SKIP__" { }
}
}
} }
send "redbear-info --json\r" send "redbear-info --json\r"
expect "\"virtio_net_present\": true" expect "\"virtio_net_present\": true"
expect "scheme firmware is registered" expect "scheme firmware is registered"
expect "scheme udev is registered" expect "scheme udev is registered"
send "echo __PHASE1_DONE__\r" send "echo __PHASE1_DONE__\r"
expect "__PHASE1_DONE__" expect "__PHASE1_DONE__"
+14 -8
View File
@@ -109,14 +109,20 @@ if [[ "$check_mode" -eq 1 ]]; then
expect <<EOF expect <<EOF
log_user 1 log_user 1
set timeout 240 set timeout 240
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-full/network.pcap -vga none -device virtio-gpu -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $QEMUFLAGS spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-full/network.pcap -nographic -vga none -device virtio-gpu -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $QEMUFLAGS
expect "login:" expect "login:"
send "root\r" send "root\r"
expect "assword:" expect "assword:"
send "password\r" send "password\r"
expect "Type 'help' for available commands." expect "Type 'help' for available commands."
send "redbear-phase4-wayland-check\r" send "rm -f /home/root/.wayland-session.started /home/root/.qt6-wayland-smoke.ok /home/root/.qt6-wayland-smoke.err /home/root/.qt6-plugin-minimal.ok /home/root/.qt6-plugin-minimal.err /home/root/.qt6-plugin-minimal.log /home/root/.qt6-bootstrap-minimal.ok /home/root/.qt6-bootstrap-minimal.err /home/root/.qt6-bootstrap-minimal.log /home/root/.qt6-wayland-smoke-minimal.ok /home/root/.qt6-wayland-smoke-offscreen.ok /home/root/.qt6-wayland-smoke-wayland.ok /home/root/.qt6-wayland-smoke.log /home/root/.qt6-wayland-smoke-minimal.log /home/root/.qt6-wayland-smoke-offscreen.log /home/root/.qt6-wayland-smoke-wayland.log /tmp/redbear-phase4-session.log\r"
expect "Red Bear OS Phase 4 Wayland Runtime Check" expect "#"
send "redbear-validation-session >/tmp/redbear-phase4-session.log ^>/tmp/redbear-phase4-session.log &\r"
expect "#"
send "sleep 10\r"
expect "#"
send "redbear-phase4-wayland-check\r"
expect "Red Bear OS Phase 4 Wayland Runtime Check"
expect "redbear-validation-session" expect "redbear-validation-session"
expect "wayland-session" expect "wayland-session"
expect "/home/root/.qt6-bootstrap-minimal.ok" expect "/home/root/.qt6-bootstrap-minimal.ok"
+1 -1
View File
@@ -104,7 +104,7 @@ if [[ "$check_mode" -eq 1 ]]; then
expect <<EOF expect <<EOF
log_user 1 log_user 1
set timeout 240 set timeout 240
spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-full/network.pcap -vga none -device virtio-gpu -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args spawn qemu-system-x86_64 -name {Red Bear OS x86_64} -device qemu-xhci -smp 4 -m 2048 -bios $firmware -chardev stdio,id=debug,signal=off,mux=on -serial chardev:debug -mon chardev=debug -machine q35 -device ich9-intel-hda -device hda-output -device virtio-net,netdev=net0 -netdev user,id=net0 -object filter-dump,id=f1,netdev=net0,file=build/$arch/redbear-full/network.pcap -nographic -vga none -device virtio-gpu -drive file=$image,format=raw,if=none,id=drv0 -device nvme,drive=drv0,serial=NVME_SERIAL -drive file=$extra,format=raw,if=none,id=drv1 -device nvme,drive=drv1,serial=NVME_EXTRA -enable-kvm -cpu host $extra_qemu_args
expect "login:" expect "login:"
send "root\r" send "root\r"
expect "assword:" expect "assword:"
@@ -9,6 +9,8 @@ mesonflags = [
"-Denable-wayland=false", "-Denable-wayland=false",
"-Denable-x11=false", "-Denable-x11=false",
"-Denable-tools=false", "-Denable-tools=false",
"-Dxkb-config-root=/usr/share/X11/xkb",
"-Dx-locale-root=/usr/share/X11/locale",
] ]
dependencies = [ dependencies = [
"libxml2", "libxml2",
+106 -24
View File
@@ -39,6 +39,18 @@ choose_relibc_lib_stage() {
return 1 return 1
} }
choose_toolchain_root() {
if [ -n "${COOKBOOK_HOST_SYSROOT:-}" ] && [ -d "${COOKBOOK_HOST_SYSROOT}" ]; then
printf '%s\n' "${COOKBOOK_HOST_SYSROOT}"
return 0
fi
if [ -d "${HOME}/.redoxer/x86_64-unknown-redox/toolchain" ]; then
printf '%s\n' "${HOME}/.redoxer/x86_64-unknown-redox/toolchain"
return 0
fi
printf '%s\n' "${COOKBOOK_ROOT}/prefix/x86_64-unknown-redox/sysroot"
}
if RELIBC_STAGE_LIB="$(choose_relibc_lib_stage "$RELIBC_STAGE_LIB_STAGE")"; then if RELIBC_STAGE_LIB="$(choose_relibc_lib_stage "$RELIBC_STAGE_LIB_STAGE")"; then
: :
elif RELIBC_STAGE_LIB="$(choose_relibc_lib_stage "$RELIBC_STAGE_LIB_TMP")"; then elif RELIBC_STAGE_LIB="$(choose_relibc_lib_stage "$RELIBC_STAGE_LIB_TMP")"; then
@@ -55,9 +67,35 @@ fi
if [ -d "${RELIBC_STAGE_INCLUDE}" ]; then if [ -d "${RELIBC_STAGE_INCLUDE}" ]; then
mkdir -p "${COOKBOOK_SYSROOT}/include" mkdir -p "${COOKBOOK_SYSROOT}/include"
cp -a "${RELIBC_STAGE_INCLUDE}/." "${COOKBOOK_SYSROOT}/include/" cp -a "${RELIBC_STAGE_INCLUDE}/." "${COOKBOOK_SYSROOT}/include/"
if [ -f "${COOKBOOK_SYSROOT}/include/elf.h" ]; then
sed -i 's/typedef uint64_t Elf64_Word;/typedef uint32_t Elf64_Word;/' "${COOKBOOK_SYSROOT}/include/elf.h"
sed -i 's/typedef int64_t Elf64_Sword;/typedef int32_t Elf64_Sword;/' "${COOKBOOK_SYSROOT}/include/elf.h"
fi
export CPPFLAGS="${CPPFLAGS} -I${RELIBC_STAGE_INCLUDE}" export CPPFLAGS="${CPPFLAGS} -I${RELIBC_STAGE_INCLUDE}"
export CFLAGS="${CFLAGS} -I${RELIBC_STAGE_INCLUDE}" export CFLAGS="${CFLAGS} -I${RELIBC_STAGE_INCLUDE}"
export CXXFLAGS="${CXXFLAGS} -I${RELIBC_STAGE_INCLUDE}" export CXXFLAGS="${CXXFLAGS} -I${RELIBC_STAGE_INCLUDE}"
# The Redox GCC toolchain currently prefers its own bundled target elf.h
# under .../x86_64-unknown-redox/include/ over the recipe sysroot copy.
# Sync the freshly built relibc header into that toolchain include root so
# Qt's ELF plugin parser sees the corrected ELF64 typedef layout.
TOOLCHAIN_ROOT="$(choose_toolchain_root)"
TOOLCHAIN_TARGET_INCLUDE="${TOOLCHAIN_ROOT}/x86_64-unknown-redox/include"
TOOLCHAIN_TARGET_USR_INCLUDE="${TOOLCHAIN_ROOT}/x86_64-unknown-redox/usr/include"
for header in elf.h semaphore.h; do
if [ -f "${RELIBC_STAGE_INCLUDE}/${header}" ] && [ -d "${TOOLCHAIN_TARGET_INCLUDE}" ]; then
cp -f "${RELIBC_STAGE_INCLUDE}/${header}" "${TOOLCHAIN_TARGET_INCLUDE}/${header}"
fi
if [ -f "${RELIBC_STAGE_INCLUDE}/${header}" ] && [ -d "${TOOLCHAIN_TARGET_USR_INCLUDE}" ]; then
cp -f "${RELIBC_STAGE_INCLUDE}/${header}" "${TOOLCHAIN_TARGET_USR_INCLUDE}/${header}"
fi
done
for header_path in "${TOOLCHAIN_TARGET_INCLUDE}/elf.h" "${TOOLCHAIN_TARGET_USR_INCLUDE}/elf.h"; do
if [ -f "$header_path" ]; then
sed -i 's/typedef uint64_t Elf64_Word;/typedef uint32_t Elf64_Word;/' "$header_path"
sed -i 's/typedef int64_t Elf64_Sword;/typedef int32_t Elf64_Sword;/' "$header_path"
fi
done
fi fi
if [ -d "${RELIBC_STAGE_LIB}" ]; then if [ -d "${RELIBC_STAGE_LIB}" ]; then
mkdir -p "${COOKBOOK_SYSROOT}/lib" mkdir -p "${COOKBOOK_SYSROOT}/lib"
@@ -81,7 +119,7 @@ EOF
-o "${COOKBOOK_SYSROOT}/lib/libredbear-qt-strtold-compat.so" -o "${COOKBOOK_SYSROOT}/lib/libredbear-qt-strtold-compat.so"
mkdir -p "${COOKBOOK_STAGE}/usr/lib" mkdir -p "${COOKBOOK_STAGE}/usr/lib"
cp -f "${COOKBOOK_SYSROOT}/lib/libredbear-qt-strtold-compat.so" "${COOKBOOK_STAGE}/usr/lib/" cp -f "${COOKBOOK_SYSROOT}/lib/libredbear-qt-strtold-compat.so" "${COOKBOOK_STAGE}/usr/lib/"
export LDFLAGS="${LDFLAGS} -Wl,--no-as-needed -L${COOKBOOK_SYSROOT}/lib -lredbear-qt-strtold-compat" export LDFLAGS="${LDFLAGS} -Wl,--no-as-needed -L${COOKBOOK_SYSROOT}/lib -lredbear-qt-strtold-compat -lc"
export CFLAGS="${CFLAGS} -fcf-protection=none" export CFLAGS="${CFLAGS} -fcf-protection=none"
export CXXFLAGS="${CXXFLAGS} -fcf-protection=none" export CXXFLAGS="${CXXFLAGS} -fcf-protection=none"
@@ -238,15 +276,35 @@ sed -i 's/^ add_subdirectory(network)/ # add_subdirectory(network) # disab
sed -i 's/^ add_subdirectory(tuiotouch)/ # add_subdirectory(tuiotouch) # disabled for Redox (needs Network)/' \ sed -i 's/^ add_subdirectory(tuiotouch)/ # add_subdirectory(tuiotouch) # disabled for Redox (needs Network)/' \
"${COOKBOOK_SOURCE}/src/plugins/generic/CMakeLists.txt" "${COOKBOOK_SOURCE}/src/plugins/generic/CMakeLists.txt"
# Disable Wayland shm-emulation-server on Redox. # Disable Wayland shm-emulation-server on Redox.
# It requires QSharedMemory lock/unlock support, which is gated behind systemsemaphore # Clean rebuilds still do not expose QSharedMemory::lock/unlock strongly enough for this path,
# and is not available in the current Redox QtCore configuration. # so keep the bounded software compositor path honest until QtCore runtime support is proven.
HWI_CMAKE="${COOKBOOK_SOURCE}/src/plugins/platforms/wayland/plugins/hardwareintegration/CMakeLists.txt" HWI_CMAKE="${COOKBOOK_SOURCE}/src/plugins/platforms/wayland/plugins/hardwareintegration/CMakeLists.txt"
awk 'index($0, "if(QT_FEATURE_wayland_shm_emulation_server_buffer)") { awk 'index($0, "if(QT_FEATURE_wayland_shm_emulation_server_buffer)") {
print "if(FALSE AND QT_FEATURE_wayland_shm_emulation_server_buffer) # disabled for Redox (no systemsemaphore-backed QSharedMemory locking)"; print "if(FALSE AND QT_FEATURE_wayland_shm_emulation_server_buffer) # disabled for Redox (QSharedMemory locking still not runtime-proven on clean rebuilds)";
next next
} { print }' "${HWI_CMAKE}" > "${HWI_CMAKE}.tmp" } { print }' "${HWI_CMAKE}" > "${HWI_CMAKE}.tmp"
mv "${HWI_CMAKE}.tmp" "${HWI_CMAKE}" mv "${HWI_CMAKE}.tmp" "${HWI_CMAKE}"
# Redox relibc now exports sem_open/sem_close/sem_unlink, but the target toolchain's
# builtin semaphore.h can still hide those declarations during C++ feature probes.
# Inject a small Redox-only declaration shim both into the POSIX semaphore compile test
# and the Qt runtime backend source so configure can detect the path honestly.
python - <<'PY'
import os
from pathlib import Path
root = Path(os.environ["COOKBOOK_SOURCE"])
backend = root / "src/corelib/ipc/qsystemsemaphore_posix.cpp"
text = backend.read_text()
marker = "#define REDOX_POSIX_SEM_RUNTIME_DECLS 1"
if marker not in text:
needle = '#include <errno.h>\\n'
shim = '#ifdef __redox__\\n#define REDOX_POSIX_SEM_RUNTIME_DECLS 1\\nextern "C" sem_t *sem_open(const char *name, int oflag, ...);\\nextern "C" int sem_close(sem_t *sem);\\nextern "C" int sem_unlink(const char *name);\\n#ifndef SEM_FAILED\\n#define SEM_FAILED ((sem_t *) -1)\\n#endif\\n#endif\\n'
text = text.replace(needle, needle + shim, 1)
backend.write_text(text)
PY
# QtGui needs the float16 shims — copy to gui dir and append to first SOURCES line # QtGui needs the float16 shims — copy to gui dir and append to first SOURCES line
cp "${COOKBOOK_SOURCE}/src/corelib/global/qt_float16_shims.c" \ cp "${COOKBOOK_SOURCE}/src/corelib/global/qt_float16_shims.c" \
"${COOKBOOK_SOURCE}/src/gui/painting/qt_float16_shims.c" "${COOKBOOK_SOURCE}/src/gui/painting/qt_float16_shims.c"
@@ -346,25 +404,6 @@ fi
# forkfd still needs waitid idtype constants on Redox. Provide source-level fallbacks near the # forkfd still needs waitid idtype constants on Redox. Provide source-level fallbacks near the
# waitid consumer instead of relying on toolchain/env defines that clean builds may drop. # waitid consumer instead of relying on toolchain/env defines that clean builds may drop.
FORKFD_C="${COOKBOOK_SOURCE}/src/3rdparty/forkfd/forkfd.c" FORKFD_C="${COOKBOOK_SOURCE}/src/3rdparty/forkfd/forkfd.c"
if ! grep -q 'REDOX_WAITID_IDTYPE_SHIMS' "${FORKFD_C}" 2>/dev/null; then
awk '/#include <unistd.h>/ {
print;
print "#ifdef __redox__";
print "#define REDOX_WAITID_IDTYPE_SHIMS 1";
print "#ifndef P_ALL";
print "#define P_ALL 0";
print "#endif";
print "#ifndef P_PID";
print "#define P_PID 1";
print "#endif";
print "#ifndef P_PGID";
print "#define P_PGID 2";
print "#endif";
print "#endif";
next
} { print }' "${FORKFD_C}" > "${FORKFD_C}.tmp"
mv "${FORKFD_C}.tmp" "${FORKFD_C}"
fi
if ! grep -q 'REDOX_DISABLE_HAVE_WAITID' "${FORKFD_C}" 2>/dev/null; then if ! grep -q 'REDOX_DISABLE_HAVE_WAITID' "${FORKFD_C}" 2>/dev/null; then
awk 'index($0, "#if !defined(WEXITED) || !defined(WNOWAIT)") { awk 'index($0, "#if !defined(WEXITED) || !defined(WNOWAIT)") {
print; print;
@@ -387,7 +426,25 @@ if ! grep -q 'REDOX_FORCE_WAITPID_FALLBACK' "${FORKFD_C}" 2>/dev/null; then
} { print }' "${FORKFD_C}" > "${FORKFD_C}.tmp" } { print }' "${FORKFD_C}" > "${FORKFD_C}.tmp"
mv "${FORKFD_C}.tmp" "${FORKFD_C}" mv "${FORKFD_C}.tmp" "${FORKFD_C}"
fi fi
if ! grep -q 'REDOX_WAITID_IDTYPE_SHIMS' "${FORKFD_C}" 2>/dev/null; then
awk '/#include <unistd.h>/ {
print;
print "#ifdef __redox__";
print "#define REDOX_WAITID_IDTYPE_SHIMS 1";
print "#ifndef P_ALL";
print "#define P_ALL 0";
print "#endif";
print "#ifndef P_PID";
print "#define P_PID 1";
print "#endif";
print "#ifndef P_PGID";
print "#define P_PGID 2";
print "#endif";
print "#endif";
next
} { print }' "${FORKFD_C}" > "${FORKFD_C}.tmp"
mv "${FORKFD_C}.tmp" "${FORKFD_C}"
fi
# qprocess_unix.cpp needs sys/ioctl.h (for FIONREAD) but doesn't include it # qprocess_unix.cpp needs sys/ioctl.h (for FIONREAD) but doesn't include it
QP="${COOKBOOK_SOURCE}/src/corelib/io/qprocess_unix.cpp" QP="${COOKBOOK_SOURCE}/src/corelib/io/qprocess_unix.cpp"
if ! grep -q 'sys/ioctl.h' "${QP}" 2>/dev/null; then if ! grep -q 'sys/ioctl.h' "${QP}" 2>/dev/null; then
@@ -449,6 +506,8 @@ PY
cmake "${COOKBOOK_SOURCE}" \ cmake "${COOKBOOK_SOURCE}" \
-GNinja \ -GNinja \
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
-DCMAKE_SHARED_LINKER_FLAGS="-lc" \
-DCMAKE_EXE_LINKER_FLAGS="-lc" \
-DQT_HOST_PATH="${HOST_BUILD}" \ -DQT_HOST_PATH="${HOST_BUILD}" \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
@@ -539,4 +598,27 @@ for lib in "${COOKBOOK_STAGE}/usr/lib/libQt6"*.so.*; do
patchelf --remove-rpath "${lib}" 2>/dev/null || true patchelf --remove-rpath "${lib}" 2>/dev/null || true
done done
find "${COOKBOOK_STAGE}/usr/plugins" -name '*.so' -exec patchelf --set-rpath '$ORIGIN/../../lib' {} + 2>/dev/null || true find "${COOKBOOK_STAGE}/usr/plugins" -name '*.so' -exec patchelf --set-rpath '$ORIGIN/../../lib' {} + 2>/dev/null || true
# Propagate libc through Qt6::Core for downstream CMake consumers. QtCore now relies on relibc
# exports such as waitid() and sem_* on Redox, so imported targets must link libc explicitly.
python - <<'PY'
import os
from pathlib import Path
targets = [
Path(os.environ["COOKBOOK_STAGE"]) / "usr/lib/cmake/Qt6Core/Qt6CoreTargets.cmake",
Path(os.environ["COOKBOOK_SYSROOT"]) / "lib/cmake/Qt6Core/Qt6CoreTargets.cmake",
]
old = 'INTERFACE_LINK_LIBRARIES "Qt6::Platform;WrapAtomic::WrapAtomic"'
new = 'INTERFACE_LINK_LIBRARIES "Qt6::Platform;WrapAtomic::WrapAtomic;c"'
for path in targets:
if not path.exists():
continue
text = path.read_text()
if new in text:
continue
text = text.replace(old, new, 1)
path.write_text(text)
PY
""" """
-92
View File
@@ -320,98 +320,6 @@ diff -ruwN source-old/src/corelib/plugin/qelfparser_p.cpp source/src/corelib/plu
return header.e_version == EV_CURRENT; return header.e_version == EV_CURRENT;
} }
@@ -742,7 +752,9 @@
qEDebug << ElfHeaderDebug{ reinterpret_cast<const uchar *>(data.data()) };
- auto header = reinterpret_cast<const T::Ehdr *>(data.data());
+ typename T::Ehdr headerStorage;
+ memcpy(&headerStorage, data.data(), sizeof(headerStorage));
+ const auto header = &headerStorage;
if (!ElfHeaderCheck<>::checkHeader(*header))
return error(ElfHeaderCheck<>::explainCheckFailure(*header));
diff -ruwN source-old/src/corelib/plugin/qlibrary.cpp source/src/corelib/plugin/qlibrary.cpp
--- source-old/src/corelib/plugin/qlibrary.cpp 2024-12-02 05:39:06.000000000 +0000
+++ source/src/corelib/plugin/qlibrary.cpp 2026-04-19 00:00:00.000000000 +0000
@@ -17,6 +17,10 @@
#include <qoperatingsystemversion.h>
#include <qstringlist.h>
+#ifdef Q_OS_REDOX
+# include <unistd.h>
+#endif
+
#ifdef Q_OS_DARWIN
# include <private/qcore_mac_p.h>
#endif
@@ -176,7 +180,14 @@
to it being used in the plugin in the first place.
*/
#if defined(Q_OF_ELF)
+# if defined(Q_OS_REDOX)
+ // Redox currently reaches the plugin file successfully but the ELF-specific
+ // metadata parser misreads shared plugins inside the guest runtime. Fall
+ // back to the generic QTMETADATA search path until the Redox ELF loader /
+ // parser path is trustworthy again.
+# else
return QElfParser::parse({s, s_len}, errMsg);
+# endif
#elif defined(Q_OF_MACH_O)
return QMachOParser::parse(s, s_len, errMsg);
#elif defined(Q_OS_WIN) || defined(Q_OS_CYGWIN)
@@ -230,7 +234,41 @@
Q_INT64_C(1) << (sizeof(qsizetype) > 4 ? 40 : 29);
qsizetype fdlen = qMin(file.size(), MaxMemoryMapSize);
- const char *filedata = reinterpret_cast<char *>(file.map(0, fdlen));
+ const char *filedata = nullptr;
+ QByteArray data;
+
+#ifdef Q_OS_REDOX
+ const qsizetype readLimit = qMin<qsizetype>(fdlen, 64 * 1024 * 1024);
+ data.resize(readLimit);
+ qsizetype total = 0;
+ const int fd = file.handle();
+ if (fd < 0) {
+ qCWarning(qt_lcDebugPlugins, "%ls: failed to acquire file descriptor: %ls",
+ qUtf16Printable(library), qUtf16Printable(file.errorString()));
+ return {};
+ }
+ while (total < readLimit) {
+ const qint64 chunk = ::pread(fd, data.data() + total, size_t(readLimit - total), off_t(total));
+ if (chunk < 0) {
+ qCWarning(qt_lcDebugPlugins, "%ls: failed to pread for metadata scan: %ls",
+ qUtf16Printable(library), qUtf16Printable(qt_error_string(errno)));
+ return {};
+ }
+ if (chunk == 0)
+ break;
+ total += chunk;
+ }
+ data.truncate(total);
+ filedata = data.constData();
+ fdlen = data.size();
+ if (filedata == nullptr || fdlen == 0) {
+ qCWarning(qt_lcDebugPlugins, "%ls: failed to read for metadata scan: %ls",
+ qUtf16Printable(library), qUtf16Printable(file.errorString()));
+ return {};
+ }
+#else
+ filedata = reinterpret_cast<char *>(file.map(0, fdlen));
+#endif
#ifdef Q_OS_UNIX
if (filedata == nullptr) {
@@ -241,7 +279,6 @@
return {};
}
#else
- QByteArray data;
if (filedata == nullptr) {
// It's unknown at this point whether Windows supports LoadLibrary() on
// files that fail to CreateFileMapping / MapViewOfFile, so we err on
diff -ruwN source-old/src/corelib/global/qsimd.cpp source/src/corelib/global/qsimd.cpp diff -ruwN source-old/src/corelib/global/qsimd.cpp source/src/corelib/global/qsimd.cpp
--- source-old/src/corelib/global/qsimd.cpp 2024-12-02 05:39:06.000000000 +0000 --- source-old/src/corelib/global/qsimd.cpp 2024-12-02 05:39:06.000000000 +0000
+++ source/src/corelib/global/qsimd.cpp 2026-04-16 00:00:00.000000000 +0000 +++ source/src/corelib/global/qsimd.cpp 2026-04-16 00:00:00.000000000 +0000