1e71b37bdb
Finalize all non-artifact changes accumulated from other sessions: - config updates, recipe changes, source edits, patches - pkgar/cache artifacts intentionally excluded (build outputs) This is the maximum achievable scope for this session. Hardware-accelerated KDE blocked by: QML gate, KWin/Plasma builds, hardware GPU validation — all require build system + physical GPU.
71 lines
3.0 KiB
TOML
71 lines
3.0 KiB
TOML
#TODO: KWayland — Qt/C++ wrapper for Wayland protocols. Required by KWin.
|
|
[source]
|
|
tar = "https://download.kde.org/stable/plasma/6.3.4/kwayland-6.3.4.tar.xz"
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"qtbase",
|
|
"qtwayland",
|
|
"kf6-extra-cmake-modules",
|
|
"libwayland",
|
|
"wayland-protocols",
|
|
"plasma-wayland-protocols",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
|
|
|
for qtdir in plugins mkspecs metatypes modules; do
|
|
if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ ! -e "${COOKBOOK_SYSROOT}/${qtdir}" ]; then
|
|
ln -s "usr/${qtdir}" "${COOKBOOK_SYSROOT}/${qtdir}"
|
|
fi
|
|
done
|
|
|
|
if [ ! -e "${COOKBOOK_SYSROOT}/bin/wayland-scanner" ] || [ -f "${COOKBOOK_SYSROOT}/bin/wayland-scanner" ]; then
|
|
mkdir -p "${COOKBOOK_SYSROOT}/bin"
|
|
rm -f "${COOKBOOK_SYSROOT}/bin/wayland-scanner"
|
|
ln -sf "/usr/bin/wayland-scanner" "${COOKBOOK_SYSROOT}/bin/wayland-scanner"
|
|
fi
|
|
|
|
sed -i 's/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
|
|
sed -i 's/^find_package(WaylandProtocols 1.15)/#find_package(WaylandProtocols 1.15)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
sed -i 's/^set_package_properties(WaylandProtocols PROPERTIES TYPE REQUIRED)/#set_package_properties(WaylandProtocols PROPERTIES TYPE REQUIRED)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
sed -i 's/^find_package(PlasmaWaylandProtocols 1.16.0 CONFIG)/#find_package(PlasmaWaylandProtocols 1.16.0 CONFIG)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
sed -i 's/^set_package_properties(PlasmaWaylandProtocols PROPERTIES TYPE REQUIRED)/#set_package_properties(PlasmaWaylandProtocols PROPERTIES TYPE REQUIRED)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
sed -i '/^find_package(Wayland 1.15/a find_package(Qt6WaylandClientPrivate REQUIRED)' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
|
|
rm -f CMakeCache.txt
|
|
rm -rf CMakeFiles
|
|
|
|
export LDFLAGS+=" -lffi"
|
|
|
|
cmake "${COOKBOOK_SOURCE}" \
|
|
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
|
|
-DQT_HOST_PATH="${HOST_BUILD}" \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
|
-DCMAKE_SHARED_LINKER_FLAGS="-lffi" \
|
|
-DCMAKE_EXE_LINKER_FLAGS="-lffi" \
|
|
-DWaylandScanner_EXECUTABLE=/usr/bin/wayland-scanner \
|
|
-DWaylandProtocols_DATADIR="${COOKBOOK_SYSROOT}/share/wayland-protocols" \
|
|
-DPLASMA_WAYLAND_PROTOCOLS_DIR="${COOKBOOK_SYSROOT}/share/plasma-wayland-protocols" \
|
|
-DBUILD_TESTING=OFF \
|
|
-DBUILD_QCH=OFF \
|
|
-DQT_SKIP_AUTO_PLUGIN_INCLUSION=ON \
|
|
-DQT_NO_PRIVATE_MODULE_WARNING=ON \
|
|
-Wno-dev
|
|
|
|
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
|
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
|
|
|
|
for lib in "${COOKBOOK_STAGE}/usr/lib/"lib*.so.*; do
|
|
[ -f "${lib}" ] || continue
|
|
patchelf --remove-rpath "${lib}" 2>/dev/null || true
|
|
done
|
|
"""
|