[osgal] Improve osgal-0.6.1-osg-3.2.0.diff.
corsepiu
corsepiu at fedoraproject.org
Thu Aug 15 04:31:37 UTC 2013
commit be48143bb234ff92688ca7914143c08e4ef86eba
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date: Thu Aug 15 06:31:19 2013 +0200
Improve osgal-0.6.1-osg-3.2.0.diff.
osgal-0.6.1-osg-3.2.0.diff | 54 +++++++++++++++++++++++++++++++++++--------
osgal.spec | 8 +++---
2 files changed, 48 insertions(+), 14 deletions(-)
---
diff --git a/osgal-0.6.1-osg-3.2.0.diff b/osgal-0.6.1-osg-3.2.0.diff
index c374dc5..a0d93aa 100644
--- a/osgal-0.6.1-osg-3.2.0.diff
+++ b/osgal-0.6.1-osg-3.2.0.diff
@@ -1,46 +1,80 @@
diff -Naur osgal-0.6.1.orig/examples/osgal/osgal.cpp osgal-0.6.1/examples/osgal/osgal.cpp
--- osgal-0.6.1.orig/examples/osgal/osgal.cpp 2007-08-02 15:38:13.000000000 +0200
-+++ osgal-0.6.1/examples/osgal/osgal.cpp 2013-08-14 07:18:34.429730017 +0200
-@@ -171,16 +171,16 @@
++++ osgal-0.6.1/examples/osgal/osgal.cpp 2013-08-15 06:15:34.902085651 +0200
+@@ -26,6 +26,7 @@
+ #include "osgAL/SoundManager"
+ #include "osgAL/SoundState"
+
++#include <osg/Version>
+ #include <osg/DeleteHandler>
+
+
+@@ -171,16 +172,28 @@
normals->push_back(osg::Vec3(0.0f,0.0f,1.0f));
-- osg::Geometry* geom = new osg::Geometry;
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ deprecated_osg::Geometry* geom = new deprecated_osg::Geometry;
++#else
+ osg::Geometry* geom = new osg::Geometry;
++#endif
geom->setVertexArray(coords);
geom->setVertexIndices(coordIndices);
geom->setColorArray(colors);
geom->setColorIndices(colorIndices);
-- geom->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE);
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ geom->setColorBinding(deprecated_osg::Geometry::BIND_PER_PRIMITIVE);
++#else
+ geom->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE);
++#endif
geom->setNormalArray(normals);
-- geom->setNormalBinding(osg::Geometry::BIND_OVERALL);
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ geom->setNormalBinding(deprecated_osg::Geometry::BIND_OVERALL);
++#else
+ geom->setNormalBinding(osg::Geometry::BIND_OVERALL);
++#endif
geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,coordIndices->size()));
diff -Naur osgal-0.6.1.orig/examples/osgalmultiple/osgalmultiple.cpp osgal-0.6.1/examples/osgalmultiple/osgalmultiple.cpp
--- osgal-0.6.1.orig/examples/osgalmultiple/osgalmultiple.cpp 2007-08-02 15:38:13.000000000 +0200
-+++ osgal-0.6.1/examples/osgalmultiple/osgalmultiple.cpp 2013-08-14 07:45:50.575457764 +0200
-@@ -135,16 +135,16 @@
++++ osgal-0.6.1/examples/osgalmultiple/osgalmultiple.cpp 2013-08-15 06:15:12.378704722 +0200
+@@ -26,6 +26,7 @@
+ #include "osgAL/SoundManager"
+ #include "osgAL/SoundState"
+
++#include <osg/Version>
+ #include <osg/Notify>
+ #include <osg/MatrixTransform>
+ #include <osg/PositionAttitudeTransform>
+@@ -135,16 +136,28 @@
normals->push_back(osg::Vec3(0.0f,0.0f,1.0f));
-- osg::Geometry* geom = new osg::Geometry;
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ deprecated_osg::Geometry* geom = new deprecated_osg::Geometry;
++#else
+ osg::Geometry* geom = new osg::Geometry;
++#endif
geom->setVertexArray(coords);
geom->setVertexIndices(coordIndices);
geom->setColorArray(colors);
geom->setColorIndices(colorIndices);
-- geom->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE);
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ geom->setColorBinding(deprecated_osg::Geometry::BIND_PER_PRIMITIVE);
++#else
+ geom->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE);
++#endif
geom->setNormalArray(normals);
-- geom->setNormalBinding(osg::Geometry::BIND_OVERALL);
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
+ geom->setNormalBinding(deprecated_osg::Geometry::BIND_OVERALL);
++#else
+ geom->setNormalBinding(osg::Geometry::BIND_OVERALL);
++#endif
geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,coordIndices->size()));
diff --git a/osgal.spec b/osgal.spec
index a88c882..d66ffe4 100644
--- a/osgal.spec
+++ b/osgal.spec
@@ -1,7 +1,7 @@
Name: osgal
Epoch: 1
Version: 0.6.1
-Release: 19%{?dist}
+Release: 20%{?dist}
Summary: Adapts OpenSceneGraph to use OpenAL++
Group: System Environment/Libraries
@@ -36,10 +36,7 @@ that use osgAL.
%prep
%setup -q
-%if 0%{?fedora} > 19
-# For OSG >= 3.2.0, non-applicable with OSG < 3.2.0
%patch0 -p1
-%endif
sed -i -e 's/^\(CXXFLAGS="[^"]*\)/\1 $CXXFLAGS/' configure.in
autoreconf --force --install
@@ -87,6 +84,9 @@ make check
%changelog
+* Thu Aug 15 2013 Ralf Corsépius <corsepiu at fedoraproject.org> - 1:0.6.1-20
+- Improve osgal-0.6.1-osg-3.2.0.diff.
+
* Wed Aug 14 2013 Ralf Corsépius <corsepiu at fedoraproject.org> - 1:0.6.1-19
- Rebuilt for OSG-3.2.0.
- Fixup %%changelog dates.
More information about the scm-commits
mailing list