void-packages/srcpkgs/konsole/template
2021-01-11 08:21:08 +01:00

62 lines
2.6 KiB
Bash

# Template file for 'konsole'
pkgname=konsole
version=20.12.1
revision=1
build_style=cmake
configure_args="-DBUILD_TESTING=OFF"
hostmakedepends="pkg-config extra-cmake-modules kcoreaddons qt5-devel
gettext qt5-qmake kdoctools kconfig"
makedepends="kinit-devel knewstuff-devel knotifyconfig-devel kparts-devel
kpty-devel"
short_desc="KDE's Terminal Emulator"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later, LGPL-2.0-or-later, GFDL-1.2-or-later"
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"
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)"
depends="konsole>=${version}_${revision}"
}