Skip to content

Commit

Permalink
boswars: 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
nieder committed Oct 4, 2023
1 parent a5aa485 commit c47a560
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 77 deletions.
47 changes: 22 additions & 25 deletions 10.9-libcxx/stable/main/finkinfo/games/boswars.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: boswars
Version: 2.7
Version: 2.8
Revision: 1
Description: Futuristic real time strategy game
License: GPL
Expand All @@ -19,53 +19,50 @@ BuildDepends: <<
libtheora0,
libvorbis0,
lua51-dev,
scons (>= 3.0.0-1),
python310,
sdl
<<
BuildConflicts: ccache-default
Source: http://www.boswars.org/dist/releases/%n-%v-src.tar.gz
Source-Checksum: SHA256(dc3718f531e9ea413cf37e1333b62a4c5e69f1405502d9c59b9e424635135e3e)
### Fixed images to use with libpng16
Source2: http://dev.gentoo.org/~hasufell/distfiles/boswars-%v-fixed-images-for-libpng-1.6.tar.xz
Source2-Checksum: SHA256(87f3ee7f4045c3acfacd884348a2b376e710b42aa0f40acbc212732d0bee9a24)
Source: https://www.boswars.org/dist/releases/boswars-%v-src.tar.gz
Source-Checksum: SHA256(5185206990bf6765c7a5d3802ce6e6048a1087cf4c307b099a5691a3eec6b86a)
PatchFile: %n.patch
PatchFile-MD5: 40ee65b2367a65a574c3eb1f5a2bafd2
PatchFile-MD5: 40762b488f9b01162258afb343366152
PatchScript: <<
%{default_script}
/usr/bin/perl -pi -e 's,/usr/local,%p,g;' SConstruct
#libpng16 fix https://bugs.gentoo.org/show_bug.cgi?id=475764#c6
cp -Rp %b/../boswars-2.7-fixed-images-for-libpng-1.6/* %b
#perl -pi -e 's|installdatadir|datadir|g' make.py
echo "#! /bin/sh" > boswars-launcher
echo "PREFIX=%p" >> boswars-launcher
echo "%p/share/%n/boswars-engine -d \$PREFIX/share/boswars/" >> boswars-launcher
echo "%p/lib/%n/boswars-engine -d \$PREFIX/share/boswars/" >> boswars-launcher
<<
GCC: 4.0
CompileScript: scons $MAKEFLAGS
SetCFLAGS: -MD
NoSetMAKEFLAGS: true
CompileScript: <<
%p/bin/python3.10 ./make.py $MAKEFLAGS release cflags="$CFLAGS $CPPFLAGS" ldflags=$LDFLAGS
fink-package-precedence --depfile-ext='\.d' .
<<
InstallScript: <<
#!/bin/bash -ev
/usr/bin/install -d %i/share/%n
install -d -m 755 %i/bin
install -d -m 755 %i/lib/%n
install -d -m 755 %i/share/%n
#%p/bin/python3.10 ./make.py $MAKEFLAGS install cflags="$CFLAGS $CPPFLAGS -DDEFAULT_DATA_PATH=%p/share/boswars" ldflags=$LDFLAGS bindir=%i/bin datadir=%i/share/boswars
for i in {campaigns,graphics,intro,languages,maps,patches,scripts,sounds,units} ;
do
/bin/cp -r $i %i/share/%n/$i
done
/usr/bin/install -s -m 755 build/boswars-release %i/share/%n/boswars-engine
/usr/bin/install -d %i/bin
/usr/bin/install -s -m 755 fbuild/release/boswars %i/lib/%n/boswars-engine
/usr/bin/install -m 755 boswars-launcher %i/bin/boswars
<<
DocFiles: doc/* CHANGELOG COPYRIGHT.txt LICENSE.txt README.txt
Homepage: http://www.boswars.org/
Homepage: https://www.boswars.org/
DescDetail: <<
Bos Wars is a futuristic real-time strategy game featuring a dynamic
rate-based economy. Resources are continuously produced while also being
consumed by creating buildings and training new units. Bos Wars aims to
create a completely original and fun open source RTS game.
<<
DescPort: <<
Some shipped PNG files are broken with libpng16.
https://savannah.nongnu.org/bugs/?39610
https://bugs.gentoo.org/show_bug.cgi?id=475764
Fixed in, but not yet released:
http://svn.seul.org/viewcvs/viewvc.cgi?view=revision&root=BosWars&revision=10222

* print "foo" is no longer valid for scons-3. Must wrap as print("foo").
* upstream commit to get rid of os.stat_float_times
5cb645f8c55b536f0027314aac9216a200315708
* make.py rebuilds everything during install phase, so just copy files over
<<
103 changes: 51 additions & 52 deletions 10.9-libcxx/stable/main/finkinfo/games/boswars.patch
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
--- a/SConstruct 2017-10-05 22:51:46.000000000 -0500
+++ b/SConstruct 2017-10-05 22:52:32.000000000 -0500
@@ -190,20 +190,20 @@
diff -ruN boswars-2.8-src-orig/make.py boswars-2.8-src/make.py
--- boswars-2.8-src-orig/make.py 2023-06-26 14:31:19.000000000 -0500
+++ boswars-2.8-src/make.py 2023-10-01 17:29:57.000000000 -0500
@@ -289,6 +289,7 @@
libs = 'GL opengl3 opengl32'.split()
if sys.platform == 'darwin':
b.incpath('/System/Library/Frameworks/OpenGL.framework/Libraries/')
+ b.libpath('/System/Library/Frameworks/OpenGL.framework/Libraries/')
r = CheckLibAlternatives(b, libs)
if not r:
print('Did not find the OpenGL library, exiting !')
From 5cb645f8c55b536f0027314aac9216a200315708 Mon Sep 17 00:00:00 2001
From: Francois Beerten <[email protected]>
Date: Wed, 5 Jul 2023 10:39:48 +0200
Subject: [PATCH] fabricate.py: remove deprecated calls to
os.stat_float_times()

Since Python 2.5, stat times use floats and we require at least
Python 2.7. os.stat_float_times() is deprecated since Python
3.1 and has been completely removed in Python 3.7.

References in Python doc and issue tracker:
* https://docs.python.org/3/whatsnew/changelog.html?highlight=stat_float_times#id409
* https://bugs.python.org/issue31827

This fixes one of the bugs detected by Luiz Gabriel Jung in bug #64375
"Can't run new game version 2.8".
---
fabricate.py | 5 -----
1 file changed, 5 deletions(-)

diff --git a/fabricate.py b/fabricate.py
index d63901d3..8fe46002 100644
--- a/fabricate.py
+++ b/fabricate.py
@@ -378,10 +378,6 @@ class AtimesRunner(Runner):
""" Run command and return its dependencies and outputs, using before
and after access times to determine dependencies. """

## check for required libs ##
if not conf.CheckLibWithHeader('png', 'png.h', 'c'):
- print 'Did not find png library or headers, exiting!'
+ print('Did not find png library or headers, exiting!')
Exit(1)
if not conf.CheckLibWithHeader('z', 'zlib.h', 'c'):
- print 'Did not find the zlib library or headers, exiting!'
+ print('Did not find the zlib library or headers, exiting!')
Exit(1)
if not 'USE_WIN32' in env['CPPDEFINES'] and not sys.platform.startswith('freebsd'):
if not conf.CheckLib('dl'):
- print 'Did not find dl library or header which is needed on some systems for lua. Exiting!'
+ print('Did not find dl library or header which is needed on some systems for lua. Exiting!')
Exit(1)
if not CheckLuaLib(env, conf):
- print 'Did not find required lua library. Exiting!'
+ print('Did not find required lua library. Exiting!')
Exit(1)
if not CheckOpenGL(env, conf):
- print 'Did not find required OpenGL library. Exiting!'
+ print('Did not find required OpenGL library. Exiting!')
Exit(1)
- # For Python pre-2.5, ensure os.stat() returns float atimes
- old_stat_float = os.stat_float_times()
- os.stat_float_times(True)
-
originals = self.file_times()
if self.atimes == 2:
befores = originals
@@ -425,7 +421,6 @@ class AtimesRunner(Runner):
if original != afters.get(name, None):
self._utime(name, original[0], original[1])

# Check for optional libraries #
@@ -232,7 +232,7 @@
env.ParseConfig('sdl-config --libs')
if sys.platform != "darwin" and not '-Dmain=SDL_main' in env['CCFLAGS']:
if not conf.CheckLibWithHeader('SDL', 'SDL.h', 'c'):
- print 'Did not find SDL library or headers, exiting!'
+ print('Did not find SDL library or headers, exiting!')
Exit(1)
- os.stat_float_times(old_stat_float) # restore stat_float_times value
return deps, outputs

env = conf.Finish()
@@ -245,14 +245,14 @@
# Remove outdated cache file
os.remove(cachename)
if optionsChanged or not os.path.exists(cachename):
- print cachename + " doesn't exist or out of date."
- print "Generating new build config cache ..."
+ print(cachename + " doesn't exist or out of date.")
+ print("Generating new build config cache ...")
cache = DefineOptions(cachename, {})
AutoConfigure(env)
cache.Save(cachename, env)
else:
cache = DefineOptions(cachename, {})
- print "Using " + cachename
+ print("Using " + cachename)
cache.Update(env)

AutoConfigureIfNeeded(env, '')
class StraceProcess(object):

0 comments on commit c47a560

Please sign in to comment.