297875a91e
- hostinfo.cpp not in cmake KIOCORE source list; workerinterface.cpp called KIO::HostInfo::lookupHost which had no implementation - Replaced HostInfo::lookupHost call with direct QHostInfo::fromName in workerinterface.cpp via recipe sed, removed hostinfo.h include - kf6-kio now publishes 2.4MB pkgar to repo - Enabled in config. Unblocks kde-cli-tools (kde-cli has its own separate build error) - Blocked count: 12 → 11 (kf6-kio now builds)
88 lines
2.8 KiB
TOML
88 lines
2.8 KiB
TOML
# KIO — reduced real KIOCore build for Red Bear OS.
|
|
#
|
|
# Honesty boundary:
|
|
# - KIOCORE_ONLY=ON and BUILD_WITH_QML=OFF stay intentional.
|
|
# - USE_DBUS=ON is now enabled to expose more real KIOCore functionality.
|
|
# - QtNetwork is still unavailable on Redox, so KIOCore uses source-local
|
|
# Redox compatibility headers for the small QHostInfo/QHostAddress surface it needs.
|
|
# - This recipe no longer forges QtNetwork headers into the shared sysroot.
|
|
[source]
|
|
tar = "https://invent.kde.org/frameworks/kio/-/archive/v6.10.0/kio-v6.10.0.tar.gz"
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"qtbase",
|
|
"qtdeclarative",
|
|
"kf6-extra-cmake-modules",
|
|
"kf6-kcoreaddons",
|
|
"kf6-kconfig",
|
|
"kf6-ki18n",
|
|
"kf6-kdbusaddons",
|
|
"kf6-kjobwidgets",
|
|
"kf6-kservice",
|
|
"kf6-kbookmarks",
|
|
"kf6-kcompletion",
|
|
"kf6-kwidgetsaddons",
|
|
"kf6-kwindowsystem",
|
|
"kf6-kiconthemes",
|
|
"kf6-kitemviews",
|
|
"kf6-kxmlgui",
|
|
"kf6-knotifications",
|
|
"kf6-kcrash",
|
|
"kf6-solid",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
|
|
|
mkdir -p "${HOST_BUILD}/bin"
|
|
for tool in moc rcc uic qdbuscpp2xml qdbusxml2cpp wayland-scanner; do
|
|
if [ -f "/usr/bin/${tool}" ] && [ ! -e "${HOST_BUILD}/bin/${tool}" ]; then
|
|
ln -sf "/usr/bin/${tool}" "${HOST_BUILD}/bin/${tool}"
|
|
fi
|
|
done
|
|
|
|
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
|
|
|
|
# workerinterface.cpp calls KIO::HostInfo::lookupHost which needs
|
|
# hostinfo.cpp — but hostinfo.cpp isn't in the cmake source list for
|
|
# KIOCORE_ONLY. Replace the call with a direct QHostInfo::fromName.
|
|
sed -i 's/const QHostInfo info = HostInfo::lookupHost(hostName, 1500);/const QHostInfo info = QHostInfo::fromName(hostName);/' \
|
|
"${COOKBOOK_SOURCE}/src/core/workerinterface.cpp" 2>/dev/null || true
|
|
# Also remove the hostinfo.h include — no longer needed
|
|
sed -i '/#include "hostinfo.h"/d' \
|
|
"${COOKBOOK_SOURCE}/src/core/workerinterface.cpp" 2>/dev/null || true
|
|
|
|
rm -f CMakeCache.txt
|
|
rm -rf CMakeFiles
|
|
|
|
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 \
|
|
-DQT_SKIP_AUTO_PLUGIN_INCLUSION=ON \
|
|
-DKIOCORE_ONLY=ON \
|
|
-DBUILD_WITH_QML=OFF \
|
|
-DUSE_DBUS=ON \
|
|
-DWITH_X11=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
|
|
"""
|