[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#926914: unblock: netrek-client-cow/3.3.1-4



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear release team,

Please unblock package netrek-client-cow, version 3.3.1-4 fixes a bug
which causes an endless loop in cross-builds (see #924291). The diff
is attached.

Regards,

Stephen

unblock netrek-client-cow/3.3.1-4

-- System Information:
Debian Release: 9.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (100, 'unstable-debug'), (100, 'testing-debug'), (100, 'unstable'), (100, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From df5828dec76e021606af958aaf84ba5c83da1e41 Mon Sep 17 00:00:00 2001
From: Stephen Kitt <steve@sk2.org>
Date: Wed, 10 Apr 2019 17:34:46 +0200
Subject: [PATCH] Build mkkey using the build CC when cross-compiling

Closes: #924291
---
 debian/changelog                       |  7 +++++++
 debian/control                         |  1 +
 debian/patches/cross-build-mkkey.patch | 18 ++++++++++++++++++
 debian/patches/series                  |  1 +
 debian/rules                           |  5 +++++
 5 files changed, 32 insertions(+)
 create mode 100644 debian/patches/cross-build-mkkey.patch

diff --git a/debian/changelog b/debian/changelog
index 379e899..7cac1c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+netrek-client-cow (3.3.1-4) unstable; urgency=medium
+
+  * Team upload.
+  * Build mkkey using the build CC when cross-compiling. Closes: #924291.
+
+ -- Stephen Kitt <skitt@debian.org>  Wed, 10 Apr 2019 17:34:14 +0200
+
 netrek-client-cow (3.3.1-3) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/control b/debian/control
index 05880bd..6497278 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Build-Depends:
  autotools-dev,
  debhelper (>= 9),
  libgmp-dev,
+ libgmp-dev:native,
  libimlib2-dev,
  libsdl-mixer1.2-dev,
  libsdl1.2-dev,
diff --git a/debian/patches/cross-build-mkkey.patch b/debian/patches/cross-build-mkkey.patch
new file mode 100644
index 0000000..128f9ed
--- /dev/null
+++ b/debian/patches/cross-build-mkkey.patch
@@ -0,0 +1,18 @@
+Description: Build mkkey correctly when cross-building
+Author: Stephen Kitt <skitt@debian.org>
+
+There are two parts to this:
+* use BUILDCC (provided by debian/rules) to build;
+* only link libgmp to minimise the native build-dependencies.
+
+--- a/system.mk.in
++++ b/system.mk.in
+@@ -150,7 +150,7 @@
+ 	$(MAKE) newkey
+ 
+ mkkey: mkkey.c $(RANDOMOBJ) defs.h
+-	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MPINC) $(MPLIB) -o mkkey mkkey.c $(RANDOMOBJ) $(LIBRARIES)
++	$(BUILDCC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MPINC) $(MPLIB) -o mkkey mkkey.c $(RANDOMOBJ) $(LMP)
+ 
+ randomize: randomize.c $(RANDOMOBJ) defs.h
+ 	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o randomize randomize.c $(RANDOMOBJ) $(LIBRARIES)
diff --git a/debian/patches/series b/debian/patches/series
index 678e27d..f749c8b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 gcc5.patch
 possible-infinite-loop.patch
+cross-build-mkkey.patch
diff --git a/debian/rules b/debian/rules
index 418d565..c667701 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 #export DH_VERBOSE=1
 export DEB_CFLAGS_MAINT_APPEND=-std=gnu89
 
+include /usr/share/dpkg/architecture.mk
+
 %:
 	dh $@ --with autotools_dev
 
@@ -11,6 +13,9 @@ override_dh_auto_configure:
 		--datadir=\$${prefix}/share/games \
 		--with-gmp
 
+override_dh_auto_build:
+	dh_auto_build -- BUILDCC=$(DEB_BUILD_GNU_TYPE)-gcc
+
 override_dh_auto_test:
 
 override_dh_auto_install:
-- 
2.11.0


Reply to: