wok rev 12929

celestia: add debian path make-dereferenced-temporaries-explicit
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 30 09:26:32 2012 +0200 (2012-05-30)
parents b586b25939cf
children c2d3acb84ef6
files celestia/receipt celestia/stuff/make-dereferenced-temporaries-explicit
line diff
     1.1 --- a/celestia/receipt	Wed May 30 09:21:30 2012 +0200
     1.2 +++ b/celestia/receipt	Wed May 30 09:26:32 2012 +0200
     1.3 @@ -16,6 +16,7 @@
     1.4  {
     1.5  	cd $src
     1.6  	patch -p0 -i $stuff/celestia-1.6.0-gcc45.patch
     1.7 +	patch -p1 -i $stuff/make-dereferenced-temporaries-explicit
     1.8  	./configure \
     1.9  		--prefix=/usr \
    1.10  		--infodir=/usr/share/info \
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/celestia/stuff/make-dereferenced-temporaries-explicit	Wed May 30 09:26:32 2012 +0200
     2.3 @@ -0,0 +1,46 @@
     2.4 +--- celestia-1.6.0+dfsg.orig/src/celengine/vecgl.h
     2.5 ++++ celestia-1.6.0+dfsg/src/celengine/vecgl.h
     2.6 +@@ -89,17 +89,20 @@ inline void glScale(const Vec3f& v)
     2.7 + 
     2.8 + inline void glLightDirection(GLenum light, const Vec3f& dir)
     2.9 + {
    2.10 +-    glLightfv(light, GL_POSITION, &(Vec4f(dir.x, dir.y, dir.z, 0.0f).x));
    2.11 ++    Vec4f dir4(dir.x, dir.y, dir.z, 0.0f);
    2.12 ++    glLightfv(light, GL_POSITION, &dir4.x);
    2.13 + }
    2.14 + 
    2.15 + inline void glLightPosition(GLenum light, const Point3f& pos)
    2.16 + {
    2.17 +-    glLightfv(light, GL_POSITION, &(Vec4f(pos.x, pos.y, pos.z, 1.0f).x));
    2.18 ++    Vec4f pos4(pos.x, pos.y, pos.z, 1.0f);
    2.19 ++    glLightfv(light, GL_POSITION, &pos4.x);
    2.20 + }
    2.21 + 
    2.22 + inline void glLightColor(GLenum light, GLenum which, const Vec3f& color)
    2.23 + {
    2.24 +-    glLightfv(light, which, &(Vec4f(color.x, color.y, color.z, 1.0f).x));
    2.25 ++    Vec4f color4(color.x, color.y, color.z, 1.0f);
    2.26 ++    glLightfv(light, which, &color4.x);
    2.27 + }
    2.28 + 
    2.29 + inline void glLightColor(GLenum light, GLenum which, const Vec4f& color)
    2.30 +@@ -109,15 +112,14 @@ inline void glLightColor(GLenum light, G
    2.31 + 
    2.32 + inline void glLightColor(GLenum light, GLenum which, const Color& color)
    2.33 + {
    2.34 +-    glLightfv(light, which,
    2.35 +-              &(Vec4f(color.red(), color.green(), color.blue(), color.alpha()).x));
    2.36 ++    Vec4f color4(color.red(), color.green(), color.blue(), color.alpha());
    2.37 ++    glLightfv(light, which, &color4.x);
    2.38 + }
    2.39 + 
    2.40 + inline void glAmbientLightColor(const Color& color)
    2.41 + {
    2.42 +-    glLightModelfv(GL_LIGHT_MODEL_AMBIENT,
    2.43 +-                   &(Vec4f(color.red(), color.green(), color.blue(),
    2.44 +-                           color.alpha()).x));
    2.45 ++    Vec4f color4(color.red(), color.green(), color.blue(), color.alpha());
    2.46 ++    glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &color4.x);
    2.47 + }
    2.48 + 
    2.49 + #endif // _VECGL_H_