tags 545593 + sid squeeze
This bug affects sid. It does not affect lenny. Right now it does not
affect squeeze either but I suspect that will change so i'm considering
this as relavent for squeeze.
It seems the headers for simgear have changed a lot with the new version
and this is breaking the build in a lot of ways. I've fixed a load of
issues (see attatched patch) but i'm stuck on the one below.
MapMaker.cxx:657: error: conversion from ‘const
std::vector<SGVec3<double>, std::allocator<SGVec3<double> > >’ to
non-scalar type ‘const point_list’ requested
MapMaker.cxx:678: error: conversion from ‘const
std::vector<SGVec3<float>, std::allocator<SGVec3<float> > >’ to
non-scalar type ‘const point_list’ requested
Anyone have any ideas? i've tried manually including the header that
seems to define point_list ( simgear/math/sg_types.hxx ) but it made no
difference.
diff -ur fgfs-atlas-0.3.1/src/Atlas.cxx fgfs-atlas-0.3.1.new/src/Atlas.cxx
--- fgfs-atlas-0.3.1/src/Atlas.cxx 2006-10-28 16:28:32.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/Atlas.cxx 2009-09-30 23:28:57.000000000 +0000
@@ -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 fgfs-atlas-0.3.1/src/: buildmaps.sh
diff -ur fgfs-atlas-0.3.1/src/config.h.in fgfs-atlas-0.3.1.new/src/config.h.in
--- fgfs-atlas-0.3.1/src/config.h.in 2006-10-29 14:35:50.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/config.h.in 2009-09-30 23:00:18.000000000 +0000
@@ -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
diff -ur fgfs-atlas-0.3.1/src/FlightTrack.hxx fgfs-atlas-0.3.1.new/src/FlightTrack.hxx
--- fgfs-atlas-0.3.1/src/FlightTrack.hxx 2003-01-07 21:51:12.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/FlightTrack.hxx 2009-09-30 23:25:40.000000000 +0000
@@ -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;
diff -ur fgfs-atlas-0.3.1/src/MapBrowser.hxx fgfs-atlas-0.3.1.new/src/MapBrowser.hxx
--- fgfs-atlas-0.3.1/src/MapBrowser.hxx 2006-10-28 16:28:32.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/MapBrowser.hxx 2009-09-30 23:27:11.000000000 +0000
@@ -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));
diff -ur fgfs-atlas-0.3.1/src/Map.cxx fgfs-atlas-0.3.1.new/src/Map.cxx
--- fgfs-atlas-0.3.1/src/Map.cxx 2006-10-26 21:45:05.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/Map.cxx 2009-09-30 23:48:38.000000000 +0000
@@ -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;
diff -ur fgfs-atlas-0.3.1/src/MapMaker.cxx fgfs-atlas-0.3.1.new/src/MapMaker.cxx
--- fgfs-atlas-0.3.1/src/MapMaker.cxx 2005-09-29 19:18:01.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/MapMaker.cxx 2009-09-30 23:56:01.000000000 +0000
@@ -35,6 +35,7 @@
#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.
diff -ur fgfs-atlas-0.3.1/src/MapMaker.hxx fgfs-atlas-0.3.1.new/src/MapMaker.hxx
--- fgfs-atlas-0.3.1/src/MapMaker.hxx 2005-02-26 18:40:36.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/MapMaker.hxx 2009-09-30 23:38:43.000000000 +0000
@@ -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.
diff -ur fgfs-atlas-0.3.1/src/OutputGL.hxx fgfs-atlas-0.3.1.new/src/OutputGL.hxx
--- fgfs-atlas-0.3.1/src/OutputGL.hxx 2005-02-26 18:40:37.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/OutputGL.hxx 2009-09-30 23:30:02.000000000 +0000
@@ -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>
diff -ur fgfs-atlas-0.3.1/src/Overlays.cxx fgfs-atlas-0.3.1.new/src/Overlays.cxx
--- fgfs-atlas-0.3.1/src/Overlays.cxx 2006-10-26 11:56:25.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/Overlays.cxx 2009-09-30 23:33:34.000000000 +0000
@@ -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.
diff -ur fgfs-atlas-0.3.1/src/Overlays.hxx fgfs-atlas-0.3.1.new/src/Overlays.hxx
--- fgfs-atlas-0.3.1/src/Overlays.hxx 2005-01-10 13:15:53.000000000 +0000
+++ fgfs-atlas-0.3.1.new/src/Overlays.hxx 2009-09-30 23:31:02.000000000 +0000
@@ -35,6 +35,8 @@
#include "FlightTrack.hxx"
#include "Projection.hxx"
+using std::vector;
+
class Overlays {
public:
static const int OVERLAY_AIRPORTS = 1 << 0;