mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
science/openbabel: Update to 2.4.1
Patches removed: patch-git_c3abbdda, patch-gcc5-support (Integrated upstream) patch-scripts__CMakeLists.txt (Builds without it) While here, set LICENSE and simplify BUILD_DEPENDS. Changes: https://github.com/openbabel/openbabel/releases PR: 219382 Submitted by: Yuri Victorovich <yuri@rawbw.com> Approved by: garga (mentor) Differential Revision: https://reviews.freebsd.org/D10837
This commit is contained in:
parent
54aee5ddcc
commit
0c2c04b55b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=441557
6 changed files with 91 additions and 659 deletions
|
@ -2,15 +2,17 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= openbabel
|
||||
PORTVERSION= 2.3.2
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 2.4.1
|
||||
CATEGORIES= science
|
||||
MASTER_SITES= SF
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Chemistry file translation program
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/include/eigen3/Eigen/Eigen:math/eigen3
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
BUILD_DEPENDS= eigen>=0:math/eigen3
|
||||
|
||||
BROKEN_powerpc64= Does not build: relocation truncated to fit: R_PPC64_TOC16_DS
|
||||
|
||||
|
@ -38,7 +40,7 @@ PYTHON_CMAKE_ON= -DPYTHON_BINDINGS=on
|
|||
post-patch:
|
||||
${REINPLACE_CMD} -e '/pkgconfig/s,$${LIB_INSTALL_DIR},libdata,' \
|
||||
${WRKSRC}/CMakeLists.txt
|
||||
${REINPLACE_CMD} -e 's,share/man,man,' \
|
||||
${REINPLACE_CMD} -e 's,man/man1,../man/man1,' \
|
||||
${WRKSRC}/doc/CMakeLists.txt
|
||||
|
||||
post-patch-CAIRO-off:
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
SHA256 (openbabel-2.3.2.tar.gz) = 4eaca26679aa6cc85ebf96af19191472ac63ca442c36b0427b369c3a25705188
|
||||
SIZE (openbabel-2.3.2.tar.gz) = 20509105
|
||||
TIMESTAMP = 1495085400
|
||||
SHA256 (openbabel-2.4.1.tar.gz) = 204136582cdfe51d792000b20202de8950218d617fd9c6e18cee36706a376dfc
|
||||
SIZE (openbabel-2.4.1.tar.gz) = 11618304
|
||||
|
|
|
@ -1,521 +0,0 @@
|
|||
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
|
||||
{
|
|
@ -1,62 +0,0 @@
|
|||
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
|
||||
|
||||
Detect libc++ as this is now the default in OS X Mavericks
|
||||
|
||||
diff --git a/include/openbabel/obmolecformat.h b/include/openbabel/obmolecformat.h
|
||||
index 46ec724..c004313 100644
|
||||
--- include/openbabel/obmolecformat.h
|
||||
+++ include/openbabel/obmolecformat.h
|
||||
@@ -23,7 +23,10 @@ GNU General Public License for more details.
|
||||
#include <hash_map>
|
||||
#endif
|
||||
|
||||
-#if __GNUC__ == 4 && __GNUC_MINOR__ >= 1
|
||||
+#include <ciso646> // detect std::lib
|
||||
+#ifdef _LIBCPP_VERSION
|
||||
+ #include <unordered_map>
|
||||
+#elif __GNUC__ == 4 && __GNUC_MINOR__ >= 1
|
||||
#include <tr1/unordered_map>
|
||||
#elif defined(USE_BOOST)
|
||||
#include <boost/tr1/unordered_map.hpp>
|
||||
@@ -141,6 +144,8 @@ public:
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef stdext::hash_map<std::string, unsigned> NameIndexType;
|
||||
+#elif defined(_LIBCPP_VERSION)
|
||||
+ typedef std::unordered_map<std::string, unsigned> NameIndexType;
|
||||
#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/src/ops/unique.cpp b/src/ops/unique.cpp
|
||||
index 5f7714f..8527fba 100644
|
||||
--- src/ops/unique.cpp
|
||||
+++ src/ops/unique.cpp
|
||||
@@ -21,7 +21,7 @@ GNU General Public License for more details.
|
||||
#include <openbabel/obconversion.h>
|
||||
#include <openbabel/descriptor.h>
|
||||
#include <openbabel/inchiformat.h>
|
||||
-#ifdef _MSC_VER
|
||||
+#if defined(_MSC_VER) || defined(_LIBCPP_VERSION)
|
||||
#include <unordered_map>
|
||||
#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && !defined(__APPLE_CC__))
|
||||
#include <tr1/unordered_map>
|
||||
@@ -36,7 +36,11 @@ GNU General Public License for more details.
|
||||
|
||||
using namespace std;
|
||||
#ifndef NO_UNORDERED_MAP
|
||||
-using std::tr1::unordered_map;
|
||||
+ #ifdef _LIBCPP_VERSION
|
||||
+ using std::unordered_map;
|
||||
+ #else
|
||||
+ using std::tr1::unordered_map;
|
||||
+ #endif
|
||||
#endif
|
||||
namespace OpenBabel
|
||||
{
|
|
@ -1,23 +0,0 @@
|
|||
--- ./scripts/CMakeLists.txt.orig 2012-10-03 19:08:52.000000000 +0000
|
||||
+++ ./scripts/CMakeLists.txt 2012-10-29 23:15:24.219796263 +0000
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
if(PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
|
||||
set(DO_PYTHON_BINDINGS ON BOOL)
|
||||
+ set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "The directory where python modules will be installed to.")
|
||||
message(STATUS "Python bindings will be compiled")
|
||||
endif(PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
|
||||
|
||||
@@ -91,9 +92,9 @@
|
||||
PREFIX ""
|
||||
SUFFIX .so )
|
||||
add_dependencies(bindings_python openbabel)
|
||||
- install(TARGETS bindings_python LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
||||
- install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py DESTINATION ${LIB_INSTALL_DIR})
|
||||
- install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py DESTINATION ${LIB_INSTALL_DIR})
|
||||
+ install(TARGETS bindings_python LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR})
|
||||
+ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR})
|
||||
+ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR})
|
||||
else(NOT WIN32)
|
||||
set_target_properties(bindings_python PROPERTIES
|
||||
OUTPUT_NAME _openbabel
|
|
@ -2,6 +2,7 @@ bin/babel
|
|||
bin/obabel
|
||||
bin/obchiral
|
||||
bin/obconformer
|
||||
bin/obdistgen
|
||||
bin/obenergy
|
||||
bin/obfit
|
||||
bin/obgen
|
||||
|
@ -13,6 +14,9 @@ bin/obrms
|
|||
bin/obrotamer
|
||||
bin/obrotate
|
||||
bin/obspectrophore
|
||||
bin/obsym
|
||||
bin/obtautomer
|
||||
bin/obthermo
|
||||
bin/roundtrip
|
||||
include/inchi/inchi_api.h
|
||||
include/openbabel-2.0/openbabel/alias.h
|
||||
|
@ -31,7 +35,9 @@ include/openbabel-2.0/openbabel/chemdrawcdx.h
|
|||
include/openbabel-2.0/openbabel/chiral.h
|
||||
include/openbabel-2.0/openbabel/conformersearch.h
|
||||
include/openbabel-2.0/openbabel/data.h
|
||||
include/openbabel-2.0/openbabel/data_utilities.h
|
||||
include/openbabel-2.0/openbabel/descriptor.h
|
||||
include/openbabel-2.0/openbabel/distgeom.h
|
||||
include/openbabel-2.0/openbabel/dlhandler.h
|
||||
include/openbabel-2.0/openbabel/fingerprint.h
|
||||
include/openbabel-2.0/openbabel/forcefield.h
|
||||
|
@ -44,6 +50,9 @@ include/openbabel-2.0/openbabel/groupcontrib.h
|
|||
include/openbabel-2.0/openbabel/inchiformat.h
|
||||
include/openbabel-2.0/openbabel/internalcoord.h
|
||||
include/openbabel-2.0/openbabel/isomorphism.h
|
||||
include/openbabel-2.0/openbabel/json/customwriter.h
|
||||
include/openbabel-2.0/openbabel/json/json-forwards.h
|
||||
include/openbabel-2.0/openbabel/json/json.h
|
||||
include/openbabel-2.0/openbabel/kinetics.h
|
||||
include/openbabel-2.0/openbabel/lineend.h
|
||||
include/openbabel-2.0/openbabel/locale.h
|
||||
|
@ -85,6 +94,7 @@ include/openbabel-2.0/openbabel/stereo/stereo.h
|
|||
include/openbabel-2.0/openbabel/stereo/tetrahedral.h
|
||||
include/openbabel-2.0/openbabel/stereo/tetranonplanar.h
|
||||
include/openbabel-2.0/openbabel/stereo/tetraplanar.h
|
||||
include/openbabel-2.0/openbabel/tautomer.h
|
||||
include/openbabel-2.0/openbabel/text.h
|
||||
include/openbabel-2.0/openbabel/tokenst.h
|
||||
include/openbabel-2.0/openbabel/typer.h
|
||||
|
@ -97,8 +107,8 @@ lib/libinchi.so
|
|||
lib/libinchi.so.0
|
||||
lib/libinchi.so.0.4.1
|
||||
lib/libopenbabel.so
|
||||
lib/libopenbabel.so.4
|
||||
lib/libopenbabel.so.4.0.2
|
||||
lib/libopenbabel.so.5
|
||||
lib/libopenbabel.so.5.0.0
|
||||
lib/openbabel/%%VERSION%%/APIInterface.so
|
||||
lib/openbabel/%%VERSION%%/CSRformat.so
|
||||
lib/openbabel/%%VERSION%%/MCDLformat.so
|
||||
|
@ -110,6 +120,7 @@ lib/openbabel/%%VERSION%%/acrformat.so
|
|||
lib/openbabel/%%VERSION%%/adfformat.so
|
||||
lib/openbabel/%%VERSION%%/alchemyformat.so
|
||||
lib/openbabel/%%VERSION%%/amberformat.so
|
||||
lib/openbabel/%%VERSION%%/aoforceformat.so
|
||||
lib/openbabel/%%VERSION%%/asciiformat.so
|
||||
lib/openbabel/%%VERSION%%/balstformat.so
|
||||
lib/openbabel/%%VERSION%%/bgfformat.so
|
||||
|
@ -121,6 +132,7 @@ lib/openbabel/%%VERSION%%/castepformat.so
|
|||
lib/openbabel/%%VERSION%%/cccformat.so
|
||||
lib/openbabel/%%VERSION%%/cdxmlformat.so
|
||||
lib/openbabel/%%VERSION%%/chem3dformat.so
|
||||
lib/openbabel/%%VERSION%%/chemdoodlejsonformat.so
|
||||
lib/openbabel/%%VERSION%%/chemdrawcdx.so
|
||||
lib/openbabel/%%VERSION%%/chemdrawct.so
|
||||
lib/openbabel/%%VERSION%%/chemkinformat.so
|
||||
|
@ -128,12 +140,15 @@ lib/openbabel/%%VERSION%%/chemtoolformat.so
|
|||
lib/openbabel/%%VERSION%%/cifformat.so
|
||||
lib/openbabel/%%VERSION%%/cmlformat.so
|
||||
lib/openbabel/%%VERSION%%/cmlreactformat.so
|
||||
lib/openbabel/%%VERSION%%/confabreport.so
|
||||
lib/openbabel/%%VERSION%%/copyformat.so
|
||||
lib/openbabel/%%VERSION%%/crkformat.so
|
||||
lib/openbabel/%%VERSION%%/crystal09format.so
|
||||
lib/openbabel/%%VERSION%%/cssrformat.so
|
||||
lib/openbabel/%%VERSION%%/daltonformat.so
|
||||
lib/openbabel/%%VERSION%%/dlpolyformat.so
|
||||
lib/openbabel/%%VERSION%%/dmolformat.so
|
||||
lib/openbabel/%%VERSION%%/exyzformat.so
|
||||
lib/openbabel/%%VERSION%%/fastaformat.so
|
||||
lib/openbabel/%%VERSION%%/fastsearchformat.so
|
||||
lib/openbabel/%%VERSION%%/fchkformat.so
|
||||
|
@ -156,6 +171,8 @@ lib/openbabel/%%VERSION%%/hinformat.so
|
|||
lib/openbabel/%%VERSION%%/inchiformat.so
|
||||
lib/openbabel/%%VERSION%%/jaguarformat.so
|
||||
lib/openbabel/%%VERSION%%/lmpdatformat.so
|
||||
lib/openbabel/%%VERSION%%/lpmdformat.so
|
||||
lib/openbabel/%%VERSION%%/mdffformat.so
|
||||
lib/openbabel/%%VERSION%%/mdlformat.so
|
||||
lib/openbabel/%%VERSION%%/mmcifformat.so
|
||||
lib/openbabel/%%VERSION%%/mmodformat.so
|
||||
|
@ -171,7 +188,9 @@ lib/openbabel/%%VERSION%%/msmsformat.so
|
|||
lib/openbabel/%%VERSION%%/nulformat.so
|
||||
lib/openbabel/%%VERSION%%/nwchemformat.so
|
||||
lib/openbabel/%%VERSION%%/opendxformat.so
|
||||
lib/openbabel/%%VERSION%%/orcaformat.so
|
||||
lib/openbabel/%%VERSION%%/outformat.so
|
||||
lib/openbabel/%%VERSION%%/painterformat.so
|
||||
lib/openbabel/%%VERSION%%/pcmodelformat.so
|
||||
lib/openbabel/%%VERSION%%/pdbformat.so
|
||||
lib/openbabel/%%VERSION%%/pdbqtformat.so
|
||||
|
@ -182,17 +201,22 @@ lib/openbabel/%%VERSION%%/plugin_forcefields.so
|
|||
lib/openbabel/%%VERSION%%/plugin_ops.so
|
||||
%%CAIRO%%lib/openbabel/%%VERSION%%/png2format.so
|
||||
lib/openbabel/%%VERSION%%/pngformat.so
|
||||
lib/openbabel/%%VERSION%%/pointcloudformat.so
|
||||
lib/openbabel/%%VERSION%%/posformat.so
|
||||
lib/openbabel/%%VERSION%%/povrayformat.so
|
||||
lib/openbabel/%%VERSION%%/pqrformat.so
|
||||
lib/openbabel/%%VERSION%%/pubchem.so
|
||||
lib/openbabel/%%VERSION%%/pubchemjsonformat.so
|
||||
lib/openbabel/%%VERSION%%/pwscfformat.so
|
||||
lib/openbabel/%%VERSION%%/qchemformat.so
|
||||
lib/openbabel/%%VERSION%%/reportformat.so
|
||||
lib/openbabel/%%VERSION%%/rsmiformat.so
|
||||
lib/openbabel/%%VERSION%%/rxnformat.so
|
||||
lib/openbabel/%%VERSION%%/shelxformat.so
|
||||
lib/openbabel/%%VERSION%%/siestaformat.so
|
||||
lib/openbabel/%%VERSION%%/smilesformat.so
|
||||
lib/openbabel/%%VERSION%%/smileyformat.so
|
||||
lib/openbabel/%%VERSION%%/stlformat.so
|
||||
lib/openbabel/%%VERSION%%/svgformat.so
|
||||
lib/openbabel/%%VERSION%%/textformat.so
|
||||
lib/openbabel/%%VERSION%%/thermoformat.so
|
||||
|
@ -228,48 +252,59 @@ man/man1/obrotamer.1.gz
|
|||
man/man1/obrotate.1.gz
|
||||
man/man1/obspectrophore.1.gz
|
||||
man/man1/roundtrip.1.gz
|
||||
share/openbabel/%%VERSION%%/MACCS.txt
|
||||
share/openbabel/%%VERSION%%/SMARTS_InteLigand.txt
|
||||
share/openbabel/%%VERSION%%/UFF.prm
|
||||
share/openbabel/%%VERSION%%/aromatic.txt
|
||||
share/openbabel/%%VERSION%%/atomtyp.txt
|
||||
share/openbabel/%%VERSION%%/babel_povray3.inc
|
||||
share/openbabel/%%VERSION%%/bondtyp.txt
|
||||
share/openbabel/%%VERSION%%/element.txt
|
||||
share/openbabel/%%VERSION%%/fragments.txt
|
||||
share/openbabel/%%VERSION%%/gaff.dat
|
||||
share/openbabel/%%VERSION%%/gaff.prm
|
||||
share/openbabel/%%VERSION%%/ghemical.prm
|
||||
share/openbabel/%%VERSION%%/isotope-small.txt
|
||||
share/openbabel/%%VERSION%%/isotope.txt
|
||||
share/openbabel/%%VERSION%%/logp.txt
|
||||
share/openbabel/%%VERSION%%/mmff94.ff
|
||||
share/openbabel/%%VERSION%%/mmff94s.ff
|
||||
share/openbabel/%%VERSION%%/mmffang.par
|
||||
share/openbabel/%%VERSION%%/mmffbndk.par
|
||||
share/openbabel/%%VERSION%%/mmffbond.par
|
||||
share/openbabel/%%VERSION%%/mmffchg.par
|
||||
share/openbabel/%%VERSION%%/mmffdef.par
|
||||
share/openbabel/%%VERSION%%/mmffdfsb.par
|
||||
share/openbabel/%%VERSION%%/mmffoop.par
|
||||
share/openbabel/%%VERSION%%/mmffpbci.par
|
||||
share/openbabel/%%VERSION%%/mmffprop.par
|
||||
share/openbabel/%%VERSION%%/mmffs_oop.par
|
||||
share/openbabel/%%VERSION%%/mmffs_tor.par
|
||||
share/openbabel/%%VERSION%%/mmffstbn.par
|
||||
share/openbabel/%%VERSION%%/mmfftor.par
|
||||
share/openbabel/%%VERSION%%/mmffvdw.par
|
||||
share/openbabel/%%VERSION%%/mr.txt
|
||||
share/openbabel/%%VERSION%%/patterns.txt
|
||||
share/openbabel/%%VERSION%%/phmodel.txt
|
||||
share/openbabel/%%VERSION%%/plugindefines.txt
|
||||
share/openbabel/%%VERSION%%/psa.txt
|
||||
share/openbabel/%%VERSION%%/qeq.txt
|
||||
share/openbabel/%%VERSION%%/resdata.txt
|
||||
share/openbabel/%%VERSION%%/ringtyp.txt
|
||||
share/openbabel/%%VERSION%%/space-groups.txt
|
||||
share/openbabel/%%VERSION%%/splash.png
|
||||
share/openbabel/%%VERSION%%/superatom.txt
|
||||
share/openbabel/%%VERSION%%/svgformat.script
|
||||
share/openbabel/%%VERSION%%/torlib.txt
|
||||
share/openbabel/%%VERSION%%/types.txt
|
||||
%%DATADIR%%/%%VERSION%%/MACCS.txt
|
||||
%%DATADIR%%/%%VERSION%%/SMARTS_InteLigand.txt
|
||||
%%DATADIR%%/%%VERSION%%/UFF.prm
|
||||
%%DATADIR%%/%%VERSION%%/aromatic.txt
|
||||
%%DATADIR%%/%%VERSION%%/atomization-energies.txt
|
||||
%%DATADIR%%/%%VERSION%%/atomtyp.txt
|
||||
%%DATADIR%%/%%VERSION%%/babel_povray3.inc
|
||||
%%DATADIR%%/%%VERSION%%/bondtyp.txt
|
||||
%%DATADIR%%/%%VERSION%%/eem.txt
|
||||
%%DATADIR%%/%%VERSION%%/eem2015ba.txt
|
||||
%%DATADIR%%/%%VERSION%%/eem2015bm.txt
|
||||
%%DATADIR%%/%%VERSION%%/eem2015bn.txt
|
||||
%%DATADIR%%/%%VERSION%%/eem2015ha.txt
|
||||
%%DATADIR%%/%%VERSION%%/eem2015hm.txt
|
||||
%%DATADIR%%/%%VERSION%%/eem2015hn.txt
|
||||
%%DATADIR%%/%%VERSION%%/element.txt
|
||||
%%DATADIR%%/%%VERSION%%/eqeqIonizations.txt
|
||||
%%DATADIR%%/%%VERSION%%/fragments.txt
|
||||
%%DATADIR%%/%%VERSION%%/gaff.dat
|
||||
%%DATADIR%%/%%VERSION%%/gaff.prm
|
||||
%%DATADIR%%/%%VERSION%%/ghemical.prm
|
||||
%%DATADIR%%/%%VERSION%%/isotope-small.txt
|
||||
%%DATADIR%%/%%VERSION%%/isotope.txt
|
||||
%%DATADIR%%/%%VERSION%%/logp.txt
|
||||
%%DATADIR%%/%%VERSION%%/mpC.txt
|
||||
%%DATADIR%%/%%VERSION%%/mmff94.ff
|
||||
%%DATADIR%%/%%VERSION%%/mmff94s.ff
|
||||
%%DATADIR%%/%%VERSION%%/mmffang.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffbndk.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffbond.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffchg.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffdef.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffdfsb.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffoop.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffpbci.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffprop.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffs_oop.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffs_tor.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffstbn.par
|
||||
%%DATADIR%%/%%VERSION%%/mmfftor.par
|
||||
%%DATADIR%%/%%VERSION%%/mmffvdw.par
|
||||
%%DATADIR%%/%%VERSION%%/mr.txt
|
||||
%%DATADIR%%/%%VERSION%%/patterns.txt
|
||||
%%DATADIR%%/%%VERSION%%/phmodel.txt
|
||||
%%DATADIR%%/%%VERSION%%/plugindefines.txt
|
||||
%%DATADIR%%/%%VERSION%%/psa.txt
|
||||
%%DATADIR%%/%%VERSION%%/qeq.txt
|
||||
%%DATADIR%%/%%VERSION%%/resdata.txt
|
||||
%%DATADIR%%/%%VERSION%%/ringtyp.txt
|
||||
%%DATADIR%%/%%VERSION%%/space-groups.txt
|
||||
%%DATADIR%%/%%VERSION%%/splash.png
|
||||
%%DATADIR%%/%%VERSION%%/superatom.txt
|
||||
%%DATADIR%%/%%VERSION%%/svgformat.script
|
||||
%%DATADIR%%/%%VERSION%%/templates.sdf
|
||||
%%DATADIR%%/%%VERSION%%/torlib.txt
|
||||
%%DATADIR%%/%%VERSION%%/types.txt
|
||||
|
|
Loading…
Add table
Reference in a new issue