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

Bug#458733: FTBFS on architectures where char is unsigned by default

Package: warzone2100
Version: 2.1.0~0.svn1436-1
Severity: serious
Tags: patch
Justification: no longer builds from source

Hash: SHA1

The attached patch fixes a problem on architectures where the char type is
unsigned by default: a value of an unsigned variable can never be equal to
EOF. This was caught by gcc -Werror.

The patch also fixes a build failure with dpkg-buildpackage -j by fixing the
target dependencies in debian/rules.

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (102, 'experimental'), (101, 'gutsy-security'), (101, 'gutsy')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.24-rc5-powerpc
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages warzone2100 depends on:
ii  libc6                  2.7-5             GNU C Library: Shared libraries
ii  libgl1-mesa-glx [libgl 7.0.2-3           A free implementation of the OpenG
ii  libglu1-mesa [libglu1] 7.0.2-3           The OpenGL utility library (GLU)
ii  libogg0                1.1.3-3           Ogg Bitstream Library
ii  libopenal0a            1:0.0.8-7         OpenAL is a portable library for 3
ii  libphysfs-1.0-0        1.0.0-5           filesystem abstraction library for
hi  libpng12-0             1.2.15~beta5-3    PNG library - runtime
ii  libsdl-net1.2          1.2.7-2           network library for Simple DirectM
ii  libsdl1.2debian        1.2.12-3          Simple DirectMedia Layer
ii  libvorbis0a            1.2.0.dfsg-3      The Vorbis General Audio Compressi
ii  libvorbisfile3         1.2.0.dfsg-3      The Vorbis General Audio Compressi
ii  libx11-6               2:1.1.3-1         X11 client-side library
ii  warzone2100-data       2.1.0~0.svn1436-1 3D real time strategy game (data f

warzone2100 recommends no packages.

- -- no debconf information

Version: GnuPG v1.4.6 (GNU/Linux)

diff -up -ru warzone2100-2.1.0~0.svn3260.orig/lib/ivis_common/imdload.c warzone2100-2.1.0~0.svn3260/lib/ivis_common/imdload.c
--- warzone2100-2.1.0~0.svn3260.orig/lib/ivis_common/imdload.c	2007-12-21 18:34:23.000000000 +0100
+++ warzone2100-2.1.0~0.svn3260/lib/ivis_common/imdload.c	2008-01-02 14:53:43.000000000 +0100
@@ -733,7 +733,7 @@ iIMDShape *iV_ProcessIMD( const char **p
 		ch = *pFileData++;
 		// Run up to the dot or till the buffer is filled. Leave room for the extension.
-		for( i = 0; i < PATH_MAX-5 && (ch = *pFileData++) != EOF && ch != '.'; i++ )
+		for( i = 0; i < PATH_MAX-5 && (ch = *pFileData++) != (char)EOF && ch != '.'; i++ )
  			texfile[i] = (char)ch;
diff -up -ru warzone2100-2.1.0~0.svn3260.orig/debian/rules warzone2100-2.1.0~0.svn3260/debian/rules
--- warzone2100-2.1.0~0.svn3260.orig/debian/rules	2008-01-02 14:35:47.000000000 +0100
+++ warzone2100-2.1.0~0.svn3260/debian/rules	2008-01-02 11:05:27.000000000 +0100
@@ -49,9 +49,9 @@ config.status:
 # Compile the binary
 # -------------------------------------
-build: configure build-stamp 
+build: build-stamp 
+build-stamp: configure
 	touch $@
@@ -60,9 +60,9 @@ build-stamp:
 # Build data files
 # -------------------------------------
-build-indep: configure build-indep-stamp
+build-indep: build-indep-stamp
+build-indep-stamp: configure
 	$(MAKE) -C data data
 	$(MAKE) -C po

Reply to: