Date: Friday, June 26, 2015 @ 07:08:12 Author: foutrelis Revision: 135888
Fix build with GCC 5.1 and Swig 3 Added: python-openbabel/trunk/openbabel-gcc5.patch python-openbabel/trunk/openbabel-swig3.patch Modified: python-openbabel/trunk/PKGBUILD -----------------------+ PKGBUILD | 20 +++- openbabel-gcc5.patch | 12 ++ openbabel-swig3.patch | 199 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 226 insertions(+), 5 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-06-26 04:41:13 UTC (rev 135887) +++ PKGBUILD 2015-06-26 05:08:12 UTC (rev 135888) @@ -12,13 +12,23 @@ license=('GPL') depends=('gcc-libs' "openbabel=${pkgver}" 'eigen2') makedepends=('swig' 'cmake' 'python-setuptools' 'python2-setuptools') -source=("http://downloads.sourceforge.net/openbabel/openbabel-$pkgver.tar.gz") -sha256sums=('4eaca26679aa6cc85ebf96af19191472ac63ca442c36b0427b369c3a25705188') +source=("http://downloads.sourceforge.net/openbabel/openbabel-$pkgver.tar.gz" + openbabel-gcc5.patch + openbabel-swig3.patch) +sha256sums=('4eaca26679aa6cc85ebf96af19191472ac63ca442c36b0427b369c3a25705188' + '0b022f4adeb16c8531e13871f6c6d256c8939defb5be0fe32d0a28711f2d933e' + '6c8fb33199d4b4fa03128278110275502266b915ca9c43ef0dc87f24a0cadf06') +prepare() { + patch -d openbabel-$pkgver -Np1 < openbabel-gcc5.patch + patch -d openbabel-$pkgver -Np1 < openbabel-swig3.patch + + cp -r openbabel-$pkgver python2-openbabel-$pkgver +} + build() { - cp -r openbabel-$pkgver python2-openbabel-$pkgver - cd $srcdir/openbabel-$pkgver - + cd "$srcdir/openbabel-$pkgver" + # Create babelconfig.h cmake . Added: openbabel-gcc5.patch =================================================================== --- openbabel-gcc5.patch (rev 0) +++ openbabel-gcc5.patch 2015-06-26 05:08:12 UTC (rev 135888) @@ -0,0 +1,12 @@ +diff -upr openbabel-2.3.2.orig/include/openbabel/shared_ptr.h openbabel-2.3.2/include/openbabel/shared_ptr.h +--- openbabel-2.3.2.orig/include/openbabel/shared_ptr.h 2011-10-12 23:24:02.000000000 +0300 ++++ openbabel-2.3.2/include/openbabel/shared_ptr.h 2015-06-26 08:00:31.909272930 +0300 +@@ -21,7 +21,7 @@ GNU General Public License for more deta + #define shared_ptr 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 + #include <tr1/memory> + #endif + using std::tr1::shared_ptr; Added: openbabel-swig3.patch =================================================================== --- openbabel-swig3.patch (rev 0) +++ openbabel-swig3.patch 2015-06-26 05:08:12 UTC (rev 135888) @@ -0,0 +1,199 @@ +From 673dd2e864ba8a51e83d20cbdcabf3772f9df9d7 Mon Sep 17 00:00:00 2001 +From: David Hall <da...@acpharis.com> +Date: Thu, 12 Feb 2015 08:50:23 -0500 +Subject: [PATCH] Swig3 patch from Fedora + +--- + scripts/openbabel-perl.i | 20 ++++++++++---------- + scripts/openbabel-python.i | 34 +++++++++++++++++----------------- + scripts/openbabel-ruby.i | 18 +++++++++--------- + 3 files changed, 36 insertions(+), 36 deletions(-) + +diff --git a/scripts/openbabel-perl.i b/scripts/openbabel-perl.i +index f3b35ed..4047859 100644 +--- a/scripts/openbabel-perl.i ++++ b/scripts/openbabel-perl.i +@@ -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 --git a/scripts/openbabel-python.i b/scripts/openbabel-python.i +index dd1d263..90741f6 100644 +--- a/scripts/openbabel-python.i ++++ b/scripts/openbabel-python.i +@@ -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 = 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> +@@ -312,7 +312,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; +@@ -323,13 +323,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 &); +@@ -348,9 +348,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; +@@ -369,8 +369,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): +@@ -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 --git a/scripts/openbabel-ruby.i b/scripts/openbabel-ruby.i +index c812383..40773d8 100644 +--- a/scripts/openbabel-ruby.i ++++ b/scripts/openbabel-ruby.i +@@ -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 &);