Your message dated Tue, 12 Jun 2018 11:19:32 +0000
with message-id <[email protected]>
and subject line Bug#901337: fixed in darkplaces 0~20180412~beta1-2
has caused the Debian Bug report #901337,
regarding darkplaces FTCBFS: uses the build architecture toolchain
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
901337: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901337
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: darkplaces
Version: 0~20140513+svn12208-7
Tags: patch
User: [email protected]
Usertags: rebootstrap

darkplaces fails to cross build from source, because it uses the build
architecture toolchain. The first step towards cross building is passing
cross tools to make and the easiest way of doing so is dh_auto_build.
That mostly works except for the makefile hard coding the build
architecture pkg-config. Then it mostly builds, except for building some
file with -msse2. The armhf compiler didn't particularly like that flag.
Turns out the upstream makefile uses uname to vary what is being built,
so we need to pass DP_MAKE_TARGET and DP_MACHINE. Pretending that
DP_MAKE_TARGET is linux works at least for linux-any, kfreebsd-any and
hurd-any. Using DEB_HOST_GNU_CPU for DP_MACHINE also works sufficiently
well, because the makefile only checks for x86_64 and x*86. Then
darkplaces cross builds successfully. Please consider applying the
attached patch.

Helmut
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+darkplaces (0~20140513+svn12208-7.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + Also pass DP_MAKE_TARGET and DP_MACHINE to avoid uname calls.
+    + cross.patch: Make pkg-config substitutable.
+
+ -- Helmut Grohne <[email protected]>  Mon, 11 Jun 2018 17:51:09 +0200
+
 darkplaces (0~20140513+svn12208-7) unstable; urgency=medium
 
   * darkplaces: Explicitly depend on libgl1. In this game engine it's
--- a/debian/patches/cross.patch
+++ b/debian/patches/cross.patch
@@ -0,0 +1,67 @@
+--- a/makefile
++++ b/makefile
+@@ -386,8 +386,8 @@
+ 
+ # vorbis
+ ifeq ($(DP_LINK_VORBIS), shared)
+-      CFLAGS_LIBVORBIS=-DLINK_TO_LIBVORBIS `pkg-config --cflags vorbisfile`
+-      LIB_VORBIS=`pkg-config --libs vorbisfile`
++      CFLAGS_LIBVORBIS=-DLINK_TO_LIBVORBIS `$(PKG_CONFIG) --cflags vorbisfile`
++      LIB_VORBIS=`$(PKG_CONFIG) --libs vorbisfile`
+ endif
+ ifeq ($(DP_LINK_VORBIS), dlopen)
+       CFLAGS_LIBVORBIS=
+@@ -396,8 +396,8 @@
+ 
+ # theora
+ ifeq ($(DP_LINK_THEORA), shared)
+-      CFLAGS_LIBTHEORA=-DLINK_TO_THEORA `pkg-config --cflags theora vorbis 
vorbisenc ogg`
+-      LIB_THEORA=`pkg-config --libs theora vorbis vorbisenc ogg`
++      CFLAGS_LIBTHEORA=-DLINK_TO_THEORA `$(PKG_CONFIG) --cflags theora vorbis 
vorbisenc ogg`
++      LIB_THEORA=`$(PKG_CONFIG) --libs theora vorbis vorbisenc ogg`
+ endif
+ ifeq ($(DP_LINK_THEORA), dlopen)
+       CFLAGS_LIBTHEORA=
+@@ -406,8 +406,8 @@
+ 
+ # png
+ ifeq ($(DP_LINK_PNG), shared)
+-      CFLAGS_LIBPNG=-DLINK_TO_PNG `pkg-config --cflags libpng`
+-      LIB_PNG=`pkg-config --libs libpng`
++      CFLAGS_LIBPNG=-DLINK_TO_PNG `$(PKG_CONFIG) --cflags libpng`
++      LIB_PNG=`$(PKG_CONFIG) --libs libpng`
+ endif
+ ifeq ($(DP_LINK_PNG), dlopen)
+       CFLAGS_LIBPNG=
+@@ -416,8 +416,8 @@
+ 
+ # curl
+ ifeq ($(DP_LINK_CURL), shared)
+-      CFLAGS_LIBCURL=-DLINK_TO_CURL `pkg-config --cflags libcurl`
+-      LIB_CURL=`pkg-config --libs libcurl`
++      CFLAGS_LIBCURL=-DLINK_TO_CURL `$(PKG_CONFIG) --cflags libcurl`
++      LIB_CURL=`$(PKG_CONFIG) --libs libcurl`
+ endif
+ ifeq ($(DP_LINK_CURL), dlopen)
+       CFLAGS_LIBCURL=
+@@ -425,8 +425,8 @@
+ endif
+ 
+ ifeq ($(DP_LINK_FREETYPE2), shared)
+-      CFLAGS_LIBFREETYPE2=-DLINK_TO_FREETYPE2 `pkg-config --cflags freetype2`
+-      LIB_FREETYPE2=`pkg-config --libs freetype2`
++      CFLAGS_LIBFREETYPE2=-DLINK_TO_FREETYPE2 `$(PKG_CONFIG) --cflags 
freetype2`
++      LIB_FREETYPE2=`$(PKG_CONFIG) --libs freetype2`
+ endif
+ ifeq ($(DP_LINK_FREETYPE2), dlopen)
+       CFLAGS_LIBFREETYPE2=
+--- a/makefile.inc
++++ b/makefile.inc
+@@ -25,6 +25,7 @@
+ CPUOPTIMIZATIONS?=-fno-math-errno -ffinite-math-only -fno-rounding-math 
-fno-signaling-nans -fno-trapping-math
+ # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
+ 
++PKG_CONFIG?=pkg-config
+ SDL_CONFIG?=sdl-config
+ SDL2_CONFIG?=sdl2-config
+ SDLCONFIG_UNIXCFLAGS?=`$(SDL_CONFIG) --cflags`
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
 Fix-various-typos.patch
 Don-t-build-SSE-only-software-rasterizer-on-non-x86-.patch
 Disable-gpu-skinning-for-skeletal-models.patch
+cross.patch
--- a/debian/rules
+++ b/debian/rules
@@ -38,11 +38,13 @@
 # LDFLAGS_* are used to compile builddate.c, so yes, they do need to include
 # the CPPFLAGS.
 override_dh_auto_build:
-       $(MAKE) \
+       dh_auto_build -- \
                CFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS)" \
                CFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS)" \
                LDFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \
                LDFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \
+               DP_MAKE_TARGET=linux \
+               DP_MACHINE=$(DEB_HOST_GNU_CPU) \
                DP_LINK_CURL=shared \
                DP_LINK_FREETYPE2=shared \
                DP_LINK_JPEG=shared \

--- End Message ---
--- Begin Message ---
Source: darkplaces
Source-Version: 0~20180412~beta1-2

We believe that the bug you reported is fixed in the latest version of
darkplaces, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Simon McVittie <[email protected]> (supplier of updated darkplaces package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 12 Jun 2018 11:36:39 +0100
Source: darkplaces
Binary: darkplaces darkplaces-server
Architecture: source
Version: 0~20180412~beta1-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Games Team <[email protected]>
Changed-By: Simon McVittie <[email protected]>
Description:
 darkplaces - Game engine for Quake and similar 3D first person shooter games
 darkplaces-server - Standalone server for Quake-based games
Closes: 901337
Changes:
 darkplaces (0~20180412~beta1-2) unstable; urgency=medium
 .
   * Be cross-compilable:
     - Use dh_auto_build to set cross-compilation-friendly CC,
       PKG_CONFIG, etc.
     - Explicitly set DP_MAKE_TARGET to linux (which seems to be
       suitable for GNU/anything) instead of choosing a target based
       on uname
     - Set DP_MACHINE to $(DEB_HOST_GNU_CPU) instead of choosing based
       on uname -m. Perfect equivalence is not necessary since the only
       uses of DP_MACHINE are comparisons with x86_64 and i?86; unlike
       yquake2 and ioquake3, darkplaces does not use this value in
       on-disk paths or in saved games.
     Based on a patch from Helmut Grohne. (Closes: #901337)
   * Upload to unstable
Checksums-Sha1:
 dafb0f3bc10872d6034bc69db5099ca6af1a06b5 2274 darkplaces_0~20180412~beta1-2.dsc
 72ef19b893ef2f92c671ae113f53d8012f1ca69e 34436 
darkplaces_0~20180412~beta1-2.debian.tar.xz
 72c6640230d19950125d8092876601b4beacc474 11500 
darkplaces_0~20180412~beta1-2_source.buildinfo
Checksums-Sha256:
 848e3697762982f75d48e1270079e1f3798f81f92d5247d1f33dd91191642315 2274 
darkplaces_0~20180412~beta1-2.dsc
 a115b54cf1e133e363f7ce0321d419ab922daaaa6f786073c8ff4491f9b62d03 34436 
darkplaces_0~20180412~beta1-2.debian.tar.xz
 6c26bd02ca326b02014ee804e06f0a106261c46381d068474d4b9e12415ee8d8 11500 
darkplaces_0~20180412~beta1-2_source.buildinfo
Files:
 98570f7b39ee54850ef8e51711faf6dc 2274 games optional 
darkplaces_0~20180412~beta1-2.dsc
 32c11882aeb291dbf1ce787c5314415a 34436 games optional 
darkplaces_0~20180412~beta1-2.debian.tar.xz
 69d362f4a9faf5f3ad0a6760d87eb18b 11500 games optional 
darkplaces_0~20180412~beta1-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEENuxaZEik9e95vv6Y4FrhR4+BTE8FAlsfpnkACgkQ4FrhR4+B
TE/8Nw/8CIH7F7PhY6n2urTOuxhMApDdAKMHhiCD2cMG+DyRtoT7WVtphLUxUaDi
8xoV0virIoDy+hoiBGObzG5TAjBDTc5ZugdJr1RqDH5G+6eP6JAX9+p1DwKjBn6v
auW9f8FWSbWon2xse568BwUG9ksMatPYI8NpbnAb6QsbzCh5vzGttwzXz2kPZm8r
T9ppahYwrkpG+IV8a/B02yewkishd+VXS98mGCfJOAR8OWA39CyOAnR+aSIhRzWV
H0ndB0oFfZnw6tUPtVE6naP2hJ++un1eE4ZZNx/OzmcQAfXxfdK39J0j2/+YQiIP
eJv4gpujgjxnUaECx94qi0Klpdphi4dvJCP0tE9plcPn4XWadUqPSjErQT0HK/s2
pJE30LwDDE0VdEfi4pDubm6J4POFY/h7PNlCBYdtPJRpxdz0n/va70Eg/mNVYQ3w
HcJL50Ezyk7EBPlCuW8FROLbRvM+ZYI1CW4jlL7+1mSAECFTQwwl56iuuccZSg31
pKe1AVZMo+VU2ekvX2DxSBdWafGdRjiJNhWsm/3OGV1XKwT45rL8okI+4MdzRmL0
S4gUWXjBsyREpA7tds09va8eTKdkKTzHyMhy/djO9bj6eZ78ZMcgkpT3lTcEQahB
ufgfEn4IneO+YhzEQJd8xXMefzVBk2n2yeB5JdbvSLE24pmYSg0=
=0WP6
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to