Dear OpenBabel developers,
the attached patch fixes building current git master (commit
75414ad4e043f16ba72ae51c7ca60f448576688d) with swig-3.0.x:

cd 
/builddir/build/BUILD/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts
&& /bin/swig -perl5 -c++ -small -O -templatereduce -naturalvar
-I/builddir/build/BUILD/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/include
-I/builddir/build/BUILD/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/include
 -o
/builddir/build/BUILD/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/perl/openbabel-perl.cpp
 -outdir
/builddir/build/BUILD/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/perl
/builddir/build/BUILD/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-perl.i
/builddir/build/BUILD/openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/scripts/openbabel-perl.i:182:
Error: Unknown SWIG preprocessor directive: CloneData (if this is a block of 
target language code, delimit it with %{ and %})
...
and so on.

Regards,
Dominik
-- 
Fedora http://fedoraproject.org/wiki/User:Rathann
RPMFusion http://rpmfusion.org
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
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 &);
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to