[btanks] Adjust disable.smpeg patch for upstream context changes.

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


commit 716513a1c98009ef80a512efdd64822613cf6a8e
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sat Jun 25 03:21:27 2011 -0500

    Adjust disable.smpeg patch for upstream context changes.

 ...sable-smpeg.patch => btanks-disable-smpeg.patch |   73 +++++++++-----------
 btanks.spec                                        |    2 +-
 2 files changed, 35 insertions(+), 40 deletions(-)
---
diff --git a/btanks-0.8-disable-smpeg.patch b/btanks-disable-smpeg.patch
similarity index 61%
rename from btanks-0.8-disable-smpeg.patch
rename to btanks-disable-smpeg.patch
index 4088926..2fa7d67 100644
--- a/btanks-0.8-disable-smpeg.patch
+++ b/btanks-disable-smpeg.patch
@@ -1,6 +1,5 @@
-diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/engine/menu/video_control.cpp
---- btanks-0.8.7686.orig/engine/menu/video_control.cpp	2008-08-06 15:04:29.000000000 +0400
-+++ btanks-0.8.7686/engine/menu/video_control.cpp	2009-03-17 13:43:44.000000000 +0300
+--- engine/menu/video_control.cpp.disable-smpeg	2008-09-22 08:10:57.000000000 -0500
++++ engine/menu/video_control.cpp	2011-06-25 03:00:25.000000000 -0500
 @@ -7,10 +7,10 @@
  #include "config.h"
  #include <assert.h>
@@ -14,7 +13,7 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/eng
  {
  	if (lock == NULL)
  		throw_sdl(("SDL_CreateMutex"));
-@@ -25,6 +25,7 @@ base(base), name(name), mpeg(0), lock(SD
+@@ -25,6 +25,7 @@
  	if (edv)
  		return;
  	
@@ -22,7 +21,7 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/eng
  	fname = "maps/" + name + ".mpg";
  	if (Finder->exists(base, fname)) {
  		{
-@@ -62,6 +63,7 @@ base(base), name(name), mpeg(0), lock(SD
+@@ -62,6 +63,7 @@
  		//SMPEG_play(mpeg);
  		//SMPEG_CHECK("SMPEG_play");
  	}
@@ -30,7 +29,7 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/eng
  }
  
  void VideoControl::activate(const bool a) {
-@@ -71,6 +73,7 @@ void VideoControl::activate(const bool a
+@@ -71,6 +73,7 @@
  }
  
  void VideoControl::checkStatus() {
@@ -38,7 +37,7 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/eng
  	if (mpeg == NULL)
  		return;
  	
-@@ -101,10 +104,12 @@ void VideoControl::checkStatus() {
+@@ -101,10 +104,12 @@
  		mpeg = NULL;
  		break;
  	}
@@ -51,7 +50,7 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/eng
  	if (mpeg == NULL || !active) 
  		return;
  		
-@@ -134,19 +139,22 @@ void VideoControl::tick(const float dt) 
+@@ -134,19 +139,22 @@
  		//updated = false;
  		SDL_mutexV(lock);
  	}
@@ -76,7 +75,7 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/eng
  }
  
  void VideoControl::get_size(int &w, int &h) const {
-@@ -155,9 +163,11 @@ void VideoControl::get_size(int &w, int 
+@@ -155,9 +163,11 @@
  }
  
  VideoControl::~VideoControl() {
@@ -88,9 +87,8 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/eng
 +	*/
  	SDL_DestroyMutex(lock);
  }
-diff -urp btanks-0.8.7686.orig/engine/menu/video_control_disabled.h btanks-0.8.7686/engine/menu/video_control_disabled.h
---- btanks-0.8.7686.orig/engine/menu/video_control_disabled.h	2008-06-08 13:02:39.000000000 +0400
-+++ btanks-0.8.7686/engine/menu/video_control_disabled.h	2009-03-17 13:42:48.000000000 +0300
+--- engine/menu/video_control_disabled.h.disable-smpeg	2008-06-08 04:02:39.000000000 -0500
++++ engine/menu/video_control_disabled.h	2011-06-25 03:00:25.000000000 -0500
 @@ -3,7 +3,7 @@
  
  #include <string>
@@ -100,9 +98,8 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control_disabled.h btanks-0.8.7
  #include "sdlx/surface.h"
  
  class DisabledVideoControl : public Control {
-diff -urp btanks-0.8.7686.orig/engine/menu/video_control.h btanks-0.8.7686/engine/menu/video_control.h
---- btanks-0.8.7686.orig/engine/menu/video_control.h	2008-06-08 13:02:39.000000000 +0400
-+++ btanks-0.8.7686/engine/menu/video_control.h	2009-03-17 13:42:48.000000000 +0300
+--- engine/menu/video_control.h.disable-smpeg	2008-06-08 04:02:39.000000000 -0500
++++ engine/menu/video_control.h	2011-06-25 03:00:25.000000000 -0500
 @@ -3,7 +3,7 @@
  
  #include <string>
@@ -112,7 +109,7 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.h btanks-0.8.7686/engin
  #include "sdlx/surface.h"
  #include <SDL_thread.h>
  
-@@ -20,8 +20,8 @@ private: 
+@@ -20,8 +20,8 @@
  	void checkStatus();
  	std::string base, name;
  	const sdlx::Surface *screenshot;
@@ -123,10 +120,25 @@ diff -urp btanks-0.8.7686.orig/engine/menu/video_control.h btanks-0.8.7686/engin
  	sdlx::Surface shadow, frame;
  	SDL_mutex * lock;
  	bool active, started;
-diff -urp btanks-0.8.7686.orig/engine/SConscript btanks-0.8.7686/engine/SConscript
---- btanks-0.8.7686.orig/engine/SConscript	2008-09-02 15:37:07.000000000 +0400
-+++ btanks-0.8.7686/engine/SConscript	2009-03-17 13:42:54.000000000 +0300
-@@ -7,7 +7,6 @@ Import('debug')
+--- SConstruct.disable-smpeg	2009-12-10 08:58:55.000000000 -0600
++++ SConstruct	2011-06-25 03:13:10.000000000 -0500
+@@ -135,13 +135,6 @@
+ 
+ Export('sdl_cflags')
+ Export('sdl_libs')
+-smpeg_lib = 'smpeg'
+-if debug and sys.platform == 'win32':
+-	smpeg_lib = 'smpeg_d'
+-Export('smpeg_lib')
+-
+-if not conf.CheckLibWithHeader(smpeg_lib, 'smpeg/smpeg.h', 'c++', "SMPEG_new_data(malloc(42), 42, NULL, 0);", False):
+-	Exit(1)
+ 
+ if not conf.CheckLibWithHeader('SDL_image', 'SDL_image.h', 'c++', "IMG_Load(0);", False):
+ 	Exit(1)
+--- engine/SConscript.disable-smpeg	2009-12-30 07:50:33.000000000 -0600
++++ engine/SConscript	2011-06-25 03:14:12.000000000 -0500
+@@ -7,7 +7,6 @@
  Import('sdl_cflags')
  Import('sdl_libs')
  Import('lib_dir')
@@ -134,29 +146,12 @@ diff -urp btanks-0.8.7686.orig/engine/SConscript btanks-0.8.7686/engine/SConscri
  
  venv = env.Clone()
  env = env.Clone()
-@@ -73,7 +72,7 @@ vorbis = 'vorbisfile'
+@@ -75,7 +74,7 @@
  if debug and sys.platform == "win32": 
  	vorbis = 'vorbisfile_d'
  
 -bt_libs = ['mrt', 'sdlx', smpeg_lib, 'SDL', vorbis, 'clunk']
 +bt_libs = ['mrt', 'sdlx', 'SDL', vorbis, 'clunk']
  
- if sys.platform != 'win32' and env['enable_lua']:
+ if sys.platform != 'win32':
  	got_lua = False
-diff -urp btanks-0.8.7686.orig/SConstruct btanks-0.8.7686/SConstruct
---- btanks-0.8.7686.orig/SConstruct	2008-07-29 13:08:59.000000000 +0400
-+++ btanks-0.8.7686/SConstruct	2009-03-17 13:42:48.000000000 +0300
-@@ -133,13 +133,6 @@ else: 
- 
- Export('sdl_cflags')
- Export('sdl_libs')
--smpeg_lib = 'smpeg'
--if debug and sys.platform == 'win32':
--	smpeg_lib = 'smpeg_d'
--Export('smpeg_lib')
--
--if not conf.CheckLibWithHeader(smpeg_lib, 'smpeg/smpeg.h', 'c++', "SMPEG_new_data(malloc(42), 42, NULL, 0);", False):
--	Exit(1)
- 
- if not conf.CheckLibWithHeader('SDL_image', 'SDL/SDL_image.h', 'c++', "IMG_Load(0);", False):
- 	Exit(1)
diff --git a/btanks.spec b/btanks.spec
index b59c8ba..1a6813c 100644
--- a/btanks.spec
+++ b/btanks.spec
@@ -11,7 +11,7 @@ URL:            http://btanks.sourceforge.net/
 # Remove RPath from binaries
 Patch0:         %{name}-0.8-remove-rpath.patch
 # Disable video previews of map levels (we don't distribute video anyway)
-Patch1:         %{name}-0.8-disable-smpeg.patch
+Patch1:         %{name}-disable-smpeg.patch
 # Rename libbt.so to libbtanks.so because of conflict with blackbox
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
 Source1:        %{name}.desktop


More information about the scm-commits mailing list