Package: searchandrescue
Version: 0.8.2-10
Severity: serious
Tags: patch
Justification: no longer builds from source

Currently the package build-depends on libjsw-dev which has been removed from
Testing (and is unbuildable/installable in any case due to GTK 1.2 removal).
It still works with keyboard navigation when rebuilt without it.

Additionally, it FTBFS without libjsw-dev and with gcc 4.4.

The attached NMU diff resolves both issues.

-- System Information:
Debian Release: 5.0
  APT prefers jaunty-updates
  APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 
'jaunty-backports'), (500, 'jaunty')
Architecture: i386 (i686)

Kernel: Linux 2.6.28-15-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages searchandrescue depends on:
ii  libc6                2.9-4ubuntu6        GNU C Library: Shared libraries
ii  libgcc1              1:4.3.3-5ubuntu4    GCC support library
ii  libgl1-mesa-glx [lib 7.4-0ubuntu3.2      A free implementation of the OpenG
ii  libglu1-mesa [libglu 7.4-0ubuntu3.2      The OpenGL utility library (GLU)
ii  libice6              2:1.0.4-1           X11 Inter-Client Exchange library
ii  libsm6               2:1.1.0-1           X11 Session Management library
ii  libstdc++6           4.3.3-5ubuntu4      The GNU Standard C++ Library v3
ii  libx11-6             2:1.1.99.2-1ubuntu2 X11 client-side library
ii  libxext6             2:1.0.99.1-0ubuntu3 X11 miscellaneous extension librar
ii  libxmu6              2:1.0.4-1           X11 miscellaneous utility library
ii  libxpm4              1:3.5.7-1           X11 pixmap library
ii  libxxf86vm1          1:1.0.2-1           X11 XFree86 video mode extension l
ii  liby2-14             2.14.5-5.1          Y Sound Server Library
pn  searchandrescue-comm <none>              (no description available)
ii  searchandrescue-data 0.8.2-1             common data files for searchandres

Versions of packages searchandrescue recommends:
pn  yiff-server                   <none>     (no description available)

searchandrescue suggests no packages.
diff -u searchandrescue-0.8.2/sar/string.cpp searchandrescue-0.8.2/sar/string.cpp
--- searchandrescue-0.8.2/sar/string.cpp
+++ searchandrescue-0.8.2/sar/string.cpp
@@ -29,7 +29,9 @@
 #ifdef __MSW__
 int strcasecmp(const char *s1, const char *s2);
 #endif
+#ifndef _GNU_SOURCE
 char *strcasestr(const char *haystack, const char *needle) throw();
+#endif /* _GNU_SOURCE not defined */
 int strpfx(const char *s, const char *pfx);
 int strcasepfx(const char *s, const char *pfx);
 
@@ -214,6 +216,7 @@
 }
 #endif
 
+#ifndef _GNU_SOURCE
 /*
  *	Case insensitive version of strstr(). Returns the pointer to
  *	needle in haystack if found or NULL on no match.
@@ -275,6 +278,7 @@
 
 	return(NULL);
 }
+#endif /* _GNU_SOURCE not defined */
 
 /*
  *	Checks if string pfx is a prefix of string s.
diff -u searchandrescue-0.8.2/debian/changelog searchandrescue-0.8.2/debian/changelog
--- searchandrescue-0.8.2/debian/changelog
+++ searchandrescue-0.8.2/debian/changelog
@@ -1,3 +1,22 @@
+searchandrescue (0.8.2-10.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+
+  [ Scott Kitterman ]
+  * Drop build-depend on libjsw-dev (being removed due to GTK 1.2 removal)
+    - Update package description and README.Debian to remove reference to
+      libjsw and joystick support
+  * Add missing #include <stdio.h> in sar/gctl.c for gcc 4.4 compatibility
+  * Remove deprecated dh_desktop calls from debian/rules
+  * Bump compat and debhelper version requirement to 5
+
+  [ Stefan Potyra ]
+  * sar/string.cpp, include/string.h: Disable strcasestr if _GNU_SOURCE
+    is defined (for gcc 4.4 compatibility), as this function is already part of
+    (e)glibc as a _GNU_SOURCE extension.
+
+ -- Scott Kitterman <sc...@kitterman.com>  Sat, 12 Sep 2009 21:51:00 -0400
+
 searchandrescue (0.8.2-10) unstable; urgency=low
 
   * Add desktop file (closes: 476962).
diff -u searchandrescue-0.8.2/debian/rules searchandrescue-0.8.2/debian/rules
--- searchandrescue-0.8.2/debian/rules
+++ searchandrescue-0.8.2/debian/rules
@@ -73,7 +73,6 @@
 	dh_installdocs -i
 	dh_installmenu -i
 #	dh_installmanpages -i
-	dh_desktop
 	dh_installchangelogs -i
 	dh_strip -i
 	dh_compress -i
@@ -91,7 +90,6 @@
 	dh_installdocs -a
 	dh_installmenu -a
 #	dh_installmanpages -a
-	dh_desktop
 	dh_installchangelogs -a
 	dh_strip -a
 	dh_compress -a
diff -u searchandrescue-0.8.2/debian/control searchandrescue-0.8.2/debian/control
--- searchandrescue-0.8.2/debian/control
+++ searchandrescue-0.8.2/debian/control
@@ -2,7 +2,7 @@
 Section: games
 Priority: extra
 Maintainer: Phil Brooke <p...@debian.org>
-Build-Depends: debhelper (>= 4), libjsw-dev (> 1.5.0-6), liby-dev (>= 2.14.2-2), libx11-dev, libxext-dev, libxpm-dev, libxxf86vm-dev, sharutils, bzip2, libsm-dev, libxmu-dev, libglu1-mesa-dev
+Build-Depends: debhelper (>= 5), liby-dev (>= 2.14.2-2), libx11-dev, libxext-dev, libxpm-dev, libxxf86vm-dev, sharutils, bzip2, libsm-dev, libxmu-dev, libglu1-mesa-dev
 Standards-Version: 3.8.0
 Homepage: http://wolfpack.twu.net/SearchAndRescue/
 
@@ -23,9 +23,9 @@
  of mission type), and graphics minimized to suit slower computers
  (minimum Pentium 166 with no graphics acceleration).
  .
- This package has been configured to depend on libjsw for joystick support and
- libY2 for sound support.  However, neither a joystick nor sound support is
- necessary to enjoy the game.  (See README.Debian for more information.)
+ This package has been configured to depend on libY2 for sound support.
+ However, sound support is not necessary to enjoy the game.  (See
+ README.Debian for more information.)
 
 Package: searchandrescue-common
 Architecture: all
diff -u searchandrescue-0.8.2/debian/README.Debian searchandrescue-0.8.2/debian/README.Debian
--- searchandrescue-0.8.2/debian/README.Debian
+++ searchandrescue-0.8.2/debian/README.Debian
@@ -1,14 +1,13 @@
-This package has been configured to depend on libjsw for joystick
-support and libY2 for sound support.  You do not, however, need a
-joystick or a sound output device to play this game.  This game will
-gracefully look towards the keyboard if no joystick is available.
+This package has been configured to depend on libY2 for sound
+support.  You do not, however, need a sound output device to play
+this game.  This game will gracefully look towards the keyboard if
+no joystick is available.
 
 You will need the Y sound server running for sound: this is included
 in the Debian package yiff-server.
 
 You can safely install the libraries required even if you don't want
-sound or a joystick.  However, if you don't want libjsw and/or libY2
-on your system, this game can be easily recompiled without joystick
-and/or sound support.  (A recompilation will be necessary, since the
-binary is linked against both libjsw and liby2-12.)
+sound.  However, if you don't want libY2 on your system, this game
+can be easily recompiled without sound support.  (A recompilation
+will be necessary, since the binary is linked against liby2-12.)
 
diff -u searchandrescue-0.8.2/debian/compat searchandrescue-0.8.2/debian/compat
--- searchandrescue-0.8.2/debian/compat
+++ searchandrescue-0.8.2/debian/compat
@@ -1 +1 @@
-4
+5
only in patch2:
unchanged:
--- searchandrescue-0.8.2.orig/sar/gctl.c
+++ searchandrescue-0.8.2/sar/gctl.c
@@ -1,4 +1,5 @@
 #include <stdlib.h>
+#include <stdio.h>
 #include <sys/types.h>
 #ifdef JS_SUPPORT
 # include <jsw.h>
only in patch2:
unchanged:
--- searchandrescue-0.8.2.orig/include/string.h
+++ searchandrescue-0.8.2/include/string.h
@@ -43,7 +43,9 @@
 #ifdef __MSW__
 extern int strcasecmp(const char *s1, const char *s2);
 #endif
+#ifndef _GNU_SOURCE
 extern char *strcasestr(const char *haystack, const char *needle);
+#endif /* _GNU_SOURCE defined */
 extern int strpfx(const char *s, const char *pfx);
 extern int strcasepfx(const char *s, const char *pfx);
 

Reply via email to