Source: kdesignerplugin
Version: 5.49.0-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

kdesignerplugin fails to cross build from source, because it cannot find
KF5::kgendesignerplugin. During native builds it refers to an executable
that is both used during build and installed to the package. So rather
than using the built one, we need to use the system copy. The attached
patch implements that and makes kdesignerplugin cross build
successfully. Please consider applying it.

Helmut
diff --minimal -Nru kdesignerplugin-5.49.0/debian/changelog 
kdesignerplugin-5.49.0/debian/changelog
--- kdesignerplugin-5.49.0/debian/changelog     2018-08-17 16:18:21.000000000 
+0200
+++ kdesignerplugin-5.49.0/debian/changelog     2018-08-22 20:35:08.000000000 
+0200
@@ -1,3 +1,11 @@
+kdesignerplugin (5.49.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Use the system kgendesignerplugin for cross building.
+    (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 22 Aug 2018 20:35:08 +0200
+
 kdesignerplugin (5.49.0-1) unstable; urgency=medium
 
   * New upstream release (5.48.0).
diff --minimal -Nru kdesignerplugin-5.49.0/debian/control 
kdesignerplugin-5.49.0/debian/control
--- kdesignerplugin-5.49.0/debian/control       2018-08-17 16:18:21.000000000 
+0200
+++ kdesignerplugin-5.49.0/debian/control       2018-08-22 20:35:07.000000000 
+0200
@@ -6,6 +6,7 @@
 Build-Depends: cmake (>= 3.0~),
                debhelper (>= 11~),
                extra-cmake-modules (>= 5.49.0~),
+               kgendesignerplugin-bin <cross>,
                libkf5completion-dev (>= 5.49.0~),
                libkf5config-dev (>= 5.49.0~),
                libkf5configwidgets-dev (>= 5.49.0~),
diff --minimal -Nru kdesignerplugin-5.49.0/debian/patches/cross.patch 
kdesignerplugin-5.49.0/debian/patches/cross.patch
--- kdesignerplugin-5.49.0/debian/patches/cross.patch   1970-01-01 
01:00:00.000000000 +0100
+++ kdesignerplugin-5.49.0/debian/patches/cross.patch   2018-08-22 
20:35:08.000000000 +0200
@@ -0,0 +1,17 @@
+--- kdesignerplugin-5.49.0.orig/src/CMakeLists.txt
++++ kdesignerplugin-5.49.0/src/CMakeLists.txt
+@@ -11,7 +11,13 @@
+   ${kdesignerplugin_QM_LOADER}
+ )
+ add_executable(kgendesignerplugin ${kgendesignerplugin_SRCS})
+-add_executable(KF5::kgendesignerplugin ALIAS kgendesignerplugin)
++if(CMAKE_CROSSCOMPILING)
++    find_program(KGENDESIGNERPLUGIN_EXECUTABLE kgendesignerplugin)
++    add_executable(KF5::kgendesignerplugin IMPORTED GLOBAL)
++    set_target_properties(KF5::kgendesignerplugin PROPERTIES 
IMPORTED_LOCATION ${KGENDESIGNERPLUGIN_EXECUTABLE})
++else()
++    add_executable(KF5::kgendesignerplugin ALIAS kgendesignerplugin)
++endif()
+ ecm_mark_nongui_executable(kgendesignerplugin)
+ 
+ target_link_libraries(kgendesignerplugin KF5::ConfigCore # KConfig + 
KConfigGroup
diff --minimal -Nru kdesignerplugin-5.49.0/debian/patches/series 
kdesignerplugin-5.49.0/debian/patches/series
--- kdesignerplugin-5.49.0/debian/patches/series        1970-01-01 
01:00:00.000000000 +0100
+++ kdesignerplugin-5.49.0/debian/patches/series        2018-08-22 
20:35:08.000000000 +0200
@@ -0,0 +1 @@
+cross.patch

Reply via email to