gentoo-ebuilds/sci-chemistry/molsketch/molsketch-0.8.1.ebuild
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

44 lines
1.1 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake optfeature xdg
DESCRIPTION="Drawing tool for 2D molecular structures"
HOMEPAGE="https://molsketch.sourceforge.io/ https://github.com/hvennekate/Molsketch/"
SRC_URI="https://downloads.sourceforge.net/project/${PN}/Molsketch/${P^}-src.tar.gz"
S="${WORKDIR}/${P^}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="openbabel"
DEPEND="
dev-qt/qtbase:6[gui,network,widgets]
dev-qt/qtsvg:6
openbabel? ( >=sci-chemistry/openbabel-3:= )
"
RDEPEND="${DEPEND}"
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() {
local mycmakeargs=(
-DMSK_OBABELIFACE="$(usex openbabel)"
-DMSK_QT6=ON
)
cmake_src_configure
}
pkg_postinst() {
xdg_pkg_postinst
use openbabel && optfeature "wikiquery support through openbabel inchi interface" "sci-chemistry/openbabel[inchi]"
}