diff --git a/srcpkgs/kconfig/patches/add-crossbuild-support-for-its-tools.patch b/srcpkgs/kconfig/patches/add-crossbuild-support-for-its-tools.patch new file mode 100644 index 00000000000..2132b63db20 --- /dev/null +++ b/srcpkgs/kconfig/patches/add-crossbuild-support-for-its-tools.patch @@ -0,0 +1,51 @@ +Handle cross build support for kconfig_compiler and kconf_update tools. + +Adapted from this patch: +https://build.opensuse.org/package/view_file/home:rhabacker:branches:windows:mingw:win32:KF529/mingw32-kconfig/0001-Add-MinGW32-cross-compile-support-to-kconfig_compile.patch + +Contrary to reference above, paths to these tools are hardcoded in this package. +If not, packages that depend on it will have to indicate each binary "native" paths in case +of cross-build, since these cmake directive lines are always evalued at *their* build time. + +--- KF5ConfigConfig.cmake.in.ORIG ++++ KF5ConfigConfig.cmake.in +@@ -11,5 +11,13 @@ if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING) + include("${KCONFIGCOMPILER_PATH}") + else() + include("${CMAKE_CURRENT_LIST_DIR}/KF5ConfigCompilerTargets.cmake") ++ if(CMAKE_CROSSCOMPILING) ++ set_target_properties(KF5::kconfig_compiler PROPERTIES IMPORTED_LOCATION_NONE /usr/lib/libexec/kf5/kconfig_compiler_kf5) ++ set_target_properties(KF5::kconfig_compiler PROPERTIES IMPORTED_LOCATION /usr/lib/libexec/kf5/kconfig_compiler_kf5) ++ endif() ++ if(CMAKE_CROSSCOMPILING) ++ set_target_properties(KF5::kconf_update PROPERTIES IMPORTED_LOCATION_NONE /usr/lib/libexec/kf5/kconf_update) ++ set_target_properties(KF5::kconf_update PROPERTIES IMPORTED_LOCATION /usr/lib/libexec/kf5/kconf_update) ++ endif() + endif() + include("${CMAKE_CURRENT_LIST_DIR}/KF5ConfigMacros.cmake") +--- KF5ConfigMacros.cmake.ORIG ++++ KF5ConfigMacros.cmake +@@ -89,8 +89,12 @@ + endif() + + # the command for creating the source file from the kcfg file ++ set(KCONFIG_COMPILER_LOCATION KF5::kconfig_compiler) ++ if(CMAKE_CROSSCOMPILING) ++ get_target_property(KCONFIG_COMPILER_LOCATION KF5::kconfig_compiler LOCATION) ++ endif() + add_custom_command(OUTPUT ${_header_FILE} ${_src_FILE} +- COMMAND KF5::kconfig_compiler ++ COMMAND ${KCONFIG_COMPILER_LOCATION} + ARGS ${_kcfg_FILE} ${_tmp_FILE} -d ${CMAKE_CURRENT_BINARY_DIR}/${_rel_PATH} + MAIN_DEPENDENCY ${_tmp_FILE} + DEPENDS ${_kcfg_FILE}) +--- src/kconfig_compiler/CMakeLists.txt.ORIG ++++ src/kconfig_compiler/CMakeLists.txt +@@ -12,6 +12,7 @@ + if(BUILD_TESTING) + message(WARNING "Testing should be disabled on cross-compilation") + endif() ++ add_executable(KF5::kconfig_compiler IMPORTED GLOBAL) + else() + add_executable(KF5::kconfig_compiler ALIAS kconfig_compiler) + endif() diff --git a/srcpkgs/kconfig/template b/srcpkgs/kconfig/template index 7fa98cdd9c4..1595ca0ea86 100644 --- a/srcpkgs/kconfig/template +++ b/srcpkgs/kconfig/template @@ -1,6 +1,6 @@ # Template file for 'kconfig' pkgname=kconfig -version=5.29.0 +version=5.36.0 revision=1 build_style=cmake configure_args="-DBUILD_TESTING=OFF" @@ -11,7 +11,7 @@ maintainer="Denis Revin " license="LGPL-2" homepage="https://projects.kde.org/projects/frameworks/kconfig" distfiles="http://download.kde.org/stable/frameworks/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=d6c12e0908de1b91529de15e75a52c9974685c91b423d5b5abeb06f261d0fa47 +checksum=b31e3a8595fa8dc14aa0b1828633c712205097a6e3d14650ae813d4d7833d654 kconfig-devel_package() { short_desc+=" - development"