Attached is the Ubuntu patch from Stefan Potyra <sistp...@ubuntu.com> that includes what's already in the bug plus additional changes to get it to build. Obviously the debian/changelog entry would have to be reworked for Debian, but I think the patch is generally suitable.
Scott K
diff -u fgfs-atlas-0.3.1/debian/changelog fgfs-atlas-0.3.1/debian/changelog --- fgfs-atlas-0.3.1/debian/changelog +++ fgfs-atlas-0.3.1/debian/changelog @@ -1,3 +1,13 @@ +fgfs-atlas (0.3.1-1ubuntu1) karmic; urgency=low + + * Apply partial patch from Peter Green to fix FTBFS + (cf DBTS: #545593). + * src/MapMaker.cxx: adjust return types to match new flightgear API. + * src/Scenery.cxx: Adjust using directive. + * src/MapPS.cxx: Add missing include. + + -- Stefan Potyra <sistp...@ubuntu.com> Mon, 05 Oct 2009 16:56:20 +0200 + fgfs-atlas (0.3.1-1) unstable; urgency=low * New upstream release. only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/config.h.in +++ fgfs-atlas-0.3.1/src/config.h.in @@ -162,6 +162,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/FlightTrack.hxx +++ fgfs-atlas-0.3.1/src/FlightTrack.hxx @@ -27,7 +27,12 @@ #include <plib/sg.h> #include <simgear/compiler.h> -SG_USING_STD(list); + +#ifdef SG_USING_STD + SG_USING_STD(list); +#else + using std::list; +#endif struct FlightData { float lat, lon, alt, hdg, spd; only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/MapMaker.hxx +++ fgfs-atlas-0.3.1/src/MapMaker.hxx @@ -31,14 +31,19 @@ #include <vector> #include <list> #include <map> -#include STL_STRING +#include <string> #include "Output.hxx" #include "Overlays.hxx" #include "Geodesy.hxx" -SG_USING_STD(vector); -SG_USING_STD(string); +#ifdef SG_USING_STD + SG_USING_STD(vector); + SG_USING_STD(string); +#else + using std::vector; + using std::string; +#endif // Utility function that I needed to put somewhere - this probably isn't the best place for it. // Appends a path separator to a directory path if not present. only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/OutputGL.hxx +++ fgfs-atlas-0.3.1/src/OutputGL.hxx @@ -2,6 +2,9 @@ #define __OUTPUTGL_H__ #include <simgear/compiler.h> +#ifndef SG_GLUT_H + #define SG_GLUT_H <GL/glut.h> +#endif #include SG_GLUT_H #include <plib/fnt.h> #include <plib/pu.h> only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/MapPS.cxx +++ fgfs-atlas-0.3.1/src/MapPS.cxx @@ -38,9 +38,15 @@ #include "OutputPS.hxx" #include <plib/ul.h> #include "Scenery.hxx" +#include <iostream> +#ifdef SG_USING_STD SG_USING_STD(vector); SG_USING_STD(string); +#else +using std::vector; +using std::string; +#endif typedef vector<string> string_list; @@ -149,7 +155,7 @@ scenerypath = new char[max_path_length + 256]; scenery_pos = 0; } else { - cout << "No scenery paths could be found. You need to set either a valid FG_ROOT and/or FG_SCENERY variable, or specify a valid --fg-root and/or --fg-scenery on the command line.\n"; + std::cout << "No scenery paths could be found. You need to set either a valid FG_ROOT and/or FG_SCENERY variable, or specify a valid --fg-root and/or --fg-scenery on the command line.\n"; exit(-1); } only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/MapBrowser.hxx +++ fgfs-atlas-0.3.1/src/MapBrowser.hxx @@ -27,11 +27,17 @@ #include "FlightTrack.hxx" #include "Projection.hxx" #include <simgear/compiler.h> +#ifndef SG_GL_H + #define SG_GL_H <GL/gl.h> +#endif #include SG_GL_H #include <math.h> #include <list> #include <map> +using std::map; + + class MapBrowser { public: static const int CACHE_LIMIT = 2; @@ -107,6 +113,7 @@ bool tex; }; + struct TileLess { bool operator()(const Coord &v1, const Coord &v2) const { return (v1.lat < v2.lat || (v1.lat == v2.lat && v1.lon < v2.lon)); only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/Scenery.cxx +++ fgfs-atlas-0.3.1/src/Scenery.cxx @@ -3,8 +3,13 @@ #include "MapMaker.hxx" +#ifdef SG_USING_STD SG_USING_STD(vector); SG_USING_STD(string); +#else +using std::vector; +using std::string; +#endif typedef vector<string> string_list; only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/Atlas.cxx +++ fgfs-atlas-0.3.1/src/Atlas.cxx @@ -29,6 +29,9 @@ #include <memory.h> #include <stdio.h> #include <simgear/compiler.h> +#ifndef SG_GLUT_H + #define SG_GLUT_H <GL/glut.h> +#endif #include SG_GLUT_H #include <plib/fnt.h> #include <plib/pu.h> @@ -42,6 +45,10 @@ #define SCALECHANGEFACTOR 1.3f +#include <iostream> +using std::cout; +using std::endl; + SGIOChannel *input_channel; bool dragmode = false; only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/Overlays.hxx +++ fgfs-atlas-0.3.1/src/Overlays.hxx @@ -35,6 +35,8 @@ #include "FlightTrack.hxx" #include "Projection.hxx" +using std::vector; + class Overlays { public: static const int OVERLAY_AIRPORTS = 1 << 0; only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/Overlays.cxx +++ fgfs-atlas-0.3.1/src/Overlays.cxx @@ -27,7 +27,11 @@ #include "Overlays.hxx" #include "Geodesy.hxx" -SG_USING_STD(map); +#ifdef SG_USING_STD + SG_USING_STD(map); +#else + using std::map; +#endif #ifdef _MSC_VER @@ -151,6 +155,8 @@ return y; } +using std::string; + // Convert an angle to degrees and possibly minutes and possibly seconds, // according to the given resolution. // 'ns' is the prefixes for positive and negative, e.g. "NS" or "EW" or "+-". @@ -185,6 +191,9 @@ return string(s); } +using std::max; +using std::min; + // Draw grid lines in latitude range lat-dtheta to lat+dtheta radians, // longitude range lon-dalpha to lon+dalpha. // 'spacing' is the desired approximate latitude interval in radians. only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/MapMaker.cxx +++ fgfs-atlas-0.3.1/src/MapMaker.cxx @@ -31,10 +31,12 @@ #endif #include <sys/stat.h> #include <plib/ul.h> +#include <iostream> #include "MapMaker.hxx" /*#include <simgear/magvar/magvar.hxx>*/ + // Utility function that I needed to put somewhere - this probably isn't the best place for it. // Appends a path separator to a directory path if not present. // Calling function MUST ENSURE that there is space allocated for the potential strcat. @@ -653,9 +655,9 @@ /* convert point_list of wgs84 nodes to a list of points transformed into the maps local coordinate system */ - const point_list wgs84_nodes = tile.get_wgs84_nodes(); - for ( point_list::const_iterator node = wgs84_nodes . begin(); - node != wgs84_nodes . end(); + const std::vector<SGVec3d> &wgs84_nodes = tile.get_wgs84_nodes(); + for ( std::vector<SGVec3d>::const_iterator node = wgs84_nodes.begin(); + node != wgs84_nodes.end(); node++ ) { float *nv = new sgVec3; @@ -674,8 +676,8 @@ } // same as above for normals - const point_list m_norms = tile.get_normals(); - for ( point_list::const_iterator normal = m_norms.begin(); + const std::vector<SGVec3f> &m_norms = tile.get_normals(); + for ( std::vector<SGVec3f>::const_iterator normal = m_norms.begin(); normal != m_norms.end(); normal++ ) { // Make a new normal @@ -760,8 +762,8 @@ } if(0) { - cout << "Node_list sizes are nodes: " << wgs84_nodes.size() << " -- normals: " << m_norms.size() << '\n'; - cout << "Group_list sizes are tris: " << tris.size() << " -- fans: " << fans.size() << " -- strips: " << strips.size() << '\n'; + std::cout << "Node_list sizes are nodes: " << wgs84_nodes.size() << " -- normals: " << m_norms.size() << '\n'; + std::cout << "Group_list sizes are tris: " << tris.size() << " -- fans: " << fans.size() << " -- strips: " << strips.size() << '\n'; } for (i = 0; i < v.size(); i++) { only in patch2: unchanged: --- fgfs-atlas-0.3.1.orig/src/Map.cxx +++ fgfs-atlas-0.3.1/src/Map.cxx @@ -39,6 +39,13 @@ #include <plib/ul.h> #include <simgear/compiler.h> +#ifndef SG_GLUT_H + #define SG_GLUT_H <GL/glut.h> +#endif +#ifndef SG_GL_H + #define SG_GL_H <GL/gl.h> +#endif + #include SG_GL_H #ifdef UL_GLX # define GLX_GLXEXT_PROTOTYPES @@ -65,10 +72,16 @@ #include <simgear/screen/RenderTexture.h> #include "Scenery.hxx" #include <vector> -#include STL_STRING +#include <string> +#include <iostream> -SG_USING_STD(vector); -SG_USING_STD(string); +#ifdef SG_USING_STD + SG_USING_STD(vector); + SG_USING_STD(string); +#else + using std::vector; + using std::string; +#endif typedef vector<string> string_list; @@ -318,6 +331,9 @@ return true; } +using std::cout; +using std::cin; + bool ContinueIfNoHeadless() { cout << "Unable to continue in headless mode - revert to doublebuffer mode? [Y/n] "; char c;
signature.asc
Description: This is a digitally signed message part.