summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2009-08-12 20:37:10 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2009-08-12 20:37:10 +0000
commita15882683a1eff1a311699b57cf3ca4a801e3694 (patch)
tree5071177eb71422b76ce25e2c41e01daa60bcc225 /games-sports/toycars
parentFix building with GCC 4.4+ wrt #273226, thanks to vasuvi from #gentoo-kde for... (diff)
downloadgentoo-2-a15882683a1eff1a311699b57cf3ca4a801e3694.tar.gz
gentoo-2-a15882683a1eff1a311699b57cf3ca4a801e3694.tar.bz2
gentoo-2-a15882683a1eff1a311699b57cf3ca4a801e3694.zip
Fix building with GLIBC 2.10+ wrt #277072, thanks to Dominik Kapusta for patch.
(Portage version: 2.2_rc38/cvs/Linux x86_64)
Diffstat (limited to 'games-sports/toycars')
-rw-r--r--games-sports/toycars/ChangeLog7
-rw-r--r--games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch101
-rw-r--r--games-sports/toycars/toycars-0.3.10.ebuild6
3 files changed, 112 insertions, 2 deletions
diff --git a/games-sports/toycars/ChangeLog b/games-sports/toycars/ChangeLog
index b96f7d76afa2..638479e4e8af 100644
--- a/games-sports/toycars/ChangeLog
+++ b/games-sports/toycars/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-sports/toycars
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/toycars/ChangeLog,v 1.13 2009/07/01 02:14:27 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-sports/toycars/ChangeLog,v 1.14 2009/08/12 20:37:10 ssuominen Exp $
+
+ 12 Aug 2009; Samuli Suominen <ssuominen@gentoo.org> toycars-0.3.10.ebuild,
+ +files/toycars-0.3.10-glibc-2.10.patch:
+ Fix building with GLIBC 2.10+ wrt #277072, thanks to Dominik Kapusta for
+ patch.
*toycars-0.3.10 (01 Jul 2009)
diff --git a/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch b/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch
new file mode 100644
index 000000000000..e3c184724c6d
--- /dev/null
+++ b/games-sports/toycars/files/toycars-0.3.10-glibc-2.10.patch
@@ -0,0 +1,101 @@
+diff --git a/toycars_track_editor/src/TrackView.cxx b/toycars_track_editor/src/TrackView.cxx
+index d52daba..e1a66df 100644
+--- a/toycars_track_editor/src/TrackView.cxx
++++ b/toycars_track_editor/src/TrackView.cxx
+@@ -89,7 +89,7 @@ TiXmlDocument *findXMLFile(const char *filename, SearchDirectories *dirs, char *
+ //{jpg,png,bmp,pnm,pbm,pgm,ppm}
+ Fl_Image* loadImage(const char *filename)
+ {
+- char *suffix = strrchr(filename, '.');
++ const char *suffix = strrchr(filename, '.');
+ if (suffix == NULL)
+ return NULL;
+ if (strcmp(suffix,".jpg") == 0)
+@@ -969,13 +969,13 @@ void TrackView::installMap(const char *name)
+ uninstallMap(name);
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(trackname, temp+1, 255);
+ }
+@@ -1044,13 +1044,13 @@ void TrackView::uninstallMap(const char *name)
+ char *temp;
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(trackname, temp+1, 255);
+ }
+diff --git a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp b/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
+index 4b6ff50..7aa6c40 100644
+--- a/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
++++ b/toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
+@@ -23,7 +23,7 @@
+ //{jpg,png,bmp,pnm,pbm,pgm,ppm}
+ Fl_Image* loadImage(const char *filename)
+ {
+- char *suffix = strrchr(filename, '.');
++ const char *suffix = strrchr(filename, '.');
+ if (suffix == NULL)
+ return NULL;
+ if (strcmp(suffix,".jpg") == 0)
+diff --git a/toycars_vehicle_editor/src/VehicleObject.cpp b/toycars_vehicle_editor/src/VehicleObject.cpp
+index 3f61114..0bd2978 100644
+--- a/toycars_vehicle_editor/src/VehicleObject.cpp
++++ b/toycars_vehicle_editor/src/VehicleObject.cpp
+@@ -533,13 +533,13 @@ void VehicleObject::installVehicle(const char *name)
+ uninstallVehicle(name);
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(carname, temp+1, 255);
+ }
+@@ -610,13 +610,13 @@ void VehicleObject::uninstallVehicle(const char *name)
+ char *temp;
+
+ // chop off any .xml suffix
+- temp = strrchr(name, '.');
++ temp = const_cast<char*>( strrchr(name, '.') );
+ if (temp) {
+ if (strcmp(temp, ".xml") == 0)
+ temp[0] = '\0';
+ }
+ // remove path
+- temp = strrchr(name, '/');
++ temp = const_cast<char*>( strrchr(name, '/') );
+ if (temp) {
+ strncpy(carname, temp+1, 255);
+ }
+@@ -675,4 +675,4 @@ void VehicleObject::uninstallVehicle(const char *name)
+ system(str);
+ */
+ #endif
+-}
+\ No newline at end of file
++}
diff --git a/games-sports/toycars/toycars-0.3.10.ebuild b/games-sports/toycars/toycars-0.3.10.ebuild
index a91d46ce649e..d436c6d3bc92 100644
--- a/games-sports/toycars/toycars-0.3.10.ebuild
+++ b/games-sports/toycars/toycars-0.3.10.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/toycars/toycars-0.3.10.ebuild,v 1.2 2009/07/29 01:13:55 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-sports/toycars/toycars-0.3.10.ebuild,v 1.3 2009/08/12 20:37:10 ssuominen Exp $
EAPI=2
inherit eutils flag-o-matic games
@@ -21,6 +21,10 @@ DEPEND="media-libs/libsdl[video]
virtual/glu
virtual/opengl"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+}
+
src_configure() {
append-ldflags -L/opt/fmodex/api/lib
egamesconf