Source: drumkv1
Version: 0.9.24-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

drumkv1 fails to cross build from source, because it strips using the
build architecture strip. Beyond breaking cross compilation, this also
breaks DEB_BUILD_OPTIONS=nostrip as well as generation of -dbgsym
packages. Please consider applying the attached patch to fix all of the
above.

Helmut
diff --minimal -Nru drumkv1-0.9.27/debian/changelog 
drumkv1-0.9.27/debian/changelog
--- drumkv1-0.9.27/debian/changelog     2022-10-06 22:33:32.000000000 +0200
+++ drumkv1-0.9.27/debian/changelog     2022-10-31 11:43:38.000000000 +0100
@@ -1,3 +1,10 @@
+drumkv1 (0.9.27-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Defer stripping to dh_strip. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 31 Oct 2022 11:43:38 +0100
+
 drumkv1 (0.9.27-2) unstable; urgency=medium
 
   * Build with Qt6
diff --minimal -Nru drumkv1-0.9.27/debian/patches/nostrip.patch 
drumkv1-0.9.27/debian/patches/nostrip.patch
--- drumkv1-0.9.27/debian/patches/nostrip.patch 1970-01-01 01:00:00.000000000 
+0100
+++ drumkv1-0.9.27/debian/patches/nostrip.patch 2022-10-31 11:43:38.000000000 
+0100
@@ -0,0 +1,39 @@
+--- drumkv1-0.9.27.orig/CMakeLists.txt
++++ drumkv1-0.9.27/CMakeLists.txt
+@@ -53,6 +53,7 @@
+ endif ()
+ 
+ set (CONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}")
++set (CONFIG_STRIP "strip" CACHE STRING "Utility used for stripping objects")
+ 
+ include (GNUInstallDirs)
+ set (CONFIG_BINDIR  "${CONFIG_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+--- drumkv1-0.9.27.orig/src/CMakeLists.txt
++++ drumkv1-0.9.27/src/CMakeLists.txt
+@@ -189,7 +189,7 @@
+   if (UNIX AND NOT APPLE)
+     if (NOT CONFIG_DEBUG)
+       add_custom_command(TARGET ${PROJECT_NAME}_lv2  POST_BUILD
+-        COMMAND strip lib${PROJECT_NAME}_lv2.so)
++        COMMAND ${CONFIG_STRIP} lib${PROJECT_NAME}_lv2.so)
+     endif ()
+     if (CONFIG_PREFIX MATCHES $ENV{HOME})
+       set (CONFIG_LV2DIR ${CONFIG_PREFIX}/.lv2)
+@@ -208,7 +208,7 @@
+     target_link_options (${PROJECT_NAME}_lv2 PRIVATE -static-libgcc 
-static-libstdc++)
+     if (NOT CONFIG_DEBUG)
+       add_custom_command(TARGET ${PROJECT_NAME}_lv2  POST_BUILD
+-        COMMAND strip lib${PROJECT_NAME}_lv2.dll)
++        COMMAND ${CONFIG_STRIP} lib${PROJECT_NAME}_lv2.dll)
+     endif ()
+     set (CONFIG_LV2DIR ${CONFIG_WINDOWS_LV2_PATH})
+     install (FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${PROJECT_NAME}_lv2.dll
+@@ -238,7 +238,7 @@
+   if (UNIX AND NOT APPLE)
+     if (NOT CONFIG_DEBUG)
+       add_custom_command(TARGET ${PROJECT_NAME}_jack POST_BUILD
+-        COMMAND strip ${PROJECT_NAME}_jack)
++        COMMAND ${CONFIG_STRIP} ${PROJECT_NAME}_jack)
+     endif ()
+     install (TARGETS ${PROJECT_NAME}_jack RUNTIME
+       DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --minimal -Nru drumkv1-0.9.27/debian/patches/series 
drumkv1-0.9.27/debian/patches/series
--- drumkv1-0.9.27/debian/patches/series        1970-01-01 01:00:00.000000000 
+0100
+++ drumkv1-0.9.27/debian/patches/series        2022-10-31 11:41:32.000000000 
+0100
@@ -0,0 +1 @@
+nostrip.patch
diff --minimal -Nru drumkv1-0.9.27/debian/rules drumkv1-0.9.27/debian/rules
--- drumkv1-0.9.27/debian/rules 2022-10-06 21:45:24.000000000 +0200
+++ drumkv1-0.9.27/debian/rules 2022-10-31 11:43:38.000000000 +0100
@@ -9,6 +9,7 @@
 else
  CMAKE_OPTS = -DCONFIG_ALSA_MIDI=OFF
 endif
+CMAKE_OPTS += -DCONFIG_STRIP=/bin/true
 
 %:
        dh $@

Reply via email to