commit: c346a2a598fef675a7de2200f16b186df7ac0a71 Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr> AuthorDate: Mon Apr 28 20:36:00 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Apr 29 19:11:34 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c346a2a5
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 : https://github.com/openbabel/openbabel/commit/a0ec8c96554d4ee4f9bf80b00165b1ce554c8621 Closes: https://bugs.gentoo.org/955047 Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> 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 <AT> gentoo.org> .../files/molsketch-0.8.1-obabel_namespace.patch | 37 ++++++++++++++++++++++ sci-chemistry/molsketch/molsketch-0.8.1.ebuild | 2 ++ 2 files changed, 39 insertions(+) diff --git a/sci-chemistry/molsketch/files/molsketch-0.8.1-obabel_namespace.patch b/sci-chemistry/molsketch/files/molsketch-0.8.1-obabel_namespace.patch new file mode 100644 index 000000000000..2fb1a8412eae --- /dev/null +++ b/sci-chemistry/molsketch/files/molsketch-0.8.1-obabel_namespace.patch @@ -0,0 +1,37 @@ +https://github.com/hvennekate/Molsketch/pull/17.patch + +From b3ecbef4766591dea4f8349c70f14cfb67d7400b Mon Sep 17 00:00:00 2001 +From: Nicolas PARLANT <[email protected]> +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 <[email protected]> +--- + 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; diff --git a/sci-chemistry/molsketch/molsketch-0.8.1.ebuild b/sci-chemistry/molsketch/molsketch-0.8.1.ebuild index c0580aff5233..65457e3c0fb1 100644 --- a/sci-chemistry/molsketch/molsketch-0.8.1.ebuild +++ b/sci-chemistry/molsketch/molsketch-0.8.1.ebuild @@ -25,6 +25,8 @@ BDEPEND="dev-qt/qttools:6[linguist]" PATCHES=( "${FILESDIR}"/${PN}-0.3.0-_DEFAULT_SOURCE.patch + # bug #955047, https://github.com/hvennekate/Molsketch/pull/17 + "${FILESDIR}"/${PN}-0.8.1-obabel_namespace.patch ) src_configure() {
