* [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/files/
@ 2020-02-09 10:57 David Seifert
0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2020-02-09 10:57 UTC (permalink / raw
To: gentoo-commits
commit: 08cd938b3b9365816248b471c0d316c7763a9e72
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 9 10:56:42 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Feb 9 10:56:42 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08cd938b
sci-chemistry/openbabel: Fix broken GCC version detection
Closes: https://bugs.gentoo.org/696066
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>
sci-chemistry/openbabel/files/openbabel-2.4.1-gcc-8.patch | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sci-chemistry/openbabel/files/openbabel-2.4.1-gcc-8.patch b/sci-chemistry/openbabel/files/openbabel-2.4.1-gcc-8.patch
index 632ffa86761..a4aa3947f2e 100644
--- a/sci-chemistry/openbabel/files/openbabel-2.4.1-gcc-8.patch
+++ b/sci-chemistry/openbabel/files/openbabel-2.4.1-gcc-8.patch
@@ -9,7 +9,7 @@ index dc38d1b..801207e 100644
if(CMAKE_COMPILER_IS_GNUCXX)
exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
- string(REGEX MATCH "[34567]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
-+ string(REGEX MATCH "[345678]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
++ string(REGEX MATCH "[3456789]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here:
if (NOT _gcc_version)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/files/
@ 2022-04-15 10:00 Alexey Shvetsov
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Shvetsov @ 2022-04-15 10:00 UTC (permalink / raw
To: gentoo-commits
commit: a7168ef5c9ef4798fe1f7176c8eea95b33e8d103
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 15 10:00:00 2022 +0000
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Fri Apr 15 10:00:38 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7168ef5
sci-chemistry/openbabel: Resurect opebabel[python]
File ${FILESDIR}/openbabel-python.cmake was accidently removed
by astrum in 3b032e0f3d0d837c2faf2051da6257844e7ced55
Closes: https://bugs.gentoo.org/837254
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
.../openbabel/files/openbabel-python.cmake | 104 +++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/sci-chemistry/openbabel/files/openbabel-python.cmake b/sci-chemistry/openbabel/files/openbabel-python.cmake
new file mode 100644
index 000000000000..425b4656a9d2
--- /dev/null
+++ b/sci-chemistry/openbabel/files/openbabel-python.cmake
@@ -0,0 +1,104 @@
+# The following is a cmake fragment taken from scripts/CMakeLists.txt and
+# edited for Gentoo python multibuild compatibility.
+
+if (PYTHON_BINDINGS)
+ # Tags should be edited to reflect the active python implementation
+ set(EPYTHON @@EPYTHON@@)
+ set(PYTHON_INCUDE_DIR @@PYTHON_INCUDE_DIR@@)
+ set(PYTHON_LIBS @@PYTHON_LIBS@@)
+ set(PYTHON_SITEDIR @@PYTHON_SITEDIR@@)
+
+ include_directories(${PYTHON_INCUDE_DIR})
+
+ add_custom_command(
+ OUTPUT ${CMAKE_SOURCE_DIR}/scripts/${EPYTHON}/openbabel-python.cpp ${CMAKE_SOURCE_DIR}/scripts/${EPYTHON}/openbabel.py
+ COMMAND ${SWIG_EXECUTABLE} -python -c++ -small -O -templatereduce -naturalvar -I${CMAKE_SOURCE_DIR}/include -I${CMAKE_BINARY_DIR}/include -o ${CMAKE_SOURCE_DIR}/scripts/${EPYTHON}/openbabel-python.cpp ${eigen_define} -outdir ${CMAKE_SOURCE_DIR}/scripts/${EPYTHON} ${CMAKE_SOURCE_DIR}/scripts/openbabel-python.i
+ MAIN_DEPENDENCY openbabel-python.i
+ VERBATIM
+ )
+
+ configure_file(${CMAKE_SOURCE_DIR}/scripts/python/openbabel/__init__.py.in
+ ${CMAKE_BINARY_DIR}/scripts/${EPYTHON}/openbabel/__init__.py)
+
+ add_library(bindings_python_${EPYTHON} MODULE ${CMAKE_SOURCE_DIR}/scripts/${EPYTHON}/openbabel-python.cpp)
+ target_link_libraries(bindings_python_${EPYTHON} ${PYTHON_LIBS} ${BABEL_LIBRARY})
+
+ set_target_properties(bindings_python_${EPYTHON}
+ PROPERTIES
+ OUTPUT_NAME _openbabel
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/scripts/${EPYTHON}/openbabel
+ PREFIX ""
+ SUFFIX .so )
+
+ add_dependencies(bindings_python_${EPYTHON} openbabel)
+
+ install(TARGETS bindings_python_${EPYTHON}
+ LIBRARY DESTINATION ${PYTHON_SITEDIR}/openbabel
+ COMPONENT bindings_python)
+ install(FILES ${CMAKE_BINARY_DIR}/scripts/${EPYTHON}/openbabel/__init__.py
+ DESTINATION ${PYTHON_SITEDIR}/openbabel
+ COMPONENT bindings_python)
+ install(FILES ${CMAKE_SOURCE_DIR}/scripts/${EPYTHON}/openbabel.py
+ DESTINATION ${PYTHON_SITEDIR}/openbabel
+ COMPONENT bindings_python)
+ install(FILES ${CMAKE_SOURCE_DIR}/scripts/python/openbabel/pybel.py
+ DESTINATION ${PYTHON_SITEDIR}/openbabel
+ COMPONENT bindings_python)
+
+ if (ENABLE_TESTS)
+ # Make sure all module files are together in the same directory for testing
+ add_custom_command(TARGET bindings_python_${EPYTHON} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/scripts/${EPYTHON}/openbabel.py ${CMAKE_BINARY_DIR}/scripts/${EPYTHON}/openbabel/
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/scripts/python/openbabel/pybel.py ${CMAKE_BINARY_DIR}/scripts/${EPYTHON}/openbabel/)
+ set(TEST_SOURCE_DIR ${CMAKE_SOURCE_DIR}/test)
+ # define TESTDATADIR for tests that need input files
+ add_definitions(-DTESTDATADIR="${TEST_SOURCE_DIR}/files/")
+ # define FORMATDIR for location of format plugin binaries
+ set(FORMATDIR "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/")
+ add_definitions(-DFORMATDIR="${FORMATDIR}/")
+ include_directories(${TEST_SOURCE_DIR})
+
+ # The macro is modified from cmake/modules/UsePythonTest.cmake
+ MACRO(ADD_PYTHON_TEST TESTNAME FILENAME)
+ GET_SOURCE_FILE_PROPERTY(loc ${FILENAME} LOCATION)
+ STRING(REGEX REPLACE ";" " " wo_semicolumn "${ARGN}")
+ FILE(WRITE ${CMAKE_BINARY_DIR}/test/${TESTNAME}.cmake
+"
+ MESSAGE(\"${PYTHONPATH}\")
+ EXECUTE_PROCESS(
+ COMMAND ${EPYTHON} ${loc} ${wo_semicolumn}
+ RESULT_VARIABLE import_res
+ OUTPUT_VARIABLE import_output
+ ERROR_VARIABLE import_output
+ )
+
+ # Pass the output back to ctest
+ IF(import_output)
+ MESSAGE(\${import_output})
+ ENDIF(import_output)
+ IF(import_res)
+ MESSAGE(SEND_ERROR \${import_res})
+ ENDIF(import_res)
+"
+ )
+ ADD_TEST(${TESTNAME} ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/test/${TESTNAME}.cmake)
+ ENDMACRO(ADD_PYTHON_TEST)
+
+ set(pybindtests
+ bindings
+ _pybel
+ example
+ obconv_writers
+ cdjsonformat
+ pcjsonformat
+ roundtrip
+ )
+ foreach(pybindtest ${pybindtests})
+ ADD_PYTHON_TEST(pybindtest_${pybindtest}_${EPYTHON} ${TEST_SOURCE_DIR}/test${pybindtest}.py)
+ set_tests_properties(pybindtest_${pybindtest}_${EPYTHON} PROPERTIES
+ ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/scripts/${EPYTHON}:${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX};LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/scripts/${EPYTHON}:${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}:\$ENV{LD_LIBRARY_PATH};BABEL_LIBDIR=${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}/;BABEL_DATADIR=${CMAKE_SOURCE_DIR}/data"
+ FAIL_REGULAR_EXPRESSION "ERROR;FAIL;Test failed"
+ )
+ endforeach(pybindtest ${pybindtests})
+ endif (ENABLE_TESTS)
+endif(PYTHON_BINDINGS)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/files/
@ 2025-06-26 19:55 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2025-06-26 19:55 UTC (permalink / raw
To: gentoo-commits
commit: f85e12f7003e586656accc5f0dfc06b94d3e2e16
Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Sun Jun 8 08:10:19 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 26 19:54:30 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f85e12f7
sci-chemistry/openbabel: bump cmake_min to avoid QA-notice
QA-notice is a false positive because this CMakeLists.txt is just an
example never used.
Amend the patch in tree to sync with upstream-PR and avoid the
workaround.
Closes: https://bugs.gentoo.org/957439
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/42496
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/openbabel-3.1.1_p2024-cmake4.patch | 48 ++++++++++++++++++----
1 file changed, 39 insertions(+), 9 deletions(-)
diff --git a/sci-chemistry/openbabel/files/openbabel-3.1.1_p2024-cmake4.patch b/sci-chemistry/openbabel/files/openbabel-3.1.1_p2024-cmake4.patch
index a9d5515186f3..822213a7bddb 100644
--- a/sci-chemistry/openbabel/files/openbabel-3.1.1_p2024-cmake4.patch
+++ b/sci-chemistry/openbabel/files/openbabel-3.1.1_p2024-cmake4.patch
@@ -1,13 +1,30 @@
https://github.com/openbabel/openbabel/pull/2784.patch
-Compat cmake-4
-Delete CMP0042 as OLD behavior is removed and policy is only used with OSX
-Set ENABLE_EXPORTS for test_runner (OLD behavior for CMP0065 is removed in cmake4)
+From fda825d390af8b5eaf79d7b7c39c19ab5ce317ac Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
+Date: Wed, 26 Mar 2025 10:24:42 +0000
+Subject: [PATCH] cmake4 compat :
+
+* up cmake_minimum_required to 3.10
+* delete CMP0042 because OLD behavior is removed in cmake-4 and
+is no longer used.
+* set ENABLE_EXPORTS for test_runner (OLD behavior for CMP0065 is removed
+in cmake4)
+
+Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
+---
+ CMakeLists.txt | 7 ++-----
+ doc/examples/static_executable/CMakeLists.txt | 2 +-
+ scripts/CMakeLists.txt | 2 +-
+ test/CMakeLists.txt | 1 +
+ 4 files changed, 5 insertions(+), 7 deletions(-)
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9d2a9f1..0b72e76 100644
+index 9d2a9f143e..f8440e412e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
- # Please ensure that any changes remain compliant with 3.1.
+-# Please ensure that any changes remain compliant with 3.1.
++# Please ensure that any changes remain compliant with 3.10.
if(NOT EMBED_OPENBABEL)
- cmake_minimum_required(VERSION 3.1)
+ cmake_minimum_required(VERSION 3.10)
@@ -15,17 +32,30 @@ index 9d2a9f1..0b72e76 100644
project(openbabel)
@@ -10,9 +10,6 @@ set (CMAKE_CXX_STANDARD 11)
-
+
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
- if(POLICY CMP0042)
- cmake_policy(SET CMP0042 OLD)
- endif()
endif()
-
+
include (CheckCXXCompilerFlag)
+diff --git a/doc/examples/static_executable/CMakeLists.txt b/doc/examples/static_executable/CMakeLists.txt
+index 0ed21beaaf..63dae2a468 100644
+--- a/doc/examples/static_executable/CMakeLists.txt
++++ b/doc/examples/static_executable/CMakeLists.txt
+@@ -25,7 +25,7 @@
+ #
+
+ # This line is required for cmake backwards compatibility.
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 3.10)
+
+ # Name of your project
+ project(myproject)
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
-index 792e459..eafda66 100644
+index 792e4592d0..eafda66c5a 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -1,4 +1,4 @@
@@ -35,7 +65,7 @@ index 792e459..eafda66 100644
set(SOVERSION 4)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index 2ecf0db..280eac4 100644
+index 2ecf0dbe22..280eac471f 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -152,6 +152,7 @@ endif()
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-26 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-26 19:55 [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2022-04-15 10:00 Alexey Shvetsov
2020-02-09 10:57 David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox