Source: rakarrack
Version: 0.6.1-5
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

rakarrack fails to cross build from source, because it detects sse
support from the build machine and passes e.g. -msse2 to an armhf
compiler when building on amd64. Disabling autodetection of sse is
tricky. The only way I found was exporting a non-empty SSE variable.
After doing so, it is globally disabled, so to retain sse2 support where
we want it, we must explicitly --enable-sse2 it. Please consider
applying the attached patch.

Helmut
diff --minimal -Nru rakarrack-0.6.1/debian/changelog 
rakarrack-0.6.1/debian/changelog
--- rakarrack-0.6.1/debian/changelog    2018-09-04 03:22:52.000000000 +0200
+++ rakarrack-0.6.1/debian/changelog    2019-11-29 16:18:24.000000000 +0100
@@ -1,3 +1,10 @@
+rakarrack (0.6.1-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Don't autodetect sse/sse2. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 29 Nov 2019 16:18:24 +0100
+
 rakarrack (0.6.1-5) unstable; urgency=medium
 
   * Add debian/patches/05_fix_segfault.diff to fix a segfault on
diff --minimal -Nru rakarrack-0.6.1/debian/rules rakarrack-0.6.1/debian/rules
--- rakarrack-0.6.1/debian/rules        2011-12-27 17:07:55.000000000 +0100
+++ rakarrack-0.6.1/debian/rules        2019-11-29 16:18:24.000000000 +0100
@@ -10,17 +10,7 @@
 #export DH_VERBOSE=1
 export DH_OPTIONS
 
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-       INSTALL_PROGRAM += -s
-endif
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-
+include /usr/share/dpkg/architecture.mk
 
 builddir            = build
 builddir_sse        = build-sse
@@ -47,13 +37,15 @@
 $(builddir)/config.status:
 $(builddir_sse)/config.status:        EXTRA_CONFIG_FLAGS += --enable-sse
 
+# exporting a non-empty SSE variable disables sse autodetection
 %/config.status: configure
        dh_testdir
        mkdir -p $*
        $(RM) src/config.h
-       cd $* && ../configure --host=$(DEB_HOST_GNU_TYPE)       \
+       cd $* && SSE=" " ../configure --host=$(DEB_HOST_GNU_TYPE)       \
                              --build=$(DEB_BUILD_GNU_TYPE)     \
                              --prefix=/usr                     \
+                             $(if $(filter $(DEB_HOST_ARCH_CPU),amd64 
i386),--enable-sse2) \
                              $(EXTRA_CONFIG_FLAGS)
 
 build: build-arch

Reply via email to