+++ /dev/null
-Fixing compilation with gcc-4.5
-
-http://bugs.gentoo.org/show_bug.cgi?id=317751
-
-Patch written by Kacper Kowalik <xarthisius.kk@gmail.com>
-
---- toycars_vehicle_editor/src/VehicleEditorUI.cxx
-+++ toycars_vehicle_editor/src/VehicleEditorUI.cxx
-@@ -228,7 +228,7 @@
- sprintf(str, "%d", n);
- convexChoice->add(str);
- convexChoice->value(n);
--vehicleObj.getGeometry()->push_back(std::list<Vec2D>::list());
-+vehicleObj.getGeometry()->push_back(std::list<Vec2D>());
- spriteView->setConvexChoice(n);
- spriteView->redraw();
- }
---- toycars_vehicle_editor/src/VehicleObject.cpp
-+++ toycars_vehicle_editor/src/VehicleObject.cpp
-@@ -152,7 +152,7 @@
- short count;
- geometry.clear();
- for (xConvex = xGeometry->FirstChild(); xConvex != NULL; xConvex = xConvex->NextSibling("convex")) {
-- geometry.push_back(std::list<Vec2D>::list());
-+ geometry.push_back(std::list<Vec2D>());
- std::list<Vec2D> &convex = geometry.back();
- readPointsFromString(xConvex->FirstChild()->ToText()->Value(), convex, count);
- }
-@@ -411,7 +411,7 @@
- short count;
- geometry.clear();
- for (xConvex = xGeometry->FirstChild(); xConvex != NULL; xConvex = xConvex->NextSibling("convex")) {
-- geometry.push_back(std::list<Vec2D>::list());
-+ geometry.push_back(std::list<Vec2D>());
- std::list<Vec2D> &convex = geometry.back();
- readPointsFromString(xConvex->FirstChild()->ToText()->Value(), convex, count);
- }
+++ /dev/null
-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
-+}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils flag-o-matic games
-
-DESCRIPTION="a physics based 2-D racer inspired by Micro Machines"
-HOMEPAGE="http://sourceforge.net/projects/toycars"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-DEPEND="media-libs/libsdl[sound,video,joystick]
- media-libs/sdl-image[png]
- x11-libs/fltk:1[opengl]
- >=media-libs/fmod-4.25.07-r1:1
- virtual/glu
- virtual/opengl"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${P}-glibc-2.10.patch \
- "${FILESDIR}"/${P}-gcc45.patch \
- "${FILESDIR}"/${P}-gcc46.patch
- mv data/tracks/Corner/{c,C}orner.map
-}
-
-src_configure() {
- append-ldflags -L/opt/fmodex/api/lib
- egamesconf
-}
-
-src_install() {
- default
- local d f
-
- newicon toycars/celica-render.png ${PN}.png
- make_desktop_entry ${PN} "Toy Cars"
-
- for d in toycars toycars_track_editor toycars_vehicle_editor
- do
- for f in ChangeLog README TODO
- do
- if [[ -s $d/$f ]] ; then
- newdoc $d/$f $d.$f
- fi
- done
- done
- prepgamesdirs
-}