Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Apr 2015 13:49:18 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r384227 - in head/science/openbabel: . files
Message-ID:  <201504181349.t3IDnI1D094939@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sat Apr 18 13:49:18 2015
New Revision: 384227
URL: https://svnweb.freebsd.org/changeset/ports/384227

Log:
  science/openbabel: Support gcc5 (taken from upstream)
  
  This was really painful.   I consolidated numerous shared_ptr (TR1)
  patches to a single big patch (including moving part of an existing
  patch to it because the target needed yet another change).
  
  Tested on FreeBSD 8/i386 and FreeBSD 10/amd64.  This was previously
  built on DragonFly with gcc 4.7, but libstdc++ incompatibilities caused
  avogadro to break which eventually broken kde4 metapackage.
  
  Those openbabel guys are long overdue for a new release, this was a bit
  absurd although maybe some clever sed'ding could have reduced the patch
  count.
  
  Approved by:	blanket (gcc5 & DF breakage)

Added:
  head/science/openbabel/files/patch-gcc5-support   (contents, props changed)
Modified:
  head/science/openbabel/Makefile
  head/science/openbabel/files/patch-git_c3abbdda

Modified: head/science/openbabel/Makefile
==============================================================================
--- head/science/openbabel/Makefile	Sat Apr 18 13:20:52 2015	(r384226)
+++ head/science/openbabel/Makefile	Sat Apr 18 13:49:18 2015	(r384227)
@@ -3,7 +3,7 @@
 
 PORTNAME=	openbabel
 PORTVERSION=	2.3.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	science
 MASTER_SITES=	SF
 

Added: head/science/openbabel/files/patch-gcc5-support
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/openbabel/files/patch-gcc5-support	Sat Apr 18 13:49:18 2015	(r384227)
@@ -0,0 +1,521 @@
+Taken from upstream: https://github.com/openbabel/openbabel
+
+The TR1 shared_ptr isn't supported on the latest gcc.OB
+
+--- include/openbabel/alias.h.orig	2010-09-07 17:07:53 UTC
++++ include/openbabel/alias.h
+@@ -115,7 +115,7 @@ private:
+   }
+   bool        FromNameLookup(OBMol& mol, const unsigned int atomindex);
+ #ifdef HAVE_SHARED_POINTER
+-  typedef std::vector< std::pair<std::string, shared_ptr<OBSmartsPattern> > > SmartsTable;
++  typedef std::vector< std::pair<std::string, obsharedptr<OBSmartsPattern> > > SmartsTable;
+   static bool LoadFile(SmartsTable& smtable);
+ #endif
+ };
+--- include/openbabel/reaction.h.orig	2010-10-10 02:05:12 UTC
++++ include/openbabel/reaction.h
+@@ -35,10 +35,10 @@ namespace OpenBabel
+ class OBReaction : public OBBase
+ {
+ private:
+-  std::vector<shared_ptr<OBMol> > _reactants;
+-  std::vector<shared_ptr<OBMol> > _products;
+-  shared_ptr<OBMol> _ts;
+-  shared_ptr<OBMol> _agent;
++  std::vector<obsharedptr<OBMol> > _reactants;
++  std::vector<obsharedptr<OBMol> > _products;
++  obsharedptr<OBMol> _ts;
++  obsharedptr<OBMol> _agent;
+   std::string _title;
+   std::string _comment;
+   bool _reversible;
+@@ -52,37 +52,37 @@ public:
+   int NumProducts()const
+   { return static_cast<int> (_products.size()); }
+ 
+-  void AddReactant(const shared_ptr<OBMol> sp)
++  void AddReactant(const obsharedptr<OBMol> sp)
+   { _reactants.push_back(sp); }
+ 
+-  void AddProduct(const shared_ptr<OBMol> sp)
++  void AddProduct(const obsharedptr<OBMol> sp)
+   { _products.push_back(sp); }
+ 
+-  void SetTransitionState(const shared_ptr<OBMol> sp)
++  void SetTransitionState(const obsharedptr<OBMol> sp)
+   { _ts = sp; }
+ 
+-  void AddAgent(const shared_ptr<OBMol> sp)
++  void AddAgent(const obsharedptr<OBMol> sp)
+   { _agent = sp; }
+ 
+-  shared_ptr<OBMol> GetReactant(const unsigned i)
++  obsharedptr<OBMol> GetReactant(const unsigned i)
+   {
+-    shared_ptr<OBMol> sp;
++    obsharedptr<OBMol> sp;
+     if(i<_reactants.size())
+       sp = _reactants[i];
+     return sp; //returns empty if out of range
+   }
+-  shared_ptr<OBMol> GetProduct(const unsigned i)
++  obsharedptr<OBMol> GetProduct(const unsigned i)
+   {
+-    shared_ptr<OBMol> sp;
++    obsharedptr<OBMol> sp;
+     if(i<_products.size())
+       sp = _products[i];
+     return sp; //returns empty if out of range
+   }
+ 
+-  shared_ptr<OBMol> GetTransitionState()const
++  obsharedptr<OBMol> GetTransitionState()const
+   { return _ts; }
+ 
+-  shared_ptr<OBMol> GetAgent()const
++  obsharedptr<OBMol> GetAgent()const
+   { return _agent; }
+ 
+   std::string GetTitle()	const { return _title; }
+--- include/openbabel/shared_ptr.h.orig	2011-10-12 20:24:02 UTC
++++ include/openbabel/shared_ptr.h
+@@ -18,13 +18,21 @@ GNU General Public License for more deta
+ 
+ #ifdef USE_BOOST
+   #include <boost/shared_ptr.hpp>
+-  #define shared_ptr boost::shared_ptr
++  #define obsharedptr boost::shared_ptr
+ #else
+   #include <memory>
+-  #if __GNUC__ == 4  //&& __GNUC_MINOR__ < 3  removed at the suggestion of Konstantin Tokarev
+-    #include <tr1/memory>
++  #if __GNUC__ >= 4  //&& __GNUC_MINOR__ < 3  removed at the suggestion of Konstantin Tokarev
++    #ifdef _LIBCPP_VERSION
++      #include <memory>
++    #else
++      #include <tr1/memory>
++    #endif
++  #endif
++  #ifdef _LIBCPP_VERSION
++    #define obsharedptr std::shared_ptr
++  #else
++    #define obsharedptr std::tr1::shared_ptr
+   #endif
+-  using std::tr1::shared_ptr;
+ #endif
+ 
+ #endif // OB_SHARED_PTR_H
+--- scripts/python/openbabel-python.cpp.orig	2012-10-11 19:20:57 UTC
++++ scripts/python/openbabel-python.cpp
+@@ -25531,64 +25531,64 @@ SWIGINTERN PyObject *_wrap_OBReaction_Nu
+   result = (int)((OpenBabel::OBReaction const *)arg1)->NumProducts(); resultobj = SWIG_From_int(static_cast< int >(result));
+   return resultobj; fail: return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_AddReactant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0;
+-  OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > arg2 ;
++  OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > arg2 ;
+   void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject *swig_obj[2] ;
+   if (!SWIG_Python_UnpackTuple(args,"OBReaction_AddReactant",2,2,swig_obj)) SWIG_fail;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_AddReactant" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'");  }
+    arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); {
+     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t,  0  | 0); if (!SWIG_IsOK(res2)) {
+-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'");  }
++      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'");  }
+        if (!argp2) {
+-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'"); }
+-     else { shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
++      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'"); }
++     else { obsharedptr< OpenBabel::OBMol > * temp = reinterpret_cast< obsharedptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
+       if (SWIG_IsNewObj(res2)) delete temp; }  }  (arg1)->AddReactant(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail:
+   return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_AddProduct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0;
+-  OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > arg2 ;
++  OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > arg2 ;
+   void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject *swig_obj[2] ;
+   if (!SWIG_Python_UnpackTuple(args,"OBReaction_AddProduct",2,2,swig_obj)) SWIG_fail;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_AddProduct" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'");  }
+    arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); {
+     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t,  0  | 0); if (!SWIG_IsOK(res2)) {
+-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'");  }
++      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'");  }
+        if (!argp2) {
+-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'"); }
+-     else { shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
++      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'"); }
++     else { obsharedptr< OpenBabel::OBMol > * temp = reinterpret_cast< obsharedptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
+       if (SWIG_IsNewObj(res2)) delete temp; }  }  (arg1)->AddProduct(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail:
+   return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_SetTransitionState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+   PyObject *resultobj = 0; OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ;
+-  SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ;
++  SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ;
+   PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args,"OBReaction_SetTransitionState",2,2,swig_obj)) SWIG_fail;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_SetTransitionState" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'");  }
+    arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); {
+     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t,  0  | 0); if (!SWIG_IsOK(res2)) {
+-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'");  }
++      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'");  }
+        if (!argp2) {
+-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'"); }
+-     else { shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
++      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'"); }
++     else { obsharedptr< OpenBabel::OBMol > * temp = reinterpret_cast< obsharedptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
+       if (SWIG_IsNewObj(res2)) delete temp; }  }  (arg1)->SetTransitionState(arg2); resultobj = SWIG_Py_Void();
+   return resultobj; fail: return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_AddAgent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0;
+-  OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > arg2 ;
++  OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > arg2 ;
+   void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject *swig_obj[2] ;
+   if (!SWIG_Python_UnpackTuple(args,"OBReaction_AddAgent",2,2,swig_obj)) SWIG_fail;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_AddAgent" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'");  }
+    arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); {
+     res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t,  0  | 0); if (!SWIG_IsOK(res2)) {
+-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'");  }
++      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'");  }
+        if (!argp2) {
+-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "shared_ptr< OpenBabel::OBMol > const""'"); }
+-     else { shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
++      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "obsharedptr< OpenBabel::OBMol > const""'"); }
++     else { obsharedptr< OpenBabel::OBMol > * temp = reinterpret_cast< obsharedptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;
+       if (SWIG_IsNewObj(res2)) delete temp; }  }  (arg1)->AddAgent(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail:
+   return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_GetReactant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0;
+   OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ;
+-  unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > result;
++  unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > result;
+   if (!SWIG_Python_UnpackTuple(args,"OBReaction_GetReactant",2,2,swig_obj)) SWIG_fail;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetReactant" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'");  }
+@@ -25596,11 +25596,11 @@ SWIGINTERN PyObject *_wrap_OBReaction_Ge
+   if (!SWIG_IsOK(ecode2)) {
+     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OBReaction_GetReactant" "', argument " "2"" of type '" "unsigned int""'"); }
+     arg2 = static_cast< unsigned int >(val2); result = (arg1)->GetReactant(arg2);
+-  resultobj = SWIG_NewPointerObj((new shared_ptr< OpenBabel::OBMol >(static_cast< const shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
++  resultobj = SWIG_NewPointerObj((new obsharedptr< OpenBabel::OBMol >(static_cast< const obsharedptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
+   return resultobj; fail: return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_GetProduct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0;
+   OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ;
+-  unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > result;
++  unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > result;
+   if (!SWIG_Python_UnpackTuple(args,"OBReaction_GetProduct",2,2,swig_obj)) SWIG_fail;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetProduct" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'");  }
+@@ -25608,24 +25608,24 @@ SWIGINTERN PyObject *_wrap_OBReaction_Ge
+   if (!SWIG_IsOK(ecode2)) {
+     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OBReaction_GetProduct" "', argument " "2"" of type '" "unsigned int""'"); }
+     arg2 = static_cast< unsigned int >(val2); result = (arg1)->GetProduct(arg2);
+-  resultobj = SWIG_NewPointerObj((new shared_ptr< OpenBabel::OBMol >(static_cast< const shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
++  resultobj = SWIG_NewPointerObj((new obsharedptr< OpenBabel::OBMol >(static_cast< const obsharedptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
+   return resultobj; fail: return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_GetTransitionState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+   PyObject *resultobj = 0; OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; void *argp1 = 0 ; int res1 = 0 ;
+-  PyObject *swig_obj[1] ; SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args;
++  PyObject *swig_obj[1] ; SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetTransitionState" "', argument " "1"" of type '" "OpenBabel::OBReaction const *""'");  }
+    arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1);
+   result = ((OpenBabel::OBReaction const *)arg1)->GetTransitionState();
+-  resultobj = SWIG_NewPointerObj((new shared_ptr< OpenBabel::OBMol >(static_cast< const shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
++  resultobj = SWIG_NewPointerObj((new obsharedptr< OpenBabel::OBMol >(static_cast< const obsharedptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
+   return resultobj; fail: return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_GetAgent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0;
+   OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ;
+-  SwigValueWrapper< shared_ptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args;
++  SwigValueWrapper< obsharedptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args;
+   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 |  0 ); if (!SWIG_IsOK(res1)) {
+     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetAgent" "', argument " "1"" of type '" "OpenBabel::OBReaction const *""'");  }
+    arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); result = ((OpenBabel::OBReaction const *)arg1)->GetAgent();
+-  resultobj = SWIG_NewPointerObj((new shared_ptr< OpenBabel::OBMol >(static_cast< const shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
++  resultobj = SWIG_NewPointerObj((new obsharedptr< OpenBabel::OBMol >(static_cast< const obsharedptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN |  0 );
+   return resultobj; fail: return NULL; }
+ SWIGINTERN PyObject *_wrap_OBReaction_GetTitle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0;
+   OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ;
+@@ -56173,7 +56173,7 @@ static swig_type_info _swigt__p_p_double
+ static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
+ static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0};
+ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *", 0, 0, (void*)0, 0};
+-static swig_type_info _swigt__p_shared_ptrT_OpenBabel__OBMol_t = {"_p_shared_ptrT_OpenBabel__OBMol_t", "shared_ptr< OpenBabel::OBMol > *", 0, 0, (void*)0, 0};
++static swig_type_info _swigt__p_shared_ptrT_OpenBabel__OBMol_t = {"_p_shared_ptrT_OpenBabel__OBMol_t", "obsharedptr< OpenBabel::OBMol > *", 0, 0, (void*)0, 0};
+ static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
+ static swig_type_info _swigt__p_std__allocatorT_std__vectorT_std__pairT_unsigned_int_unsigned_int_t_std__allocatorT_std__pairT_unsigned_int_unsigned_int_t_t_t_t = {"_p_std__allocatorT_std__vectorT_std__pairT_unsigned_int_unsigned_int_t_std__allocatorT_std__pairT_unsigned_int_unsigned_int_t_t_t_t", "std::allocator< std::vector< std::pair< unsigned int,unsigned int >,std::allocator< std::pair< unsigned int,unsigned int > > > > *|std::vector< std::vector< std::pair< unsigned int,unsigned int > > >::allocator_type *", 0, 0, (void*)0, 0};
+ static swig_type_info _swigt__p_std__binary_functionT_char_const_p_char_const_p_bool_t = {"_p_std__binary_functionT_char_const_p_char_const_p_bool_t", "std::binary_function< char const *,char const *,bool > *", 0, 0, (void*)0, 0};
+--- src/alias.cpp.orig	2012-10-05 20:17:36 UTC
++++ src/alias.cpp
+@@ -21,6 +21,7 @@ GNU General Public License for more deta
+ #include <openbabel/parsmart.h>
+ #include <openbabel/mcdlutil.h>
+ #include <openbabel/atomclass.h>
++#include <openbabel/shared_ptr.h>
+ 
+ using namespace std;
+ namespace OpenBabel
+@@ -270,7 +271,7 @@ bool AliasData::LoadFile(SmartsTable& sm
+         //OBSmartsPattern objects are not copyable without complications,
+         //so reference semantics used.
+ 
+-        shared_ptr<OBSmartsPattern> psp(new OBSmartsPattern);
++        obsharedptr<OBSmartsPattern> psp(new OBSmartsPattern);
+         psp->Init(ssmarts.str());
+         smtable.push_back(make_pair(vec[0], psp));
+       }
+--- src/formats/chemkinformat.cpp.orig	2012-10-03 19:08:14 UTC
++++ src/formats/chemkinformat.cpp
+@@ -78,7 +78,7 @@ private:
+   bool              ReadHeader(istream& ifs, OBConversion* pConv);
+   bool              ParseReactionLine(OBReaction* pReact, OBConversion* pConv);
+   bool              ReadReactionQualifierLines(istream& ifs, OBReaction* pReact);
+-  shared_ptr<OBMol> CheckSpecies(string& name, string& ln, bool MustBeKnown);
++  obsharedptr<OBMol> CheckSpecies(string& name, string& ln, bool MustBeKnown);
+   bool              ReadThermo(OBConversion* pConv);
+   bool              ReadStdThermo(const string& datafilename);
+   OBFormat*         GetThermoFormat();
+@@ -86,8 +86,8 @@ private:
+   bool              WriteReactionLine(OBReaction* pReact, OBConversion* pConv);
+   bool              WriteHeader(OBConversion* pConv);
+ private:
+-  typedef map<string,shared_ptr<OBMol> > MolMap;
+-  typedef set<shared_ptr<OBMol> > MolSet;
++  typedef map<string,obsharedptr<OBMol> > MolMap;
++  typedef set<obsharedptr<OBMol> > MolSet;
+   //used on input
+   MolMap IMols;
+   string ln;
+@@ -215,7 +215,7 @@ void ChemKinFormat::Init()
+     SpeciesListed=false;
+     IMols.clear();
+     //Special species name
+-    shared_ptr<OBMol> sp(new OBMol);
++    obsharedptr<OBMol> sp(new OBMol);
+     sp.get()->SetTitle("M");
+     IMols["M"] = sp;
+ }
+@@ -280,7 +280,7 @@ bool ChemKinFormat::ReadHeader(istream&
+           break;
+         }
+         //Add all species to IMols
+-        shared_ptr<OBMol> sp(new OBMol);
++        obsharedptr<OBMol> sp(new OBMol);
+         sp.get()->SetTitle(*itr);
+         IMols[*itr] = sp;
+       }
+@@ -346,7 +346,7 @@ bool ChemKinFormat::ParseReactionLine(OB
+   OBRateData* pRD = new OBRateData; //to store rate constant data. Attach only if rate data found
+ 
+   int n=0;
+-  shared_ptr<OBMol> sp;
++  obsharedptr<OBMol> sp;
+ 
+   string::size_type eqpos = ln.find('=');
+ 
+@@ -643,7 +643,7 @@ bool ChemKinFormat::ReadReactionQualifie
+ }
+ 
+ ///////////////////////////////////////////////////////////////
+-shared_ptr<OBMol> ChemKinFormat::CheckSpecies(string& name, string& ln, bool MustBeKnown)
++obsharedptr<OBMol> ChemKinFormat::CheckSpecies(string& name, string& ln, bool MustBeKnown)
+ {
+   MolMap::iterator mapitr = IMols.find(name);
+   if(mapitr==IMols.end())
+@@ -653,14 +653,14 @@ shared_ptr<OBMol> ChemKinFormat::CheckSp
+     {
+       obErrorLog.ThrowError(__FUNCTION__,
+         name + " not recognized as a species in\n" + ln, obError);
+-      shared_ptr<OBMol> sp;
++      obsharedptr<OBMol> sp;
+       return sp; //empty
+     }
+     else
+     {
+       // There was no REACTIONS section in input file and probably no SPECIES section.
+       // Unknown species that appear in a reaction can be made here with just a name.
+-      shared_ptr<OBMol> sp(new OBMol);
++      obsharedptr<OBMol> sp(new OBMol);
+       sp->SetTitle(name.c_str());
+       return sp;
+     }
+@@ -697,7 +697,7 @@ bool ChemKinFormat::ReadThermo(OBConvers
+       MolMap::iterator mapitr = IMols.find(thmol.GetTitle());
+       if(mapitr!=IMols.end())
+       {
+-        shared_ptr<OBMol> psnewmol(OBMoleculeFormat::MakeCombinedMolecule(mapitr->second.get(),&thmol));
++        obsharedptr<OBMol> psnewmol(OBMoleculeFormat::MakeCombinedMolecule(mapitr->second.get(),&thmol));
+         IMols.erase(mapitr);
+         IMols[thmol.GetTitle()] = psnewmol;
+       }
+@@ -743,7 +743,7 @@ bool ChemKinFormat::ReadStdThermo(const
+       OBMol thmol;
+       stdthermo.seekg(itr->second);
+       StdThermConv.Read(&thmol);
+-      shared_ptr<OBMol> psnewmol(OBMoleculeFormat::MakeCombinedMolecule(mapitr->second.get(),&thmol));
++      obsharedptr<OBMol> psnewmol(OBMoleculeFormat::MakeCombinedMolecule(mapitr->second.get(),&thmol));
+       IMols[thmol.GetTitle()] = psnewmol;
+     }
+     else
+@@ -915,7 +915,7 @@ bool ChemKinFormat::WriteReactionLine(OB
+   int i;
+   for(i=0;i<pReact->NumReactants();++i)
+   {
+-    shared_ptr<OBMol> psMol = pReact->GetReactant(i);
++    obsharedptr<OBMol> psMol = pReact->GetReactant(i);
+ //    if(strcasecmp(psMol->GetTitle(),"M"))
+     OMols.insert(psMol);
+ 
+@@ -954,7 +954,7 @@ bool ChemKinFormat::WriteReactionLine(OB
+ 
+   for(i=0;i<pReact->NumProducts();++i)
+   {
+-    shared_ptr<OBMol> psMol = pReact->GetProduct(i);
++    obsharedptr<OBMol> psMol = pReact->GetProduct(i);
+     if(strcasecmp(psMol->GetTitle(),"M"))
+       OMols.insert(psMol);
+ 
+--- src/formats/rsmiformat.cpp.orig	2012-10-03 19:08:14 UTC
++++ src/formats/rsmiformat.cpp
+@@ -181,7 +181,7 @@ namespace OpenBabel
+     }
+     mols = jreactants.Separate();
+     for(itr=mols.begin();itr!=mols.end();++itr)
+-      pReact->AddReactant(shared_ptr<OBMol>(new OBMol(*itr)));
++      pReact->AddReactant(obsharedptr<OBMol>(new OBMol(*itr)));
+ 
+     pos2 = rsmiles.find('>', pos+1);
+     if(pos2==string::npos)
+@@ -201,7 +201,7 @@ namespace OpenBabel
+         delete pAgent;
+         return false;
+       }
+-      pReact->AddAgent(shared_ptr<OBMol>(pAgent));
++      pReact->AddAgent(obsharedptr<OBMol>(pAgent));
+     }
+ 
+     //Extract products and split into separate molecules
+@@ -215,7 +215,7 @@ namespace OpenBabel
+     mols.clear();
+     mols = jproducts.Separate();
+     for(itr=mols.begin();itr!=mols.end();++itr)
+-      pReact->AddProduct(shared_ptr<OBMol>(new OBMol(*itr)));
++      pReact->AddProduct(obsharedptr<OBMol>(new OBMol(*itr)));
+ 
+     return true;
+   }
+@@ -247,7 +247,7 @@ namespace OpenBabel
+ 
+     ofs << '>';
+ 
+-    shared_ptr<OBMol> spAgent = pReact->GetAgent();
++    obsharedptr<OBMol> spAgent = pReact->GetAgent();
+     if(spAgent.get())
+       if(!pSmiFormat->WriteMolecule(spAgent.get(), pConv))
+         return false;
+--- src/formats/rxnformat.cpp.orig	2012-10-03 19:08:14 UTC
++++ src/formats/rxnformat.cpp
+@@ -175,7 +175,7 @@ bool RXNFormat::ReadMolecule(OBBase* pOb
+         obErrorLog.ThrowError(__FUNCTION__, "Failed to read a reactant", obWarning);
+       else
+       {
+-        shared_ptr<OBMol> p(pmol);
++        obsharedptr<OBMol> p(pmol);
+         pReact->AddReactant(p);
+       }
+     }
+@@ -189,7 +189,7 @@ bool RXNFormat::ReadMolecule(OBBase* pOb
+       else
+       {
+         //        pReact->products.push_back(pmol);
+-        shared_ptr<OBMol> p(pmol);
++        obsharedptr<OBMol> p(pmol);
+         pReact->AddProduct(p);
+       }
+     }
+--- src/formats/xml/cmlreactformat.cpp.orig	2012-10-03 19:08:13 UTC
++++ src/formats/xml/cmlreactformat.cpp
+@@ -91,15 +91,15 @@ public:
+   };
+ 
+ private:
+-  typedef map<string,shared_ptr<OBMol> > MolMap;
+-  string AddMolToList(shared_ptr<OBMol> spmol, MolMap& mmap);
++  typedef map<string,obsharedptr<OBMol> > MolMap;
++  string AddMolToList(obsharedptr<OBMol> spmol, MolMap& mmap);
+   bool WriteRateData(OBReaction* pReact, xmlChar* altprefix);
+   void WriteMetadataList(OBReaction& react);
+ 
+ private:
+   OBReaction* _preact;
+   OBMol* pmol;
+-  shared_ptr<OBMol> _spmol;
++  obsharedptr<OBMol> _spmol;
+   MolMap IMols; //used on input
+   MolMap OMols; //used on output
+   int nextmol;
+@@ -123,7 +123,7 @@ bool CMLReactFormat::ReadChemObject(OBCo
+   {
+     IMols.clear();
+     //add special species
+-    shared_ptr<OBMol> sp(new OBMol);
++    obsharedptr<OBMol> sp(new OBMol);
+     sp.get()->SetTitle("M");
+     IMols["M"] = sp;
+   }
+@@ -192,7 +192,7 @@ bool CMLReactFormat::DoElement(const str
+     }
+     else
+     {
+-      shared_ptr<OBMol> sp(new OBMol);
++      obsharedptr<OBMol> sp(new OBMol);
+       OBFormat* pCMLFormat = OBConversion::FindFormat("cml");
+       if(!pCMLFormat)
+         return false;
+@@ -331,7 +331,7 @@ bool CMLReactFormat::WriteChemObject(OBC
+     OBMol* pmol = dynamic_cast<OBMol*>(pOb);
+     if(pmol!=NULL)
+     {
+-      shared_ptr<OBMol> sp(pmol);
++      obsharedptr<OBMol> sp(pmol);
+       AddMolToList(sp, OMols);
+       pConv->SetOutputIndex(-1); //Signals that molecules have been added
+ 
+@@ -624,7 +624,7 @@ bool CMLReactFormat::WriteMolecule(OBBas
+   return true;
+ }
+ 
+-string CMLReactFormat::AddMolToList(shared_ptr<OBMol> spmol, MolMap& mmap)
++string CMLReactFormat::AddMolToList(obsharedptr<OBMol> spmol, MolMap& mmap)
+ {
+   //Adds a molecule to the map
+   string id = spmol->GetTitle();
+@@ -664,7 +664,7 @@ string CMLReactFormat::AddMolToList(shar
+     {
+       //already in map.
+       //Get a molecule with the best bits of both old and new molecules and immediately make a shared_ ptr
+-      shared_ptr<OBMol> spnew(OBMoleculeFormat::MakeCombinedMolecule(mapitr->second.get(), spmol.get()));
++      obsharedptr<OBMol> spnew(OBMoleculeFormat::MakeCombinedMolecule(mapitr->second.get(), spmol.get()));
+       if(spnew)
+       {
+         spmol.swap(spnew);
+--- src/obmolecformat.cpp.orig	2012-10-03 19:08:15 UTC
++++ src/obmolecformat.cpp
+@@ -439,7 +439,7 @@ namespace OpenBabel
+     //Output all the constituent molecules of the reaction
+ 
+     //Collect the molecules first, just for convenience
+-    vector<shared_ptr<OBMol> > mols;
++    vector<obsharedptr<OBMol> > mols;
+     unsigned i;
+     for(i=0;i<pReact->NumReactants();i++)
+       mols.push_back(pReact->GetReactant(i));
+--- test/obtest.h.orig	2010-09-22 04:05:05 UTC
++++ test/obtest.h
+@@ -40,7 +40,7 @@ const char* ob_expr(const char *expr) {
+ 
+ 
+ // some utility functions
+-typedef shared_ptr<OpenBabel::OBMol> OBMolPtr;
++typedef obsharedptr<OpenBabel::OBMol> OBMolPtr;
+ 
+ struct OBTestUtil
+ {

Modified: head/science/openbabel/files/patch-git_c3abbdda
==============================================================================
--- head/science/openbabel/files/patch-git_c3abbdda	Sat Apr 18 13:20:52 2015	(r384226)
+++ head/science/openbabel/files/patch-git_c3abbdda	Sat Apr 18 13:49:18 2015	(r384227)
@@ -1,6 +1,8 @@
 This is the git commit below, with the change to include/openbabel/shared_ptr.h
 properly adapted since it originally depends on commit ce178cbb.
 
+The include/openbabel/shared_ptr.h patch was moved to patch-gcc5-support
+
 commit c3abbddae78e654df9322ad1020ff79dd6332946
 Author: Matt Swain <m.swain@me.com>
 Date:   Thu Oct 31 15:25:53 2013 +0000
@@ -32,30 +34,6 @@ index 46ec724..c004313 100644
  #elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && !defined(__APPLE_CC__)) || defined (USE_BOOST)
    typedef std::tr1::unordered_map<std::string, unsigned> NameIndexType;
  #else
-diff --git a/include/openbabel/shared_ptr.h b/include/openbabel/shared_ptr.h
-index 5d20254..378856a 100644
---- include/openbabel/shared_ptr.h
-+++ include/openbabel/shared_ptr.h
-@@ -22,9 +22,17 @@ GNU General Public License for more details.
- #else
-   #include <memory>
-   #if __GNUC__ == 4  //&& __GNUC_MINOR__ < 3  removed at the suggestion of Konstantin Tokarev
--    #include <tr1/memory>
-+    #ifdef _LIBCPP_VERSION
-+      #include <memory>
-+    #else
-+      #include <tr1/memory>
-+    #endif
-+  #endif
-+  #ifdef _LIBCPP_VERSION
-+    using std::shared_ptr;
-+  #else
-+    using std::tr1::shared_ptr;
-   #endif
--  using std::tr1::shared_ptr;
- #endif
- 
- #endif // OB_SHARED_PTR_H
 diff --git a/src/ops/unique.cpp b/src/ops/unique.cpp
 index 5f7714f..8527fba 100644
 --- src/ops/unique.cpp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504181349.t3IDnI1D094939>