diff options
Diffstat (limited to 'games/toycars')
5 files changed, 109 insertions, 34 deletions
diff --git a/games/toycars/Makefile b/games/toycars/Makefile index 3bc6137b76f9..30eae7a3d34a 100644 --- a/games/toycars/Makefile +++ b/games/toycars/Makefile @@ -10,15 +10,15 @@ MASTER_SITES= SF MAINTAINER= amdmi3@FreeBSD.org COMMENT= Physics-based 2D racing game +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING + LIB_DEPENDS= libfltk.so:x11-toolkits/fltk -USES= gmake +USES= gmake localbase +GNU_CONFIGURE= yes USE_SDL= image sdl USE_GL= gl glu -GNU_CONFIGURE= yes - -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib PLIST_FILES= bin/toycars \ bin/toycars_track_editor \ @@ -31,8 +31,8 @@ OPTIONS_DEFINE= DOCS post-extract: @${RM} ${WRKSRC}/data/.*Store -post-install: - ${MKDIR} ${STAGEDIR}${DOCSDIR} +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include <bsd.port.mk> diff --git a/games/toycars/files/patch-toycars__track_editor_src_TrackView.cxx b/games/toycars/files/patch-toycars__track_editor_src_TrackView.cxx new file mode 100644 index 000000000000..b9626782a041 --- /dev/null +++ b/games/toycars/files/patch-toycars__track_editor_src_TrackView.cxx @@ -0,0 +1,33 @@ +--- toycars_track_editor/src/TrackView.cxx.orig 2009-06-28 03:13:24 UTC ++++ toycars_track_editor/src/TrackView.cxx +@@ -89,7 +89,7 @@ TiXmlDocument *findXMLFile(const char *f + //{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) +@@ -956,8 +956,8 @@ void TrackView::importImage(const char * + // installs map into user data directory + void TrackView::installMap(const char *name) + { +-#ifdef WIN32 +- fl_alert("Unfortunately this is unsupported on Windows at this time.\nYou may still install maps manually by saving them to a folder and placing it inside the data\\tracks directory and editing the tracklist.xml file."); ++#if 1 ++ fl_alert("Unfortunately this is unsupported at this time.\nYou may still install maps manually by saving them to a folder and placing it inside the data\\tracks directory and editing the tracklist.xml file."); + return; + #else + char fullname[1024]; +@@ -1033,8 +1033,8 @@ void TrackView::installMap(const char *n + // nb: doesn't remove track data itself, only remove entry from tracklist xml file. + void TrackView::uninstallMap(const char *name) + { +-#ifdef WIN32 +- fl_alert("Unfortunately this is unsupported on Windows at this time.\nYou may still uninstall maps manually by removing them from the data\\tracks directory and editing the tracklist.xml file."); ++#if 1 ++ fl_alert("Unfortunately this is unsupported at this time.\nYou may still uninstall maps manually by removing them from the data\\tracks directory and editing the tracklist.xml file."); + return; + #else + char fullname[1024]; diff --git a/games/toycars/files/patch-toycars__vehicle__editor_src_VehicleObject.cpp b/games/toycars/files/patch-toycars__vehicle__editor_src_VehicleObject.cpp deleted file mode 100644 index 6fef44efe99e..000000000000 --- a/games/toycars/files/patch-toycars__vehicle__editor_src_VehicleObject.cpp +++ /dev/null @@ -1,27 +0,0 @@ ---- toycars_vehicle_editor/src/VehicleObject.cpp.orig 2009-03-22 19:45:31.000000000 +0000 -+++ toycars_vehicle_editor/src/VehicleObject.cpp -@@ -152,7 +152,7 @@ void VehicleObject::loadVehicle(const ch - 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 @@ void VehicleObject::loadSpriteFromDataDi - 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); - } -@@ -675,4 +675,4 @@ void VehicleObject::uninstallVehicle(con - system(str); - */ - #endif --} -\ No newline at end of file -+} diff --git a/games/toycars/files/patch-toycars__vehicle_editor_src_LoadSpriteFromImage.cpp b/games/toycars/files/patch-toycars__vehicle_editor_src_LoadSpriteFromImage.cpp new file mode 100644 index 000000000000..f4c1c741ceec --- /dev/null +++ b/games/toycars/files/patch-toycars__vehicle_editor_src_LoadSpriteFromImage.cpp @@ -0,0 +1,11 @@ +--- toycars_vehicle_editor/src/LoadSpriteFromImage.cpp.orig 2009-02-26 19:24:22 UTC ++++ 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/games/toycars/files/patch-toycars__vehicle_editor_src_VehicleObject.cpp b/games/toycars/files/patch-toycars__vehicle_editor_src_VehicleObject.cpp new file mode 100644 index 000000000000..1b56e1645ba2 --- /dev/null +++ b/games/toycars/files/patch-toycars__vehicle_editor_src_VehicleObject.cpp @@ -0,0 +1,58 @@ +--- toycars_vehicle_editor/src/VehicleObject.cpp.orig 2009-03-22 19:45:31 UTC ++++ toycars_vehicle_editor/src/VehicleObject.cpp +@@ -7,6 +7,8 @@ + * + */ + ++#include <FL/Fl_File_Chooser.H> // fl_alert ++ + #include "VehicleObject.h" + #include "ScException.h" + #include "tinyxml.h" +@@ -152,7 +154,7 @@ void VehicleObject::loadVehicle(const ch + 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 +413,7 @@ void VehicleObject::loadSpriteFromDataDi + 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); + } +@@ -520,8 +522,8 @@ void VehicleObject::loadWheelSpriteFromD + // installs map into user data directory + void VehicleObject::installVehicle(const char *name) + { +-#ifdef WIN32 +- fl_alert("Unfortunately this is unsupported on Windows at this time.\nYou may still install vehicles manually by saving them to a folder and placing it inside the data\\cars directory and editing the carslist.xml file."); ++#if 1 ++ fl_alert("Unfortunately this is unsupported at this time.\nYou may still install vehicles manually by saving them to a folder and placing it inside the data\\cars directory and editing the carslist.xml file."); + return; + #else + char fullname[1024]; +@@ -600,8 +602,8 @@ void VehicleObject::installVehicle(const + // nb: doesn't remove car data itself, only remove entry from carslist xml file. + void VehicleObject::uninstallVehicle(const char *name) + { +-#ifdef WIN32 +- fl_alert("Unfortunately this is unsupported on Windows at this time.\nYou may still uninstall vehicles manually by removing them from the data\\cars directory and editing the carslist.xml file."); ++#if 1 ++ fl_alert("Unfortunately this is unsupported at this time.\nYou may still uninstall vehicles manually by removing them from the data\\cars directory and editing the carslist.xml file."); + return; + #else + char fullname[1024]; +@@ -675,4 +677,4 @@ void VehicleObject::uninstallVehicle(con + system(str); + */ + #endif +-} +\ No newline at end of file ++} |