summaryrefslogtreecommitdiff
path: root/sci-chemistry/openbabel-python
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-chemistry/openbabel-python
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-chemistry/openbabel-python')
-rw-r--r--sci-chemistry/openbabel-python/Manifest11
-rw-r--r--sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-bindings_only.patch209
-rw-r--r--sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-gcc-6_and_7-backport.patch13
-rw-r--r--sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-swig-3.0.3.patch97
-rw-r--r--sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-testpybel.patch28
-rw-r--r--sci-chemistry/openbabel-python/metadata.xml18
-rw-r--r--sci-chemistry/openbabel-python/openbabel-python-2.3.2.ebuild93
-rw-r--r--sci-chemistry/openbabel-python/openbabel-python-2.4.1-r1.ebuild91
8 files changed, 560 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-python/Manifest b/sci-chemistry/openbabel-python/Manifest
new file mode 100644
index 000000000000..725c5dbc48dc
--- /dev/null
+++ b/sci-chemistry/openbabel-python/Manifest
@@ -0,0 +1,11 @@
+AUX openbabel-python-2.3.2-bindings_only.patch 8843 SHA256 dc6eec80f84e851a7dabad19c32a69179ccb747ddf7de3ba321a2ac40216105f SHA512 c933ac9f0c2370ceb305ebb831ab81e3d66dc9233d175f2b31f0e6ca0cc91dce591c46478ef5d5ccc118cfa8f6d82459331d5e7885bffa904ad486215c657333 WHIRLPOOL addaba85bee01eaa5342fbc55c8dde5ce27fb126b2e07f0a16d3b8ababc3593f7f5ba4d679b0112a6d13cf69a80b3f98f4dbff16badcb95a6c6650f289b6e17e
+AUX openbabel-python-2.3.2-gcc-6_and_7-backport.patch 635 SHA256 49f9fc47d1c864d501a266c4d1d7251d5921ce64f1de33a7679d369938bd8490 SHA512 e1b4402f34d01ced5b4caaa184b4e5544cf47893cfe7958054052b05a57dc34b4d44239a212c7d909f29b9366b83b6df74993f844a20f23748c01272ec093081 WHIRLPOOL 8789037e71722ee28d8769eadc574edf2d7d80e8e01f6a8475b18fd4ed0314757bd02854eacf375f7c23ca20b9ec8cc9a40797b51ad3fe64921440549a49cd3d
+AUX openbabel-python-2.3.2-swig-3.0.3.patch 4138 SHA256 d4aa44552155f16d43fb086c2cd35a944d5d9ff35ae97bb6e632d9772566bfe8 SHA512 ac454d8f8a8e6d8942d493ee648ad190e275d616bea99cc16bede97e00733d4aa6522cf43a80707b3aa59a78ba68731ccdf748beb76fb2b69267b3b060a5e96f WHIRLPOOL 1a758196daad39b1ebb01d13a26256ccfdefee086676b476e4812206aa65a32fb494fe91b0f6cc64ba3233ccdf747752f97786c261d8f679c9472a4fd4f898cd
+AUX openbabel-python-2.3.2-testpybel.patch 1105 SHA256 d39e2530c31f074aa2860f0dea4845acbb3731004491e409169d0c3689682114 SHA512 65df0351fc626ba9d88c06c7f9e84e5707585f302baea4b4885faa3b190c29483b0016d7390e23c2d2444e83c39ad525ba52d7b8d22faed89d82beb480c5b469 WHIRLPOOL 34be3e8bf7322f1c03b4c55d87b4b46d51603ace4a6f1a1524394c115b8ff731125ed0c55132248029718a0519d7d9a96ff8fb56db430d9ca3bc95014d7915a1
+DIST openbabel-2.3.2.tar.gz 20509105 SHA256 4eaca26679aa6cc85ebf96af19191472ac63ca442c36b0427b369c3a25705188 SHA512 d0e1f8b758ffdd65ec6c31d988bffe3279355e286ce69fad12c5905b3b832e2b73ee95b1061b1576aba1ee9fe4da5e31ec30350c473be17493c657dc80caf919 WHIRLPOOL 74eff18b73d24c8f702e5573a58ba6afba8402e9ce8782de95dc0568575a7d2d632dbc8e8a98b3cd25efdfa7379494f7dcd449342c81ddf73f42a387bce77aaa
+DIST openbabel-2.4.1.tar.gz 11618304 SHA256 204136582cdfe51d792000b20202de8950218d617fd9c6e18cee36706a376dfc SHA512 427e678f0a911bd27b9a8a05e60b6e09f113be4e5dd180daaf80c28d06368e52b57501261755ab3817a8d31f2754db24471fd0ceee706d029386d6f70800e9c6 WHIRLPOOL 88e333b47118449e1edba2b164af77ac7fac9c60e2965b5d6657ba8cf981845f49f6bac9427515ebbdf62668fddf38ae2422c4e107b98df46922c5bba860b216
+EBUILD openbabel-python-2.3.2.ebuild 2249 SHA256 e5ffb874d14e0d8a8f663b0989849c42bd7e2ed54d6f13e40a73080858444c11 SHA512 5cda71fe2a54d46eb8d7d68e03c0791866172466a54769a032a03e3ab7327ad3c5dac96a937416dd576635528f6b1c0602f753fc13a3f44e8d79579620279fe7 WHIRLPOOL d4d6ca8a48024d5e905c0ff0a06da7c9687843184f414bc4e1338fb6168dd4abf7c451e09a6c926271269b08881747623105e6a43bb3c637ca253e6fac91467b
+EBUILD openbabel-python-2.4.1-r1.ebuild 2175 SHA256 d496dabb0855ae8de3e3cbcff4e50c0fb6672b38f777580b4ddda24642e244ee SHA512 a4174ac5fabedd91719a7adba9bfac803ca231e223243a32eff6bfd98a95d6d21e0ab7c9ac0457f43b064866bb5876fb684449f6389764afa2365a83aa749ae2 WHIRLPOOL f3f09cc9f56ca936c6125d72bb623ff1f7351ebec91387df3feb43e1211d5e9eb40ab758f08c2ea504dc0c8d7e0ce41bc320453614466cc61bf988f19aa14c69
+MISC ChangeLog 3304 SHA256 09a73e802e749856c8ae4f694d330bb08f74c5028688e251fdc3e3ae379d4916 SHA512 72f3630b79ebed432388c9b60e3f547b64b4dc5e3716bc5281c3e4ca155540d796a5218dff38059fe2b6f9c79688fbe78a7b534cdd48d882170da274fde99b72 WHIRLPOOL 1a1fb6ac98ea62a630fc799aadd66d4a8ddb264855ce8fd48c9abb43f7db6e6d48a71f0ab6e1362d7d5e8b2a866fc1ece189b46913222806b4ddfbd5b0480bc4
+MISC ChangeLog-2015 4216 SHA256 93e5ef940fc808b25b5225faab8e21f4e37f53dd71a0446062e0bf7db9e8ed9c SHA512 46fe186c7e5f4d5155d7dcc3953c1db2e6fa6c8fc8731b1cc18333f1bd9ddd90c00b6449aa858b2aa82449246a71ae9abc78b329f4644afdafe5f4b7b7e74868 WHIRLPOOL 21239983513f5f6b68a5eff420742d15079e4c6c1c8983195eb8fd0b35d7d1fbfde180c63165b70c11e9f0bd83ab5aa6bdb88c0dca01b5681e5988e386ece91f
+MISC metadata.xml 737 SHA256 a0d128cb29b316c9a99d6ae6e1a5a1ff153d957514619f375cceb37fda483cb4 SHA512 7ff97ef3f6752a8fed578676aa2cb9706b7d68e31ee22d26e90d4bbb01c10ff410b66da20a91b078293add3bcb3a3711ad180d5174368e0d588ea718ad297d7e WHIRLPOOL 39cf569c8e097bff03a0d2aa32690203db72c13b913fcf40b1f7d1e87fb7c15d5a326bb7930812e7c8a79fae5c5a96a5685264de9ffab3df7c1d6705c4a173ab
diff --git a/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-bindings_only.patch b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-bindings_only.patch
new file mode 100644
index 000000000000..2e776b4029ec
--- /dev/null
+++ b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-bindings_only.patch
@@ -0,0 +1,209 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 449f4b4..1c9ad00 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -252,7 +252,8 @@ if(NOT MSVC)
+ }
+ " SCANDIR_NEEDS_CONST)
+
+- set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}")
++ set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}"
++ CACHE PATH "Set to system install for bindings only build")
+ add_definitions(-DOB_MODULE_PATH="\\"${OB_MODULE_PATH}\\"")
+
+ # Add some visibility support when using GCC
+@@ -380,7 +381,8 @@ if(UNIX AND BUILD_SHARED)
+ if(APPLE)
+ set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
+ else()
+- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
++ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}"
++ CACHE PATH "Set sane rpath")
+ set(CMAKE_SKIP_BUILD_RPATH FALSE)
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+@@ -477,6 +479,13 @@ endif()
+ # Should the language bindings be regenereted?
+ option(RUN_SWIG "Generate language bindings with SWIG" OFF)
+
++# Build bindings only
++option(BINDINGS_ONLY "Build bindings only" OFF)
++
++# Point to library if building bindings only
++set(BABEL_SYSTEM_LIBRARY ${BABEL_LIBRARY}
++ CACHE PATH "Point to openbabel library if building bindings only")
++
+ # Should all bindings be built?
+ option(ALL_BINDINGS "Build all languages bindings" OFF)
+
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index 16e9000..ecd2295 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -92,16 +92,30 @@ if (DO_PYTHON_BINDINGS)
+ endif(RUN_SWIG)
+
+ add_library(bindings_python MODULE ${openbabel_SOURCE_DIR}/scripts/python/openbabel-python.cpp)
+- target_link_libraries(bindings_python ${PYTHON_LIBRARIES} ${BABEL_LIBRARY})
++ if(BINDINGS_ONLY)
++ target_link_libraries(bindings_python ${PYTHON_LIBRARIES} ${BABEL_SYSTEM_LIBRARY})
++ else()
++ target_link_libraries(bindings_python ${PYTHON_LIBRARIES} ${BABEL_LIBRARY})
++ endif()
++
+ if(NOT WIN32)
+ set_target_properties(bindings_python PROPERTIES
+ OUTPUT_NAME _openbabel
+ PREFIX ""
+ SUFFIX .so )
+- add_dependencies(bindings_python openbabel)
+- install(TARGETS bindings_python LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+- install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py DESTINATION ${LIB_INSTALL_DIR})
+- install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py DESTINATION ${LIB_INSTALL_DIR})
++ if(NOT BINDINGS_ONLY)
++ add_dependencies(bindings_python openbabel)
++ endif()
++
++ install(TARGETS bindings_python
++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT bindings_python)
++ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py
++ DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT bindings_python)
++ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py
++ DESTINATION ${LIB_INSTALL_DIR}
++ COMPONENT bindings_python)
+ else(NOT WIN32)
+ set_target_properties(bindings_python PROPERTIES
+ OUTPUT_NAME _openbabel
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 7841782..6f3495f 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -2,7 +2,12 @@
+ add_definitions(-DTESTDATADIR="\\"${CMAKE_SOURCE_DIR}/test/files/\\"")
+
+ # define FORMATDIR for location of format plugin binaries
+-add_definitions(-DFORMATDIR="\\"${openbabel_BINARY_DIR}/lib/\\"")
++if(BINDINGS_ONLY)
++ set(FORMATDIR "${OB_MODULE_PATH}/")
++else()
++ set(FORMATDIR "${openbabel_BINARY_DIR}/lib${LIB_SUFFIX}/")
++endif()
++add_definitions(-DFORMATDIR="\\"${FORMATDIR}/\\"")
+
+ ###########################################################
+ # new tests using obtest.h
+@@ -89,7 +94,7 @@ foreach(test ${tests})
+ add_test(${test}_Test ${TEST_PATH}/test_${test})
+ set_tests_properties(${test}_Test PROPERTIES
+ FAIL_REGULAR_EXPRESSION "ERROR;FAIL;Test failed"
+- ENVIRONMENT "BABEL_DATADIR=${CMAKE_SOURCE_DIR}/data;LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib")
++ ENVIRONMENT "BABEL_DATADIR=${CMAKE_SOURCE_DIR}/data;LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}")
+ endforeach(test ${tests})
+
+ ############################################################
+@@ -152,7 +157,7 @@ if(WITH_INCHI)
+ ${TEST_PATH}/test_inchiwrite ${inchidata}/${test} ${inchidata}/${test}.txt)
+ set_tests_properties(inchi${test}_Test PROPERTIES
+ FAIL_REGULAR_EXPRESSION "Not ok"
+- ENVIRONMENT "BABEL_DATADIR=${CMAKE_SOURCE_DIR}/data;LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib"
++ ENVIRONMENT "BABEL_DATADIR=${CMAKE_SOURCE_DIR}/data;LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
+ )
+ endforeach(test ${inchitests})
+ endif(WITH_INCHI)
+@@ -166,7 +171,7 @@ foreach(test ${old_tests})
+ add_test(${test}_Test ${TEST_PATH}/test_${test})
+ set_tests_properties(${test}_Test PROPERTIES
+ FAIL_REGULAR_EXPRESSION "not ok"
+- ENVIRONMENT "BABEL_DATADIR=${CMAKE_SOURCE_DIR}/data;LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib"
++ ENVIRONMENT "BABEL_DATADIR=${CMAKE_SOURCE_DIR}/data;LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
+ )
+ endforeach(test ${old_tests})
+
+@@ -181,8 +186,8 @@ if(NOT BUILD_SHARED AND NOT BUILD_MIXED)
+ endif()
+ install(TARGETS roundtrip
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+
+ ###########################
+@@ -199,10 +204,10 @@ if(NOT MINGW AND NOT CYGWIN)
+ babel sym smartssym fastsearch unique kekule)
+ foreach(pytest ${pytests})
+ SET_SOURCE_FILES_PROPERTIES(test${pytest}.py PROPERTIES
+- PYTHONPATH "${CMAKE_SOURCE_DIR}/scripts/python:${CMAKE_BINARY_DIR}/lib"
+- BABEL_LIBDIR "${CMAKE_BINARY_DIR}/lib"
++ PYTHONPATH "${CMAKE_SOURCE_DIR}/scripts/python:${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
++ BABEL_LIBDIR "${FORMATDIR}"
+ BABEL_DATADIR "${CMAKE_SOURCE_DIR}/data"
+- LD_LIBRARY_PATH "${CMAKE_BINARY_DIR}/lib"
++ LD_LIBRARY_PATH "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
+ )
+ ADD_PYTHON_TEST(pytest_${pytest} test${pytest}.py)
+ set_tests_properties(pytest_${pytest} PROPERTIES
+@@ -221,10 +226,10 @@ if (PYTHON_BINDINGS)
+ bindings _pybel example)
+ foreach(pybindtest ${pybindtests})
+ SET_SOURCE_FILES_PROPERTIES(test${pybindtest}.py PROPERTIES
+- PYTHONPATH "${CMAKE_SOURCE_DIR}/scripts/python:${CMAKE_BINARY_DIR}/lib"
+- BABEL_LIBDIR "${CMAKE_BINARY_DIR}/lib"
++ PYTHONPATH "${CMAKE_SOURCE_DIR}/scripts/python:${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
++ BABEL_LIBDIR "${FORMATDIR}"
+ BABEL_DATADIR "${CMAKE_SOURCE_DIR}/data"
+- LD_LIBRARY_PATH "${CMAKE_BINARY_DIR}/lib"
++ LD_LIBRARY_PATH "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
+ )
+ if(MSVC)
+ SET_SOURCE_FILES_PROPERTIES(test${pybindtest}.py PROPERTIES
+diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
+index 1f547bf..fb98441 100644
+--- a/tools/CMakeLists.txt
++++ b/tools/CMakeLists.txt
+@@ -38,8 +38,8 @@ if(BUILD_SHARED)
+ target_link_libraries(${tool} ${BABEL_LIBRARY})
+ install(TARGETS ${tool}
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+ endforeach(tool)
+
+@@ -53,8 +53,8 @@ if(BUILD_SHARED)
+ target_link_libraries(obspectrophore ${BABEL_LIBRARY})
+ install(TARGETS obspectrophore
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+
+ # obgrep -- requires getopt
+@@ -66,8 +66,8 @@ if(BUILD_SHARED)
+ target_link_libraries(obgrep ${BABEL_LIBRARY})
+ install(TARGETS obgrep
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ )
+ endif(NOT MINIMAL_BUILD)
+
+@@ -146,7 +146,7 @@ else(BUILD_SHARED)
+
+ install(TARGETS babel
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+
+ endif(BUILD_SHARED)
diff --git a/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-gcc-6_and_7-backport.patch b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-gcc-6_and_7-backport.patch
new file mode 100644
index 000000000000..e23dc6020ee5
--- /dev/null
+++ b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-gcc-6_and_7-backport.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0ee545cf..7f4b944e 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -239,7 +239,7 @@ check_type_size(clock_t CLOCK_T)
+ # Get the GCC version - from KDE4 cmake files
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
+- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
++ string(REGEX MATCH "[34567]\\.[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)
diff --git a/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-swig-3.0.3.patch b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-swig-3.0.3.patch
new file mode 100644
index 000000000000..d30efd55bd92
--- /dev/null
+++ b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-swig-3.0.3.patch
@@ -0,0 +1,97 @@
+ scripts/openbabel-python.i | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/scripts/openbabel-python.i b/scripts/openbabel-python.i
+index 7cb8f24..d893129 100644
+--- a/scripts/openbabel-python.i
++++ b/scripts/openbabel-python.i
+@@ -227,7 +227,7 @@ CAST_GENERICDATA_TO(SquarePlanarStereo)
+ %include <openbabel/math/transform3d.h>
+ %include <openbabel/math/spacegroup.h>
+
+-# CloneData should be used instead of the following method
++// CloneData should be used instead of the following method
+ %ignore OpenBabel::OBBase::SetData;
+ %include <openbabel/base.h>
+
+@@ -289,7 +289,7 @@ OBMol.BeginResidues = OBMol.EndResidues = OBMol.BeginResidue = OBMol.EndResidue
+ %ignore OpenBabel::OBDescriptor::LessThan;
+ %include <openbabel/descriptor.h>
+
+-# Ignore shadowed methods
++// Ignore shadowed methods
+ %ignore OpenBabel::OBForceField::VectorSubtract(const double *const, const double *const, double *);
+ %ignore OpenBabel::OBForceField::VectorMultiply(const double *const, const double, double *);
+ %include <openbabel/forcefield.h>
+@@ -310,7 +310,7 @@ OBMol.BeginResidues = OBMol.EndResidues = OBMol.BeginResidue = OBMol.EndResidue
+
+ %warnfilter(503) OpenBabel::OBBitVec; // Not wrapping any of the overloaded operators
+ %include <openbabel/bitvec.h>
+-# Ignore shadowed method
++// Ignore shadowed method
+ %ignore OpenBabel::OBRotor::GetRotAtoms() const;
+ %include <openbabel/rotor.h>
+ %ignore OpenBabel::Swab;
+@@ -321,13 +321,13 @@ OBMol.BeginResidues = OBMol.EndResidues = OBMol.BeginResidue = OBMol.EndResidue
+ %include <openbabel/math/align.h>
+ #endif
+
+-# The following %ignores avoid warning messages due to shadowed classes.
+-# This does not imply a loss of functionality as (in this case)
+-# the shadowed class is identical (from the point of view of SWIG) to
+-# the shadowing class.
+-# This is because C++ references (&) are transformed by SWIG back into
+-# pointers, so that OBAtomIter(OBMol &) would be treated the same as
+-# OBAtomIter(OBMol *).
++// The following %ignores avoid warning messages due to shadowed classes.
++// This does not imply a loss of functionality as (in this case)
++// the shadowed class is identical (from the point of view of SWIG) to
++// the shadowing class.
++// This is because C++ references (&) are transformed by SWIG back into
++// pointers, so that OBAtomIter(OBMol &) would be treated the same as
++// OBAtomIter(OBMol *).
+
+ %ignore OBAtomAtomIter(OBAtom &);
+ %ignore OBAtomBondIter(OBAtom &);
+@@ -346,9 +346,9 @@ OBMol.BeginResidues = OBMol.EndResidues = OBMol.BeginResidue = OBMol.EndResidue
+ %ignore OBResidueIter(OBMol &);
+ %ignore OBResidueAtomIter(OBResidue &);
+
+-# These classes are renamed so that they can be replaced by Python
+-# classes of the same name which provide Pythonic iterators
+-# (see %pythoncode section below)
++// These classes are renamed so that they can be replaced by Python
++// classes of the same name which provide Pythonic iterators
++// (see %pythoncode section below)
+
+ %rename(_OBAtomAtomIter) OpenBabel::OBAtomAtomIter;
+ %rename(_OBAtomBondIter) OpenBabel::OBAtomBondIter;
+@@ -367,8 +367,8 @@ OBMol.BeginResidues = OBMol.EndResidues = OBMol.BeginResidue = OBMol.EndResidue
+
+ %include <openbabel/obiter.h>
+
+-# The following class, OBiter, is subclassed to provide Python iterators
+-# equivalent to the C++ iterators in obiter.h and the plugin iterators
++// The following class, OBiter, is subclassed to provide Python iterators
++// equivalent to the C++ iterators in obiter.h and the plugin iterators
+
+ %pythoncode %{
+ class OBIter(object):
+@@ -459,7 +459,7 @@ def double_array(mylist):
+ return c
+ %}
+
+-# Copy some of the global variables in cvar into the openbabel namespace
++// Copy some of the global variables in cvar into the openbabel namespace
+
+ %pythoncode %{
+ obErrorLog = cvar.obErrorLog
+@@ -470,7 +470,7 @@ atomtyper = cvar.atomtyper
+ aromtyper = cvar.aromtyper
+ %}
+
+-# Functions to set the log file to std::cout and std::cerr
++// Functions to set the log file to std::cout and std::cerr
+
+ %ignore OBForceField::SetLogFile(std::ostream *pos);
+ %extend OpenBabel::OBForceField {
diff --git a/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-testpybel.patch b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-testpybel.patch
new file mode 100644
index 000000000000..7a0114975fff
--- /dev/null
+++ b/sci-chemistry/openbabel-python/files/openbabel-python-2.3.2-testpybel.patch
@@ -0,0 +1,28 @@
+From b34edb6de512e5735d87cb0893804a4abd14f9b7 Mon Sep 17 00:00:00 2001
+From: baoilleach <baoilleach@71e0b675-c112-0410-beda-96664073b5c2>
+Date: Mon, 1 Oct 2012 20:40:36 +0000
+Subject: [PATCH] scripts/python/testpybel.py: Minor fix to enable failing
+ test to pass. Failures due to the new MOL Chiral Flag data
+ that I stored a while ago.
+
+git-svn-id: https://openbabel.svn.sourceforge.net/svnroot/openbabel/openbabel/trunk@5022 71e0b675-c112-0410-beda-96664073b5c2
+---
+ scripts/python/examples/testpybel.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/python/examples/testpybel.py b/scripts/python/examples/testpybel.py
+index aa5fcd4..7951851 100644
+--- a/scripts/python/examples/testpybel.py
++++ b/scripts/python/examples/testpybel.py
+@@ -336,7 +336,7 @@ class TestPybel(TestToolkit):
+ tpsaname = "TPSA"
+ Nbits = 3
+ Nfpbits = 32
+- datakeys = ['NSC', 'Comment', 'OpenBabel Symmetry Classes']
++ datakeys = ['NSC', 'Comment', 'OpenBabel Symmetry Classes', 'MOL Chiral Flag']
+
+ def testFP_FP3(self):
+ "Checking the results from FP3"
+--
+1.7.12.3
+
diff --git a/sci-chemistry/openbabel-python/metadata.xml b/sci-chemistry/openbabel-python/metadata.xml
new file mode 100644
index 000000000000..06fa4d2398d3
--- /dev/null
+++ b/sci-chemistry/openbabel-python/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+ <longdescription>
+OpenBabel is a chemical toolbox designed to speak the many languages of
+chemical data. It's an open, collaborative project allowing anyone to
+search, convert, analyze, or store data from molecular modeling, chemistry,
+solid-state materials, biochemistry, or related areas. This package enables
+to access OpenBabel library from Python programs.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">openbabel</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/openbabel-python/openbabel-python-2.3.2.ebuild b/sci-chemistry/openbabel-python/openbabel-python-2.3.2.ebuild
new file mode 100644
index 000000000000..999a73bc7948
--- /dev/null
+++ b/sci-chemistry/openbabel-python/openbabel-python-2.3.2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_4 )
+
+inherit cmake-utils eutils multilib python-r1
+
+DESCRIPTION="Python bindings for OpenBabel (including Pybel)"
+HOMEPAGE="http://openbabel.sourceforge.net/"
+SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz"
+
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ ~sci-chemistry/openbabel-${PV}
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-2"
+
+S="${WORKDIR}"/openbabel-${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-testpybel.patch
+ "${FILESDIR}"/${P}-bindings_only.patch
+ "${FILESDIR}"/${P}-swig-3.0.3.patch
+ "${FILESDIR}"/${P}-gcc-6_and_7-backport.patch
+ )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ sed \
+ -e "s:\"\.\.\":\"${EPREFIX}/usr\":g" \
+ -i test/testbabel.py || die
+ swig -python -c++ -small -O -templatereduce -naturalvar \
+ -I"${EPREFIX}/usr/include/openbabel-2.0" \
+ -o scripts/python/openbabel-python.cpp \
+ -DHAVE_EIGEN \
+ -outdir scripts/python \
+ scripts/openbabel-python.i \
+ || die "Regeneration of openbabel-python.cpp failed"
+ sed \
+ -e '/__GNUC__/s:== 4:>= 4:g' \
+ -i include/openbabel/shared_ptr.h || die
+}
+
+src_configure() {
+ my_impl_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_RPATH=
+ -DBINDINGS_ONLY=ON
+ -DBABEL_SYSTEM_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libopenbabel.so"
+ -DOB_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/openbabel/${PV}"
+ -DLIB_INSTALL_DIR="${D}$(python_get_sitedir)"
+ -DPYTHON_BINDINGS=ON
+ -DPYTHON_EXECUTABLE=${PYTHON}
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_INCLUDE_PATH="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DENABLE_TESTS=ON
+ )
+
+ cmake-utils_src_configure
+ }
+
+ python_foreach_impl my_impl_src_configure
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_make bindings_python
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test -R py
+}
+
+src_install() {
+ my_impl_src_install() {
+ cd "${BUILD_DIR}" || die
+
+ cmake -DCOMPONENT=bindings_python -P cmake_install.cmake
+
+ python_optimize
+ }
+
+ python_foreach_impl my_impl_src_install
+}
diff --git a/sci-chemistry/openbabel-python/openbabel-python-2.4.1-r1.ebuild b/sci-chemistry/openbabel-python/openbabel-python-2.4.1-r1.ebuild
new file mode 100644
index 000000000000..84f9aa89e74b
--- /dev/null
+++ b/sci-chemistry/openbabel-python/openbabel-python-2.4.1-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit cmake-utils python-r1
+
+DESCRIPTION="Python bindings for OpenBabel (including Pybel)"
+HOMEPAGE="http://openbabel.sourceforge.net/"
+SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz"
+
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
+SLOT="0/5"
+LICENSE="GPL-2"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ ~sci-chemistry/openbabel-${PV}
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-2"
+
+S="${WORKDIR}"/openbabel-${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.2-gcc-6_and_7-backport.patch
+ )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ sed \
+ -e "s:\"\.\.\":\"${EPREFIX}/usr\":g" \
+ -i test/testbabel.py || die
+ swig -python -c++ -small -O -templatereduce -naturalvar \
+ -I"${EPREFIX}/usr/include/openbabel-2.0" \
+ -o scripts/python/openbabel-python.cpp \
+ -DHAVE_EIGEN \
+ -outdir scripts/python \
+ scripts/openbabel-python.i \
+ || die "Regeneration of openbabel-python.cpp failed"
+ sed \
+ -e '/__GNUC__/s:== 4:>= 4:g' \
+ -i include/openbabel/shared_ptr.h || die
+}
+
+src_configure() {
+ my_impl_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_RPATH=
+ -DBINDINGS_ONLY=ON
+ -DBABEL_SYSTEM_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libopenbabel.so"
+ -DOB_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/openbabel/${PV}"
+ -DLIB_INSTALL_DIR="${D}$(python_get_sitedir)"
+ -DPYTHON_BINDINGS=ON
+ -DPYTHON_EXECUTABLE=${PYTHON}
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_INCLUDE_PATH="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DENABLE_TESTS=ON
+ -DCMAKE_INSTALL_PREFIX="${ED%/}/usr"
+ )
+
+ cmake-utils_src_configure
+ }
+
+ python_foreach_impl my_impl_src_configure
+}
+
+src_compile() {
+ python_foreach_impl cmake-utils_src_make bindings_python
+}
+
+src_test() {
+ python_foreach_impl cmake-utils_src_test -R py
+}
+
+src_install() {
+ my_impl_src_install() {
+ cd "${BUILD_DIR}" || die
+
+ cmake -DCOMPONENT=bindings_python -P cmake_install.cmake
+
+ python_optimize
+ }
+
+ python_foreach_impl my_impl_src_install
+}