gentoo-ebuilds/sci-chemistry/molsketch/files/molsketch-0.8.1-obabel_namespace.patch
Nicolas PARLANT c346a2a598
sci-chemistry/molsketch: fix build with openbabel-3.1.1_p20241221
it occurs only with openbabel-3.1.1_p20241221, because
openbabel has changed namespaces :
a0ec8c9655

Closes: https://bugs.gentoo.org/955047
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/41831
Closes: https://github.com/gentoo/gentoo/pull/41831
Signed-off-by: Sam James <sam@gentoo.org>
2025-04-29 20:11:34 +01:00

37 lines
1.5 KiB
Diff

https://github.com/hvennekate/Molsketch/pull/17.patch
From b3ecbef4766591dea4f8349c70f14cfb67d7400b Mon Sep 17 00:00:00 2001
From: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Date: Mon, 28 Apr 2025 19:25:24 +0000
Subject: [PATCH] fix namespace for obabeliface
openbabel has changed namespaces :
https://github.com/openbabel/openbabel/commit/a0ec8c96554d4ee4f9bf80b00165b1ce554c8621
> Molsketch-0.8.1/obabeliface/obabeliface.cpp:199:5: error: use of undeclared identifier 'impl'; did you mean 'OpenBabel::impl'?
> 199 | FOR_ATOMS_OF_MOL(obatom, molecule) {
> | ^
> /usr/include/openbabel3/openbabel/obiter.h:417:49: note: expanded from macro 'FOR_ATOMS_OF_MOL'
> 417 | #define FOR_ATOMS_OF_MOL(a,m) for (auto a : impl::MolGetAtoms(m))
> | ^
> /usr/include/openbabel3/openbabel/obiter.h:401:13: note: 'OpenBabel::impl' declared here
> 401 | namespace impl {
> | ^
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
---
obabeliface/obabeliface.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/obabeliface/obabeliface.cpp b/obabeliface/obabeliface.cpp
index 029f4e3..fad553a 100644
--- a/obabeliface/obabeliface.cpp
+++ b/obabeliface/obabeliface.cpp
@@ -190,6 +190,7 @@ namespace Molsketch
// TODO should be const, but OpenBabel iterator methods do not support const
bool hasCoordinates(OpenBabel::OBMol &molecule) {
+ using namespace OpenBabel;
FOR_ATOMS_OF_MOL(obatom, molecule) {
if (obatom->GetVector() != OpenBabel::VZero)
return true;