Bug#1023235: synthv1 FTCBFS: strips with the build architecture strip
Source: synthv1
Version: 0.9.24-1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
synthv1 fails to cross build from source, because the upstream
CMakeLists.txt hard code 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 synthv1-0.9.27/debian/changelog synthv1-0.9.27/debian/changelog
--- synthv1-0.9.27/debian/changelog 2022-10-06 23:27:01.000000000 +0200
+++ synthv1-0.9.27/debian/changelog 2022-10-31 15:02:25.000000000 +0100
@@ -1,3 +1,10 @@
+synthv1 (0.9.27-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Defer stripping to dh_strip. (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de> Mon, 31 Oct 2022 15:02:25 +0100
+
synthv1 (0.9.27-1) unstable; urgency=medium
* New upstream version 0.9.27
diff --minimal -Nru synthv1-0.9.27/debian/patches/cross.patch synthv1-0.9.27/debian/patches/cross.patch
--- synthv1-0.9.27/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ synthv1-0.9.27/debian/patches/cross.patch 2022-10-31 15:02:11.000000000 +0100
@@ -0,0 +1,39 @@
+--- synthv1-0.9.27.orig/CMakeLists.txt
++++ synthv1-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}")
+--- synthv1-0.9.27.orig/src/CMakeLists.txt
++++ synthv1-0.9.27/src/CMakeLists.txt
+@@ -174,7 +174,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)
+@@ -193,7 +193,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
+@@ -223,7 +223,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 synthv1-0.9.27/debian/patches/series synthv1-0.9.27/debian/patches/series
--- synthv1-0.9.27/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ synthv1-0.9.27/debian/patches/series 2022-10-31 15:01:34.000000000 +0100
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru synthv1-0.9.27/debian/rules synthv1-0.9.27/debian/rules
--- synthv1-0.9.27/debian/rules 2022-10-06 11:05:29.000000000 +0200
+++ synthv1-0.9.27/debian/rules 2022-10-31 15:02:23.000000000 +0100
@@ -9,6 +9,7 @@
else
CMAKE_OPTS = -DCONFIG_ALSA_MIDI=OFF
endif
+CMAKE_OPTS += -DCONFIG_STRIP=/bin/true
%:
dh $@
Reply to: