ports/106834: [MAINTAINER] graphics/libx3dtk: unbreak for GCC 4.1/4.2

German Tischler tanis at gaspode.franken.de
Sun Dec 17 13:41:04 UTC 2006


>Number:         106834
>Category:       ports
>Synopsis:       [MAINTAINER] graphics/libx3dtk: unbreak for GCC 4.1/4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 17 13:40:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     German Tischler
>Release:        FreeBSD 6.2-PRERELEASE amd64
>Organization:
none
>Environment:
System: FreeBSD gaspode.franken.de 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Thu Sep 28 02:32:06 CEST 2006 tanis at bertha.franken.de:/usr/obj/usr/src/sys/BERTHA amd64

>Description:
	The port does not compile with GCC >= 4
>How-To-Repeat:
	Try to compile the current port with GCC 4.1
>Fix:
	Apply the attached patch.

--- libx3dtk.patch begins here ---
diff -u -r -P libx3dtk.orig/files/patch-MESH_SFVertex.inl libx3dtk/files/patch-MESH_SFVertex.inl
--- libx3dtk.orig/files/patch-MESH_SFVertex.inl	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-MESH_SFVertex.inl	Sat Dec 16 15:56:00 2006
@@ -0,0 +1,31 @@
+*** include/X3DTK/private/MESH_SFVertex.inl.orig	Sat Dec 16 15:54:33 2006
+--- include/X3DTK/private/MESH_SFVertex.inl	Sat Dec 16 15:55:20 2006
+***************
+*** 46,58 ****
+  #endif
+  
+  template<class MData, class VData, class EData, class FData, bool RW>
+! SFTemplateVertex<MData, VData, EData, FData, RW>::SFTemplateVertex<MData, VData, EData, FData, RW>(unsigned int i)
+  : BaseSFVertex(i)
+  {
+  }
+  
+  template<class MData, class VData, class EData, class FData, bool RW>
+! SFTemplateVertex<MData, VData, EData, FData, RW>::~SFTemplateVertex<MData, VData, EData, FData, RW>()
+  {
+  }
+  
+--- 46,58 ----
+  #endif
+  
+  template<class MData, class VData, class EData, class FData, bool RW>
+! SFTemplateVertex<MData, VData, EData, FData, RW>::SFTemplateVertex(unsigned int i)
+  : BaseSFVertex(i)
+  {
+  }
+  
+  template<class MData, class VData, class EData, class FData, bool RW>
+! SFTemplateVertex<MData, VData, EData, FData, RW>::~SFTemplateVertex()
+  {
+  }
+  
diff -u -r -P libx3dtk.orig/files/patch-Signal.h libx3dtk/files/patch-Signal.h
--- libx3dtk.orig/files/patch-Signal.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-Signal.h	Sat Dec 16 16:52:19 2006
@@ -0,0 +1,12 @@
+*** include/X3DTK/private/Signal.h.orig	Sat Dec 16 16:51:16 2006
+--- include/X3DTK/private/Signal.h	Sat Dec 16 16:51:52 2006
+***************
+*** 44,49 ****
+--- 44,50 ----
+  class Signal
+  {
+  public:
++   virtual ~Signal() {}
+    virtual void transmit() = 0;
+  
+  #ifdef TEMPLATE_SPECIALIZATION_SUPPORTED
diff -u -r -P libx3dtk.orig/files/patch-X3D-Scene.h libx3dtk/files/patch-X3D-Scene.h
--- libx3dtk.orig/files/patch-X3D-Scene.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-X3D-Scene.h	Sat Dec 16 16:28:41 2006
@@ -0,0 +1,21 @@
+*** include/X3DTK/private/X3D_Scene.h.orig	Sat Dec 16 16:25:53 2006
+--- include/X3DTK/private/X3D_Scene.h	Sat Dec 16 16:28:11 2006
+***************
+*** 36,43 ****
+  
+  class Scene : public X3DGroupingNode, public X3DBoundedObject
+  {
+!   friend class ProcessHistory;
+!   friend class X3DRoute;
+  public:
+    /// Constructor.
+    Scene();
+--- 36,43 ----
+  
+  class Scene : public X3DGroupingNode, public X3DBoundedObject
+  {
+!   friend class ::X3DTK::ProcessHistory;
+!   friend class ::X3DTK::X3DRoute;
+  public:
+    /// Constructor.
+    Scene();
diff -u -r -P libx3dtk.orig/files/patch-X3DAbstractNode.h libx3dtk/files/patch-X3DAbstractNode.h
--- libx3dtk.orig/files/patch-X3DAbstractNode.h	Sat Dec 16 15:38:02 2006
+++ libx3dtk/files/patch-X3DAbstractNode.h	Sat Dec 16 15:42:40 2006
@@ -1,11 +1,29 @@
 *** include/X3DTK/private/X3DAbstractNode.h.orig	Fri Aug 27 13:18:33 2004
---- include/X3DTK/private/X3DAbstractNode.h	Sat Oct 29 12:40:12 2005
+--- include/X3DTK/private/X3DAbstractNode.h	Sat Dec 16 15:42:01 2006
 ***************
-*** 133,138 ****
---- 133,148 ----
+*** 102,108 ****
+    inline void defineTypeName(const SFString &name, const SFString &component = SFString(""), const SFString &sceneGraph = SFString("")) {defineTempTypeName(this, name, component, sceneGraph);};
+    /// Method to avoid defineTypeName having a template parameter.
+    template<class T>
+!   inline void defineTempTypeName(T *t, const SFString &name, const SFString &component, const SFString &sceneGraph) {define(Recorder<T>::getTypeName(name, component, sceneGraph));};
+    /// Defines an attribute.
+    template<class T, class V>
+    inline void defineAttribute(const SFString &name, V T:: *member, const V &init);
+--- 102,108 ----
+    inline void defineTypeName(const SFString &name, const SFString &component = SFString(""), const SFString &sceneGraph = SFString("")) {defineTempTypeName(this, name, component, sceneGraph);};
+    /// Method to avoid defineTypeName having a template parameter.
+    template<class T>
+!   inline void defineTempTypeName(T * /* t */, const SFString &name, const SFString &component, const SFString &sceneGraph) {define(Recorder<T>::getTypeName(name, component, sceneGraph));};
+    /// Defines an attribute.
+    template<class T, class V>
+    inline void defineAttribute(const SFString &name, V T:: *member, const V &init);
+***************
+*** 132,137 ****
+--- 132,147 ----
+    /// Removes a parent.
     bool removeParent(const SFNode &N);
   };
-  
++ 
 + inline void X3DAbstractNode_addParentToChild(SFNode parent, SFNode child) {
 +   X3DAbstractNode::addParentToChild(parent,child);
 + }
@@ -15,7 +33,6 @@
 + inline SFType * X3DAbstractNode_getType(X3DAbstractNode * node) {
 +   return node->getType();
 + }
-+ 
+  
   }
   
-  #include "X3DAbstractNode.inl"
diff -u -r -P libx3dtk.orig/files/patch-X3DField.h libx3dtk/files/patch-X3DField.h
--- libx3dtk.orig/files/patch-X3DField.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-X3DField.h	Sat Dec 16 15:36:35 2006
@@ -0,0 +1,22 @@
+*** include/X3DTK/private/X3DField.h.orig	Sat Dec 16 15:19:29 2006
+--- include/X3DTK/private/X3DField.h	Sat Dec 16 15:20:21 2006
+***************
+*** 55,60 ****
+--- 55,61 ----
+  class X3DFieldLoader
+  {
+  public:
++   virtual ~X3DFieldLoader() {}
+    virtual void load(X3DField &field, const SFString &value) = 0;
+  };
+  
+***************
+*** 69,74 ****
+--- 70,76 ----
+  class X3DFieldWriter
+  {
+  public:
++   virtual ~X3DFieldWriter() {}
+    virtual SFString write(const X3DField &field) = 0;
+    virtual void writeToFile(SFString &output, const SFString &name, const X3DField &field, const SFString &init) = 0;
+  };
diff -u -r -P libx3dtk.orig/files/patch-X3DLoader.h libx3dtk/files/patch-X3DLoader.h
--- libx3dtk.orig/files/patch-X3DLoader.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-X3DLoader.h	Sat Dec 16 15:36:35 2006
@@ -0,0 +1,19 @@
+*** include/X3DTK/private/X3DLoader.h.orig	Sat Dec 16 15:22:27 2006
+--- include/X3DTK/private/X3DLoader.h	Sat Dec 16 15:22:36 2006
+***************
+*** 73,79 ****
+    void setComponentVisitorForFileValidator(X3DComponentVisitor *component);
+    /// Sets the FileValidator. If there is already a creator recorded for this component,
+    /// then it is deleted and replaced by the new one.
+!   void X3DLoader::setFileValidator(X3D::FileValidator *fileValidator);
+    
+  protected:
+    /// Creator.
+--- 73,79 ----
+    void setComponentVisitorForFileValidator(X3DComponentVisitor *component);
+    /// Sets the FileValidator. If there is already a creator recorded for this component,
+    /// then it is deleted and replaced by the new one.
+!   void setFileValidator(X3D::FileValidator *fileValidator);
+    
+  protected:
+    /// Creator.
diff -u -r -P libx3dtk.orig/files/patch-X3DMFNodeFunctor.h libx3dtk/files/patch-X3DMFNodeFunctor.h
--- libx3dtk.orig/files/patch-X3DMFNodeFunctor.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-X3DMFNodeFunctor.h	Sat Dec 16 15:36:35 2006
@@ -0,0 +1,12 @@
+*** include/X3DTK/private/X3DMFNodeFunctor.h.orig	Sat Dec 16 15:21:47 2006
+--- include/X3DTK/private/X3DMFNodeFunctor.h	Sat Dec 16 15:22:02 2006
+***************
+*** 26,31 ****
+--- 26,32 ----
+  class X3DMFNodeFunctor
+  {
+  public:
++   virtual ~X3DMFNodeFunctor() {}
+    virtual const MFNode &getNodes(X3DAbstractNode const *N) = 0;
+    virtual bool addNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
+    virtual bool removeNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
diff -u -r -P libx3dtk.orig/files/patch-X3DMemberFunctor.h libx3dtk/files/patch-X3DMemberFunctor.h
--- libx3dtk.orig/files/patch-X3DMemberFunctor.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-X3DMemberFunctor.h	Sat Dec 16 15:36:35 2006
@@ -0,0 +1,12 @@
+*** include/X3DTK/private/X3DMemberFunctor.h.orig	Sat Dec 16 15:20:40 2006
+--- include/X3DTK/private/X3DMemberFunctor.h	Sat Dec 16 15:21:00 2006
+***************
+*** 28,33 ****
+--- 28,34 ----
+  class X3DMemberFunctor
+  {
+  public:
++   virtual ~X3DMemberFunctor() {}
+    virtual X3DField getValueOf(X3DAbstractNode const *N) const = 0;
+    virtual void setValueOf(X3DAbstractNode *N, const X3DField &field) = 0;
+  };
diff -u -r -P libx3dtk.orig/files/patch-X3DNodeCloner.h libx3dtk/files/patch-X3DNodeCloner.h
--- libx3dtk.orig/files/patch-X3DNodeCloner.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-X3DNodeCloner.h	Sat Dec 16 15:36:35 2006
@@ -0,0 +1,12 @@
+*** include/X3DTK/private/X3DNodeCloner.h.orig	Sat Dec 16 15:18:34 2006
+--- include/X3DTK/private/X3DNodeCloner.h	Sat Dec 16 15:19:09 2006
+***************
+*** 24,29 ****
+--- 24,30 ----
+  class X3DNodeCloner
+  {
+  public:
++   virtual ~X3DNodeCloner() {}
+    virtual SFNode create() const = 0;
+  };
+  
diff -u -r -P libx3dtk.orig/files/patch-X3DSFNodeFunctor.h libx3dtk/files/patch-X3DSFNodeFunctor.h
--- libx3dtk.orig/files/patch-X3DSFNodeFunctor.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-X3DSFNodeFunctor.h	Sat Dec 16 15:36:35 2006
@@ -0,0 +1,12 @@
+*** include/X3DTK/private/X3DSFNodeFunctor.h.orig	Sat Dec 16 15:21:18 2006
+--- include/X3DTK/private/X3DSFNodeFunctor.h	Sat Dec 16 15:21:31 2006
+***************
+*** 26,31 ****
+--- 26,32 ----
+  class X3DSFNodeFunctor
+  {
+  public:
++   virtual ~X3DSFNodeFunctor() {}
+    virtual X3DAbstractNode *getNode(X3DAbstractNode const *N) = 0;
+    virtual bool setNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
+    virtual bool removeNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
diff -u -r -P libx3dtk.orig/files/patch-src-X3DLoader-X3DLoader.h libx3dtk/files/patch-src-X3DLoader-X3DLoader.h
--- libx3dtk.orig/files/patch-src-X3DLoader-X3DLoader.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-X3DLoader-X3DLoader.h	Sat Dec 16 16:31:18 2006
@@ -0,0 +1,19 @@
+*** src/X3DLoader/X3DLoader.h.orig	Sat Dec 16 16:30:37 2006
+--- src/X3DLoader/X3DLoader.h	Sat Dec 16 16:30:50 2006
+***************
+*** 73,79 ****
+    void setComponentVisitorForFileValidator(X3DComponentVisitor *component);
+    /// Sets the FileValidator. If there is already a creator recorded for this component,
+    /// then it is deleted and replaced by the new one.
+!   void X3DLoader::setFileValidator(X3D::FileValidator *fileValidator);
+    
+  protected:
+    /// Creator.
+--- 73,79 ----
+    void setComponentVisitorForFileValidator(X3DComponentVisitor *component);
+    /// Sets the FileValidator. If there is already a creator recorded for this component,
+    /// then it is deleted and replaced by the new one.
+!   void setFileValidator(X3D::FileValidator *fileValidator);
+    
+  protected:
+    /// Creator.
diff -u -r -P libx3dtk.orig/files/patch-src-functionalities-GL-GL_Renderer-GL_RendererShapeVisitor.cpp libx3dtk/files/patch-src-functionalities-GL-GL_Renderer-GL_RendererShapeVisitor.cpp
--- libx3dtk.orig/files/patch-src-functionalities-GL-GL_Renderer-GL_RendererShapeVisitor.cpp	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-functionalities-GL-GL_Renderer-GL_RendererShapeVisitor.cpp	Sat Dec 16 15:47:57 2006
@@ -0,0 +1,19 @@
+*** src/functionalities/GL/GL_Renderer/GL_RendererShapeVisitor.cpp.orig	Sat Dec 16 15:45:37 2006
+--- src/functionalities/GL/GL_Renderer/GL_RendererShapeVisitor.cpp	Sat Dec 16 15:47:15 2006
+***************
+*** 19,25 ****
+  
+  void RendererShapeVisitor::enterMaterial(Material *M) 
+  {
+!   RendererStateVariables *stateVariables = Singleton<RendererStateVariables>::getInstance();
+    
+    glMaterialfv(GL_FRONT, GL_DIFFUSE, &M->getDiffuseColor().front());
+    glMaterialfv(GL_FRONT, GL_AMBIENT, &M->getAmbientColor().front());
+--- 19,25 ----
+  
+  void RendererShapeVisitor::enterMaterial(Material *M) 
+  {
+!   /* RendererStateVariables *stateVariables = */ Singleton<RendererStateVariables>::getInstance();
+    
+    glMaterialfv(GL_FRONT, GL_DIFFUSE, &M->getDiffuseColor().front());
+    glMaterialfv(GL_FRONT, GL_AMBIENT, &M->getAmbientColor().front());
diff -u -r -P libx3dtk.orig/files/patch-src-functionalities-GL-GL_Updater-GL_UpdaterCoreVisitor.cpp libx3dtk/files/patch-src-functionalities-GL-GL_Updater-GL_UpdaterCoreVisitor.cpp
--- libx3dtk.orig/files/patch-src-functionalities-GL-GL_Updater-GL_UpdaterCoreVisitor.cpp	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-functionalities-GL-GL_Updater-GL_UpdaterCoreVisitor.cpp	Sat Dec 16 15:53:06 2006
@@ -0,0 +1,36 @@
+*** src/functionalities/GL/GL_Updater/GL_UpdaterCoreVisitor.cpp.orig	Sat Dec 16 15:50:47 2006
+--- src/functionalities/GL/GL_Updater/GL_UpdaterCoreVisitor.cpp	Sat Dec 16 15:53:01 2006
+***************
+*** 19,25 ****
+  
+  void UpdaterCoreVisitor::enterScene(Scene *S) 
+  {
+!   UpdaterStateVariables *stateVariables = Singleton<UpdaterStateVariables>::getInstance();
+    S->update();
+    
+    if (chdir(S->getFileName().getPath()) != 0)
+--- 19,25 ----
+  
+  void UpdaterCoreVisitor::enterScene(Scene *S) 
+  {
+!   /* UpdaterStateVariables *stateVariables = */ Singleton<UpdaterStateVariables>::getInstance();
+    S->update();
+    
+    if (chdir(S->getFileName().getPath()) != 0)
+***************
+*** 28,34 ****
+  
+  void UpdaterCoreVisitor::enterX3DNode(X3DNode *N) 
+  {
+!   UpdaterStateVariables *stateVariables = Singleton<UpdaterStateVariables>::getInstance();
+    N->update();
+  }
+  
+--- 28,34 ----
+  
+  void UpdaterCoreVisitor::enterX3DNode(X3DNode *N) 
+  {
+!   /* UpdaterStateVariables *stateVariables = */ Singleton<UpdaterStateVariables>::getInstance();
+    N->update();
+  }
+  
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DAbstractNode.h libx3dtk/files/patch-src-kernel-abstractNode-X3DAbstractNode.h
--- libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DAbstractNode.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-abstractNode-X3DAbstractNode.h	Sat Dec 16 16:21:31 2006
@@ -0,0 +1,19 @@
+*** src/kernel/abstractNode/X3DAbstractNode.h.orig	Sat Dec 16 16:20:51 2006
+--- src/kernel/abstractNode/X3DAbstractNode.h	Sat Dec 16 16:21:07 2006
+***************
+*** 102,108 ****
+    inline void defineTypeName(const SFString &name, const SFString &component = SFString(""), const SFString &sceneGraph = SFString("")) {defineTempTypeName(this, name, component, sceneGraph);};
+    /// Method to avoid defineTypeName having a template parameter.
+    template<class T>
+!   inline void defineTempTypeName(T *t, const SFString &name, const SFString &component, const SFString &sceneGraph) {define(Recorder<T>::getTypeName(name, component, sceneGraph));};
+    /// Defines an attribute.
+    template<class T, class V>
+    inline void defineAttribute(const SFString &name, V T:: *member, const V &init);
+--- 102,108 ----
+    inline void defineTypeName(const SFString &name, const SFString &component = SFString(""), const SFString &sceneGraph = SFString("")) {defineTempTypeName(this, name, component, sceneGraph);};
+    /// Method to avoid defineTypeName having a template parameter.
+    template<class T>
+!   inline void defineTempTypeName(T * /* t */, const SFString &name, const SFString &component, const SFString &sceneGraph) {define(Recorder<T>::getTypeName(name, component, sceneGraph));};
+    /// Defines an attribute.
+    template<class T, class V>
+    inline void defineAttribute(const SFString &name, V T:: *member, const V &init);
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DField.h libx3dtk/files/patch-src-kernel-abstractNode-X3DField.h
--- libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DField.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-abstractNode-X3DField.h	Sat Dec 16 16:07:13 2006
@@ -0,0 +1,22 @@
+*** src/kernel/abstractNode/X3DField.h.orig	Sat Dec 16 16:04:52 2006
+--- src/kernel/abstractNode/X3DField.h	Sat Dec 16 16:05:59 2006
+***************
+*** 55,60 ****
+--- 55,61 ----
+  class X3DFieldLoader
+  {
+  public:
++   virtual ~X3DFieldLoader() {}
+    virtual void load(X3DField &field, const SFString &value) = 0;
+  };
+  
+***************
+*** 69,74 ****
+--- 70,76 ----
+  class X3DFieldWriter
+  {
+  public:
++   virtual ~X3DFieldWriter() {}
+    virtual SFString write(const X3DField &field) = 0;
+    virtual void writeToFile(SFString &output, const SFString &name, const X3DField &field, const SFString &init) = 0;
+  };
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DMFNodeFunctor.h libx3dtk/files/patch-src-kernel-abstractNode-X3DMFNodeFunctor.h
--- libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DMFNodeFunctor.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-abstractNode-X3DMFNodeFunctor.h	Sat Dec 16 16:11:09 2006
@@ -0,0 +1,12 @@
+*** src/kernel/abstractNode/X3DMFNodeFunctor.h.orig	Sat Dec 16 16:08:35 2006
+--- src/kernel/abstractNode/X3DMFNodeFunctor.h	Sat Dec 16 16:09:42 2006
+***************
+*** 26,31 ****
+--- 26,32 ----
+  class X3DMFNodeFunctor
+  {
+  public:
++   virtual ~X3DMFNodeFunctor() {}
+    virtual const MFNode &getNodes(X3DAbstractNode const *N) = 0;
+    virtual bool addNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
+    virtual bool removeNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DMemberFunctor.h libx3dtk/files/patch-src-kernel-abstractNode-X3DMemberFunctor.h
--- libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DMemberFunctor.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-abstractNode-X3DMemberFunctor.h	Sat Dec 16 16:10:08 2006
@@ -0,0 +1,12 @@
+*** src/kernel/abstractNode/X3DMemberFunctor.h.orig	Sat Dec 16 16:08:12 2006
+--- src/kernel/abstractNode/X3DMemberFunctor.h	Sat Dec 16 16:08:54 2006
+***************
+*** 28,33 ****
+--- 28,34 ----
+  class X3DMemberFunctor
+  {
+  public:
++   virtual ~X3DMemberFunctor() {}
+    virtual X3DField getValueOf(X3DAbstractNode const *N) const = 0;
+    virtual void setValueOf(X3DAbstractNode *N, const X3DField &field) = 0;
+  };
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DSFNodeFunctor.h libx3dtk/files/patch-src-kernel-abstractNode-X3DSFNodeFunctor.h
--- libx3dtk.orig/files/patch-src-kernel-abstractNode-X3DSFNodeFunctor.h	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-abstractNode-X3DSFNodeFunctor.h	Sat Dec 16 16:10:41 2006
@@ -0,0 +1,12 @@
+*** src/kernel/abstractNode/X3DSFNodeFunctor.h.orig	Sat Dec 16 16:08:26 2006
+--- src/kernel/abstractNode/X3DSFNodeFunctor.h	Sat Dec 16 16:09:15 2006
+***************
+*** 26,31 ****
+--- 26,32 ----
+  class X3DSFNodeFunctor
+  {
+  public:
++   virtual ~X3DSFNodeFunctor() {}
+    virtual X3DAbstractNode *getNode(X3DAbstractNode const *N) = 0;
+    virtual bool setNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
+    virtual bool removeNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-base-SFPoint2f.cpp libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp
--- libx3dtk.orig/files/patch-src-kernel-base-SFPoint2f.cpp	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp	Sun Dec 17 12:58:55 2006
@@ -0,0 +1,110 @@
+*** src/kernel/base/SFPoint2f.cpp.orig	Sun Dec 17 12:28:27 2006
+--- src/kernel/base/SFPoint2f.cpp	Sun Dec 17 12:30:01 2006
+***************
+*** 67,74 ****
+  
+  // operations on points
+  //overloading of the operators +, -, *
+  
+! SFPoint2f X3DTK::operator+ (const SFPoint2f &v1, const SFVec2f &v2)
+  {
+    SFPoint2f res;
+    res.x = v1.x + v2.x;
+--- 67,75 ----
+  
+  // operations on points
+  //overloading of the operators +, -, *
++ namespace X3DTK {
+  
+! SFPoint2f operator+ (const SFPoint2f &v1, const SFVec2f &v2)
+  {
+    SFPoint2f res;
+    res.x = v1.x + v2.x;
+***************
+*** 76,82 ****
+    return res;
+  }
+  
+! SFPoint2f X3DTK::operator+ (const SFPoint2f &v1, const SFPoint2f &v2)
+  {
+    SFPoint2f res;
+    res.x = v1.x + v2.x;
+--- 77,83 ----
+    return res;
+  }
+  
+! SFPoint2f operator+ (const SFPoint2f &v1, const SFPoint2f &v2)
+  {
+    SFPoint2f res;
+    res.x = v1.x + v2.x;
+***************
+*** 84,90 ****
+    return res;
+  }
+  
+! SFPoint2f X3DTK::operator- (const SFPoint2f &v1, const SFVec2f &v2)
+  {
+    SFPoint2f res;
+    res.x = v1.x - v2.x;
+--- 85,91 ----
+    return res;
+  }
+  
+! SFPoint2f operator- (const SFPoint2f &v1, const SFVec2f &v2)
+  {
+    SFPoint2f res;
+    res.x = v1.x - v2.x;
+***************
+*** 92,98 ****
+    return res;
+  }
+  
+! SFVec2f X3DTK::operator- (const SFPoint2f &v1, const SFPoint2f &v2)
+  {
+    SFVec2f res;
+    res.x = v1.x - v2.x;
+--- 93,99 ----
+    return res;
+  }
+  
+! SFVec2f operator- (const SFPoint2f &v1, const SFPoint2f &v2)
+  {
+    SFVec2f res;
+    res.x = v1.x - v2.x;
+***************
+*** 100,106 ****
+    return res;
+  }
+  
+! SFPoint2f X3DTK::operator* (const float a, const SFPoint2f &v)
+  {
+    SFPoint2f res;
+    res.x = a * v.x;
+--- 101,107 ----
+    return res;
+  }
+  
+! SFPoint2f operator* (const float a, const SFPoint2f &v)
+  {
+    SFPoint2f res;
+    res.x = a * v.x;
+***************
+*** 108,115 ****
+    return res;
+  }
+  
+! float X3DTK::distance(const SFPoint2f &A, const SFPoint2f &B)
+  {
+    return (A - B).norm();
+  }
+  
+--- 109,117 ----
+    return res;
+  }
+  
+! float distance(const SFPoint2f &A, const SFPoint2f &B)
+  {
+    return (A - B).norm();
+  }
+  
++ }
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-base-SFPoint3f.cpp libx3dtk/files/patch-src-kernel-base-SFPoint3f.cpp
--- libx3dtk.orig/files/patch-src-kernel-base-SFPoint3f.cpp	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-base-SFPoint3f.cpp	Sun Dec 17 12:58:55 2006
@@ -0,0 +1,107 @@
+*** src/kernel/base/SFPoint3f.cpp.orig	Sun Dec 17 12:30:22 2006
+--- src/kernel/base/SFPoint3f.cpp	Sun Dec 17 12:31:00 2006
+***************
+*** 75,81 ****
+  // operations on points
+  //overloading of the operators +, -, *
+  
+! SFPoint3f X3DTK::operator+ (const SFPoint3f &v1, const SFVec3f &v2)
+  {
+    SFPoint3f res;
+    res.x = v1.x + v2.x;
+--- 75,82 ----
+  // operations on points
+  //overloading of the operators +, -, *
+  
+! namespace X3DTK {
+! SFPoint3f operator+ (const SFPoint3f &v1, const SFVec3f &v2)
+  {
+    SFPoint3f res;
+    res.x = v1.x + v2.x;
+***************
+*** 84,90 ****
+    return res;
+  }
+  
+! SFPoint3f X3DTK::operator+ (const SFPoint3f &v1, const SFPoint3f &v2)
+  {
+    SFPoint3f res;
+    res.x = v1.x + v2.x;
+--- 85,91 ----
+    return res;
+  }
+  
+! SFPoint3f operator+ (const SFPoint3f &v1, const SFPoint3f &v2)
+  {
+    SFPoint3f res;
+    res.x = v1.x + v2.x;
+***************
+*** 93,99 ****
+    return res;
+  }
+  
+! SFPoint3f X3DTK::operator- (const SFPoint3f &v1, const SFVec3f &v2)
+  {
+    SFPoint3f res;
+    res.x = v1.x - v2.x;
+--- 94,100 ----
+    return res;
+  }
+  
+! SFPoint3f operator- (const SFPoint3f &v1, const SFVec3f &v2)
+  {
+    SFPoint3f res;
+    res.x = v1.x - v2.x;
+***************
+*** 102,108 ****
+    return res;
+  }
+  
+! SFVec3f X3DTK::operator- (const SFPoint3f &v1, const SFPoint3f &v2)
+  {
+    SFVec3f res;
+    res.x = v1.x - v2.x;
+--- 103,109 ----
+    return res;
+  }
+  
+! SFVec3f operator- (const SFPoint3f &v1, const SFPoint3f &v2)
+  {
+    SFVec3f res;
+    res.x = v1.x - v2.x;
+***************
+*** 111,117 ****
+    return res;
+  }
+  
+! SFPoint3f X3DTK::operator* (const float a, const SFPoint3f &v)
+  {
+    SFPoint3f res;
+    res.x = a * v.x;
+--- 112,118 ----
+    return res;
+  }
+  
+! SFPoint3f operator* (const float a, const SFPoint3f &v)
+  {
+    SFPoint3f res;
+    res.x = a * v.x;
+***************
+*** 120,127 ****
+    return res;
+  }
+  
+! float X3DTK::distance(const SFPoint3f &A, const SFPoint3f &B)
+  {
+    return (A - B).norm();
+  }
+! 
+--- 121,128 ----
+    return res;
+  }
+  
+! float distance(const SFPoint3f &A, const SFPoint3f &B)
+  {
+    return (A - B).norm();
+  }
+! }
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-base-SFVec2f.cpp libx3dtk/files/patch-src-kernel-base-SFVec2f.cpp
--- libx3dtk.orig/files/patch-src-kernel-base-SFVec2f.cpp	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-base-SFVec2f.cpp	Sun Dec 17 12:58:55 2006
@@ -0,0 +1,116 @@
+*** src/kernel/base/SFVec2f.cpp.orig	Sun Dec 17 12:38:08 2006
+--- src/kernel/base/SFVec2f.cpp	Sun Dec 17 12:38:57 2006
+***************
+*** 60,78 ****
+    y = P.y;
+  }
+  
+  // operations on vectors
+  //overloading of the operators +, -, *
+! bool X3DTK::operator== (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    return ((v1.x == v2.x) && (v1.y == v2.y));
+  }
+  
+! bool X3DTK::operator!= (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    return ((v1.x != v2.x) || (v1.y != v2.y));
+  }
+  
+! SFVec2f X3DTK::operator+ (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    SFVec2f res;
+    res.x = v1.x + v2.x;
+--- 60,79 ----
+    y = P.y;
+  }
+  
++ namespace X3DTK {
+  // operations on vectors
+  //overloading of the operators +, -, *
+! bool operator== (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    return ((v1.x == v2.x) && (v1.y == v2.y));
+  }
+  
+! bool operator!= (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    return ((v1.x != v2.x) || (v1.y != v2.y));
+  }
+  
+! SFVec2f operator+ (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    SFVec2f res;
+    res.x = v1.x + v2.x;
+***************
+*** 80,86 ****
+    return res;
+  }
+  
+! SFVec2f X3DTK::operator- (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    SFVec2f res;
+    res.x = v1.x - v2.x;
+--- 81,87 ----
+    return res;
+  }
+  
+! SFVec2f operator- (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    SFVec2f res;
+    res.x = v1.x - v2.x;
+***************
+*** 88,94 ****
+    return res;
+  }
+  
+! SFVec2f X3DTK::operator- (const SFVec2f &v)
+  {
+    SFVec2f res;
+    res.x = -v.x;
+--- 89,95 ----
+    return res;
+  }
+  
+! SFVec2f operator- (const SFVec2f &v)
+  {
+    SFVec2f res;
+    res.x = -v.x;
+***************
+*** 97,113 ****
+  }
+  
+  //scalar product
+! float X3DTK::operator* (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    return v1.x * v2.x + v1.y * v2.y;
+  }
+  
+! SFVec2f X3DTK::operator* (const float a, const SFVec2f &v)
+  {
+    SFVec2f res;
+    res.x = a * v.x;
+    res.y = a * v.y;
+    return res;
+  }
+  
+  //norm2 
+--- 98,115 ----
+  }
+  
+  //scalar product
+! float operator* (const SFVec2f &v1, const SFVec2f &v2)
+  {
+    return v1.x * v2.x + v1.y * v2.y;
+  }
+  
+! SFVec2f operator* (const float a, const SFVec2f &v)
+  {
+    SFVec2f res;
+    res.x = a * v.x;
+    res.y = a * v.y;
+    return res;
++ }
+  }
+  
+  //norm2 
diff -u -r -P libx3dtk.orig/files/patch-src-kernel-processor-Visitor.cpp libx3dtk/files/patch-src-kernel-processor-Visitor.cpp
--- libx3dtk.orig/files/patch-src-kernel-processor-Visitor.cpp	Thu Jan  1 01:00:00 1970
+++ libx3dtk/files/patch-src-kernel-processor-Visitor.cpp	Sun Dec 17 12:58:55 2006
@@ -0,0 +1,28 @@
+*** src/kernel/processor/Visitor.cpp.orig	Sun Dec 17 12:45:21 2006
+--- src/kernel/processor/Visitor.cpp	Sun Dec 17 12:46:14 2006
+***************
+*** 160,166 ****
+    return LF;
+  }
+  
+! Visitor *X3DTK::joinVisitors(Visitor *N0, Visitor *N1)
+  {
+    Visitor *N = new Visitor();
+    
+--- 160,167 ----
+    return LF;
+  }
+  
+! namespace X3DTK {
+! Visitor *joinVisitors(Visitor *N0, Visitor *N1)
+  {
+    Visitor *N = new Visitor();
+    
+***************
+*** 171,174 ****
+--- 172,176 ----
+      N->setComponentVisitor(*j);
+    
+    return N;  
++ }
+  }
--- libx3dtk.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list