kdesignerplugin: fix cross-build support in cmake macro.
Apply to (cross)build this package itself and use it from other buildings.
This commit is contained in:
parent
c664ca0b8c
commit
5a8e05c9db
2 changed files with 21 additions and 9 deletions
|
@ -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})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'kdesignerplugin'
|
# Template file for 'kdesignerplugin'
|
||||||
pkgname=kdesignerplugin
|
pkgname=kdesignerplugin
|
||||||
version=5.43.0
|
version=5.43.0
|
||||||
revision=2
|
revision=3
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DBUILD_TESTING=OFF"
|
configure_args="-DBUILD_TESTING=OFF"
|
||||||
hostmakedepends="extra-cmake-modules"
|
hostmakedepends="extra-cmake-modules"
|
||||||
|
@ -19,14 +19,6 @@ if [ -n "$CROSS_BUILD" ]; then
|
||||||
configure_args+=" -DMEINPROC5_EXECUTABLE=/usr/bin/meinproc5"
|
configure_args+=" -DMEINPROC5_EXECUTABLE=/usr/bin/meinproc5"
|
||||||
fi
|
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() {
|
kgendesignerplugin_package() {
|
||||||
short_desc+=" - tool"
|
short_desc+=" - tool"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue