[netpanzer] Build with system physfs instead of bundled one (#1076808)

Jon Ciesla limb at fedoraproject.org
Mon Mar 24 16:23:10 UTC 2014


commit 776549f33dd87819303c3a356eade409edbe10b5
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Mar 18 09:31:15 2014 +0200

    Build with system physfs instead of bundled one (#1076808)

 netpanzer-0.8.4-system-physfs.patch |  114 +++++++++++++++++++++++++++++++++++
 netpanzer.spec                      |    8 ++-
 2 files changed, 121 insertions(+), 1 deletions(-)
---
diff --git a/netpanzer-0.8.4-system-physfs.patch b/netpanzer-0.8.4-system-physfs.patch
new file mode 100644
index 0000000..987477e
--- /dev/null
+++ b/netpanzer-0.8.4-system-physfs.patch
@@ -0,0 +1,114 @@
+diff --git a/SConstruct b/SConstruct
+index 1ffaa27..c344024 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -155,15 +155,12 @@ crossmingwenv.BuildDir(crossmingwenv['FINALBUILDDIR'],'.',duplicate=0)
+ crosslinuxenv.BuildDir(crosslinuxenv['FINALBUILDDIR'],'.',duplicate=0)
+ 
+ luaenv = env.Clone()
+-physfsenv = env.Clone()
+ networkenv = env.Clone()
+ 
+ crossmingwluaenv = crossmingwenv.Clone()
+-crossmingwphysfsenv = crossmingwenv.Clone()
+ crossmingwnetworkenv = crossmingwenv.Clone()
+ 
+ crosslinuxluaenv = crosslinuxenv.Clone()
+-crosslinuxphysfsenv = crosslinuxenv.Clone()
+ crosslinuxnetworkenv = crosslinuxenv.Clone()
+ 
+ ################################################################
+@@ -205,9 +202,9 @@ print 'Building version ' + NPVERSION + ' in ' + sys.platform
+ # Configure Environments
+ ################################################################
+ 
+-env.Append(           CPPPATH = [ '.', 'src/Lib', 'src/NetPanzer', 'src/Lib/physfs', 'src/Lib/lua'] )
+-crossmingwenv.Append( CPPPATH = [ '.', 'src/Lib', 'src/NetPanzer', 'src/Lib/physfs', 'src/Lib/lua'] )
+-crosslinuxenv.Append( CPPPATH = [ '.', 'src/Lib', 'src/NetPanzer', 'src/Lib/physfs', 'src/Lib/lua'] )
++env.Append(           CPPPATH = [ '.', 'src/Lib', 'src/NetPanzer', 'src/Lib/lua'] )
++crossmingwenv.Append( CPPPATH = [ '.', 'src/Lib', 'src/NetPanzer', 'src/Lib/lua'] )
++crosslinuxenv.Append( CPPPATH = [ '.', 'src/Lib', 'src/NetPanzer', 'src/Lib/lua'] )
+ 
+ # for this platform
+ if thisplatform == 'darwin':
+@@ -217,13 +214,11 @@ if thisplatform == 'darwin':
+     if env['universal'] != 'false':
+ 		env.Append( CCFLAGS = [ '-arch', 'ppc', '-arch', 'i386' ] )
+ 		luaenv.Append( CCFLAGS = [ '-arch', 'ppc', '-arch', 'i386' ] )
+-		physfsenv.Append( CCFLAGS = [ '-arch', 'ppc', '-arch', 'i386' ] )
+ 		networkenv.Append( CCFLAGS = [ '-arch', 'ppc', '-arch', 'i386' ] )
+ 		env.Append( LINKFLAGS = [ '-mmacosx-version-min=10.4', '-arch', 'ppc', '-arch', 'i386' ] )
+     else:
+         env.Append( CCFLAGS = [ '-arch', 'i386' ] )
+         luaenv.Append( CCFLAGS = [ '-arch', 'i386' ] )
+-        physfsenv.Append( CCFLAGS = [ '-arch', 'i386' ] )
+         networkenv.Append( CCFLAGS = [ '-arch', 'i386' ] )
+         env.Append( LINKFLAGS = [ '-arch', 'i386' ] )
+ 	
+@@ -273,28 +268,12 @@ MakeStaticLib(          luaenv, 'nplua', 'lua', '*.c')
+ MakeStaticLib(crossmingwluaenv, 'nplua', 'lua', '*.c')
+ MakeStaticLib(crosslinuxluaenv, 'nplua', 'lua', '*.c')
+ 
+-# BUILDS PHYSFS
+-physfsenv.Append( CFLAGS = [ '-DPHYSFS_SUPPORTS_ZIP=1', '-DZ_PREFIX=1', '-DPHYSFS_NO_CDROM_SUPPORT=1' ] )
+-physfsenv.Append( CPPPATH = [ 'src/Lib/physfs', 'src/Lib/physfs/zlib123' ] )
+-MakeStaticLib(physfsenv, 'npphysfs', 'physfs physfs/platform physfs/archivers physfs/zlib123', '*.c')
+-
+-crossmingwphysfsenv.Append( CFLAGS = [ '-DPHYSFS_SUPPORTS_ZIP=1', '-DZ_PREFIX=1', '-DPHYSFS_NO_CDROM_SUPPORT=1' ] )
+-crossmingwphysfsenv.Append( CPPPATH = [ 'src/Lib/physfs', 'src/Lib/physfs/zlib123' ] )
+-MakeStaticLib(crossmingwphysfsenv, 'npphysfs', 'physfs physfs/platform physfs/archivers physfs/zlib123', '*.c')
+-
+-crosslinuxphysfsenv.Append( CFLAGS = [ '-DPHYSFS_SUPPORTS_ZIP=1', '-DZ_PREFIX=1', '-DPHYSFS_NO_CDROM_SUPPORT=1' ] )
+-crosslinuxphysfsenv.Append( CPPPATH = [ 'src/Lib/physfs', 'src/Lib/physfs/zlib123' ] )
+-MakeStaticLib(crosslinuxphysfsenv, 'npphysfs', 'physfs physfs/platform physfs/archivers physfs/zlib123', '*.c')
+-
+ # BUILDS 2D
+ env.Append( CFLAGS = [ '-DZ_PREFIX=1' ] )
+-env.Append( CPPPATH = 'src/Lib/physfs/zlib123' )
+ MakeStaticLib(env, 'np2d', '2D 2D/libpng', '*.c*')
+ crossmingwenv.Append( CFLAGS = [ '-DZ_PREFIX=1' ] )
+-crossmingwenv.Append( CPPPATH = 'src/Lib/physfs/zlib123' )
+ MakeStaticLib(crossmingwenv, 'np2d', '2D 2D/libpng', '*.c*')
+ crosslinuxenv.Append( CFLAGS = [ '-DZ_PREFIX=1' ] )
+-crosslinuxenv.Append( CPPPATH = 'src/Lib/physfs/zlib123' )
+ MakeStaticLib(crosslinuxenv, 'np2d', '2D 2D/libpng', '*.c*')
+ 
+ # BUILDS REST OF LIBRARIES
+@@ -323,9 +302,9 @@ if crossmingwenv.has_key('WINICON'):
+     
+ crosslinuxenv.Append( NPSOURCES = globSources(crosslinuxenv, 'src/NetPanzer', npdirs, "*.cpp") )
+ 
+-env.Append(           NPLIBS = ['nplua','np2d','npnetwork','nplibs','npphysfs'] )
+-crossmingwenv.Append( NPLIBS = ['nplua','np2d','npnetwork','nplibs','npphysfs'] )
+-crosslinuxenv.Append( NPLIBS = ['nplua','np2d','npnetwork','nplibs','npphysfs'] )
++env.Append(           NPLIBS = ['nplua','np2d','npnetwork','nplibs','physfs'] )
++crossmingwenv.Append( NPLIBS = ['nplua','np2d','npnetwork','nplibs','physfs'] )
++crosslinuxenv.Append( NPLIBS = ['nplua','np2d','npnetwork','nplibs','physfs'] )
+ 
+ if env.has_key('LIBS'):
+     env.Append( NPLIBS = env['LIBS'] )
+diff --git a/src/Lib/Util/FileSystem.cpp b/src/Lib/Util/FileSystem.cpp
+index 1deae2d..a951119 100644
+--- a/src/Lib/Util/FileSystem.cpp
++++ b/src/Lib/Util/FileSystem.cpp
+@@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ #include "Exception.hpp"
+ #include "Log.hpp"
+ #include "FileSystem.hpp"
+-#include "physfs/physfs.h"
+ 
+ namespace filesystem
+ {
+diff --git a/src/Lib/Util/FileSystem.hpp b/src/Lib/Util/FileSystem.hpp
+index 244d075..8bda26e 100644
+--- a/src/Lib/Util/FileSystem.hpp
++++ b/src/Lib/Util/FileSystem.hpp
+@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ #include "SDL.h"
+ #include <string>
+ #include <stdlib.h>
+-#include "physfs/physfs.h"
++#include <physfs.h>
+ 
+ namespace filesystem
+ {
diff --git a/netpanzer.spec b/netpanzer.spec
index 8bed9a8..2b85cad 100644
--- a/netpanzer.spec
+++ b/netpanzer.spec
@@ -1,6 +1,6 @@
 Name:           netpanzer
 Version:        0.8.4
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        An Online Multiplayer Tactical Warfare Game
 
 Group:          Amusements/Games
@@ -17,6 +17,7 @@ Patch4:         netpanzer-0.8.2-MapSelectionView-memory.patch
 #Patch5:         netpanzer-0.8.3-scons-fixes.patch
 Patch6:         netpanzer-0.8.3-optflags-580241.patch
 Patch7:		netpanzer-0.8.4-gcc470.patch
+Patch8:		netpanzer-0.8.4-system-physfs.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  physfs-devel >= 0.1.9, desktop-file-utils, doxygen, scons
@@ -51,6 +52,8 @@ sed -i 's/\r//' RELNOTES
 #%patch5 -p0
 %patch6 -p1
 %patch7 -p0
+%patch8 -p1
+rm -r src/Lib/physfs
 
 %build
 scons datadir=%{_datadir}/netpanzer %{?_smp_mflags}
@@ -106,6 +109,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/netpanzer
 
 %changelog
+* Tue Mar 18 2014 Ville Skyttä <ville.skytta at iki.fi> - 0.8.4-6
+- Build with system physfs instead of bundled one (#1076808)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.4-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list