diff -Nurd xdrawchem-1.10.2.1.orig/README-docs.txt xdrawchem-1.10.2.1/README-docs.txt --- xdrawchem-1.10.2.1.orig/README-docs.txt 1969-12-31 19:00:00.000000000 -0500 +++ xdrawchem-1.10.2.1/README-docs.txt 2021-03-06 17:05:14.000000000 -0500 @@ -0,0 +1,3 @@ +Documentation is available in the About and Help menus. You can also find +copies of those files in the Contents/Resource/doc directory inside the +%n.app bundle. diff -Nurd xdrawchem-1.10.2.1.orig/xdrawchem/ioiface.cpp xdrawchem-1.10.2.1/xdrawchem/ioiface.cpp --- xdrawchem-1.10.2.1.orig/xdrawchem/ioiface.cpp 2017-01-09 07:25:32.000000000 -0500 +++ xdrawchem-1.10.2.1/xdrawchem/ioiface.cpp 2021-03-07 22:57:01.000000000 -0500 @@ -193,7 +193,7 @@ int bondorder = bond->GetBondOrder(); //set elements - if ( !atom1->IsCarbon() ) { + if (atom1->GetAtomicNum() != 6) { QString str( "" ); str += IOIface::symbol[atom1->GetAtomicNum() - 1]; str += ""; @@ -201,7 +201,7 @@ } - if ( !atom2->IsCarbon() ) { + if (atom2->GetAtomicNum() != 6) { QString str( "" ); str += IOIface::symbol[atom2->GetAtomicNum() - 1]; @@ -216,7 +216,7 @@ //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 @@ //qDebug() << "ioiface(1) text:" << str; } - if ( !atom2->IsCarbon() ) { + if (atom2->GetAtomicNum() != 6) { text = new Text( chemdata->getRender2D() ); QString str = IOIface::symbol[atom2->GetAtomicNum() - 1]; diff -Nurd xdrawchem-1.10.2.1.orig/xdrawchem/ioiface.h xdrawchem-1.10.2.1/xdrawchem/ioiface.h --- xdrawchem-1.10.2.1.orig/xdrawchem/ioiface.h 2017-01-09 07:25:32.000000000 -0500 +++ xdrawchem-1.10.2.1/xdrawchem/ioiface.h 2021-03-07 22:57:02.000000000 -0500 @@ -20,6 +20,8 @@ #include "chemdata.h" +#include +#include #include using namespace OpenBabel; diff -Nurd xdrawchem-1.10.2.1.orig/xdrawchem/molecule.h xdrawchem-1.10.2.1/xdrawchem/molecule.h --- xdrawchem-1.10.2.1.orig/xdrawchem/molecule.h 2017-01-09 07:25:32.000000000 -0500 +++ xdrawchem-1.10.2.1/xdrawchem/molecule.h 2021-03-07 23:05:16.000000000 -0500 @@ -3,6 +3,10 @@ #ifndef MOLECULE_H #define MOLECULE_H +#include +#include +#include +#include #include #include diff -Nurd xdrawchem-1.10.2.1.orig/xdrawchem/molecule_obmol.cpp xdrawchem-1.10.2.1/xdrawchem/molecule_obmol.cpp --- xdrawchem-1.10.2.1.orig/xdrawchem/molecule_obmol.cpp 2017-01-09 07:25:32.000000000 -0500 +++ xdrawchem-1.10.2.1/xdrawchem/molecule_obmol.cpp 2021-03-07 23:18:40.000000000 -0500 @@ -58,7 +58,7 @@ Point point; Text *text; - std::vector < OBEdgeBase * >::iterator bonditr; + std::vector::iterator bonditr; std::map < Point, DPoint *, pt_cmp > points; std::map < Point, DPoint *, pt_cmp >::iterator itr; @@ -133,7 +133,7 @@ int bondorder = bond->GetBondOrder(); //set elements - if ( !atom1->IsCarbon() ) { + if (atom1->GetAtomicNum() != 6) { QString str( "" ); str += symbol[atom1->GetAtomicNum() - 1]; @@ -142,7 +142,7 @@ } - if ( !atom2->IsCarbon() ) { + if (atom2->GetAtomicNum() != 6) { QString str( "" ); str += symbol[atom2->GetAtomicNum() - 1]; @@ -155,7 +155,7 @@ //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 @@ addText( text ); } - if ( !atom2->IsCarbon() ) { + if (atom2->GetAtomicNum() != 6) { text = new Text( r ); QString str = symbol[atom2->GetAtomicNum() - 1]; diff -Nurd xdrawchem-1.10.2.1.orig/xdrawchem/molecule_smiles.cpp xdrawchem-1.10.2.1/xdrawchem/molecule_smiles.cpp --- xdrawchem-1.10.2.1.orig/xdrawchem/molecule_smiles.cpp 2017-01-09 07:25:32.000000000 -0500 +++ xdrawchem-1.10.2.1/xdrawchem/molecule_smiles.cpp 2021-03-07 23:22:55.000000000 -0500 @@ -254,7 +254,6 @@ DPoint *thisDPoint; - OpenBabel::OBElementTable etable; std::vector < OpenBabel::OBNodeBase * >::iterator ait; @@ -265,9 +264,9 @@ 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 +291,7 @@ OpenBabel::OBBond * thisBond; - std::vector < OpenBabel::OBEdgeBase * >::iterator bit; + std::vector::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 ); } diff -Nurd xdrawchem-1.10.2.1.orig/xdrawchem.pro xdrawchem-1.10.2.1/xdrawchem.pro --- xdrawchem-1.10.2.1.orig/xdrawchem.pro 2017-01-09 07:25:32.000000000 -0500 +++ xdrawchem-1.10.2.1/xdrawchem.pro 2021-03-06 15:36:01.000000000 -0500 @@ -2,27 +2,8 @@ TARGET = xdrawchem # edit to match your OB install -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 -LIBS += -lopenbabel -} -exists(/Developer/openbabel-2.4.1/include/openbabel/mol.h) { -INCLUDEPATH += /Developer/openbabel-2.4.1/include -LIBS += -L/Developer/openbabel-2.4.1/lib/Debug -lopenbabel -} -# exit if openbabel wasn't found -contains( LIBS, -lopenbabel ) { -} else { -error(OpenBabel was not found. Edit xdrawchem.pro and add valid include and lib values) -# if you get this error, comment the above with #, uncomment the variables below, and set -# the paths to match your OpenBabel install -#INCLUDEPATH += /usr/local/include/openbabel-2.0 -#LIBS += -lopenbabel -} +CONFIG += link_pkgconfig +PKGCONFIG += openbabel-3 # set PREFIX if not set (it is set when building RPM) isEmpty(PREFIX) { PREFIX = /usr/local