gentoo-ebuilds/sci-chemistry/openbabel/files/openbabel-3.1.1_p2024-fix_pybind.patch
Nicolas PARLANT 203d57887f
sci-chemistry/openbabel: add 3.1.1_p20241221
New snapshot to include in particular more json features.

deps :
  libxml2/cairo are not required with minimal
  rm openbabel-perl

replace sed :
  perl LIB_INSTALL_DIR (no-op) -> set PERL_INSTDIR
  PYTHON_BINDINGS (no-op for test/CMakeLists.txt due to a typo) -> not required
  examples RUNTIME_DESTINATION -> patch with CMAKE_INSTALL_DOCDIR
  find_package :
     use DISABLE_FIND_PACKAGE for Cairo(png), wxWidgets(wxwidgets) and Boost
     use ADD_INCHI_FORMAT to prevent using bundled inchi

openbabel-python-cmake :
  use target_include_directories instead of include_directories to prevent
  including all python_targets at the same time for each implementation.

tests :
  skip two more tests with known issues
  rm -O2 exclusions introduced with 1fce6e91e6
  It seems fixed now (checked with -O2/clang/lto/gcc15/+-openmp/+-cpu_flags).
  This will require investigation if it reappears.

add py3.13 (tests passed)

Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Signed-off-by: Sam James <sam@gentoo.org>
2025-03-24 09:15:54 +00:00

25 lines
1.6 KiB
Diff

--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -69,13 +69,9 @@
if (DO_PYTHON_BINDINGS)
- include_directories(
- ${PYTHON_INCLUDE_PATH}
- )
-
if(RUN_SWIG)
add_custom_command(OUTPUT ${openbabel_SOURCE_DIR}/scripts/python/openbabel/openbabel-python.cpp ${openbabel_SOURCE_DIR}/scripts/python/openbabel/openbabel.py
- COMMAND ${SWIG_EXECUTABLE} -python -c++ ${doxygen_switch} -small -O -templatereduce -naturalvar -I${openbabel_SOURCE_DIR}/include -I${openbabel_BINARY_DIR}/include -o ${openbabel_SOURCE_DIR}/scripts/python/openbabel/openbabel-python.cpp ${eigen_define} -outdir ${openbabel_SOURCE_DIR}/scripts/python/openbabel ${openbabel_SOURCE_DIR}/scripts/openbabel-python.i
+ COMMAND ${SWIG_EXECUTABLE} -python -c++ ${doxygen_switch} -small -O -templatereduce -naturalvar -I${PYTHON_INCLUDE_PATH} -I${openbabel_SOURCE_DIR}/include -I${openbabel_BINARY_DIR}/include -o ${openbabel_SOURCE_DIR}/scripts/python/openbabel/openbabel-python.cpp ${eigen_define} -outdir ${openbabel_SOURCE_DIR}/scripts/python/openbabel ${openbabel_SOURCE_DIR}/scripts/openbabel-python.i
MAIN_DEPENDENCY openbabel-python.i
VERBATIM
)
@@ -84,6 +80,7 @@
configure_file(${openbabel_SOURCE_DIR}/scripts/python/openbabel/__init__.py.in
${openbabel_SOURCE_DIR}/scripts/python/openbabel/__init__.py)
add_library(bindings_python MODULE ${openbabel_SOURCE_DIR}/scripts/python/openbabel/openbabel-python.cpp)
+ target_include_directories(bindings_python PRIVATE ${PYTHON_INCLUDE_PATH})
if(APPLE)
# Don't link against Python library on Mac