# HG changeset patch # User Pascal Bellard # Date 1338362792 -7200 # Node ID 97eef196916c7cb10b8fc478bb8eb5e5dbe3fa30 # Parent b586b25939cf0f343d14c726e22def35f1266f61 celestia: add debian path make-dereferenced-temporaries-explicit diff -r b586b25939cf -r 97eef196916c celestia/receipt --- a/celestia/receipt Wed May 30 09:21:30 2012 +0200 +++ b/celestia/receipt Wed May 30 09:26:32 2012 +0200 @@ -16,6 +16,7 @@ { cd $src patch -p0 -i $stuff/celestia-1.6.0-gcc45.patch + patch -p1 -i $stuff/make-dereferenced-temporaries-explicit ./configure \ --prefix=/usr \ --infodir=/usr/share/info \ diff -r b586b25939cf -r 97eef196916c celestia/stuff/make-dereferenced-temporaries-explicit --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/celestia/stuff/make-dereferenced-temporaries-explicit Wed May 30 09:26:32 2012 +0200 @@ -0,0 +1,46 @@ +--- celestia-1.6.0+dfsg.orig/src/celengine/vecgl.h ++++ celestia-1.6.0+dfsg/src/celengine/vecgl.h +@@ -89,17 +89,20 @@ inline void glScale(const Vec3f& v) + + inline void glLightDirection(GLenum light, const Vec3f& dir) + { +- glLightfv(light, GL_POSITION, &(Vec4f(dir.x, dir.y, dir.z, 0.0f).x)); ++ Vec4f dir4(dir.x, dir.y, dir.z, 0.0f); ++ glLightfv(light, GL_POSITION, &dir4.x); + } + + inline void glLightPosition(GLenum light, const Point3f& pos) + { +- glLightfv(light, GL_POSITION, &(Vec4f(pos.x, pos.y, pos.z, 1.0f).x)); ++ Vec4f pos4(pos.x, pos.y, pos.z, 1.0f); ++ glLightfv(light, GL_POSITION, &pos4.x); + } + + inline void glLightColor(GLenum light, GLenum which, const Vec3f& color) + { +- glLightfv(light, which, &(Vec4f(color.x, color.y, color.z, 1.0f).x)); ++ Vec4f color4(color.x, color.y, color.z, 1.0f); ++ glLightfv(light, which, &color4.x); + } + + inline void glLightColor(GLenum light, GLenum which, const Vec4f& color) +@@ -109,15 +112,14 @@ inline void glLightColor(GLenum light, G + + inline void glLightColor(GLenum light, GLenum which, const Color& color) + { +- glLightfv(light, which, +- &(Vec4f(color.red(), color.green(), color.blue(), color.alpha()).x)); ++ Vec4f color4(color.red(), color.green(), color.blue(), color.alpha()); ++ glLightfv(light, which, &color4.x); + } + + inline void glAmbientLightColor(const Color& color) + { +- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, +- &(Vec4f(color.red(), color.green(), color.blue(), +- color.alpha()).x)); ++ Vec4f color4(color.red(), color.green(), color.blue(), color.alpha()); ++ glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &color4.x); + } + + #endif // _VECGL_H_