[btanks] Work around scons libcheck issue.

Bruno Wolff III bruno at fedoraproject.org
Sun Jun 26 19:14:28 UTC 2011


commit bfb33d083d5cb0e13f6414c8cafcc64950126c01
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sat Jun 25 03:42:11 2011 -0500

    Work around scons libcheck issue.
    
    Using c++ to do libchecks (isntead of c) is failing.

 btanks.spec           |    4 +++-
 sirius-libcheck.patch |   23 +++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/btanks.spec b/btanks.spec
index bfded73..07f88b1 100644
--- a/btanks.spec
+++ b/btanks.spec
@@ -12,7 +12,8 @@ URL:            http://btanks.sourceforge.net/
 Patch0:         %{name}-remove-rpath.patch
 # Disable video previews of map levels (we don't distribute video anyway)
 Patch1:         %{name}-disable-smpeg.patch
-# Rename libbt.so to libbtanks.so because of conflict with blackbox
+# Avoid problem with lib checks using c++ instead of c.
+Patch2:         %{name}-libcheck.patch
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
 Source1:        %{name}.desktop
 Source2:        bted.desktop
@@ -62,6 +63,7 @@ running %{name}.
 %setup -q
 %patch0 -b .remove-rpath
 %patch1 -b .disable-smpeg
+%patch2 -b .libcheck
 dos2unix -k *.txt ChangeLog *.url LICENSE LICENSE.EXCEPTION
 
 iconv -f latin1 -t utf-8 LICENSE.EXCEPTION > LICENSE.EXCEPTION.new
diff --git a/sirius-libcheck.patch b/sirius-libcheck.patch
new file mode 100644
index 0000000..da752ff
--- /dev/null
+++ b/sirius-libcheck.patch
@@ -0,0 +1,23 @@
+--- SConstruct.orig	2011-06-25 03:39:39.000000000 -0500
++++ SConstruct	2011-06-25 03:39:56.000000000 -0500
+@@ -129,17 +129,17 @@
+ 	conf.env.Append(LINKFLAGS = ['/SUBSYSTEM:WINDOWS', '/FORCE'])
+ 	conf.env.Append(LIBS=['SDLmain'])
+ 
+-if not conf.CheckLibWithHeader('SDL', 'SDL.h', 'c++', "SDL_Init(0);", False):
++if not conf.CheckLibWithHeader('SDL', 'SDL.h', 'c', "SDL_Init(0);", False):
+ 	Exit(1)
+ 	
+ 
+ Export('sdl_cflags')
+ Export('sdl_libs')
+ 
+-if not conf.CheckLibWithHeader('SDL_image', 'SDL_image.h', 'c++', "IMG_Load(0);", False):
++if not conf.CheckLibWithHeader('SDL_image', 'SDL_image.h', 'c', "IMG_Load(0);", False):
+ 	Exit(1)
+ 
+-if not conf.CheckLibWithHeader('vorbisfile', 'vorbis/vorbisfile.h', 'c++', "ov_open(0, 0, 0, 0);", False):
++if not conf.CheckLibWithHeader('vorbisfile', 'vorbis/vorbisfile.h', 'c', "ov_open(0, 0, 0, 0);", False):
+ 	Exit(1)
+ 
+ if sys.platform == 'win32':


More information about the scm-commits mailing list