Source: padthv1 Version: 0.9.27-1 Tags: patch User: [email protected] Usertags: ftcbfs
padthv1 fails to cross build from source, because it strips with the build architecture strip during build. Beyond breaking cross compilation, this also breaks DEB_BUILD_OPTIONS=nostrip as well as generation of -dbgsym packages. I'm attaching a patch that fixes all of the above by deferring all stripping to dh_strip for your convenience. Helmut
diff --minimal -Nru padthv1-0.9.27/debian/changelog padthv1-0.9.27/debian/changelog --- padthv1-0.9.27/debian/changelog 2022-10-06 23:08:34.000000000 +0200 +++ padthv1-0.9.27/debian/changelog 2022-11-18 11:34:21.000000000 +0100 @@ -1,3 +1,10 @@ +padthv1 (0.9.27-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Defer stripping to dh_strip. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Fri, 18 Nov 2022 11:34:21 +0100 + padthv1 (0.9.27-1) unstable; urgency=medium * New upstream version 0.9.27 diff --minimal -Nru padthv1-0.9.27/debian/patches/nostrip.patch padthv1-0.9.27/debian/patches/nostrip.patch --- padthv1-0.9.27/debian/patches/nostrip.patch 1970-01-01 01:00:00.000000000 +0100 +++ padthv1-0.9.27/debian/patches/nostrip.patch 2022-11-18 11:33:54.000000000 +0100 @@ -0,0 +1,39 @@ +--- padthv1-0.9.27.orig/CMakeLists.txt ++++ padthv1-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}") +--- padthv1-0.9.27.orig/src/CMakeLists.txt ++++ padthv1-0.9.27/src/CMakeLists.txt +@@ -183,7 +183,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) +@@ -202,7 +202,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 +@@ -232,7 +232,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 padthv1-0.9.27/debian/patches/series padthv1-0.9.27/debian/patches/series --- padthv1-0.9.27/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ padthv1-0.9.27/debian/patches/series 2022-11-18 11:33:05.000000000 +0100 @@ -0,0 +1 @@ +nostrip.patch diff --minimal -Nru padthv1-0.9.27/debian/rules padthv1-0.9.27/debian/rules --- padthv1-0.9.27/debian/rules 2022-10-06 11:04:40.000000000 +0200 +++ padthv1-0.9.27/debian/rules 2022-11-18 11:34:20.000000000 +0100 @@ -9,6 +9,7 @@ else CMAKE_OPTS = -DCONFIG_ALSA_MIDI=OFF endif +CMAKE_OPTS += -DCONFIG_STRIP=/bin/true %: dh $@

