openbabel/openbabel-noswig-rubymethod.patch
Dominik Mierzejewski 2f7b3c12eb update to current Git master HEAD
- drop obsolete patches
- rebase remaining patches
- drop zlib-devel from BR (required by libxml2-devel)
- add gcc-c++ to BR
- fix building bindings with swig-3.x
- drop old Obsoletes: and Provides:
2015-02-12 12:50:01 +01:00

21 lines
1.8 KiB
Diff

diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt.noswig_ruby openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt.noswig_ruby 2015-02-07 21:45:57.930604455 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt 2015-02-07 21:48:41.744097913 +0100
@@ -374,10 +374,15 @@ if (DO_RUBY_BINDINGS)
set(WORKAROUND_CMAKE260_BUG "s/rb_define_module(\"Openbabel\")/rb_define_module(\"OpenBabel\")/")
add_custom_command(OUTPUT ${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.cpp
COMMAND ${SWIG_EXECUTABLE} -ruby -c++ -small -O -templatereduce -naturalvar -autorename -I${openbabel_SOURCE_DIR}/include -I${openbabel_BINARY_DIR}/include -o ${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.txt ${openbabel_SOURCE_DIR}/scripts/openbabel-ruby.i
- COMMAND sed -e '${WORKAROUND_CMAKE_260_BUG}' -e's/void Init_OpenBabel/void Init_openbabel/' <${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.txt >${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.cpp
+ COMMAND sed -e '${WORKAROUND_CMAKE260_BUG}' -e's/void Init_OpenBabel/void Init_openbabel/' <${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.txt >${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.cpp
COMMAND ${CMAKE_COMMAND} -E remove ${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.txt
MAIN_DEPENDENCY openbabel-ruby.i
)
+ else (RUN_SWIG)
+ # Fix openbabel-ruby.cpp also in this case
+ execute_process(
+ COMMAND sed -i -e s/void\ Init_OpenBabel/void\ Init_openbabel/ ${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.cpp
+ )
endif (RUN_SWIG)
include_directories(