pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
molsketch: Fix build with openbabel 3.0.0
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Nov 20 19:06:06 2019 +0100
Changeset: 9a725bc110e331bbf46df8fca3b71e5b28bc43c0
Modified Files:
molsketch/distinfo
Added Files:
molsketch/patches/patch-cmake_modules_FindOpenBabel2.cmake
molsketch/patches/patch-obabeliface_obabeliface.cpp
Log Message:
molsketch: Fix build with openbabel 3.0.0
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9a725bc110e331bbf46df8fca3b71e5b28bc43c0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
molsketch/distinfo | 4 +-
.../patch-cmake_modules_FindOpenBabel2.cmake | 24 +++++++++++
.../patches/patch-obabeliface_obabeliface.cpp | 48 ++++++++++++++++++++++
3 files changed, 75 insertions(+), 1 deletion(-)
diffs:
diff --git a/molsketch/distinfo b/molsketch/distinfo
index 3b06404016..d31d2e7e0b 100644
--- a/molsketch/distinfo
+++ b/molsketch/distinfo
@@ -4,4 +4,6 @@ SHA1 (Molsketch-0.6.0-src.tar.gz) = c6292b9cc913374bc748a511c4595a5abb435569
RMD160 (Molsketch-0.6.0-src.tar.gz) = 91322bace06ef1da18512619a7dc7583415af25c
SHA512 (Molsketch-0.6.0-src.tar.gz) = 94e6ae7daff5dd6b17923022873c8891b316a29f7b6cc9bb8eef5b515a376477f5d05d6c746b30696740aa01acb23cbbd9a6c16baa61479da4d2e6f9fd85e2b1
Size (Molsketch-0.6.0-src.tar.gz) = 1680065 bytes
-SHA1 (patch-CMakeLists.txt) = c3d43bd07d443d69edf855f8e47aafdde726ee71
+SHA1 (patch-CMakeLists.txt) = 4fa4b5bbca386cca0e359542f754ffc11099e888
+SHA1 (patch-cmake_modules_FindOpenBabel2.cmake) = 3a6493e0af9d61d62c1f068c30c3d80cda8a2844
+SHA1 (patch-obabeliface_obabeliface.cpp) = 56af584f0cde18951943ba7008c22252186b740d
diff --git a/molsketch/patches/patch-cmake_modules_FindOpenBabel2.cmake b/molsketch/patches/patch-cmake_modules_FindOpenBabel2.cmake
new file mode 100644
index 0000000000..8e2d7f1ae0
--- /dev/null
+++ b/molsketch/patches/patch-cmake_modules_FindOpenBabel2.cmake
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- cmake/modules/FindOpenBabel2.cmake.orig 2019-03-13 20:46:48.000000000 +0000
++++ cmake/modules/FindOpenBabel2.cmake
+@@ -20,15 +20,15 @@ else (OPENBABEL2_INCLUDE_DIR AND OPENBAB
+ # not cached
+ if(NOT WIN32)
+ # set(PKG_CONFIG_PATH ${PKG_CONFIG_PATH} /usr/local)
+- pkg_check_modules(OPENBABEL2 openbabel-2.0)
++ pkg_check_modules(OPENBABEL2 openbabel-3)
+
+- # query pkg-config asking for a openbabel >= 2.1.0
+- exec_program(${PKG_CONFIG_EXECUTABLE} ARGS --atleast-version=2.1.0 openbabel-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
++ # query pkg-config asking for a openbabel >= 3.0.0
++ exec_program(${PKG_CONFIG_EXECUTABLE} ARGS --atleast-version=3.0.0 openbabel-3 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+ if(_return_VALUE STREQUAL "0")
+ set(OPENBABEL_MINI_FOUND TRUE)
+ endif(_return_VALUE STREQUAL "0")
+
+- exec_program(${PKG_CONFIG_EXECUTABLE} ARGS --variable=pkgincludedir openbabel-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _obPkgIncDir )
++ exec_program(${PKG_CONFIG_EXECUTABLE} ARGS --variable=pkgincludedir openbabel-3 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _obPkgIncDir )
+ message(STATUS "Querying include dir: ${_obPkgIncDir}")
+ if (_obPkgIncDir)
+ set(OPENBABEL2_INCLUDE_DIR "${_obPkgIncDir}")
diff --git a/molsketch/patches/patch-obabeliface_obabeliface.cpp b/molsketch/patches/patch-obabeliface_obabeliface.cpp
new file mode 100644
index 0000000000..2f3d24ef18
--- /dev/null
+++ b/molsketch/patches/patch-obabeliface_obabeliface.cpp
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- obabeliface/obabeliface.cpp.orig 2019-03-13 20:46:48.000000000 +0000
++++ obabeliface/obabeliface.cpp
+@@ -48,6 +48,9 @@
+ #include <openbabel/canon.h>
+ #endif
+
++#include <openbabel/obiter.h>
++#include <openbabel/bond.h>
++#include <openbabel/elements.h>
+ #include <openbabel/mol.h>
+ #include <openbabel/data.h>
+ #include <openbabel/obconversion.h>
+@@ -55,20 +58,18 @@
+ #include <openbabel/op.h>
+ #include <openbabel/stereo/stereo.h>
+
+-OpenBabel::OBElementTable eTable ;
+-
+ namespace Molsketch
+ {
+ static const char INCHI_FORMAT[] = "inchi";
+
+ QString number2symbol( int number )
+ {
+- return eTable.GetSymbol(number);
++ return OpenBabel::OBElements::GetSymbol(number);
+ }
+
+ int symbol2number( const QString &symbol )
+ {
+- return eTable.GetAtomicNum(symbol.STRINGCONVERSION) ;
++ return OpenBabel::OBElements::GetAtomicNum(symbol.STRINGCONVERSION) ;
+ }
+
+ OpenBabel::OBMol toOBMolecule(const Molsketch::Molecule* originalMolecule, unsigned short int dim = 2)
+@@ -353,8 +354,8 @@ namespace Molsketch
+ using namespace OpenBabel;
+ // Remove any existing wedge and hash bonds
+ FOR_BONDS_OF_MOL(b, &mol) {
+- b->UnsetWedge();
+- b->UnsetHash();
++ b->SetWedge(false);
++ b->SetHash(false);
+ }
+
+ std::map<OBBond*, enum OBStereo::BondDirection> updown;
Home |
Main Index |
Thread Index |
Old Index