FreeBSD Bugzilla – Attachment 221140 Details for
Bug 252309
science/openbabel: upgrade to 3.1.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
science/xdrawchem: chase the upgrade to OpenBabel 3
science_xdrawchem.diff (text/plain), 9.85 KB, created by
Thierry Thomas
on 2020-12-31 16:34:52 UTC
(
hide
)
Description:
science/xdrawchem: chase the upgrade to OpenBabel 3
Filename:
MIME Type:
Creator:
Thierry Thomas
Created:
2020-12-31 16:34:52 UTC
Size:
9.85 KB
patch
obsolete
>Index: science/xdrawchem/Makefile >=================================================================== >--- science/xdrawchem/Makefile (revision 558294) >+++ science/xdrawchem/Makefile (working copy) >@@ -2,7 +2,7 @@ > > PORTNAME= xdrawchem > DISTVERSION= 1.10.2-1 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= science > > MAINTAINER= yuri@FreeBSD.org >@@ -21,6 +21,10 @@ > > WRKSRC_SUBDIR= ${PORTNAME}-qt5 > >+pre-configure: >+ ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ >+ ${WRKSRC}/xdrawchem.pro >+ > post-install: > @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} > >Index: science/xdrawchem/files/patch-xdrawchem.pro >=================================================================== >--- science/xdrawchem/files/patch-xdrawchem.pro (nonexistent) >+++ science/xdrawchem/files/patch-xdrawchem.pro (working copy) >@@ -0,0 +1,13 @@ >+--- xdrawchem.pro.orig 2017-01-09 12:25:32 UTC >++++ xdrawchem.pro >+@@ -6,8 +6,8 @@ exists(/usr/include/openbabel-2.0/openbabel/mol.h) { >+ INCLUDEPATH += /usr/include/openbabel-2.0 >+ LIBS += -lopenbabel >+ } >+-exists(/usr/local/include/openbabel-2.0/openbabel/mol.h) { >+-INCLUDEPATH += /usr/local/include/openbabel-2.0 >++exists(%%LOCALBASE%%/include/openbabel3/openbabel/mol.h) { >++INCLUDEPATH += %%LOCALBASE%%/include/openbabel3 >+ LIBS += -lopenbabel >+ } >+ exists(/Developer/openbabel-2.4.1/include/openbabel/mol.h) { > >Property changes on: science/xdrawchem/files/patch-xdrawchem.pro >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: science/xdrawchem/files/patch-xdrawchem_ioiface.cpp >=================================================================== >--- science/xdrawchem/files/patch-xdrawchem_ioiface.cpp (nonexistent) >+++ science/xdrawchem/files/patch-xdrawchem_ioiface.cpp (working copy) >@@ -0,0 +1,38 @@ >+--- xdrawchem/ioiface.cpp.orig 2017-01-09 12:25:32 UTC >++++ xdrawchem/ioiface.cpp >+@@ -193,7 +193,7 @@ void IOIface::convertToChemData() >+ int bondorder = bond->GetBondOrder(); >+ >+ //set elements >+- if ( !atom1->IsCarbon() ) { >++ if ( atom1->GetAtomicNum() != 6 ) { >+ QString str( "<element>" ); >+ str += IOIface::symbol[atom1->GetAtomicNum() - 1]; >+ str += "</element>"; >+@@ -201,7 +201,7 @@ void IOIface::convertToChemData() >+ >+ } >+ >+- if ( !atom2->IsCarbon() ) { >++ if ( atom2->GetAtomicNum() != 6 ) { >+ QString str( "<element>" ); >+ >+ str += IOIface::symbol[atom2->GetAtomicNum() - 1]; >+@@ -216,7 +216,7 @@ void IOIface::convertToChemData() >+ >+ //label atoms if not Carbon >+ >+- if ( !atom1->IsCarbon() ) { >++ if ( atom1->GetAtomicNum() != 6 ) { >+ >+ text = new Text( chemdata->getRender2D() ); >+ QString str = IOIface::symbol[atom1->GetAtomicNum() - 1]; >+@@ -229,7 +229,7 @@ void IOIface::convertToChemData() >+ //qDebug() << "ioiface(1) text:" << str; >+ } >+ >+- if ( !atom2->IsCarbon() ) { >++ if ( atom2->GetAtomicNum() != 6 ) { >+ >+ text = new Text( chemdata->getRender2D() ); >+ QString str = IOIface::symbol[atom2->GetAtomicNum() - 1]; > >Property changes on: science/xdrawchem/files/patch-xdrawchem_ioiface.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: science/xdrawchem/files/patch-xdrawchem_ioiface.h >=================================================================== >--- science/xdrawchem/files/patch-xdrawchem_ioiface.h (nonexistent) >+++ science/xdrawchem/files/patch-xdrawchem_ioiface.h (working copy) >@@ -0,0 +1,12 @@ >+--- xdrawchem/ioiface.h.orig 2017-01-09 12:25:32 UTC >++++ xdrawchem/ioiface.h >+@@ -20,6 +20,9 @@ >+ >+ #include "chemdata.h" >+ >++#include <openbabel/atom.h> >++#include <openbabel/bond.h> >++#include <openbabel/math/vector3.h> >+ #include <openbabel/mol.h> >+ >+ using namespace OpenBabel; > >Property changes on: science/xdrawchem/files/patch-xdrawchem_ioiface.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: science/xdrawchem/files/patch-xdrawchem_molecule.h >=================================================================== >--- science/xdrawchem/files/patch-xdrawchem_molecule.h (nonexistent) >+++ science/xdrawchem/files/patch-xdrawchem_molecule.h (working copy) >@@ -0,0 +1,13 @@ >+--- xdrawchem/molecule.h.orig 2017-01-09 12:25:32 UTC >++++ xdrawchem/molecule.h >+@@ -3,6 +3,10 @@ >+ #ifndef MOLECULE_H >+ #define MOLECULE_H >+ >++#include <openbabel/atom.h> >++#include <openbabel/bond.h> >++#include <openbabel/elements.h> >++#include <openbabel/math/vector3.h> >+ #include <openbabel/mol.h> >+ #include <openbabel/obconversion.h> >+ > >Property changes on: science/xdrawchem/files/patch-xdrawchem_molecule.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: science/xdrawchem/files/patch-xdrawchem_molecule__obmol.cpp >=================================================================== >--- science/xdrawchem/files/patch-xdrawchem_molecule__obmol.cpp (nonexistent) >+++ science/xdrawchem/files/patch-xdrawchem_molecule__obmol.cpp (working copy) >@@ -0,0 +1,47 @@ >+--- xdrawchem/molecule_obmol.cpp.orig 2017-01-09 12:25:32 UTC >++++ xdrawchem/molecule_obmol.cpp >+@@ -58,7 +58,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol ) >+ Point point; >+ Text *text; >+ >+- std::vector < OBEdgeBase * >::iterator bonditr; >++ std::vector < OBBond * >::iterator bonditr; >+ std::map < Point, DPoint *, pt_cmp > points; >+ std::map < Point, DPoint *, pt_cmp >::iterator itr; >+ >+@@ -133,7 +133,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol ) >+ int bondorder = bond->GetBondOrder(); >+ >+ //set elements >+- if ( !atom1->IsCarbon() ) { >++ if ( atom1->GetAtomicNum() != 6 ) { >+ QString str( "<element>" ); >+ >+ str += symbol[atom1->GetAtomicNum() - 1]; >+@@ -142,7 +142,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol ) >+ >+ } >+ >+- if ( !atom2->IsCarbon() ) { >++ if ( atom2->GetAtomicNum() != 6 ) { >+ QString str( "<element>" ); >+ >+ str += symbol[atom2->GetAtomicNum() - 1]; >+@@ -155,7 +155,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol ) >+ >+ //label atoms if not Carbon >+ >+- if ( !atom1->IsCarbon() ) { >++ if ( atom1->GetAtomicNum() != 6 ) { >+ >+ text = new Text( r ); >+ QString str = symbol[atom1->GetAtomicNum() - 1]; >+@@ -167,7 +167,7 @@ bool Molecule::convertFromOBMol( OBMol * obmol ) >+ addText( text ); >+ } >+ >+- if ( !atom2->IsCarbon() ) { >++ if ( atom2->GetAtomicNum() != 6 ) { >+ >+ text = new Text( r ); >+ QString str = symbol[atom2->GetAtomicNum() - 1]; > >Property changes on: science/xdrawchem/files/patch-xdrawchem_molecule__obmol.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: science/xdrawchem/files/patch-xdrawchem_molecule__smiles.cpp >=================================================================== >--- science/xdrawchem/files/patch-xdrawchem_molecule__smiles.cpp (nonexistent) >+++ science/xdrawchem/files/patch-xdrawchem_molecule__smiles.cpp (working copy) >@@ -0,0 +1,32 @@ >+--- xdrawchem/molecule_smiles.cpp.orig 2017-01-09 12:25:32 UTC >++++ xdrawchem/molecule_smiles.cpp >+@@ -254,8 +254,6 @@ void Molecule::FromSMILES( QString sm ) >+ >+ DPoint *thisDPoint; >+ >+- OpenBabel::OBElementTable etable; >+- >+ std::vector < OpenBabel::OBNodeBase * >::iterator ait; >+ >+ std::map < OpenBabel::OBAtom *, DPoint * >hashit; >+@@ -265,9 +263,9 @@ void Molecule::FromSMILES( QString sm ) >+ >+ qInfo() << "Adding OBAtom: " << i++ << " of element#: " << >+ thisAtom->GetAtomicNum() << " type: " << >+- etable.GetSymbol(thisAtom->GetAtomicNum()) ; >++ OBElements::GetSymbol(thisAtom->GetAtomicNum()) ; >+ thisDPoint = new DPoint; >+- tmp_element = etable.GetSymbol( thisAtom->GetAtomicNum() ); >++ tmp_element = OBElements::GetSymbol( thisAtom->GetAtomicNum() ); >+ >+ tmp_element_mask = tmp_element; >+ tmp_element_mask.fill( ' ' ); // fix the mask characters >+@@ -292,7 +290,7 @@ void Molecule::FromSMILES( QString sm ) >+ >+ OpenBabel::OBBond * thisBond; >+ >+- std::vector < OpenBabel::OBEdgeBase * >::iterator bit; >++ std::vector < OpenBabel::OBBond * >::iterator bit; >+ for ( thisBond = myMol.BeginBond( bit ); thisBond; thisBond = myMol.NextBond( bit ) ) { >+ addBond( hashit[thisBond->GetBeginAtom()], hashit[thisBond->GetEndAtom()], 1, thisBond->GetBondOrder(), QColor( 0, 0, 0 ), true ); >+ } > >Property changes on: science/xdrawchem/files/patch-xdrawchem_molecule__smiles.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252309
:
221136
|
221137
|
221138
|
221139
| 221140