konsole: switch to ninja to drop cursed hack

this avoids running into the weird automoc race condition
so we can drop that whole path and be done with it
This commit is contained in:
q66 2021-01-29 16:13:41 +01:00
parent bb664068d0
commit ce3d544e68

View File

@ -3,9 +3,9 @@ pkgname=konsole
version=20.12.1
revision=1
build_style=cmake
configure_args="-DBUILD_TESTING=OFF"
configure_args="-DBUILD_TESTING=OFF -GNinja"
hostmakedepends="pkg-config extra-cmake-modules kcoreaddons qt5-devel
gettext qt5-qmake kdoctools kconfig"
gettext qt5-qmake kdoctools kconfig ninja"
makedepends="kinit-devel knewstuff-devel knotifyconfig-devel kparts-devel
kpty-devel"
short_desc="KDE's Terminal Emulator"
@ -15,46 +15,14 @@ homepage="https://kde.org/applications/en/system/org.kde.konsole"
distfiles="${KDE_SITE}/release-service/${version}/src/konsole-${version}.tar.xz"
checksum=b690be392462cab5abac74d1e1010c3f991c3d00968b51ed5525040640d769ec
replaces="konsole5>=0"
# FIXME: after we switch cmake build-style to ninja, remove this as well as
# the ninja host-dependency and configure_arg as they will become superfluous
make_cmd=ninja
if [ "$CROSS_BUILD" ]; then
configure_args+=" -DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
fi
post_configure() {
# there is some really awful race in cmake or something
#
# careful inspection of a diff between a working platform and a broken
# one (seemingly every big endian target) reveals that this dependency
# is not added in these specific files and these file only; that results
# in build errors like:
#
# [ 98%] Linking CXX shared library ../bin/libkdeinit5_konsole.so
# /usr/bin/ld: ../ProfileModel.cpp.o: undefined reference to `vtable for Konsole::ProfileModel'
#
# this is obviously a horrible hack, but also debugging this seems pretty
# non-trivial to say the least, and honestly i am not in the mood for
# debugging this either, it's frustrating enough as it is
#
# next release we should try if this still fails, and in case it magically
# gets fixed, remove this and pretend i've never made this change
#
# (git will remember, and it will haunt me forever, that is my punishment)
#
[ -n "$(grep 'konsoleprofile_autogen/mocs_compilation' \
build/src/CMakeFiles/kdeinit_konsole.dir/build.make)" ] && return 0
msg_normal "cursed build system encountered, brace for impact\n"
vsed -i "s,^kdeinit_konsole_EXTERNAL_OBJECTS =,& $(pwd)/build/src/profile/CMakeFiles/konsoleprofile.dir/konsoleprofile_autogen/mocs_compilation.cpp.o," \
build/src/CMakeFiles/kdeinit_konsole.dir/build.make
echo "bin/libkdeinit5_konsole.so: src/profile/CMakeFiles/konsoleprofile.dir/konsoleprofile_autogen/mocs_compilation.cpp.o" \
>> build/src/CMakeFiles/kdeinit_konsole.dir/build.make
vsed -i "s,ProfileShortcutDelegate.cpp.o,& profile/CMakeFiles/konsoleprofile.dir/konsoleprofile_autogen/mocs_compilation.cpp.o," \
build/src/CMakeFiles/kdeinit_konsole.dir/link.txt
}
konsole5_package() {
build_style=meta
short_desc+=" (transitional dummy package)"