Source: qimageblitz Version: 1:0.0.6-4 Tags: patch User: helm...@debian.org Usertags: rebootstrap
qimageblitz fails to cross build from source, because it compiles its assembly file with the build architecture compiler and then fails linking it. It uses plain gcc instead of the proper cmake variable ${CMAKE_C_COMPILER} there. It also determines whether to use certain processor features (e.g. MMX) by looking at the architecture one is building on (build architecture) instead of the architecture one is building for (host architecture). The attached patch fixes both problems and makes qimageblitz cross build just fine. Please consider applying it. Helmut
diff --minimal -Nru qimageblitz-0.0.6/debian/changelog qimageblitz-0.0.6/debian/changelog --- qimageblitz-0.0.6/debian/changelog 2011-06-23 10:26:57.000000000 +0200 +++ qimageblitz-0.0.6/debian/changelog 2016-09-30 22:30:15.000000000 +0200 @@ -1,3 +1,12 @@ +qimageblitz (1:0.0.6-4.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Use CMAKE_C_COMPILER instead of gcc + + Fix build/host confusion + + -- Helmut Grohne <hel...@subdivi.de> Fri, 30 Sep 2016 22:29:29 +0200 + qimageblitz (1:0.0.6-4) unstable; urgency=low * Replace $(overriden_command) with $(overridden_command) in debian/rules. diff --minimal -Nru qimageblitz-0.0.6/debian/patches/14_cross.diff qimageblitz-0.0.6/debian/patches/14_cross.diff --- qimageblitz-0.0.6/debian/patches/14_cross.diff 1970-01-01 01:00:00.000000000 +0100 +++ qimageblitz-0.0.6/debian/patches/14_cross.diff 2016-09-30 22:29:09.000000000 +0200 @@ -0,0 +1,16 @@ +From: Helmut Grohne <hel...@subdivi.de> +Subject: use the host architecture compiler + +Index: qimageblitz-0.0.6/blitz/CMakeLists.txt +=================================================================== +--- qimageblitz-0.0.6.orig/blitz/CMakeLists.txt ++++ qimageblitz-0.0.6/blitz/CMakeLists.txt +@@ -33,7 +33,7 @@ + if(NOT APPLE AND NOT WIN32) + set( blitz_LIB_SRCS ${blitz_LIB_SRCS} asm_scale.S ) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o +- COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S ++ COMMAND ${CMAKE_C_COMPILER} -c ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S ) + set( blitz_LIB_EXTRA_SRCS ${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o ) + set(HAVE_EXTERNAL_ASM TRUE) diff --minimal -Nru qimageblitz-0.0.6/debian/patches/series qimageblitz-0.0.6/debian/patches/series --- qimageblitz-0.0.6/debian/patches/series 2010-09-19 11:38:11.000000000 +0200 +++ qimageblitz-0.0.6/debian/patches/series 2016-09-30 22:26:49.000000000 +0200 @@ -2,3 +2,4 @@ 11_.gnu.note.diff 12_remove_FindQt4.cmake.diff 13_disable_usr_lib_rpath.diff +14_cross.diff diff --minimal -Nru qimageblitz-0.0.6/debian/rules qimageblitz-0.0.6/debian/rules --- qimageblitz-0.0.6/debian/rules 2011-04-27 14:37:40.000000000 +0200 +++ qimageblitz-0.0.6/debian/rules 2016-09-30 22:29:27.000000000 +0200 @@ -8,7 +8,7 @@ cpu_opt_amd64 = 3dnow mmx sse sse2 sse3 cpu_opt_powerpc = altivec -build_arch_opts = $(cpu_opt_$(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)) +build_arch_opts = $(cpu_opt_$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)) ifneq (,$(build_arch_opts))