Accepting request 87426 from games:unknown-horizons

update to 0.3.3

OBS-URL: https://build.opensuse.org/request/show/87426
OBS-URL: https://build.opensuse.org/package/show/games/fife?expand=0&rev=2
This commit is contained in:
Nelson Marques 2011-10-11 16:47:02 +00:00 committed by Git OBS Bridge
parent 21cd8ee0ef
commit c4a3402dac
8 changed files with 72 additions and 241 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22c1be393b047f3bbcd2061e9ad20bf88391177217ab959410435857d3b16c4e
size 4728905

3
fife-0.3.3.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1ccc4e74307f8761451aac85cca578957a53fb4173af2d06dda78406ef2da2f9
size 5150534

View File

@ -1,70 +0,0 @@
diff -urN fife-0.3.2.old//engine/core/vfs/vfsdirectory.cpp fife-0.3.2/engine/core/vfs/vfsdirectory.cpp
--- fife-0.3.2.old//engine/core/vfs/vfsdirectory.cpp 2010-02-11 04:18:42.000000000 +0000
+++ fife-0.3.2/engine/core/vfs/vfsdirectory.cpp 2011-05-09 17:59:03.878062479 +0100
@@ -25,6 +25,7 @@
// 3rd party library includes
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
+#include <boost/version.hpp>
// FIFE includes
// These includes are split up in two parts, separated by one empty line
@@ -37,6 +38,27 @@
#include "vfsdirectory.h"
namespace bfs = boost::filesystem;
+
+namespace
+{
+ // grab the major and minor version of boost,
+ // calculations taken from boost/version.hpp
+ #define BOOST_MAJOR_VERSION BOOST_VERSION / 100000
+ #define BOOST_MINOR_VERSION BOOST_VERSION / 100 % 1000
+
+#if (BOOST_MAJOR_VERSION >= 1 && BOOST_MINOR_VERSION >= 46)
+ // this define will tell us to use boost filesystem
+ // version 3 since this is the default version of the library
+ // starting in boost version 1.46 and above
+ #define USE_BOOST_FILESYSTEM_V3
+#elif (BOOST_MAJOR_VERSION >= 1 && BOOST_MINOR_VERSION >= 36)
+ // this define will tell us not to use the deprecated functions
+ // in boost filesystem version 2 library which were introduced
+ // in boost version 1.36 and above
+ #define USE_NON_DEPRECATED_BOOST_FILESYSTEM_V2
+#endif
+}
+
namespace FIFE {
static Logger _log(LM_VFS);
@@ -94,10 +116,26 @@
if (bfs::is_directory(*i) != directorys)
continue;
- // This only works with boost 1.34 and up
- // list.insert(i->path().leaf());
- // This one should be ok with both 1.33 and above
- list.insert(i->leaf());
+#if defined(USE_BOOST_FILESYSTEM_V3)
+ // boost version 1.46 and above uses
+ // boost filesystem version 3 as the default
+ // which has yet a different way of getting
+ // a filename string
+ bfs::path filenamePath = i->path().filename();
+ list.insert(filenamePath.string());
+#elif defined(USE_NON_DEPRECATED_BOOST_FILESYSTEM_V2)
+ // the new way in boost filesystem version 2
+ // to get a filename string
+ //(this is for boost version 1.36 and above)
+ list.insert(i->path().filename());
+#else
+ // the old way in boost filesystem version 2
+ // to get a filename string
+ //(this is for boost version 1.35 and below)
+ list.insert(i->leaf());
+#endif
+
+
}
}
catch (const bfs::filesystem_error& ex) {

View File

@ -1,26 +0,0 @@
diff -urN fife-0.3.2.old//build/linux2-config.py fife-0.3.2/build/linux2-config.py
--- fife-0.3.2.old//build/linux2-config.py 2010-11-09 15:46:04.000000000 +0000
+++ fife-0.3.2/build/linux2-config.py 2011-05-08 23:45:02.815939632 +0100
@@ -30,19 +30,15 @@
def initEnvironment(env):
rootpath = env.Dir('#.').srcnode().abspath
- extincludepath = os.path.join(rootpath, 'ext', 'install', 'include')
- extlibpath = os.path.join(rootpath, 'ext', 'install', 'lib')
env.Append(CPPPATH = [os.path.join('/', 'opt', 'include'),
os.path.join('/', 'usr', 'include', 'vorbis'),
os.path.join('/', 'usr', 'include', 'SDL'),
- os.path.join('/', 'usr', 'include', pythonversion),
- extincludepath])
+ os.path.join('/', 'usr', 'include', pythonversion)])
- env.Append(LIBPATH = [os.path.join('/', 'opt', 'lib'),
- extlibpath])
+ env.Append(LIBPATH = [os.path.join('/', 'opt', '%{_lib}')])
- env.AppendENVPath('LD_RUN_PATH', os.path.join('..', '..', '..', extlibpath))
+ env.AppendENVPath('LD_RUN_PATH', os.path.join('..', '..', '..'))
env.AppendUnique(CXXFLAGS=["-DPNG_SKIP_SETJMP_CHECK"])

View File

@ -1,2 +0,0 @@
# Nevertheless, useful comments...
addFilter("macro-in-comment")

View File

@ -1,13 +0,0 @@
diff -urN fife-0.3.2.old//engine/SConscript fife-0.3.2/engine/SConscript
--- fife-0.3.2.old//engine/SConscript 2010-07-05 20:36:41.000000000 +0100
+++ fife-0.3.2/engine/SConscript 2011-05-09 01:15:23.731939633 +0100
@@ -128,7 +128,8 @@
SHLIBEMITTER = '')
else:
sharedlib = env.SharedLibrary(target = fife_tgt,
- source = compilefiles)
+ source = compilefiles,
+ LINKFLAGS=['-Wl,-soname,libfife.so.SONAME'])
#**************************************************************************
#python library target

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Tue Oct 11 00:05:46 UTC 2011 - nmarques@opensuse.org
- Update to version 0.3.3:
+ Many optimizations/improvements to the OpenGL renderer. Depth
testing was modified and now works properly with alpha
blending enabled. Alpha testing is used to discard pixels.
[t:556]
+ Optimized color overlays. [t:539]
+ Customizable alpha threshold value for outlines / outlining
[t:569]
+ Added support for drawing/modifying images. [t:553]
+ Re-implemented the Resouce Pools (ImagePool AnimationPool, etc)
as ImangeManager, SoundClipManager, etc. [t:504]
+ Setting module no longer crashes when settings dialog has not
been loaded. [t:555]
+ Fixed the problem that the objects of the renderers don't get
deallocated when the camera deconstructor was called. Affected
renderers: Instance-, Cellsection-, Generic- and LightRenderer.
+ Many more on CHANGES
- Removed fife-opensuse-packaging-fixes.patch: fixed upstream
- Removed fife-changeset_r3592.patch: included on release
- Removed fife-soname-fix.patch: fixed upstream
- Removed rpmlintrc
- Removed all entries for Fedora builds from spec.
- Some cleanup and optimizations on spec file.
- python-fife not building for now, removed from devel Requires.
-------------------------------------------------------------------
Tue May 10 00:23:58 UTC 2011 - nmarques@opensuse.org

168
fife.spec
View File

@ -1,7 +1,8 @@
#
# spec file for fife (Version 0.3.2)
# spec file for package fife
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) Nelson Marques <nmarques@opensuse.org>, Aveiro, Portugal.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,90 +16,52 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%global soname 0
# Release sources: http://sourceforge.net/projects/fife/files/active/src/%{name}-%{version}.tar.gz/download
# The sources were recompressed as: %{name}-%{version}.tar.bz2 for this package.
# Not building the documentation for this package, anyone wants docs?
%define _soname 0
Name: fife
# Quick workaround for a fast library package
%define _name libfife
Version: 0.3.2
%define _name libfife%{_soname}
Version: 0.3.3
Release: 1
License: LGPLv2+
License: LGPL-2.0+
Summary: A powerful 2D game engine
Url: http://www.fifengine.de
Group: Amusements/Games/Other
Source: %{name}-%{version}.tar.bz2
# Currently: "macro-in-comment"
Source99: %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE - fife-opensuse-packaging-fixes.patch nmarques@opensuse.org -- Remove 'ext' so we use system shared libraries
Patch0: %{name}-opensuse-packaging-fixes.patch
# PATCH-FIX-UPSTREAM - fife-changeset_r3592.patch nmarques@opensuse.org -- Cherry picked from git, fixes some issues with boost on vfsdirectory.cpp
Patch1: %{name}-changeset_r3592.patch
# PATCH-FIX-UPSTREAM - fife-soname-fix.patch -- Modified for openSUSE from existing Fedora patch
Patch2: %{name}-soname-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: boost-devel
BuildRequires: chrpath
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: guichan-devel
BuildRequires: libSDL_image-devel
BuildRequires: libSDL_ttf-devel
BuildRequires: libpng-devel
BuildRequires: libstdc++-devel
BuildRequires: scons
BuildRequires: swig
BuildRequires: tinyxml-devel
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(guichan-0.8)
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(vorbis)
BuildRequires: python-devel
# Required for a quick rpath workaround
BuildRequires: chrpath
BuildRequires: scons
BuildRequires: swig
BuildRequires: zlib-devel
# openSUSE/Fedora specific BRs. Unfortunatly no pkgconfig() present!
%if 0%{?suse_version}
BuildRequires: libSDL_image-devel
BuildRequires: libSDL_ttf-devel
BuildRequires: pkg-config
%endif
%if 0%{?fedora_version}
BuildRequires: SDL_image-devel
BuildRequires: SDL_ttf-devel
BuildRequires: libXcursor-devel
BuildRequires: pkgconfig
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig(python)
BuildRequires: pkgconfig(zlib)
%description
FIFE stands for Flexible Isometric Free Engine and is a cross platform
game creation framework. It provides you with the ability to create a
game using Python interfaces.
You can make just about any 2D game with FIFE but it is more geared
toward a RTS or RPG in just about any view style (isometric ortop-down).
For more information on FIFE's capabilities visit the Features page.
---
http://www.fifengine.de
http://wiki.fifengine.net/Features
%package -n %{_name}%{soname}
%package -n %{_name}
Summary: System shared libraries for fife engine games
Group: Amusements/Games/Other
%description -n %{_name}%{soname}
%description -n %{_name}
FIFE stands for Flexible Isometric Free Engine and is a cross platform
game creation framework. It provides you with the ability to create a
game using Python interfaces.
This package provides the shared libraries.
---
http://www.fifengine.de
http://wiki.fifengine.net/Features
%package -n python-%{name}
Summary: Python extensions for the fife engine
Group: Amusements/Games/Other
@ -109,104 +72,56 @@ FIFE stands for Flexible Isometric Free Engine and is a cross platform
game creation framework. It provides you with the ability to create a
game using Python interfaces.
This package provides the python extensions.
---
http://www.fifengine.de
http://wiki.fifengine.net/Features
%package devel
Summary: Development files for %{name} engine
Group: Development/Libraries/Other
Requires: %{_name}%{soname} = %{version}
Requires: python-%{name} = %{version}
%if 0%{?suse_version}
Requires: pkg-config
%endif
%if 0%{?fedora_version}
Requires: pkgconfig
%endif
Summary: Development files for %{name} engine
Group: Development/Libraries/Other
Requires: %{_name} = %{version}
Requires: python-fife = %{version}
%description devel
FIFE stands for Flexible Isometric Free Engine and is a cross platform
game creation framework. It provides you with the ability to create a
game using Python interfaces.
This package provides the development files.
---
http://www.fifengine.de
http://wiki.fifengine.net/Features
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# Add soname to generated library
%patch2 -p1
sed -i "s|SONAME|%{soname}|g" \
engine/SConscript
# Use libdir instead of lib (for 64bit systems)
for l in ./engine/SConscript ./build/linux2-config.py
do
sed -i "s|'lib'|'%{_lib}'|g" $l
done
# UTF-8 friendly fix - upstream pinged!
for f in AUTHORS CHANGES COPYING README
do
iconv -f iso-8859-1 -t utf-8 $f |sed 's|\r||g' > $f.utf8
touch -c -r $f $f.utf8
mv $f.utf8 $f
done
%setup -q -n %{name}_%{version}
%build
# Parallel builds will break the package - upstream pinged
scons \
CXXFLAGS='%{optflags}' \
--prefix=%{_prefix} \
--python-prefix=%{python_sitelib} \
--enable-rend-camzone \
--enable-rend-grid \
%{name}-shared \
%{name}-python \
%{name}-swig
%install
# Parallel builds will break the package - upstream pinged
scons \
CXXFLAGS='%{optflags}' \
DESTDIR=%{buildroot} \
install-shared \
install-python \
install-dev \
--enable-rend-camzone \
--enable-rend-grid \
--prefix=%{_prefix} \
--python-prefix=%{python_sitelib}
# rpath workaround
find %{buildroot} -name '*.so' -print -type f -exec chrpath --delete {} \;
# playing a little bit with soname
mv %{buildroot}/%{_libdir}/%{_name}.so %{buildroot}/%{_libdir}/%{_name}.so.%{version}
--python-prefix=%{python_sitelib} \
--lib-dir=%{_lib} \
install-all
pushd %{buildroot}%{_libdir}
ln -s %{_name}.so.%{version} %{_name}.so.%{soname}
ln -s %{_name}.so.%{version} %{_name}.so
ln -s libfife.so.%{version} libfife.so.0
ln -s libfife.so.%{version} libfife.so
popd
# We use system shared libraries, not static
# showstopper: removing RPATH
find %{buildroot} -name '*.so.*' -print -type f -print -exec chrpath --delete {} \;
find %{buildroot}%{python_sitelib} -name '*.so' -type f -print -exec chrpath --delete {} \;
# static libraries: shared only
find %{buildroot}%{_libdir} -name '*.a' -type f -delete -print
# permissions: we need to fix some permissions
find %{buildroot}%{_includedir} -perm 0755 -type f -print -exec chmod 0644 {} \;
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%post -n %{_name} -p /sbin/ldconfig
%post -n %{_name}%{soname} -p /sbin/ldconfig
%postun -n %{_name} -p /sbin/ldconfig
%postun -n %{_name}%{soname} -p /sbin/ldconfig
%files -n %{_name}%{soname}
%files -n %{_name}
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/*.so.*
%files -n python-%{name}
%defattr(-,root,root)
%{python_sitelib}/fife/
%{python_sitelib}/
%files devel
%defattr(-,root,root)
@ -215,4 +130,3 @@ find %{buildroot}%{_libdir} -name '*.a' -type f -delete -print
%{_libdir}/*.so
%changelog