From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 06AF91581EE for ; Mon, 24 Mar 2025 09:16:27 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id E1BB53431B4 for ; Mon, 24 Mar 2025 09:16:26 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 32E8A1104AD; Mon, 24 Mar 2025 09:16:23 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 2DCA71104AD for ; Mon, 24 Mar 2025 09:16:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C858F3431C2 for ; Mon, 24 Mar 2025 09:16:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2FC182822 for ; Mon, 24 Mar 2025 09:16:21 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1742807754.714bdc8b5ba99e156a92fd2f4025a41e157e5a20.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-chemistry/openbabel/openbabel-9999.ebuild X-VCS-Directories: sci-chemistry/openbabel/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 714bdc8b5ba99e156a92fd2f4025a41e157e5a20 X-VCS-Branch: master Date: Mon, 24 Mar 2025 09:16:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 197aa548-5edb-4315-a532-b30a63523a58 X-Archives-Hash: 5c2f1be229ac8ff26290a408a29ed1a7 commit: 714bdc8b5ba99e156a92fd2f4025a41e157e5a20 Author: Nicolas PARLANT parhuet fr> AuthorDate: Thu Mar 13 15:04:29 2025 +0000 Commit: Sam James gentoo org> CommitDate: Mon Mar 24 09:15:54 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=714bdc8b sci-chemistry/openbabel: sync live sync with last version Signed-off-by: Nicolas PARLANT parhuet.fr> Closes: https://github.com/gentoo/gentoo/pull/41087 Signed-off-by: Sam James gentoo.org> sci-chemistry/openbabel/openbabel-9999.ebuild | 164 ++++++++++---------------- 1 file changed, 60 insertions(+), 104 deletions(-) diff --git a/sci-chemistry/openbabel/openbabel-9999.ebuild b/sci-chemistry/openbabel/openbabel-9999.ebuild index fc4d6cab575e..84485db4537d 100644 --- a/sci-chemistry/openbabel/openbabel-9999.ebuild +++ b/sci-chemistry/openbabel/openbabel-9999.ebuild @@ -1,12 +1,12 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) WX_GTK_VER=3.2-gtk3 -inherit cmake desktop flag-o-matic perl-functions python-r1 toolchain-funcs wxwidgets xdg-utils +inherit cmake desktop flag-o-matic perl-functions python-r1 toolchain-funcs wxwidgets xdg DESCRIPTION="Interconverts file formats used in molecular modeling" HOMEPAGE="https://openbabel.org/ https://github.com/openbabel/openbabel/" @@ -17,7 +17,7 @@ if [[ "${PV}" == *9999* ]]; then else if [[ "${PV}" == *_p* ]]; then # eg., openbabel-3.1.1_p20210325 # Set to commit hash - OPENBABEL_COMMIT=08e23f39b0cc39b4eebd937a5a2ffc1a7bac3e1b + OPENBABEL_COMMIT="889c350feb179b43aa43985799910149d4eaa2bc" SRC_URI="https://github.com/${PN}/${PN}/archive/${OPENBABEL_COMMIT}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/${PN}-${OPENBABEL_COMMIT}" else @@ -25,63 +25,49 @@ else SRC_URI="https://github.com/${PN}/${PN}/archive/${MY_P}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/${PN}-${MY_P}" fi - KEYWORDS="amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~ppc-macos" fi -SRC_URI="${SRC_URI} - https://openbabel.org/docs/dev/_static/babel130.png -> ${PN}.png - https://openbabel.org/OBTitle.jpg -> ${PN}.jpg" - +LICENSE="GPL-2" # See src/CMakeLists.txt for LIBRARY_VERSION SLOT="0/7.0.0" -LICENSE="GPL-2" IUSE="cpu_flags_arm_neon cpu_flags_x86_sse2 cpu_flags_x86_sse4_2 doc examples +inchi json minimal openmp perl png python test wxwidgets" - RESTRICT="!test? ( test )" - -# Inaccurate dependency logic upstream REQUIRED_USE=" python? ( ${PYTHON_REQUIRED_USE} ) - test? ( inchi json !minimal wxwidgets ) -" - -BDEPEND=" - dev-lang/perl - doc? ( - app-text/doxygen - dev-texlive/texlive-latex - ) - perl? ( >=dev-lang/swig-2 ) - python? ( >=dev-lang/swig-2 ) - test? ( dev-lang/python ) + test? ( inchi !minimal python? ( json png ) ${PYTHON_REQUIRED_USE} ) " -COMMON_DEPEND=" +RDEPEND=" dev-cpp/eigen:3 - dev-libs/libxml2:2 sys-libs/zlib:= inchi? ( sci-libs/inchi ) json? ( >=dev-libs/rapidjson-1.1.0 ) - png? ( x11-libs/cairo ) + !minimal? ( + dev-libs/libxml2:2 + png? ( x11-libs/cairo ) + ) + perl? ( dev-lang/perl:= ) python? ( ${PYTHON_DEPS} ) wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) " - -DEPEND=" - ${COMMON_DEPEND} - perl? ( dev-lang/perl ) -" - -RDEPEND=" - ${COMMON_DEPEND} - perl? ( - dev-lang/perl:= - !sci-chemistry/openbabel-perl +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/perl + doc? ( + app-text/doxygen + dev-texlive/texlive-latex ) + perl? ( dev-lang/swig ) + python? ( dev-lang/swig ) + test? ( dev-lang/python ) " PATCHES=( - "${FILESDIR}"/openbabel-3.1.1-fix-time-check-cmake.patch + # Set include dir only for global implementation + "${FILESDIR}"/${PN}-3.1.1_p2024-fix_pybind.patch + # prevent installation of examples in /usr/bin + "${FILESDIR}"/${PN}-3.1.1_p2024-fix_examples.patch ) pkg_pretend() { @@ -92,13 +78,13 @@ pkg_setup() { [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp } -prepare_python_bindings() { +gen_python_bindings() { mkdir -p scripts/${EPYTHON} || die # Appends to scripts/CMakeLists.txt, substituting the correct tags, for # each valid python implementation, - cat "${FILESDIR}"/${PN}-python.cmake | \ + cat "${FILESDIR}"/${PN}-python-r2.cmake | \ sed -e "s|@@EPYTHON@@|${EPYTHON}|" \ - -e "s|@@PYTHON_INCUDE_DIR@@|$(python_get_includedir)|" \ + -e "s|@@PYTHON_INCLUDE_DIR@@|$(python_get_includedir)|" \ -e "s|@@PYTHON_LIBS@@|$(python_get_LIBS)|" \ -e "s|@@PYTHON_SITEDIR@@|$(python_get_sitedir)|" >> \ scripts/CMakeLists.txt || die @@ -107,51 +93,10 @@ prepare_python_bindings() { src_prepare() { cmake_src_prepare - if use perl; then - perl_set_version - - sed -e "/\${LIB_INSTALL_DIR}\/auto/s|\${LIB_INSTALL_DIR}|${VENDOR_ARCH}|" \ - -e "/\${LIB_INSTALL_DIR}\/Chemistry/s|\${LIB_INSTALL_DIR}|${VENDOR_ARCH}|" \ - -i scripts/CMakeLists.txt || die - fi - - if use python; then - # Skip the python bindings sections as we'll append our own - sed -e '/^if (PYTHON_BINDINGS)$/s|PYTHON_BINDINGS|false|' \ - -i {scripts,test}/CMakeLists.txt || die - if use test; then - # Problems with testbindings built with -O2 - local test_skip="@unittest.skip('Similar to Issue #2138')" - sed -e "/def testTemplates/s|^| ${test_skip}\\n|" \ - -i test/testbindings.py || die - test_skip="@unittest.skip('Similar to Issue #2246')" - sed -e "/^def test_write_string/s|^|${test_skip}\\n|" \ - -i test/testobconv_writers.py || die - fi - python_foreach_impl prepare_python_bindings - fi - - # Remove dependency automagic - if ! use png; then - sed -e '/^find_package(Cairo/d' -i CMakeLists.txt || die - fi - if ! use wxwidgets; then - sed -e '/^find_package(wxWidgets/d' -i CMakeLists.txt || die - fi - if ! use inchi; then - sed -e '/^else()$/s|else\(\)|elseif\(false\)|' \ - -i cmake/modules/FindInchi.cmake || die - fi - - # Don't install example bins to /usr/bin - if use examples; then - sed -e "/RUNTIME DESTINATION/s|bin|share/doc/${PF}/examples|" \ - -i doc/examples/CMakeLists.txt || die - fi + # Prevent bundled inchi as fallback + rm -r include/inchi || die - # boost is only used if building with gcc-3.x, which isn't supported in - # Gentoo. Still, it shouldn't look for, and include, its headers - sed -e '/find_package(Boost/d' -i {{tools,src}/,}CMakeLists.txt || die + use python && python_foreach_impl gen_python_bindings } src_configure() { @@ -170,36 +115,59 @@ src_configure() { } local mycmakeargs=( + $(cmake_use_find_package png Cairo) + $(cmake_use_find_package wxwidgets wxWidgets) + -DCMAKE_SKIP_RPATH=ON -DBUILD_DOCS=$(usex doc) -DBUILD_EXAMPLES=$(usex examples) -DBUILD_GUI=$(usex wxwidgets) -DENABLE_OPENMP=$(usex openmp) -DENABLE_TESTS=$(usex test) -DMINIMAL_BUILD=$(usex minimal) - # Set this, otherwise it defaults to true and forces WITH_INCHI=true + # All three required to comply w/ useflag and prevent bundled lib -DOPENBABEL_USE_SYSTEM_INCHI=$(usex inchi) + -DADD_INCHI_FORMAT=$(usex inchi) + -DWITH_INCHI=$(usex inchi) -DOPTIMIZE_NATIVE=OFF -DPERL_BINDINGS=$(usex perl) -DPYTHON_BINDINGS=$(usex python) -DRUN_SWIG=$(use_bindings) -DWITH_COORDGEN=false - -DWITH_INCHI=$(usex inchi) -DWITH_JSON=$(usex json) + # MEAPARSER + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON -DWITH_MAEPARSER=false ) + if use perl; then + perl_set_version + mycmakeargs+=( + -DPERL_INSTDIR="${VENDOR_ARCH}" + ) + fi + if use test; then # Help cmake find the python interpreter when dev-lang/python-exec is built # without native-symlinks support. python_setup - mycmakeargs+=( -DPYTHON_EXECUTABLE="${PYTHON}" ) + mycmakeargs+=( + -DPYTHON_EXECUTABLE="${PYTHON}" + ) fi cmake_src_configure } src_test() { - # Wierd deadlock causes system_load to keep rising + local CMAKE_SKIP_TESTS=( + # https://github.com/openbabel/openbabel/issues/2766 + test_align_{4,5} + ) + ! use wxwidgets && CMAKE_SKIP_TESTS+=( + test_tautomer_{22,27} + ) + + # Weird deadlock causes system_load to keep rising cmake_src_test -j1 } @@ -214,9 +182,6 @@ src_install() { for x in doc/*.html; do [[ ${x} != doc/api*.html ]] && dodoc ${x} done - # Rendered in some html pages - newdoc "${DISTDIR}"/${PN}.png babel130.png - newdoc "${DISTDIR}"/${PN}.jpg OBTitle.jpg if use doc; then cmake_src_install docs @@ -240,7 +205,6 @@ src_install() { # Needed by the povray example dosym ../../../../${PN}/${babel_ver}/babel_povray3.inc \ /usr/share/doc/${PF}/examples/povray/babel31.inc - fi if use perl; then @@ -267,14 +231,6 @@ src_install() { if use wxwidgets; then make_desktop_entry obgui "Open Babel" ${PN} - doicon "${DISTDIR}"/${PN}.png + newicon "${S}"/src/GUI/babel.xpm ${PN}.xpm fi } - -pkg_postinst() { - use wxwidgets && xdg_desktop_database_update -} - -pkg_postrm() { - use wxwidgets && xdg_desktop_database_update -}