[tecnoballz] use tinyxml system library (patch from Debian) fix configure.ac and Makefile.am to include missing f

musuruan musuruan at fedoraproject.org
Sat Dec 10 13:39:55 UTC 2011


commit 5f2d139146cf3ada5a514036b5ff49a48a4e3fae
Author: Andrea Musuruane <musuruan at gmail.com>
Date:   Sat Dec 10 14:39:45 2011 +0100

    use tinyxml system library (patch from Debian)
    fix configure.ac and Makefile.am to include missing files (patches from
    Debian)
    fix dependencies in configure.ac

 tecnoballz-0.92-Makefile.patch    |   30 +++++
 tecnoballz-0.92-dependecies.patch |   39 ++++++
 tecnoballz-0.92-deps.patch        |  230 -------------------------------------
 tecnoballz-0.92-level_data.patch  |   13 ++
 tecnoballz-0.92-texts_dir.patch   |   44 +++++++
 tecnoballz-0.92-tinyxml.patch     |   96 +++++++++++++++
 tecnoballz.spec                   |   52 ++++++---
 7 files changed, 257 insertions(+), 247 deletions(-)
---
diff --git a/tecnoballz-0.92-Makefile.patch b/tecnoballz-0.92-Makefile.patch
new file mode 100644
index 0000000..96283f2
--- /dev/null
+++ b/tecnoballz-0.92-Makefile.patch
@@ -0,0 +1,30 @@
+diff -dur tecnoballz-0.92.orig/Makefile.am tecnoballz-0.92/Makefile.am
+--- tecnoballz-0.92.orig/Makefile.am	2005-07-21 19:43:03.000000000 +0200
++++ tecnoballz-0.92/Makefile.am	2011-11-26 17:32:23.878188098 +0100
+@@ -1,5 +1,5 @@
+ 
+-gamesdir = $(prefix)/games
++gamesdir = $(bindir)
+ scoredir = /var/games/tecnoballz
+ score = tecnoballz.hi
+ 
+diff -dur tecnoballz-0.92.orig/src/Makefile.am tecnoballz-0.92/src/Makefile.am
+--- tecnoballz-0.92.orig/src/Makefile.am	2007-10-31 08:35:29.000000000 +0100
++++ tecnoballz-0.92/src/Makefile.am	2011-11-26 17:32:38.401341341 +0100
+@@ -1,6 +1,6 @@
+ 
+ NULL =
+-gamesdir = $(prefix)/games
++gamesdir = $(bindir)
+ scoredir = /var/games/tecnoballz
+ score = tecnoballz.hi
+ 
+@@ -71,7 +71,7 @@
+   sprite_projectile.cc \
+   sprite_ship.cc \
+   sprite_wall.cc \
+-  supervisor.c \
++  supervisor.cc \
+   supervisor_bricks_level.cc \
+   supervisor_main_menu.cc \
+   supervisor_map_editor.cc \
diff --git a/tecnoballz-0.92-dependecies.patch b/tecnoballz-0.92-dependecies.patch
new file mode 100644
index 0000000..daedc1c
--- /dev/null
+++ b/tecnoballz-0.92-dependecies.patch
@@ -0,0 +1,39 @@
+diff -dur tecnoballz-0.92.orig/configure.ac tecnoballz-0.92/configure.ac
+--- tecnoballz-0.92.orig/configure.ac	2007-11-19 13:44:15.000000000 +0100
++++ tecnoballz-0.92/configure.ac	2011-11-26 18:04:22.221420518 +0100
+@@ -50,23 +50,6 @@
+ 
+ LDFLAGS_="${LDFLAGS_save}"
+ 
+-AC_CHECK_LIB(vorbisfile, ov_raw_seek, [
+-	MM_LIBS="${MM_LIBS} -lvorbisfile"
+-],[
+-	AC_MSG_ERROR(Could not find the vorbisfile lib : -lvorbisfile)
+-])
+-AC_CHECK_LIB(ogg, ogg_stream_packetin, [
+-	MM_LIBS="${MM_LIBS} -logg"
+-],[
+-	AC_MSG_ERROR(Could not find the ogg lib : -logg)
+-])
+-AC_CHECK_LIB(smpeg, SMPEG_play, [
+-	MM_LIBS="${MM_LIBS} -lsmpeg"
+-],[
+-	AC_MSG_ERROR(Could not find the smpeg lib : -lsmpeg)
+-])
+-AC_SUBST(MM_LIBS)
+-
+ AC_CHECK_LIB(mikmod, Player_Stop, [
+ 	MIKMOD_LIBS="-lmikmod"
+ 	MIKMOD_FLAGS="-pthread -D_REENTRANT"
+diff -dur tecnoballz-0.92.orig/src/Makefile.am tecnoballz-0.92/src/Makefile.am
+--- tecnoballz-0.92.orig/src/Makefile.am	2007-10-31 08:35:29.000000000 +0100
++++ tecnoballz-0.92/src/Makefile.am	2011-11-26 18:04:44.634636369 +0100
+@@ -9,7 +9,7 @@
+ games_PROGRAMS = tecnoballz
+ tecnoballz_SOURCES = $(SOURCES_MAIN) 
+ tecnoballz_CXXFLAGS = -DDATADIR=\"$(datadir)/tecnoballz\" -DSCOREFILE=\"$(scoredir)/$(score)\" @XLIB_CFLAGS@ @SDL_CFLAGS@ @MIKMOD_FLAGS@ 
+-tecnoballz_LDADD = @XLIB_LIBS@ @SDL_LIBS@ @MM_LIBS@ @MIKMOD_LIBS@ -L.
++tecnoballz_LDADD = @XLIB_LIBS@ @SDL_LIBS@ @MIKMOD_LIBS@ -L.
+ 
+ SOURCES_MAIN = \
+   bitmap_data.cc \
diff --git a/tecnoballz-0.92-level_data.patch b/tecnoballz-0.92-level_data.patch
new file mode 100644
index 0000000..b042abb
--- /dev/null
+++ b/tecnoballz-0.92-level_data.patch
@@ -0,0 +1,13 @@
+#Description: Include levels-data.xml file in build.
+Index: tecnoballz-0.92/src/TecnoballZ/Makefile.am
+===================================================================
+--- tecnoballz-0.92.orig/src/TecnoballZ/Makefile.am	2009-04-16 14:41:28.000000000 -0400
++++ tecnoballz-0.92/src/TecnoballZ/Makefile.am	2009-04-16 14:41:48.000000000 -0400
+@@ -6,6 +6,7 @@
+ dist_pkgdata_DATA = \
+ 	cosinus128.list \
+ 	gard_lissa.list \
++	levels-data.xml \
+ 	min60map.png \
+ 	tableau.data \
+   tilemap-congratulation_20.data \
diff --git a/tecnoballz-0.92-texts_dir.patch b/tecnoballz-0.92-texts_dir.patch
new file mode 100644
index 0000000..21c2c76
--- /dev/null
+++ b/tecnoballz-0.92-texts_dir.patch
@@ -0,0 +1,44 @@
+#Description: Include the texts subdir in the build.
+Index: tecnoballz-0.92/configure.ac
+===================================================================
+--- tecnoballz-0.92.orig/configure.ac	2009-04-16 15:35:02.000000000 -0400
++++ tecnoballz-0.92/configure.ac	2009-04-16 15:35:33.000000000 -0400
+@@ -81,5 +81,5 @@
+ 
+ 
+ dnl  Output makefiles
+-AC_OUTPUT(Makefile src/Makefile src/TecnoballZ/Makefile src/TecnoballZ/hires/Makefile src/TecnoballZ/lores/Makefile src/TecnoballZ/textures/Makefile src/TecnoballZ/musics/Makefile src/TecnoballZ/sounds/Makefile)
++AC_OUTPUT(Makefile src/Makefile src/TecnoballZ/Makefile src/TecnoballZ/hires/Makefile src/TecnoballZ/lores/Makefile src/TecnoballZ/textures/Makefile src/TecnoballZ/musics/Makefile src/TecnoballZ/sounds/Makefile src/TecnoballZ/texts/Makefile)
+ 
+Index: tecnoballz-0.92/src/TecnoballZ/Makefile.am
+===================================================================
+--- tecnoballz-0.92.orig/src/TecnoballZ/Makefile.am	2009-04-16 15:35:46.000000000 -0400
++++ tecnoballz-0.92/src/TecnoballZ/Makefile.am	2009-04-16 15:36:10.000000000 -0400
+@@ -1,6 +1,6 @@
+ NULL =
+ 
+-SUBDIRS = lores hires textures sounds musics
++SUBDIRS = lores hires textures sounds musics texts
+ 
+ pkgdatadir = $(datadir)/tecnoballz
+ dist_pkgdata_DATA = \
+Index: tecnoballz-0.92/src/TecnoballZ/texts/Makefile.am
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ tecnoballz-0.92/src/TecnoballZ/texts/Makefile.am	2009-04-16 15:37:27.000000000 -0400
+@@ -0,0 +1,15 @@
++NULL =
++pkgdatadir = $(datadir)/tecnoballz/texts
++dist_pkgdata_DATA = \
++	main_menu_en.txt \
++	main_menu_fr.txt \
++	popup_menu_en.txt \
++	popup_menu_fr.txt \
++	scrolltext_en.txt \
++	scrolltext_fr.txt \
++	shop_en.txt \
++	shop_fr.txt \
++	short_info_messages_en.txt \
++	short_info_messages_fr.txt \
++	$(NULL)
++
diff --git a/tecnoballz-0.92-tinyxml.patch b/tecnoballz-0.92-tinyxml.patch
new file mode 100644
index 0000000..c4f55cc
--- /dev/null
+++ b/tecnoballz-0.92-tinyxml.patch
@@ -0,0 +1,96 @@
+From: Ansgar Burchardt <ansgar at debian.org>
+Date: Sun, 14 Aug 2011 14:08:35 +0200
+Subject: Use tinyxml system library
+Origin: vendor
+
+--- tecnoballz.orig/include/handler_levels.h
++++ tecnoballz/include/handler_levels.h
+@@ -32,7 +32,7 @@
+ class handler_levels;
+ 
+ #include "../include/tecnoballz.h"
+-#include "../include/tinyxml.h"
++#include <tinyxml.h>
+ #include <string.h>
+ 
+ typedef struct
+--- tecnoballz.orig/include/tinystr.h
++++ tecnoballz/include/tinystr.h
+@@ -34,6 +34,8 @@
+  * - added swap(), clear(), size(), capacity(), operator+().
+  */
+ 
++#error "Embedded copy of libtinyxml-dev should not be used."
++
+ #ifndef TIXML_USE_STL
+ 
+ #ifndef TIXML_STRING_INCLUDED
+--- tecnoballz.orig/include/tinyxml.h
++++ tecnoballz/include/tinyxml.h
+@@ -22,6 +22,7 @@
+ distribution.
+ */
+ 
++#error "Embedded copy of libtinyxml-dev should not be used."
+ 
+ #ifndef TINYXML_INCLUDED
+ #define TINYXML_INCLUDED
+--- tecnoballz.orig/src/Makefile.am
++++ tecnoballz/src/Makefile.am
+@@ -9,7 +9,7 @@
+ games_PROGRAMS = tecnoballz
+ tecnoballz_SOURCES = $(SOURCES_MAIN) 
+ tecnoballz_CXXFLAGS = -DDATADIR=\"$(datadir)/tecnoballz\" -DSCOREFILE=\"$(scoredir)/$(score)\" @XLIB_CFLAGS@ @SDL_CFLAGS@ @MIKMOD_FLAGS@ 
+-tecnoballz_LDADD = @XLIB_LIBS@ @SDL_LIBS@ @MIKMOD_LIBS@ -L.
++tecnoballz_LDADD = @XLIB_LIBS@ @SDL_LIBS@ @MIKMOD_LIBS@ -ltinyxml -L.
+ 
+ SOURCES_MAIN = \
+   bitmap_data.cc \
+@@ -81,9 +81,5 @@
+   tecnoballz.cc \
+   tiles_background.cc \
+   tilesmap_scrolling.cc \
+-  tinyxml.cc \
+-  tinyxmlerror.cc \
+-  tinyxmlparser.cc \
+-  tinystr.cc
+   $(NULL)
+ 
+--- tecnoballz.orig/src/handler_levels.cc
++++ tecnoballz/src/handler_levels.cc
+@@ -29,7 +29,7 @@
+ using namespace std;
+ #include "../include/handler_levels.h"
+ #include "../include/handler_resources.h"
+-#include "../include/tinyxml.h"
++#include <tinyxml.h>
+ #include <string.h>
+ #include <sstream>
+ 
+@@ -143,7 +143,7 @@
+   Sint32 type = parent->Type ();
+   switch (type)
+     {
+-    case TiXmlNode::ELEMENT:
++    case TiXmlNode::TINYXML_ELEMENT:
+       {
+         string element = parent->Value ();
+         if (element == "level")
+@@ -221,7 +221,7 @@
+   string name;
+   switch (type)
+     {
+-    case TiXmlNode::ELEMENT:
++    case TiXmlNode::TINYXML_ELEMENT:
+       {
+         element = parent->ToElement ();
+         last_element = parent->Value ();
+@@ -290,7 +290,7 @@
+       break;
+ 
+ 
+-    case TiXmlNode::TEXT:
++    case TiXmlNode::TINYXML_TEXT:
+       text = parent->ToText ();
+       value_str = text->Value ();
+ 
diff --git a/tecnoballz.spec b/tecnoballz.spec
index 813e732..b4fd0a6 100644
--- a/tecnoballz.spec
+++ b/tecnoballz.spec
@@ -1,6 +1,6 @@
 Name: tecnoballz
 Version: 0.92
-Release: 10%{?dist}
+Release: 11%{?dist}
 Summary: A Brick Busting game
 
 Group: Amusements/Games
@@ -9,18 +9,34 @@ URL: http://linux.tlk.fr/games/TecnoballZ/
 Source0: http://linux.tlk.fr/games/TecnoballZ/download/%{name}-%{version}.tgz
 Source1: %{name}.xpm
 Source2: %{name}.desktop
-# SuSE/Gentoo
-Patch0: tecnoballz-0.92-deps.patch
-# Hans de Goede
-Patch1: tecnoballz-0.92-dropsgid.patch
+# Andrea Musuruane
+# Fix dependencies
+Patch0: tecnoballz-0.92-dependecies.patch
+# Andrea Musuruane
+# Don't combine explicit and implicit rules for make 3.82
+# Set correct gamedir for Fedora
+Patch1: tecnoballz-0.92-Makefile.patch
+# Debian
+# Fix configure.ac Makefile.am to include missing files
+Patch2: tecnoballz-0.92-level_data.patch
+Patch3: tecnoballz-0.92-texts_dir.patch
+# Debian
+# Use tinyxml system library
+Patch4: tecnoballz-0.92-tinyxml.patch
 # Upstream CVS
-Patch2: tecnoballz-0.92-gcc43.patch
+# Compile with gcc 4.3
+Patch5: tecnoballz-0.92-gcc43.patch
+# Hans de Goede
+# Drop setgid privileges when not needed
+Patch6: tecnoballz-0.92-dropsgid.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+BuildRequires: autoconf
 BuildRequires: SDL_image-devel
 BuildRequires: SDL_mixer-devel
 BuildRequires: mikmod-devel
+BuildRequires: tinyxml-devel
 BuildRequires: desktop-file-utils
 Requires: hicolor-icon-theme
 
@@ -37,17 +53,16 @@ complete this great game. This game was ported from the Commodore Amiga.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p2
-
-# FIX: don't combine explicit and implicit rules for make 3.82
-sed -i 's/supervisor.c/supervisor.cc/' src/Makefile.in
-
-# FIX: set gamedir and scoredir
-sed -i 's:gamesdir = $(prefix)/games:gamesdir = ${bindir}:' src/Makefile.in
-sed -i 's:scoredir = /var/games/tecnoballz:scoredir = ${localstatedir}/games/%{name}:' Makefile.in
+%patch2 -p1
+%patch3 -p1
+# Patch4 must be called after Patch0
+%patch4 -p1
+%patch5 -p2
+%patch6 -p1
 
 
 %build
+autoreconf -fvi
 %configure
 # FIX: ovverride CXXFLAGS to pick up RPM_OPT_FLAGS
 make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS"
@@ -57,9 +72,6 @@ make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS"
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
 
-# FIX: install missing files
-cp -fr src/TecnoballZ/levels-data.xml src/TecnoballZ/texts %{buildroot}%{_datadir}/%{name}
-
 # install desktop file
 mkdir -p %{buildroot}%{_datadir}/applications
 desktop-file-install --vendor fedora         \
@@ -102,6 +114,12 @@ fi
 
 
 %changelog
+* Sat Nov 26 2011 Andrea Musuruane <musuruan at gmail.com> 0.92-11
+- use tinyxml system library (patch from Debian)
+- fix configure.ac and Makefile.am to include missing files (patches from 
+  Debian)
+- fix dependencies in configure.ac
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.92-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list