[openbabel] update to current Git master HEAD

Dominik Mierzejewski rathann at fedoraproject.org
Thu Feb 12 11:59:04 UTC 2015


commit 2f7b3c12eb0f69badd91227ad73c273d832005da
Author: Dominik Mierzejewski <rpm at greysector.net>
Date:   Thu Feb 12 12:50:01 2015 +0100

    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:

 .gitignore                                         |    1 +
 openbabel-2.3.0-plugindir.patch                    |   12 --
 openbabel-2.3.1-gcc47-darwin.patch                 |   25 ---
 openbabel-2.3.1-ruby19-vendorarch.patch            |   13 --
 ...abel-2.3.1-ruby22-remove-deprecated-usage.patch |   22 ---
 openbabel-2.3.2-cmake.patch                        |   19 --
 openbabel-gcc5.patch                               |   12 ++
 ...thod.patch => openbabel-noswig-rubymethod.patch |   14 +-
 openbabel-perl.patch                               |   29 +++
 openbabel-plugindir.patch                          |   12 ++
 openbabel-rpm.patch                                |   12 --
 openbabel-ruby19-vendorarch.patch                  |   12 ++
 openbabel-ruby22-remove-deprecated-usage.patch     |   12 ++
 openbabel-swig3.patch                              |  185 ++++++++++++++++++++
 openbabel-tests.patch                              |   90 ----------
 openbabel.spec                                     |   91 ++++------
 sources                                            |    2 +-
 17 files changed, 311 insertions(+), 252 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9421ee7..9e41af4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/openbabel-gcc5.patch b/openbabel-gcc5.patch
new file mode 100644
index 0000000..a3941c2
--- /dev/null
+++ b/openbabel-gcc5.patch
@@ -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
diff --git a/openbabel-2.3.1-noswig-rubymethod.patch b/openbabel-noswig-rubymethod.patch
similarity index 66%
rename from openbabel-2.3.1-noswig-rubymethod.patch
rename to openbabel-noswig-rubymethod.patch
index de4b9cd..0395296 100644
--- a/openbabel-2.3.1-noswig-rubymethod.patch
+++ b/openbabel-noswig-rubymethod.patch
@@ -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)
  
diff --git a/openbabel-perl.patch b/openbabel-perl.patch
new file mode 100644
index 0000000..7e80117
--- /dev/null
+++ b/openbabel-perl.patch
@@ -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)
diff --git a/openbabel-plugindir.patch b/openbabel-plugindir.patch
new file mode 100644
index 0000000..6827fd3
--- /dev/null
+++ b/openbabel-plugindir.patch
@@ -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}\\"")
+ 
diff --git a/openbabel-ruby19-vendorarch.patch b/openbabel-ruby19-vendorarch.patch
new file mode 100644
index 0000000..2f9a72c
--- /dev/null
+++ b/openbabel-ruby19-vendorarch.patch
@@ -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)
diff --git a/openbabel-ruby22-remove-deprecated-usage.patch b/openbabel-ruby22-remove-deprecated-usage.patch
new file mode 100644
index 0000000..492bdc5
--- /dev/null
+++ b/openbabel-ruby22-remove-deprecated-usage.patch
@@ -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'
diff --git a/openbabel-swig3.patch b/openbabel-swig3.patch
new file mode 100644
index 0000000..65ec448
--- /dev/null
+++ b/openbabel-swig3.patch
@@ -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 &);
diff --git a/openbabel.spec b/openbabel.spec
index 67f0d37..af34982 100644
--- a/openbabel.spec
+++ b/openbabel.spec
@@ -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 at 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 at 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
diff --git a/sources b/sources
index 4af7240..27ada34 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9b0007560d9d838b40ab4ad06daf5610  openbabel-2.3.2.tar.gz
+d73cc446061060d36c5306d44430a79f  openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d.tar.gz


More information about the scm-commits mailing list