diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-chemistry/openbabel-perl/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-chemistry/openbabel-perl/files')
3 files changed, 162 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch new file mode 100644 index 000000000000..92e126a77d86 --- /dev/null +++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-bindings_only.patch @@ -0,0 +1,108 @@ +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..8f92e91 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 +@@ -231,13 +245,25 @@ if (DO_PERL_BINDINGS) + endif (RUN_SWIG) + + add_library(bindings_perl MODULE ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp) +- target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_LIBRARY} ${PERL_EXTRA_LINK_FLAGS}) ++ if(BINDINGS_ONLY) ++ target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_SYSTEM_LIBRARY} ${PERL_EXTRA_LINK_FLAGS}) ++ else() ++ target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_LIBRARY} ${PERL_EXTRA_LINK_FLAGS}) ++ endif() ++ + set_target_properties(bindings_perl PROPERTIES + PREFIX "" + OUTPUT_NAME OpenBabel) +- add_dependencies(bindings_perl openbabel) +- install(TARGETS bindings_perl LIBRARY DESTINATION ${LIB_INSTALL_DIR}) +- install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm DESTINATION ${LIB_INSTALL_DIR}) ++ if(NOT BINDINGS_ONLY) ++ add_dependencies(bindings_perl openbabel) ++ endif() ++ ++ install(TARGETS bindings_perl ++ LIBRARY DESTINATION ${LIB_INSTALL_DIR}/auto/Chemistry/OpenBabel/ ++ COMPONENT bindings_perl) ++ install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm ++ DESTINATION ${LIB_INSTALL_DIR}/Chemistry/ ++ COMPONENT bindings_perl) + + endif (DO_PERL_BINDINGS) + diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-gcc-6_and_7-backport.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-gcc-6_and_7-backport.patch new file mode 100644 index 000000000000..e23dc6020ee5 --- /dev/null +++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-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-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch new file mode 100644 index 000000000000..b72a622a3afb --- /dev/null +++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-trunk_cmake.patch @@ -0,0 +1,41 @@ +diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt +index e7298ce..16e9000 100644 +--- a/scripts/CMakeLists.txt ++++ b/scripts/CMakeLists.txt +@@ -231,36 +239,6 @@ if (DO_PERL_BINDINGS) + install(TARGETS bindings_perl LIBRARY DESTINATION ${LIB_INSTALL_DIR}) + install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm DESTINATION ${LIB_INSTALL_DIR}) + +- set(PERL_INSTALLDIRS_TEXT "") +- if (OBPERL_INSTALLDIRS) +- set(PERL_INSTALLDIRS_TEXT "INSTALLDIRS=${OBPERL_INSTALLDIRS}") +- endif (OBPERL_INSTALLDIRS) +- +- if (NOT MSVC) +- add_custom_target(pre_bindings_perl ALL +- # Create the scripts/perl directory; we cannot do this inside +- # bindings_perl as the WORKING_DIRECTORY needs to already exist! +- COMMAND ${CMAKE_COMMAND} -E make_directory ${openbabel_BINARY_DIR}/scripts/perl +- ) +- add_custom_target(bindings_perl ALL +- COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/Makefile.PL ${openbabel_BINARY_DIR}/scripts/perl +- COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm ${openbabel_BINARY_DIR}/scripts/perl +- COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp ${openbabel_BINARY_DIR}/scripts/perl +- COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc SRC_DIR=${openbabel_SOURCE_DIR} OBJ_DIR=${openbabel_BINARY_DIR} ${PERL_EXECUTABLE} ${openbabel_BINARY_DIR}/scripts/perl/Makefile.PL ${PERL_PREFIX_TEXT} ${PERL_INSTALLDIRS_TEXT} +- COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc make +- DEPENDS openbabel ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp +- WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl +- ) +- add_dependencies(bindings_perl pre_bindings_perl openbabel) +- install(CODE "execute_process(COMMAND make install DESTDIR=\$ENV{DESTDIR} WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl)") +- +- else (NOT MSVC) +- add_library(bindings_perl MODULE ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp) +- target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_LIBRARY}) +- set_target_properties(bindings_perl PROPERTIES +- OUTPUT_NAME openbabel_perl ) +- endif(NOT MSVC) +- + endif (DO_PERL_BINDINGS) + + ################### |