[Pkg-voip-commits] [sipsak] 11/19: Fix cross-building by passing the correct --host and/or --build arguments

Victor Seva vseva at moszumanska.debian.org
Wed Aug 31 09:07:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

vseva pushed a commit to branch master
in repository sipsak.

commit ccc33dc59ce1b5781631e3e49f32c9170d7d02c3
Author: Guillem Jover <gjover at sipwise.com>
Date:   Mon Jul 4 13:05:34 2016 +0200

    Fix cross-building by passing the correct --host and/or --build arguments
    
    The GNU build system expects either a single --build or both --build and
    --host when cross-building.
---
 debian/changelog | 2 ++
 debian/rules     | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0e21a42..1752c16 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ sipsak (0.9.6-3) UNRELEASED; urgency=medium
     stamp file.
   * Switch to use the dpkg makefile fragments in debian/rules.
   * Enable all hardening flags.
+  * Fix cross-building by passing the correct --host and/or --build
+    combination to configure.
 
  -- Guillem Jover <gjover at sipwise.com>  Mon, 04 Jul 2016 12:19:42 +0200
 
diff --git a/debian/rules b/debian/rules
index c4d1458..78e99f5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,12 @@ DEB_CFLAGS_MAINT_PREPEND = -Wall -std=gnu89
 
 include /usr/share/dpkg/default.mk
 
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+	confflags += --build=$(DEB_HOST_GNU_TYPE)
+else
+	confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+
 config.status: configure
 	dh_testdir
 
@@ -18,8 +24,7 @@ config.status: configure
 		CPPFLAGS="$(CPPFLAGS)" \
 		CFLAGS="$(CFLAGS)" \
 		LDFLAGS="$(LDFLAGS)" \
-		--host=$(DEB_HOST_GNU_TYPE) \
-		--build=$(DEB_BUILD_GNU_TYPE) \
+		$(confflags) \
 		--prefix=/usr \
 		--mandir=\$${prefix}/share/man \
 		--infodir=\$${prefix}/share/info

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/sipsak.git



More information about the Pkg-voip-commits mailing list