diff --git a/srcpkgs/kdesignerplugin/patches/kdesignerplugin-on-crossbuild.patch b/srcpkgs/kdesignerplugin/patches/kdesignerplugin-on-crossbuild.patch new file mode 100644 index 0000000000..582d1b3e4b --- /dev/null +++ b/srcpkgs/kdesignerplugin/patches/kdesignerplugin-on-crossbuild.patch @@ -0,0 +1,20 @@ +On cross-build, use the host's binary. +Apply to both cross-build kdesignerplugin's package and use its package from others. +--- KF5DesignerPluginMacros.cmake.ORIG ++++ KF5DesignerPluginMacros.cmake +@@ -51,9 +51,14 @@ + get_filename_component(basename ${input} NAME_WE) + set(source ${CMAKE_CURRENT_BINARY_DIR}/${basename}widgets.cpp) + ++ set(KGENDESIGNERPLUGIN_LOCATION KF5::kgendesignerplugin) ++ if(CMAKE_CROSSCOMPILING) ++ set(KGENDESIGNERPLUGIN_LOCATION /usr/bin/kgendesignerplugin) ++ endif() ++ + # create source file from the .widgets file + add_custom_command(OUTPUT ${source} +- COMMAND KF5::kgendesignerplugin ++ COMMAND ${KGENDESIGNERPLUGIN_LOCATION} + ARGS -o ${source} ${input} + MAIN_DEPENDENCY ${input}) + diff --git a/srcpkgs/kdesignerplugin/template b/srcpkgs/kdesignerplugin/template index e2fba08b78..6fd48c9009 100644 --- a/srcpkgs/kdesignerplugin/template +++ b/srcpkgs/kdesignerplugin/template @@ -1,7 +1,7 @@ # Template file for 'kdesignerplugin' pkgname=kdesignerplugin version=5.43.0 -revision=2 +revision=3 build_style=cmake configure_args="-DBUILD_TESTING=OFF" hostmakedepends="extra-cmake-modules" @@ -19,14 +19,6 @@ if [ -n "$CROSS_BUILD" ]; then configure_args+=" -DMEINPROC5_EXECUTABLE=/usr/bin/meinproc5" fi -post_configure() { - if [ -n "$CROSS_BUILD" ]; then - # Hack to use host's kgendesignerplugin - find build/src/CMakeFiles -name "*.make" -exec sed -i "{}" \ - -e "s;KF5::\(kgendesignerplugin\);/usr/bin/\1;" \; - fi -} - kgendesignerplugin_package() { short_desc+=" - tool" pkg_install() {