[OpenSceneGraph] Add 0004-Applied-fix-to-Node-remove-Callback-NodeCallback-ins.patch

corsepiu corsepiu at fedoraproject.org
Thu Oct 30 06:19:42 UTC 2014


commit f75fb7a8e656ba23a266bd7fb40cafcf52ff4c49
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date:   Thu Oct 30 07:19:19 2014 +0100

    Add 0004-Applied-fix-to-Node-remove-Callback-NodeCallback-ins.patch
    
      (RHBZ #1158669).
    - Rebase patches.

 0001-Cmake-fixes.patch                             |    6 +-
 0002-Fix-invalid-char.patch                        |    6 +-
 0003-Activate-osgviewerWX.patch                    |    4 +-
 ...-to-Node-remove-Callback-NodeCallback-ins.patch |   51 ++++++++++++++++++++
 OpenSceneGraph.spec                                |   10 ++++-
 5 files changed, 68 insertions(+), 9 deletions(-)
---
diff --git a/0001-Cmake-fixes.patch b/0001-Cmake-fixes.patch
index 77bde0e..d6b9ed4 100644
--- a/0001-Cmake-fixes.patch
+++ b/0001-Cmake-fixes.patch
@@ -1,7 +1,7 @@
-From 324857354b1d68539ce1af5df0c2540d250a113c Mon Sep 17 00:00:00 2001
+From 4ba570c4f40a7df4205718be7ec0ac5f1f19edda Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= <corsepiu at fedoraproject.org>
 Date: Wed, 14 Aug 2013 12:30:03 +0200
-Subject: [PATCH 1/3] Cmake fixes.
+Subject: [PATCH 1/4] Cmake fixes.
 
 ---
  CMakeLists.txt                       | 4 ++--
@@ -11,7 +11,7 @@ Subject: [PATCH 1/3] Cmake fixes.
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 3bf8dd7..5f5a18b 100644
+index 52e8747..524f280 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -1001,7 +1001,7 @@ IF(BUILD_DOCUMENTATION)
diff --git a/0002-Fix-invalid-char.patch b/0002-Fix-invalid-char.patch
index ad31198..8072d83 100644
--- a/0002-Fix-invalid-char.patch
+++ b/0002-Fix-invalid-char.patch
@@ -1,14 +1,14 @@
-From 861b18e4fba79a547724b338b923276772ddae27 Mon Sep 17 00:00:00 2001
+From 074bfacc7b6a80534a2ee6a57f07b1ab5df14775 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= <corsepiu at fedoraproject.org>
 Date: Wed, 14 Aug 2013 12:31:47 +0200
-Subject: [PATCH 2/3] Fix invalid char.
+Subject: [PATCH 2/4] Fix invalid char.
 
 ---
  AUTHORS.txt | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/AUTHORS.txt b/AUTHORS.txt
-index 78d42e9..f4b1976 100644
+index da5ee7d..ed3376e 100644
 --- a/AUTHORS.txt
 +++ b/AUTHORS.txt
 @@ -384,7 +384,7 @@ Nicolas Brodu
diff --git a/0003-Activate-osgviewerWX.patch b/0003-Activate-osgviewerWX.patch
index e44d5a4..b5760f9 100644
--- a/0003-Activate-osgviewerWX.patch
+++ b/0003-Activate-osgviewerWX.patch
@@ -1,7 +1,7 @@
-From 02b9179040796dba7e1d0355f55f8743493630a0 Mon Sep 17 00:00:00 2001
+From 1bd53febc6f6a34af70ab4141e48cb12832d5e20 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= <corsepiu at fedoraproject.org>
 Date: Wed, 14 Aug 2013 12:36:32 +0200
-Subject: [PATCH 3/3] Activate osgviewerWX.
+Subject: [PATCH 3/4] Activate osgviewerWX.
 
 ---
  examples/CMakeLists.txt | 6 ++----
diff --git a/0004-Applied-fix-to-Node-remove-Callback-NodeCallback-ins.patch b/0004-Applied-fix-to-Node-remove-Callback-NodeCallback-ins.patch
new file mode 100644
index 0000000..a907f5b
--- /dev/null
+++ b/0004-Applied-fix-to-Node-remove-Callback-NodeCallback-ins.patch
@@ -0,0 +1,51 @@
+From 859832e97696968b933c87eef5a80830fdd8e81a Mon Sep 17 00:00:00 2001
+From: Robert OSFIELD <robert.osfield at gmail.com>
+Date: Fri, 8 Aug 2014 15:45:48 +0000
+Subject: [PATCH 4/4] Applied fix to Node::remove*Callback(NodeCallback*)
+ inspired by fix from Glen Waldron that was applied to svn/trunk.
+
+git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14400 16af8721-9629-0410-8352-f15c8da7e697
+---
+ include/osg/Node | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/include/osg/Node b/include/osg/Node
+index b5eb8d9..9e2d727 100644
+--- a/include/osg/Node
++++ b/include/osg/Node
+@@ -203,8 +203,9 @@ class OSG_EXPORT Node : public Object
+             if (nc != NULL && _updateCallback.valid()) {
+                 if (_updateCallback == nc)
+                 {
+-                    setUpdateCallback(nc->getNestedCallback());        // replace the callback by the nested one
++                    ref_ptr<NodeCallback> new_nested_callback = nc->getNestedCallback();
+                     nc->setNestedCallback(0);
++                    setUpdateCallback(new_nested_callback.get());
+                 }
+                 else _updateCallback->removeNestedCallback(nc);
+             }
+@@ -237,8 +238,9 @@ class OSG_EXPORT Node : public Object
+             if (nc != NULL && _eventCallback.valid()) {
+                 if (_eventCallback == nc)
+                 {
+-                    setEventCallback(nc->getNestedCallback());        // replace the callback by the nested one
++                    ref_ptr<NodeCallback> new_nested_callback = nc->getNestedCallback();
+                     nc->setNestedCallback(0);
++                    setEventCallback(new_nested_callback.get()); // replace the callback by the nested one
+                 }
+                 else _eventCallback->removeNestedCallback(nc);
+             }
+@@ -271,8 +273,9 @@ class OSG_EXPORT Node : public Object
+             if (nc != NULL && _cullCallback.valid()) {
+                 if (_cullCallback == nc)
+                 {
+-                    setCullCallback(nc->getNestedCallback());        // replace the callback by the nested one
++                    ref_ptr<NodeCallback> new_nested_callback = nc->getNestedCallback();
+                     nc->setNestedCallback(0);
++                    setCullCallback(new_nested_callback.get()); // replace the callback by the nested one
+                 }
+                 else _cullCallback->removeNestedCallback(nc);
+             }
+-- 
+1.9.3
+
diff --git a/OpenSceneGraph.spec b/OpenSceneGraph.spec
index 2cb8f6d..0301a24 100644
--- a/OpenSceneGraph.spec
+++ b/OpenSceneGraph.spec
@@ -9,7 +9,7 @@
 
 Name:           OpenSceneGraph
 Version:        %{apivers}
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        High performance real-time graphics toolkit
 
 Group:          Applications/Multimedia
@@ -24,6 +24,8 @@ Patch2:         0002-Fix-invalid-char.patch
 # Upstream deactivated building osgviewerWX for obscure reasons
 # Reactivate for now.
 Patch3:         0003-Activate-osgviewerWX.patch
+# Upstream patch: https://github.com/openscenegraph/osg/commit/49d560f4d9d0641c98df67264b7ace4733c6b9a9
+Patch4:         0004-Applied-fix-to-Node-remove-Callback-NodeCallback-ins.patch
 
 BuildRequires:  libGL-devel
 BuildRequires:  libGLU-devel
@@ -75,6 +77,7 @@ cd OpenSceneGraph-%{srcvers}
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 sed -i -e 's,\.:/usr/share/fonts/ttf:,.:%{_fontdir}:/usr/share/fonts/ttf:,' \
 src/osgText/Font.cpp
@@ -482,6 +485,11 @@ Development files for OpenThreads.
 %{_includedir}/OpenThreads
 
 %changelog
+* Thu Oct 30 2014 Ralf Corsépius <corsepiu at fedoraproject.org> - 3.2.1-3
+- Add 0004-Applied-fix-to-Node-remove-Callback-NodeCallback-ins.patch
+  (RHBZ #1158669).
+- Rebase patches.
+
 * Fri Aug 15 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list