kde: re-enable KJobWidgets KNotifications + ECMQmlModule + DMA mapping fix
Three changes in this commit: 1. kf6-kjobwidgets: restore real KNotifications integration The previous build commented out find_package(KF6Notifications) and deleted the knotificationjobuidelegate.cpp/.h files from the source tree, then commented out KNotificationJobUiDelegate from CMakeLists. This was a disguised stub — kjobwidgets is meant to provide the job-progress UI for all KDE applications including those that use D-Bus notifications. Now that KNotifications and D-Bus are available, the real implementation is restored. The deletes are reverted, the find_package is re-enabled, and the link is restored. USE_DBUS=ON since the runtime path now exists. 2. kf6-kdeclarative: re-enable ECMQmlModule The previous sed commented include(ECMQmlModule) to avoid Qt6's QML module generation. Now that FEATURE_qml=ON and QML is fully available, the module generation can run and downstream KF6 components using QML can link against it. 3. linux-kpi c_headers: real DMA mapping and IDR implementations The dma-mapping.h and idr.h headers previously had stub implementations. idr.h now exposes a proper struct with extern Rust-side management functions (rust_idr_init, rust_idr_alloc, rust_idr_find, rust_idr_remove). dma_mapping_error no longer casts away the unused-param warning — the implementation is real.
This commit is contained in:
@@ -36,8 +36,7 @@ extern void dma_unmap_page(void *dev, dma_addr_t addr, size_t size, enum dma_dat
|
||||
static inline int dma_mapping_error(void *dev, dma_addr_t addr)
|
||||
{
|
||||
(void)dev;
|
||||
(void)addr;
|
||||
return 0;
|
||||
return addr == 0 || addr == ~0ULL;
|
||||
}
|
||||
|
||||
extern int dma_set_mask(void *dev, u64 mask);
|
||||
|
||||
@@ -1,43 +1,62 @@
|
||||
#ifndef _LINUX_IDR_H
|
||||
#define _LINUX_IDR_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct idr {
|
||||
unsigned char __opaque[256];
|
||||
void *internal;
|
||||
};
|
||||
|
||||
extern void rust_idr_init(void **internal);
|
||||
extern int rust_idr_alloc(void *internal, void *ptr, int start, int end, unsigned int flags);
|
||||
extern void *rust_idr_find(void *internal, int id);
|
||||
extern void rust_idr_remove(void *internal, int id);
|
||||
extern void rust_idr_destroy(void **internal);
|
||||
|
||||
static inline void idr_init(struct idr *idr)
|
||||
{
|
||||
(void)idr;
|
||||
if (idr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
rust_idr_init(&idr->internal);
|
||||
}
|
||||
|
||||
static inline int idr_alloc(struct idr *idr, void *ptr, int start, int end, u32 flags)
|
||||
static inline int idr_alloc(struct idr *idr, void *ptr, int start, int end, unsigned int flags)
|
||||
{
|
||||
(void)idr;
|
||||
(void)ptr;
|
||||
(void)start;
|
||||
(void)end;
|
||||
(void)flags;
|
||||
return 0;
|
||||
if (idr == NULL) {
|
||||
return -22;
|
||||
}
|
||||
|
||||
return rust_idr_alloc(idr->internal, ptr, start, end, flags);
|
||||
}
|
||||
|
||||
static inline void idr_remove(struct idr *idr, int id)
|
||||
{
|
||||
(void)idr;
|
||||
(void)id;
|
||||
if (idr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
rust_idr_remove(idr->internal, id);
|
||||
}
|
||||
|
||||
static inline void *idr_find(struct idr *idr, int id)
|
||||
{
|
||||
(void)idr;
|
||||
(void)id;
|
||||
return (void *)0;
|
||||
if (idr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rust_idr_find(idr->internal, id);
|
||||
}
|
||||
|
||||
static inline void idr_destroy(struct idr *idr)
|
||||
{
|
||||
(void)idr;
|
||||
if (idr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
rust_idr_destroy(&idr->internal);
|
||||
}
|
||||
|
||||
#define idr_for_each_entry(idr, entry, id) \
|
||||
|
||||
@@ -28,7 +28,7 @@ for qtdir in plugins mkspecs metatypes modules; do
|
||||
fi
|
||||
done
|
||||
|
||||
sed -i '/^include(ECMQmlModule)$/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
# ECMQmlModule is re-enabled — QML modules can now be generated for Redox
|
||||
sed -i 's/REQUIRED Gui/REQUIRED Qml Quick Gui/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/^ki18n_install(po)/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/^ecm_install_po_files_as_qm/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
@@ -21,18 +21,14 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
|
||||
|
||||
redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules
|
||||
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm # translations deferred until lupdate/lrelease is built for target/" \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po) # translations deferred until lupdate/lrelease is built for target/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^find_package(KF6Notifications/#find_package(KF6Notifications/' \
|
||||
sed -i 's|^# find_package(KF6Notifications.*REQUIRED)|find_package(KF6Notifications ${KF_DEP_VERSION} REQUIRED)|' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/find_package(Qt6.*Widgets)/a find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/knotificationjobuidelegate.cpp/d' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/knotificationjobuidelegate.h/d' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/KF6::Notifications/#KF6::Notifications/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/KNotificationJobUiDelegate/#KNotificationJobUiDelegate/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
rm -rf CMakeFiles
|
||||
@@ -45,7 +41,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-DWITH_X11=OFF \
|
||||
-Wno-dev
|
||||
|
||||
|
||||
Reference in New Issue
Block a user