[vegastrike] Fix up gcc46 patch.

Bruno Wolff III bruno at fedoraproject.org
Sat Jul 9 19:00:15 UTC 2011


commit d56d30e12bfa4befa127bd87f48ea616bbd05405
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sat Jul 9 10:22:04 2011 -0500

    Fix up gcc46 patch.
    
    Some context changes and some upsteam.

 vegastrike-0.5.0-gcc46.patch |   61 ------------------------------------------
 vegastrike-0.5.1-gcc46.patch |   40 +++++++++++++++++++++++++++
 vegastrike.spec              |    4 +-
 3 files changed, 42 insertions(+), 63 deletions(-)
---
diff --git a/vegastrike-0.5.1-gcc46.patch b/vegastrike-0.5.1-gcc46.patch
new file mode 100644
index 0000000..0d882f6
--- /dev/null
+++ b/vegastrike-0.5.1-gcc46.patch
@@ -0,0 +1,40 @@
+--- src/cmd/ai/aggressive.cpp.orig	2011-07-09 10:16:05.230676774 -0500
++++ src/cmd/ai/aggressive.cpp	2011-07-09 10:17:43.826207759 -0500
+@@ -27,6 +27,8 @@
+ #include "faction_generic.h"
+ #include "docking.h"
+ 
++extern double aggfire;
++
+ using namespace Orders;
+ 
+ const EnumMap::Pair element_names[] = {
+@@ -1608,7 +1610,6 @@
+ {
+     if (parent == uoi)
+         printf( "kewl" );
+-    extern double aggfire;
+     jump_time_check++;     //just so we get a nicely often wrapping var;
+     jump_time_check %= 5;
+     Flightgroup  *fg  = parent->getFlightgroup();
+--- src/cmd/ai/fire.cpp.orig	2011-07-09 10:18:45.272017206 -0500
++++ src/cmd/ai/fire.cpp	2011-07-09 10:19:30.139719659 -0500
+@@ -15,6 +15,9 @@
+ #include "lin_time.h" //DEBUG ONLY
+ #include "cmd/pilot.h"
+ 
++extern int numprocessed;
++extern double targetpick;
++
+ static bool NoDockWithClear()
+ {
+     static bool nodockwithclear = XMLSupport::parse_bool( vs_config->getVariable( "physics", "dock_with_clear_planets", "true" ) );
+@@ -430,8 +433,6 @@
+ {
+     float gunspeed, gunrange, missilerange;
+     parent->getAverageGunSpeed( gunspeed, gunrange, missilerange );
+-    extern int    numprocessed;
+-    extern double targetpick;
+     static float  targettimer = UniverseUtil::GetGameTime();    //timer used to determine passage of physics frames
+     static float  mintimetoswitch =
+         XMLSupport::parse_float( vs_config->getVariable( "AI", "Targetting", "MinTimeToSwitchTargets", "3" ) );
diff --git a/vegastrike.spec b/vegastrike.spec
index c76b4f6..a02cb63 100644
--- a/vegastrike.spec
+++ b/vegastrike.spec
@@ -20,7 +20,7 @@ Patch5:         vegastrike-0.5.1-openal.patch
 Patch6:         vegastrike-0.5.1-sys-python.patch
 Patch8:         vegastrike-0.5.1-gcc44.patch
 Patch9:         vegastrike-0.5.0-glext.patch
-Patch11:        vegastrike-0.5.0-gcc46.patch
+Patch11:        vegastrike-0.5.1-gcc46.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  libGLU-devel freeglut-devel libXi-devel libXmu-devel gtk2-devel
 BuildRequires:  libjpeg-devel libpng-devel boost-devel expat-devel python-devel
@@ -47,7 +47,7 @@ Yet danger lurks in the space beyond.
 %patch6 -p0
 %patch8 -p0
 %patch9 -p1
-%patch11 -p1
+%patch11 -p0
 iconv -f ISO-8859-1 -t UTF-8 README > README.tmp
 touch -r README README.tmp
 mv README.tmp README


More information about the scm-commits mailing list