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:
This commit is contained in:
Dominik Mierzejewski 2015-02-12 12:50:01 +01:00
parent 7249506091
commit 2f7b3c12eb
17 changed files with 311 additions and 252 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ openbabel-2.0.2.tar.gz
/openbabel-2.3.0.tar.gz
/openbabel-2.3.1.tar.gz
/openbabel-2.3.2.tar.gz
/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d.tar.gz

View File

@ -1,12 +0,0 @@
diff -ru openbabel-2.3.0/CMakeLists.txt openbabel-2.3.0-lg/CMakeLists.txt
--- openbabel-2.3.0/CMakeLists.txt 2010-10-23 02:05:07.000000000 +0400
+++ openbabel-2.3.0-lg/CMakeLists.txt 2011-02-26 18:49:31.000000000 +0300
@@ -218,7 +218,7 @@
}
" SCANDIR_NEEDS_CONST)
- set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}")
+ set(OB_MODULE_PATH "${OB_PLUGIN_INSTALL_DIR}")
add_definitions(-DOB_MODULE_PATH="\\"${OB_MODULE_PATH}\\"")
# Add some visibility support when using GCC

View File

@ -1,25 +0,0 @@
--- openbabel-2.3.1/scripts/ruby/extconf.rb.gcc47 2011-01-11 23:53:32.000000000 +0900
+++ openbabel-2.3.1/scripts/ruby/extconf.rb 2012-04-05 14:15:14.286842274 +0900
@@ -3,11 +3,13 @@
# Compensate for the fact that Ruby will try to build universal
# binaries on OS X by default
require 'rbconfig'
+darwin_ldflags = ""
if Config::CONFIG["arch"] =~ /universal-darwin/
ENV['ARCHFLAGS'] = case `uname -smr`.chomp
when "i386" then '-arch i386'
when "ppc" then '-arch ppc'
end
+ darwin_ldflags = "-flat_namespace"
end
require 'mkmf'
@@ -36,7 +38,7 @@
end
if have_library('openbabel')
- with_ldflags("#$LDFLAGS -dynamic -flat_namespace") do #Enables cc to handle linking better.
+ with_ldflags("#$LDFLAGS -dynamic #$darwin_ldflags") do #Enables cc to handle linking better.
create_makefile('openbabel')
end
else

View File

@ -1,13 +0,0 @@
--- openbabel-2.3.1/scripts/CMakeLists.txt.ruby19 2012-04-06 00:09:36.000000000 +0900
+++ openbabel-2.3.1/scripts/CMakeLists.txt 2012-04-06 01:03:29.000000000 +0900
@@ -324,6 +324,10 @@
endif (RUBY_PREFIX)
add_custom_target(bindings_ruby ALL
COMMAND ${RUBY_EXECUTABLE} ${openbabel_SOURCE_DIR}/scripts/ruby/extconf.rb --with-openbabel-lib=${openbabel_BINARY_DIR}/lib${LIB_SUFFIX} --with-openbabel-include=${openbabel_BINARY_DIR}/include
+
+ # As same as rubygems does
+ COMMAND sed -i -e \"\\@^RUBYARCHDIR@s|sitearchdir|vendorarchdir|\" ${openbabel_SOURCE_DIR}/scripts/ruby/Makefile
+
COMMAND ${CMAKE_COMMAND} -E echo "Compiling Ruby bindings"
COMMAND make
DEPENDS ${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.cpp

View File

@ -1,22 +0,0 @@
--- openbabel-2.3.2/scripts/CMakeLists.txt.rbconfig 2015-01-16 15:16:50.455454787 +0900
+++ openbabel-2.3.2/scripts/CMakeLists.txt 2015-01-16 15:19:56.608276116 +0900
@@ -308,7 +308,7 @@
# no regex metacharacters except possibly '.':
string(REGEX REPLACE ^${RUBY_POSSIBLE_LIB_DIR}/ruby ${RUBY_PREFIX} ruby_install_dir "${RUBY_SITEARCH_DIR}")
else (RUBY_PREFIX)
- execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['exec_prefix']"
+ execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['exec_prefix']"
OUTPUT_VARIABLE ruby_exec_prefix)
# It is reasonably safe to assume that ruby_exec_prefix contains no
# regex metacharacters except possibly '.':
--- openbabel-2.3.2/scripts/ruby/extconf.rb.rbconfig 2015-01-16 15:16:50.450454846 +0900
+++ openbabel-2.3.2/scripts/ruby/extconf.rb 2015-01-16 15:19:31.945564760 +0900
@@ -4,7 +4,7 @@
# binaries on OS X by default
require 'rbconfig'
darwin_ldflags = ""
-if Config::CONFIG["arch"] =~ /universal-darwin/
+if RbConfig::CONFIG["arch"] =~ /universal-darwin/
ENV['ARCHFLAGS'] = case `uname -smr`.chomp
when "i386" then '-arch i386'
when "ppc" then '-arch ppc'

View File

@ -1,19 +0,0 @@
diff -up openbabel-2.3.2/scripts/CMakeLists.txt.cmakepol openbabel-2.3.2/scripts/CMakeLists.txt
--- openbabel-2.3.2/scripts/CMakeLists.txt.cmakepol 2012-10-03 22:08:52.000000000 +0300
+++ openbabel-2.3.2/scripts/CMakeLists.txt 2013-07-18 10:31:52.295263987 +0300
@@ -222,15 +222,6 @@ if (DO_PERL_BINDINGS)
endif (NOT WIN32)
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})
- 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})
-
set(PERL_INSTALLDIRS_TEXT "")
if (OBPERL_INSTALLDIRS)
set(PERL_INSTALLDIRS_TEXT "INSTALLDIRS=${OBPERL_INSTALLDIRS}")

12
openbabel-gcc5.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/include/openbabel/shared_ptr.h.gcc5 openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/include/openbabel/shared_ptr.h
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/include/openbabel/shared_ptr.h.gcc5 2015-02-04 20:04:57.000000000 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/include/openbabel/shared_ptr.h 2015-02-07 22:10:37.433163644 +0100
@@ -21,7 +21,7 @@ GNU General Public License for more deta
#define obsharedptr boost::shared_ptr
#else
#include <memory>
- #if __GNUC__ == 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
+ #if __GNUC__ >= 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
#ifdef _LIBCPP_VERSION
#include <memory>
#else

View File

@ -1,17 +1,19 @@
--- openbabel-2.3.1/scripts/CMakeLists.txt.noswig_ruby 2012-04-05 22:15:22.000000000 +0900
+++ openbabel-2.3.1/scripts/CMakeLists.txt 2012-04-06 00:09:36.000000000 +0900
@@ -290,9 +290,14 @@
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 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
+ COMMAND sed -i -e s/void\ Init_OpenBabel/void\ Init_openbabel/ ${openbabel_SOURCE_DIR}/scripts/ruby/openbabel-ruby.cpp
+ )
endif (RUN_SWIG)

29
openbabel-perl.patch Normal file
View File

@ -0,0 +1,29 @@
diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt.rpm openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt.rpm 2015-02-04 20:04:57.000000000 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt 2015-02-07 23:38:54.649356914 +0100
@@ -336,12 +336,23 @@ if (DO_PERL_BINDINGS)
if(NOT BINDINGS_ONLY)
add_dependencies(bindings_perl openbabel)
endif()
+ execute_process(
+ COMMAND
+ ${PERL_EXECUTABLE} -V:installvendorarch
+ OUTPUT_VARIABLE
+ PERL_INSTALL_DIR_OUTPUT
+ RESULT_VARIABLE
+ PERL_INSTALL_DIR_RESULT
+ )
+ if (NOT PERL_INSTALL_DIR_RESULT)
+ string(REGEX REPLACE "installvendorarch='([^']+)'.*" "\\1" PERL_INSTALL_DIR ${PERL_INSTALL_DIR_OUTPUT})
+ endif (NOT PERL_INSTALL_DIR_RESULT)
install(TARGETS bindings_perl
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}/auto/Chemistry/OpenBabel/
+ LIBRARY DESTINATION ${PERL_INSTALL_DIR}/auto/Chemistry/OpenBabel/
COMPONENT bindings_perl)
install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm
- DESTINATION ${LIB_INSTALL_DIR}/Chemistry/
+ DESTINATION ${PERL_INSTALL_DIR}/Chemistry/
COMPONENT bindings_perl)
endif (DO_PERL_BINDINGS)

12
openbabel-plugindir.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt.plugindir openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt.plugindir 2015-02-07 21:42:44.431479900 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt 2015-02-07 21:43:29.000429326 +0100
@@ -266,7 +266,7 @@ if(NOT MSVC)
}
" SCANDIR_NEEDS_CONST)
- set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}"
+ set(OB_MODULE_PATH "${OB_PLUGIN_INSTALL_DIR}"
CACHE PATH "Set to system install for bindings only build")
add_definitions(-DOB_MODULE_PATH="\\"${OB_MODULE_PATH}\\"")

View File

@ -1,12 +0,0 @@
diff -up openbabel-2.3.1/scripts/CMakeLists.txt.r openbabel-2.3.1/scripts/CMakeLists.txt
--- openbabel-2.3.1/scripts/CMakeLists.txt.r 2011-10-08 22:09:17.000000000 +0200
+++ openbabel-2.3.1/scripts/CMakeLists.txt 2011-10-12 18:57:31.000000000 +0200
@@ -251,7 +251,7 @@ if (DO_PERL_BINDINGS)
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)")
+ install(CODE "execute_process(COMMAND make install_vendor 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)

View File

@ -0,0 +1,12 @@
diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt.ruby_vendor openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt.ruby_vendor 2015-02-04 20:04:57.000000000 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/CMakeLists.txt 2015-02-07 23:38:54.649356914 +0100
@@ -400,7 +416,7 @@ if (DO_RUBY_BINDINGS)
endif()
install(TARGETS bindings_ruby
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}/ruby/vendor_ruby
COMPONENT bindings_ruby)
endif (DO_RUBY_BINDINGS)

View File

@ -0,0 +1,12 @@
diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/ruby/extconf.rb.rbconfig openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/ruby/extconf.rb
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/ruby/extconf.rb.rbconfig 2015-02-07 21:51:50.828130289 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/ruby/extconf.rb 2015-02-07 21:57:02.185770250 +0100
@@ -3,7 +3,7 @@
# Compensate for the fact that Ruby will try to build universal
# binaries on OS X by default
require 'rbconfig'
-if Config::CONFIG["arch"] =~ /universal-darwin/
+if RbConfig::CONFIG["arch"] =~ /universal-darwin/
ENV['ARCHFLAGS'] = case `uname -smr`.chomp
when "i386" then '-arch i386'
when "ppc" then '-arch ppc'

185
openbabel-swig3.patch Normal file
View File

@ -0,0 +1,185 @@
diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-perl.i.swig3 openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-perl.i
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-perl.i.swig3 2015-02-04 20:04:57.000000000 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-perl.i 2015-02-10 22:17:43.043291031 +0100
@@ -179,7 +179,7 @@ CAST_GENERICDATA_TO(VirtualBond)
%import <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;
%rename(_local) OpenBabel::local;
%include <openbabel/base.h>
@@ -224,7 +224,7 @@ namespace std { class stringbuf {}; }
%ignore OpenBabel::OBForceField::DiverseConfGen;
#endif
-# 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>
@@ -234,20 +234,20 @@ namespace std { class stringbuf {}; }
%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;
%warnfilter(314); // 'next' is a Perl keyword
%include <openbabel/rotor.h>
%ignore OpenBabel::Swab;
%include <openbabel/rotamer.h>
-# 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 &);
diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-python.i.swig3 openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-python.i
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-python.i.swig3 2015-02-04 20:04:57.000000000 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-python.i 2015-02-10 22:17:43.043291031 +0100
@@ -229,7 +229,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>
@@ -291,7 +291,7 @@ OBMol.BeginResidues = OBMol.EndResidues
%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>
@@ -312,7 +312,7 @@ OBMol.BeginResidues = OBMol.EndResidues
%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;
@@ -323,13 +323,13 @@ OBMol.BeginResidues = OBMol.EndResidues
%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 &);
@@ -348,9 +348,9 @@ OBMol.BeginResidues = OBMol.EndResidues
%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;
@@ -369,8 +369,8 @@ OBMol.BeginResidues = OBMol.EndResidues
%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):
@@ -460,7 +460,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
@@ -471,7 +471,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 -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-ruby.i.swig3 openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-ruby.i
--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-ruby.i.swig3 2015-02-04 20:04:57.000000000 +0100
+++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-ruby.i 2015-02-10 22:19:12.334540544 +0100
@@ -181,7 +181,7 @@ CAST_GENERICDATA_TO(VirtualBond)
%import <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>
%include <openbabel/generic.h>
@@ -217,7 +217,7 @@ namespace std { class stringbuf {}; }
%include <openbabel/fingerprint.h>
%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 *);
#ifdef HAVE_EIGEN
@@ -241,13 +241,13 @@ namespace std { class stringbuf {}; }
%ignore OpenBabel::Swab;
%include <openbabel/rotamer.h>
-# 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 &);

View File

@ -1,90 +0,0 @@
diff -up openbabel-2.3.2/scripts/python/examples/testpybel.py.tests openbabel-2.3.2/scripts/python/examples/testpybel.py
--- openbabel-2.3.2/scripts/python/examples/testpybel.py.tests 2012-10-03 21:08:51.000000000 +0200
+++ openbabel-2.3.2/scripts/python/examples/testpybel.py 2014-04-27 02:52:33.409199059 +0200
@@ -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"
diff -up openbabel-2.3.2/test/CMakeLists.txt.tests openbabel-2.3.2/test/CMakeLists.txt
--- openbabel-2.3.2/test/CMakeLists.txt.tests 2012-10-03 21:08:16.000000000 +0200
+++ openbabel-2.3.2/test/CMakeLists.txt 2014-04-27 01:45:09.814474935 +0200
@@ -2,7 +2,7 @@
add_definitions(-DTESTDATADIR="\\"${CMAKE_SOURCE_DIR}/test/files/\\"")
# define FORMATDIR for location of format plugin binaries
-add_definitions(-DFORMATDIR="\\"${openbabel_BINARY_DIR}/lib/\\"")
+add_definitions(-DFORMATDIR="\\"${openbabel_BINARY_DIR}/lib${LIB_SUFFIX}/\\"")
###########################################################
# new tests using obtest.h
@@ -64,7 +64,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})
############################################################
@@ -127,7 +127,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)
@@ -141,7 +141,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})
@@ -156,8 +156,8 @@ if(NOT BUILD_SHARED)
endif()
install(TARGETS roundtrip
RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
###########################
@@ -174,10 +174,10 @@ if(NOT MINGW AND NOT CYGWIN)
babel sym 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 "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
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
@@ -196,10 +196,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 "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}"
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

View File

@ -1,36 +1,29 @@
%global commit 75414ad4e043f16ba72ae51c7ca60f448576688d
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python2_sitearch: %define python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
# we don't want to provide private Perl or Python extension libs
%global __provides_exclude_from ^(%{perl_vendorarch}/auto/.*\\.so|%{python_sitearch}/.*\\.so)$
%define beta_ver %{nil}
%define beta_str %{nil}
%define beta_dir %{nil}
%global __provides_exclude_from ^(%{perl_vendorarch}/auto/.*\\.so|%{python2_sitearch}/.*\\.so)$
Name: openbabel
Version: 2.3.2
Release: 11%{beta_ver}%{?dist}
Version: 2.3.90
Release: 0.1.20150204git%{shortcommit}
Summary: Chemistry software file format converter
License: GPLv2
Group: Applications/File
URL: http://openbabel.org/
Source0: http://downloads.sourceforge.net/sourceforge/openbabel/%{name}-%{version}%{beta_str}.tar.gz
Source0: https://github.com/openbabel/openbabel/archive/%{commit}/openbabel-%{commit}.tar.gz
Source1: obgui.desktop
Patch1: %{name}-rpm.patch
# http://sourceforge.net/p/openbabel/bugs/839/ perl bindings fail to build
Patch2: openbabel-2.3.2-cmake.patch
# fix tests
Patch3: openbabel-tests.patch
# fix perl modules install path
Patch1: %{name}-perl.patch
# fix plugin directory location (#680292, patch by lg)
Patch4: openbabel-2.3.0-plugindir.patch
# Patch 5-7: all ruby related
# fix build with gcc47 + ruby on Linux
Patch5: openbabel-2.3.1-gcc47-darwin.patch
Patch4: openbabel-plugindir.patch
# fix SWIG_init even when not using swig (#772149)
Patch6: openbabel-2.3.1-noswig-rubymethod.patch
Patch6: openbabel-noswig-rubymethod.patch
# On F-17, directory for C ruby files changed to use vendorarch directory
Patch7: openbabel-2.3.1-ruby19-vendorarch.patch
Patch7: openbabel-ruby19-vendorarch.patch
# temporarily disable some tests on:
# - ppc64 and s390(x) to unblock other builds (#1108103)
# - ARM (#1094491)
@ -38,19 +31,20 @@ Patch7: openbabel-2.3.1-ruby19-vendorarch.patch
# Upstream bugs: https://sourceforge.net/p/openbabel/bugs/927/ https://sourceforge.net/p/openbabel/bugs/945/
Patch8: openbabel-disable-tests-some-arches.patch
# Remove deprecated usage on ruby 22
Patch10: openbabel-2.3.1-ruby22-remove-deprecated-usage.patch
Patch10: openbabel-ruby22-remove-deprecated-usage.patch
# Fix build with gcc5
Patch11: openbabel-gcc5.patch
# Fix build with swig-3.x
Patch12: openbabel-swig3.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: eigen3-devel
BuildRequires: gcc-c++
BuildRequires: inchi-devel >= 1.0.3
BuildRequires: libxml2-devel
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: python2-devel
BuildRequires: ruby-devel
BuildRequires: swig
BuildRequires: wxGTK-devel
BuildRequires: zlib-devel
BuildRequires: ImageMagick
%description
@ -115,9 +109,8 @@ file-translation code.
Group: System Environment/Libraries
Summary: Perl wrapper for the Open Babel library
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Obsoletes: %{name}-perl < 2.2.0
Provides: %{name}-perl = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: perl-devel
%description -n perl-%{name}
Perl wrapper for the Open Babel library.
@ -125,9 +118,8 @@ Perl wrapper for the Open Babel library.
%package -n python-%{name}
Group: System Environment/Libraries
Summary: Python wrapper for the Open Babel library
Obsoletes: %{name}-python < 2.2.0
Provides: %{name}-python = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: python2-devel
%description -n python-%{name}
Python wrapper for the Open Babel library.
@ -137,26 +129,23 @@ Summary: Ruby wrapper for the Open Babel library
Group: Development/Libraries
Requires: ruby(release)
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: ruby-devel
%description -n ruby-%{name}
Ruby wrapper for the Open Babel library.
%prep
%setup -q -n %{name}-%{version}%{beta_dir}
%patch1 -p1 -b .rpm
%patch2 -p1 -b .cmakepol
%patch3 -p1 -b .tests
%setup -q -n %{name}-%{commit}
%patch1 -p1 -b .perl_path
%patch4 -p1 -b .plugindir
%patch5 -p1 -b .gcc47
%patch6 -p1 -b .noswig_ruby
%patch7 -p1 -b .ruby_vendor
%ifarch %{power64} s390 s390x armv7hl aarch64
%patch8 -p1 -b .some_arches
%endif
%patch10 -p1 -b .rbconfig
chmod 644 src/formats/{fchk,genbank,mmcif}format.cpp
chmod 644 src/math/align.cpp
chmod 644 include/openbabel/{graphsym.h,math/align.h}
%patch11 -p1 -b .gcc5
%patch12 -p1 -b .swig3
convert src/GUI/babel.xpm -transparent white babel.png
# Remove duplicate html files
@ -183,20 +172,9 @@ done
make VERBOSE=1 %{?_smp_mflags}
%install
make VERBOSE=1 DESTDIR=%{buildroot} ruby_headers= install
# Put Python bindings in the right place.
# See http://sourceforge.net/p/openbabel/bugs/837/
mkdir -p %{buildroot}%{python_sitearch}
mv %{buildroot}%{_libdir}/_openbabel.so \
%{buildroot}%{_libdir}/openbabel.py* \
%{buildroot}%{_libdir}/pybel.py* \
%{buildroot}%{python_sitearch}
make VERBOSE=1 DESTDIR=%{buildroot} install
rm %{buildroot}%{_libdir}/cmake/openbabel2/*.cmake
rm %{buildroot}%{_libdir}/perl5/perllocal.pod
rm -f %{buildroot}%{perl_vendorarch}/auto/Chemistry/OpenBabel/{.packlist,OpenBabel.bs}
chmod 755 %{buildroot}%{perl_vendorarch}/auto/Chemistry/OpenBabel/OpenBabel.so
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
install -Dpm644 babel.png %{buildroot}%{_datadir}/pixmaps/babel.png
@ -247,9 +225,9 @@ make test
%files -n python-%{name}
%defattr(-,root,root,-)
%{python_sitearch}/_openbabel.so
%{python_sitearch}/openbabel.py*
%{python_sitearch}/pybel.py*
%{python2_sitearch}/_openbabel.so
%{python2_sitearch}/openbabel.py*
%{python2_sitearch}/pybel.py*
# Egg-info is not generated in 2.3.2, see upstream bug 837
#%{python_sitearch}/openbabel*.egg-info
@ -258,6 +236,15 @@ make test
%{ruby_vendorarchdir}/openbabel.so
%changelog
* Sat Feb 07 2015 Dominik Mierzejewski <rpm@greysector.net> 2.3.90-0.1.20150204git75414ad
- 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:
* Tue Jan 27 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.3.2-11
- Unify patches which disable tests on ppc64, s390(x), arm and enable
result also for aarch64. rhbugs: #1108103 #1094491 #1094513

View File

@ -1 +1 @@
9b0007560d9d838b40ab4ad06daf5610 openbabel-2.3.2.tar.gz
d73cc446061060d36c5306d44430a79f openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d.tar.gz