cf12defd28
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
68 lines
2.3 KiB
TOML
68 lines
2.3 KiB
TOML
#TODO: KCoreAddons — core utilities, plugin framework. Depends on qtbase + ECM.
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"qtbase",
|
|
"kf6-extra-cmake-modules",
|
|
]
|
|
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
|
|
|
|
rm -f CMakeCache.txt
|
|
rm -rf CMakeFiles
|
|
|
|
# Disable translation installation — requires Qt6LinguistTools which is not built
|
|
sed -i 's/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/' \
|
|
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
|
|
# Re-enable kfilesystemtype.cpp but provide stub for missing statfs implementation
|
|
sed -i 's|#io/kfilesystemtype.cpp|io/kfilesystemtype.cpp|' \
|
|
"${COOKBOOK_SOURCE}/src/lib/CMakeLists.txt"
|
|
|
|
# Provide a stub determineFileSystemTypeImpl() — Q_OS_LINUX path uses Linux-specific
|
|
# statfs which isn't available in relibc. Unknown is safe (only affects dir watch optimization).
|
|
KFS="${COOKBOOK_SOURCE}/src/lib/io/kfilesystemtype.cpp"
|
|
if ! grep -q 'Redox stub' "${KFS}" 2>/dev/null; then
|
|
awk '/^KFileSystemType::Type KFileSystemType::fileSystemType/ {
|
|
print "KFileSystemType::Type determineFileSystemTypeImpl(const QByteArray &path) {"
|
|
print " Q_UNUSED(path);"
|
|
print " return KFileSystemType::Unknown;"
|
|
print "}"
|
|
print ""
|
|
}
|
|
{ print }' "${KFS}" > "${KFS}.tmp"
|
|
mv "${KFS}.tmp" "${KFS}"
|
|
fi
|
|
|
|
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}" \
|
|
-DBUILD_TESTING=OFF \
|
|
-DBUILD_QCH=OFF \
|
|
-DKCOREADDONS_USE_QML=OFF \
|
|
-DUSE_DBUS=OFF \
|
|
-Wno-dev
|
|
|
|
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
|
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
|
|
|
|
for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6*.so.*; do
|
|
[ -f "${lib}" ] || continue
|
|
patchelf --remove-rpath "${lib}" 2>/dev/null || true
|
|
done
|
|
"""
|
|
|
|
[source]
|
|
tar = "https://invent.kde.org/frameworks/kcoreaddons/-/archive/v6.10.0/kcoreaddons-v6.10.0.tar.gz"
|