[SimGear] Rebuild against OSG-3.2.0.

corsepiu corsepiu at fedoraproject.org
Thu Aug 15 03:44:12 UTC 2013


commit 007eb45a26b778a4aaf6834f02d47042ac372d8f
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date:   Thu Aug 15 05:43:57 2013 +0200

    Rebuild against OSG-3.2.0.
    
    - Add 0005-SimGear-2.10.0-OSG-3.2.0.patch.

 0005-SimGear-2.10.0-OSG-3.2.0.patch |   44 +++++++++++++++++++++++++++++++++++
 SimGear.spec                        |   10 +++++++-
 2 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/0005-SimGear-2.10.0-OSG-3.2.0.patch b/0005-SimGear-2.10.0-OSG-3.2.0.patch
new file mode 100644
index 0000000..206363d
--- /dev/null
+++ b/0005-SimGear-2.10.0-OSG-3.2.0.patch
@@ -0,0 +1,44 @@
+diff --git a/simgear/scene/material/EffectGeode.cxx b/simgear/scene/material/EffectGeode.cxx
+index 26eab38..c296763 100644
+--- a/simgear/scene/material/EffectGeode.cxx
++++ b/simgear/scene/material/EffectGeode.cxx
+@@ -22,6 +22,8 @@
+ #include "Effect.hxx"
+ #include "Technique.hxx"
+ 
++#include <osg/Version>
++
+ #include <osgUtil/CullVisitor>
+ #include <osgUtil/TangentSpaceGenerator>
+ 
+@@ -80,15 +82,27 @@ void EffectGeode::runGenerators(osg::Geometry *geometry)
+         int n = _effect->getGenerator(Effect::TANGENT);
+         tsg->generate(geometry, 0);  // 0 is normal_unit, but I have no idea what that is!
+         if (n != -1 && !geometry->getVertexAttribArray(n))
+-            geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getTangentArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
++          geometry->setVertexAttribArray(n, tsg->getTangentArray(), osg::Array::BIND_PER_VERTEX);
++#else
++          geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getTangentArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
++#endif
+ 
+         n = _effect->getGenerator(Effect::BINORMAL);
+         if (n != -1 && !geometry->getVertexAttribArray(n))
+-            geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getBinormalArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
++          geometry->setVertexAttribArray(n, tsg->getBinormalArray(), osg::Array::BIND_PER_VERTEX);
++#else
++          geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getBinormalArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
++#endif
+ 
+         n = _effect->getGenerator(Effect::NORMAL);
+         if (n != -1 && !geometry->getVertexAttribArray(n))
+-            geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getNormalArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
++          geometry->setVertexAttribArray(n, tsg->getNormalArray(), osg::Array::BIND_PER_VERTEX);
++#else
++          geometry->setVertexAttribData(n, osg::Geometry::ArrayData(tsg->getNormalArray(), osg::Geometry::BIND_PER_VERTEX,GL_FALSE));
++#endif
+     }
+ }
+ 
diff --git a/SimGear.spec b/SimGear.spec
index 15e99f5..ff471df 100644
--- a/SimGear.spec
+++ b/SimGear.spec
@@ -1,6 +1,6 @@
 Name:           SimGear
 Version:        2.10.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 License:        GPLv2+
 Group:          System Environment/Libraries
 Summary:        Simulation library components
@@ -9,6 +9,9 @@ Source0:        http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/simgea
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Patch3:         0003-remove-unneeded-header.patch
 Patch4:         0004-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch
+# From upstream (git://gitorious.org/fg/simgear.git)
+# git diff origin/release/2.10.0 simgear/scene/material/EffectGeode.cxx
+Patch5:         0005-SimGear-2.10.0-OSG-3.2.0.patch
 BuildRequires:  openal-soft-devel, plib-devel >= 1.8.5
 BuildRequires:  OpenSceneGraph-devel >= 2.8.0
 BuildRequires:  boost-devel >= 1.37.0
@@ -37,6 +40,7 @@ SimGear.
 %prep
 %setup -q -n simgear-%{version}
 %patch4 -p1 -b .checkforn
+%patch5 -p1
 
 # makes rpmlint happy
 find -name \*.cxx -o -name \*.hxx | xargs chmod -x
@@ -82,6 +86,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libSimGearScene.so
 
 %changelog
+* Thu Aug 15 2013 Ralf Corsépius <corsepiu at fedoraproject.org> 2.10.0-4
+- Rebuild against OSG-3.2.0.
+- Add 0005-SimGear-2.10.0-OSG-3.2.0.patch.
+
 * Fri Aug 02 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.10.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list